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 programming envionrment is installed on the cs filesystem at
  /home/mflatt/packages/plt/bin/drscheme
(That's a script that will select a Solaris, Linux, or FreeBSD binary, as appropriate.) You may prefer the non-GUI version at
  /home/mflatt/packages/plt/bin/mzscheme
which prints faster, but provides even less debugging help.

For other platforms (notably Windows), you can download and install DrScheme/MzScheme from
  http://www.cs.rice.edu/CS/PLT/packages/drscheme/
Installation is easy, and requires about 25 MB of disk space.

Important!
When using DrScheme for the first time, set the language to Full Scheme via the "Choose Language" menu item. The provided code will not run in Beginner Student, which is the default language.
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: Wednesday, February 28th, 2001
mflatt@cs.utah.edu