Meta-Circular Interpreter Sample Code

Here is some sample code that you may use as a starting point for Homework 3. You are also welcom (and encouraged) to use your own solutions to Homework 2. If you do, you may borrow anything you want from these samples. You should load these files into scheme in the order that they are listed below.

This code contains special-if and derived-and. They are done a little differently from how they were done in section. As well, a system is set up for adding new special forms and derived expressions.

Note, you when you add envronments you will need to modify all of the special-form code to be passed the envrionment. Basically, and function that uses my-eval (such as the special-form functions) need to be passed the current environment. Note also that the source-to-source transformations (the derived expressions) do not need to have the environment passed in to them because they just transform the code, they do not ever call my-eval.

[back]