CSCI 6220
Fall 2010
Section 001
Exam review 1

This will be an open book exam. It will cover chapters 3-7 and 9-10 of Thompson. You should be prepared to do the following kinds of things.

  1. Perform β-reductions on terms of λ-calculus.

  2. Write functions that work on lists and integers using correct Haskell syntax.

  3. Be able to carry out simple evaluations of Haskell expressions by hand.

  4. Know basic Haskell operators and functions, such as :, ++, and length. Be able to use lists, including list comprehensions.

  5. Understand curried and higher order functions, including their types. Understand fundamental higher order functions, including map, foldl and foldr.

Sample problems are the following from Thompson. 3.9, 4.1, 4.5, 5.6, 5.10, 5.11, 7.2, 7.5, 7.7, 7.20, 9.1, 9.2, 9.4, 9.5, 9.11, 9.16, 10.4, 10.5, 10.9.

For λ-calculus, here are some sample problems.

  1. Suppose that fix = λ f.(λ x.f(x x))(λ x.f(x x)). Perform a single β reduction on expression fix fix. What do you get?

  2. Without performing further β-reductions, can you argue that fix fix = fix(fix fix)? How?

  3. Suppose that I = λ x.x, K = λ xy.x and S = λ xyz. x z (y z). It is known that every term of λ-calculus that has no free variables is equivalent to a term that is formed from only S, K and applications. (No λs are needed.) Show that I is the same as SKK by performing β-reductions (and possibly α-conversions) on SKK so that you reach I.