This was the final project for Elements of Software Construction (6.005).