Docsity

Lambda Terms: Abstract Syntax Trees and Normal Forms, Assignments of Programming Languages

Partial preview of the text

Download Lambda Terms: Abstract Syntax Trees and Normal Forms and more Assignments Programming Languages in PDF only on Docsity!

Homework 3 extra-credit

Due before class Oct 10, 2008

Draw an AST (Abstract Syntax Tree) for each of the following lambda terms. Then reduce each lambda term to a normal form.

  1. (6pts) (λz. z + z) ((λx. x + 3) 5)
  2. (7pts) λy. (λx. λy. y x x) y (λx. λy. x + y)
  3. (7pts) λz. (λx. z (λz. x z)) (λx. z x) 5