next up previous contents index
Next: Continuation passing style Up: A high level simulator Previous: Reporting bugs

The transformer

HLSIM uses program transformation to convert the user's Scheme program into a form that can be executed efficiently in the simulation environment. The cps procedure (command) performs the transformation on a Scheme source file.

Questions:

``Why bother transforming the Scheme program?''

``Can't you just run Scheme directly?''

``Why don't you just write the communications primitives to context switch''

``Why not wrap the whole program in a lambda and cps-cpnvert that'' [top level environment too rigid, opaque, and cant run code in that context].

The transformation approach addresses all of the following requirements for the simulator.

Conceptually, the gunk program is a program running on many machines. The simulator is a program running on one machine.

The transformer compiler enforced cooperative multitasking

Alternatives:

call-with-current-continuation

Interpreter -- slower.





Erik Rauch
Sat May 8 16:42:57 EDT 1999