CS 3520 Homework 4   - Due September 26

The following exercises will be graded primarily on completeness and correctness. Hand in a single, modified version of this interpreter that combines the changes for both of the exercises.

Exercise 4.1, Extending the interpreter: new primitive

Extend the interpreter from EoPL 3.1 (page 71) with a new primitive, abs, which takes a single argument.

Start with this interpreter. Remember to modify the grammar to add the new primitive.

Exercise 4.2, Extending the interpreter: new form

Follow the instructions in EoPL 3.3 (page 80) to add an if form to your interpreter. (The book does not show you exactly how to extend the interpreter, but it provides you with the crucial pieces.)

Provide test cases to demonstrate that your abs and if extensions both work properly.


Last update: Thursday, September 21st, 2000
mflatt@cs.utah.edu