CS 6520 Homework 18

Exercise 18.1

Let o = [a = (x)x,  b = (y)y.a,  c = (x)[d = (y)x.b]].

Show the reduction of o.c.d.

Exercise 18.2

Let o = [a = (x)(x.a:=(y)(y.a:=(z)[ ]))].

Show the reduction of o.a.a.

Exercise 18.3

Develop an encoding of true and false as objects with three methods: not, if, and ifnot. The if and ifnot methods should each return a binary function, relying our syntactic sugar for functions and application.

The encoding must obey the following laws:

Important: Remember that true and false will just be abbreviations, so thay cannot be defined recursively, as in true = [not = (x)false,  ...] and false = [not = (x)true,  ...].


Last update: Tuesday, March 28th, 2000
mflatt@cs.utah.edu