The purpose of this problem is to develop a CEK machine for the
ISWIM*s language from problem set 6.
Encode your CEK machine in Redex.
cek function, which uses the CEK machine to
ISWIM*s programs to answers.
Formulate a conjecture about the relationship between
(solution for problem set 6, imported from 8provided.rkt) and
cek as a metafunction. Test the conjecture manually and with
You must think of the imported solution as the "weather" and your own
model as a "weatherman". As you explore your solution, keep in mind that
you can't change the weather.
If testing finds a counter-example to your conjecture, formulate the
counter-example as a failing test case and explain the failure with a
one-line comment. Then fix those parts of your solution that broke so that
the test case passes.
Task 4 Add the following exception handling mechanism
to the CEK machine for ISWIM*s:
We say that a
e = ... | (handle e x e) | (raise x e)
x in Variables
(raise x e_x) expressions raises an exception
x and exception code
(handle e_body x e_handler) expression sets up an exception
handler for exceptions with tag
x and then evaluates
e_body. If the evaluation produces a value, the value is the
result of the
handle expression. If the evaluation of
e_body raises an exception with tag
e_x, then the