COMS W4115
Programming Languages and Translators
Lecture 23: April 22, 2013
The Lambda Calculus

Outline

1. Reduction Orders

2. The Church-Rosser Theorems

3. The Y Combinator

4. Implementing Factorial using the Y Combinator

5. Church Numerals

6. Arithmetic

7. Logic

8. Other Programming Language Constructs

9. The Influence of The Lambda Calculus on Functional Languages

10. Practice Problems

  1. Evaluate (λx.((λw.λz. + w z)1)) ((λx. xx)(λx. xx))) ((λy. * y 1) (- 3 2)) using normal order evaluation and applicative order evaluation.
  2. Give an example of a code optimization transformation that has the Church-Rosser property.
  3. Evaluate FAC 2.
  4. Evaluate succ two.
  5. Evaluate add two three.
  6. Let mul be the function
  7. Evaluate mul two three.
  8. Write a lambda expression for the boolean predicate isZero and evaluate isZero one.

11. References



aho@cs.columbia.edu