CS217 Assignment 4, Due Monday, April 24, 2000

Submit assgn4.scm by hsp.
The file must contain at least your name and a comment before each problem, indicating its number and other info you feel is required.

Environment Passing Interpreters

Start with interp3-1.scm which Extending definitions of expression, primitive, parse-expression and the grammar as necessary, do
  1. Ex 3.2.3, p70: Add the primitive minus
  2. Ex 3.2.4, p70: Add the primitive print
  3. Ex 3.2.5, p70: Add list primitives cons, car, cdr, list, and a variable emptylist with value ().
  4. Ex 3.3.1, p72: Add and test the if form.
  5. Ex 3.3.2, p72: Add numeric equality, zero-testing and order predicates equal?, zero?, greater? and less?.
  6. Ex 3.3.3, p72: Add the primitive null?.
  7. Ex 3.4.1, p75: Add and test the let form (Fig 3.2, p74).
  8. Ex 3.5.1, p80: Add and test the proc form (Fig 3.3, p 78).

assgn4.scm must be loadable into Scheme and procedures must pass tests of correctness.