Problem Set 7
Home Syllabus Lecture Slides Learning Haskell Problem Set 1 Problem Set 2 Problem Set 3 Problem Set 4 Problem Set 5 Problem Set 6 Problem Set 7 Problem Set 8 Problem Set 9

 

Due on Thursday November 15.

The Eager Functional Language

Study carefully the implementation of the direct denotational semantics for EFL (Eager Functional Language), attached below.  Then:

  1. Modify the tuple syntax so that the index is dynamic -- i.e. it can be an expression -- and define and implement a suitable semantics for the new design.
  2. Modify the implementation so as to realize the continuation semantics for EFL described in Chapter 12 (specifically, in Section 12.1).
  3. Add ISWIM-like references (via mkref, val, :=, and =R) as described in Chapter 13.
  4. Add sequencing using the syntactic sugar defined in Section 13.4, except instead of semicolon, use ::: as we did with SIL.
  5. Do Exercise 13.3 in the text, and implement your design in the EFL interpreter.

Test your implementation on a suitable set of examples.

Eager FL Interpreter.

Solutions:

Continuation Semantics for EFL.

Continuation Semantics for ISWIM.