CSC 272
Homework 5
Assigned Mar 12, due Mar 29

Modify your interpreter from Homework 3 so that it implements lazy evaluation with cached values, as described in chapter 8 of the PLAI textbook. For example, the expression

{with {x {* 3 4}}
  {with {y {/ x 0}}
    {* x x}}}
should not crash, because y is never used, and it should only multiply 3 by 4 once, re-using the same value for the second occurrence of x.

You are encouraged to do this in teams of two, both students working together on all parts of the assignment; if you do this, turn in one homework with both names on it.


Last modified: Mon Mar 22 12:35:43 EDT 2010
Stephen Bloch / sbloch@adelphi.edu