CS 3520 Homework 3   - Due September 14

This homework is due September 14, 8:00 AM.

Configuration: Even if you already installed ealier plai+handin.plt versions, install plai+handin-v4.plt (note the "-v4") as described in the course web page, then restart DrScheme. This latest version adds the PLAI Void language to DrScheme.

PLAI Advanced Change: After you install plai+handin-v4.plt, then each type-case line must contain a single result expression. Multiple expressions could be combined with begin. More likely, except when using PLAI Void, having multiple result expressions in a case line is a bug (which is why the syntax allows only one expression, now).

Exercise 3.1, PLAI Void

From the lecture slides, extract the version of interp that takes a WAE and a SubCache to produce a number. (You do not need to handle F1WAEs.) Write test cases and make sure that interp works in the PLAI Advanced langauge.

Then, change your language to PLAI Void, and change the interpreter and test cases to make them work again. The interp function should take its arguments through global variables a-wae and sc, and it should put its result into a global variable named iresult.

Hint 1: here is a useful test case (to be translated into a use of test and interp):

  {with {x 8}
    {+ {with {x 1} x}
      x}}
  => 9

Submit your code for PLAI Void using the Handin button in DrScheme.

After submitting, you can confirm your submission through the web-based status server:

https://sniar.cs.utah.edu:7980/servlets/status.ss


Last update: Wednesday, November 23rd, 2005
mflatt@cs.utah.edu