# CS 6520 Homework 9

### Exercise 9.1

The partial function evale is defined on page 85 of Felleisen.

Define the partial function eval'e as
• eval'e(M) = b   if   M =e b
• eval'e(M) = closure   if   M =e x . N
• eval'e(M) = err   if   M =e error

where err is simply a token, like closure.

Show that evale and eval'e generate different observational equivalence relations.

### Exercise 9.2

The partial function evalh is defined on page 97 of Felleisen.

Define the partial function eval'h as
• eval'h(M) = b   if   M =h b
• eval'h(M) = closure   if   M =h x . N
• eval'h(M) = err   if   M =h (error b)

where err is simply a token, like closure.

Prove that evalh and eval'h generate the same observational equivalence relation.

### Exercise 9.3

The change to eval in exercises 9.1 and 9.2 is essentially the same.

In one sentence, describe the difference between Error ISWIM and Handler ISWIM that makes the same change have a different effect.

 Last update: Thursday, February 10th, 2000mflatt@cs.utah.edu