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.