CS 6520 Homework 8

Exercise 8.1

Complete a Scheme implementation of the CC machine, staring with the given incomplete implementation.

For the purposes of this exercise, the only primitive operations are +, -, and = (which are all binary operators). The = operator returns x . y . x 0 when its arguments are equal, and x . y . y 0 otherwise.

Starting with the given incomplete implementation, you should only complete/modify the next-state procedure. Please leave the rest of the file intact, but you may add extra test examples if you want.

For your convenience, the DrScheme v200 programming environment is installed on the cs filesystem at
  /home/mflatt/packages/plt-linux/bin/drscheme
and
  /home/mflatt/packages/plt-solaris/bin/drscheme
You may prefer the non-GUI version at
  /home/mflatt/packages/plt-<platform>/bin/mzscheme
which prints faster, but provides less debugging help.

For other platforms (notably Windows), you can download and install DrScheme/MzScheme v200 from
  download.plt-scheme.org
Installation is easy, and requires about 25 MB of disk space.

Important!
When using DrScheme for the first time, set the language to either of the options in PLT in the "Choose Language" dialog. The dialog should appear automatically the first time you run DrScheme.
Also Important!
When setting the language, click the Show Details button and set the output style to Quasiquote.

Exercise 8.2

Convert your Scheme implementation of the CC machine to an SCC machine.

Exercise 8.3

Convert your Scheme implementation of the SCC machine to a CK machine.

Exercise 8.4

Convert your Scheme implementation of the CK machine to a CEK machine.


Hand-in procedure: Send a mail message containing your code to mflatt@cs.utah.edu. Your message should encapsulate four files: cc.scm, scc.scm, ck.scm, and cek.scm.

Mime-encoded enclosures are preferred, but any reasonable encoding/enclosing mechanism is fine, including plain text with a clear separator between the files.


Last update: Thursday, January 31st, 2002
mflatt@cs.utah.edu