/IMPSemantics

Implementation of the denotational semantics of IMP using Haskell – arithmetic expressions, boolean expressions, and basic commands.

Primary LanguageHaskell

IMP Extensions Using Haskell

This assignment focused on implementing the denotational semantics of IMP using Haskell (as part of CM20218: Foundations of Computation II).

The full specification is included in the PDF. In summary this included:

  • Elaborating on arithmetic expressions and the construction of pre-increment/pre-decrement operators.
  • Implementing boolean expressions, with an emphasis on short-circuit and eager evaluation.
  • Interpretation and implementation of the commands for typical control statements: skip, branching (if-then-else), and looping (while-do).

Graded as a strong first.