Evaluation with the CES Machine (aka. Modern SECD Machnine:
Implement an evaluator for the extended lambda calculus!
This involves the following steps:
Turning (extended) lambda terms into De Bruijn notation
Compiling De Bruijn terms into CES machine code (see attached document)
Writing the CES machine: its step function and running code on the machine. (You may want a debugging mode!)
Writing five example programs (including some recursive ones! e.g factorial) in the extended lambda calculus.
You are expected to work with the lambda calculus extended by:
Built in Booleans: True and False together with an conditional construct (if ... then ... else ...)
Built in basic arithmetic: addition, multiplication, and comparison of integers.