CS 421: Programming Languages and Compilers
Midterm - July 2, 2007
Final Study Guide
Final format:
  • 140 points total (176 with xc)
  • 8 written problems, 2 worth 10 points, 6 worth 20 points
  • 2 additional extra credit written problems, worth 16 and 20 points
  • An information sheet will be included with the final; other than that, it is a closed-notes exam.
Final topics:
  1. Continuation passing style
    1. Know how to translate a program into CPS
  2. Lambda calculus
    1. know the difference between lazy and eager evaluation
    2. know how to evaluate to a normal form (one to which beta-reduction does not apply)
    3. be able to recognize non-terminating expression
  3. Church encoding
    1. know how to encode Booleans in the lambda-calculus and write simple functions over them
    2. know how to encode numbers in the lambda-calculus and write simple functions over them
  4. Combinatory logic
    1. know how to translate lambda-calculus expressions to combinatory logic
  5. Natural / transition semantics
    1. know how to write natural / transition semantics derivations for expressions
    2. know the difference between natural / transition semantics
    3. given a rule, identify whether it is a transition / natural semantics rule
  6. Context free grammars
    1. be able to prove that a grammar is ambiguous (using an example string)
    2. be able to disambiguate a simple grammar (recall the MP on this subject)
  7. DFA (a few points only)
    1. know which class of languages they recognize
    2. know which other common formalism recognizes this class.
    3. other common facts