Home
Schedule
Software
Mailing List

Boolean Machine

Due: Tuesday Jan 28, 00:00AM

I encourage you to do this and other assignments in pairs. Programming and theorem proving in Coq requires a lot of patience and a good partner will make the course easier.

Chapter 2.1 of CPDT presents a simple language of arithmetic expressions, a stack machine that evaluates arithmetic expressions, and a verified compiler from arithmetic expressions to the stack machine. Your task is to do the same for a language of boolean expressions.

The same correctness theorem that holds for the language in the book must hold for your language too:

Lemma compile_correct : 
  forall e,
    progDenote (compile e) nil = Some (expDenote e :: nil).

In fact, you shouldn’t need to change any of the lemmas or the proof scripts.