C311 Spring 1997 -- Programming Languages

C311 Spring 1997 Assignment 8: CPS with Registers and Stacks

Due Thursday March 27, 11:59pm

Convert the CPS procedures duplicate, union, memq and snoc of the last assignment to the Framed Stack form. You may want to start with a8start.ss.

The difficult part will be debugging. Here is the recommended debugging cycle for this assignment:

  1. Start with a correctly transformed set of procedures.
  2. Make one (and only one) transformation to the procedures.
  3. Test the transformed procedures. If some of them don't work, go to step 1. Do not try to find out why it doesn't work. Do not try to debug. It will hurt your brain.
  4. Save the set of procedures. Use a new name. Don't destroy your old set. Now go to step 1 for the next transformation.

The transformations you'll have to make are:

  1. register form
  2. framed continuation form
  3. framed stack form

You may want to take a look at last semester's solution.

Submission

As before, but refer to "handin 8".

Credits

The suggested debugging cycle is the one recommended by Erik Hilsdale.
Gustavo Gomez / ggomezes@cs.indiana.edu
Last modified: Thu Mar 13 11:07:09 EST 1997