Your second mini-project is going to be a paper and pencil project involving defining and verifying the operational and denotational semantics of a language quite similar to IMP. The syntax of this language is identical to IMP with the only changes occurring in the definition of c. Specifically:

c :== X := a | c0;c1 | if b then c0 else c1 | repeat c until b

We have a post-test loop (repeat-until) rather than a pre-test loop (while-do). The semantic definition can be done in a manner quite similar to the original IMP definition. Your task is to modify the IMP operational and denotational semantic definitions to provide a definition for this new language. Specifically, you are to do the following:

  1. Define an operational semantics in the form of rules to generate transitions of the form <c,sigma> -> sigma. Note that the definitions associated with a and b do not change.
  2. Define a denotational semantics in which each commend c is denoted by a partial function C[[c]] from Sigma to Sigma (states to state). You must find the fixed point for the repeat loop should it have a definition similar to while. Note that the definitions associated with a and b again do not change.
  3. Sketch the proof of the equivalence of the operational and denotational definitions. When I say sketch, I mean do not redo proofs for a and b. Instead focus on the new elements of c. Reuse what you can!
  4. Define the denotation of the while loop in terms of the repeat loop. Specifically, define a form that implements a while loop using a repeat. Show that your two semantic definitions for the same construct are equivalent.

Most of this problem is taken from Exercise 5.9 from your text. It is identical up to Part 4. Reuse as much of what we have already done as possible. However, you must document your work in a manner similar to Winskel. Do not copy Winskel, but write your documentation in a manner that convinces me you understand what you have done.

Due: 11/17/08