CS7400 Machine Problem 5: Effects and the Store

Out: Thursday, 10/15/09

Due: Thursday, 10/22/09

I had written a longer problem set, but we didn't get far enough in class. So here is the first half. The second half will appear next week.

  1. [10 points] Implement the language of exercise 4.22 in EOPL3. This is similar to the language discussed in section 5.5.2 of the notes. Interpret the non-terminal Expression in the grammar of exercise 4.22 to be the expressions of MUTABLE-PAIRS. Use the store implementation of interps/mutable-pairs as well.
  2. [5 points] Replace the "stupid" implementation of the store in the preceding problem with an implementation in which the store is represented as a Scheme vector mutated with vector-set!. Your interpreter should run unaltered, except for changing (require "store.scm") to (require "store-using-vector.scm") (or whatever).

As usual, turn in a single set of modules containing your solution to both parts of the problem.

As before, you do not need to write any specifications; we'll get to that later in the term.

Last modified: Thu Oct 15 10:52:40 Eastern Daylight Time 2009