C311 Fall 1996 -- Programming Languages

Assignment 8: CPS with Registers and Stacks

Due Friday, November 8, 5:00P

Convert the CPS procedures of the last assignment to the Framed Stack form.

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. data structure representation form (for problems 1 and 3)
  2. register form
  3. framed continuation form
  4. framed stack form

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