CS 6520 Homework 10
Exercise 10.1
Define an extension of State ISWIM where
let
and
begin
are normal expressions with their own reduction rules, rather than abbreviations.
Be sure to include revised grammars for
M
,
C
, and
E
, plus new one-step reduction rules.
Exercise 10.2
Show the evaluation of
(
let
x
=
0
f
=
(
y
. (
begin
(
:=
y
(
*
y
y
)) (
:=
x
(
+
x
y
))))
in
(
begin
(
f
2) (
f
7)
x
))
Use your
let
and
begin
reduction rules, and apply the garbage collection reduction rule as often as possible.
Last update: Wednesday, February 16th, 2000
mflatt@cs.utah.edu