Plt1213 1

(C) Ralf Lämmel, Andrei Varanovich, University of Koblenz Landau



Please choose one of the following tasks:

  1. Add support for boolean variables in a While language. Implement the semantics of the following boolean operators: and, not, eq.
  2. Change the big-step semantics of the While language to support do-while loops.
  3. Implement procedures from the lecture (no variable declarations, dynamic scope for variables and procedures).
  4. Implement the Set language, which supports enumerated sets and the following operations:
    • union of set A and set B: giving a set containing elements either in A or in B.
    • intersection of A and B: giving a set containing elements both in A and in B.
    • difference of A and B: giving a set containing elements in A and not in B.

For example, giving a two input sets,


should return [1,2,3].

Provide test cases with your extended interpreter.
At least 3 test cases should be provided.