* Topics for Midterm 2 ** Lambda calculus encodings ** Environment-based interpreter ** Static and Dynamic scoping ** Recursive definitions ** Mutation and store passing ** Call-by-name and Call-by-need ** Call-by-reference * What won't be on the exam ** Anything covered after Friday, March 5th ** complexities of Scheme/ML syntax ** complexities of ML module system For this exam, you will need to be able to read and write programs in O'Caml and in the language implemented in chapter 3 of EOPL. Minor errors in syntax (such as punctuation) will not be deducted as long as your answers are unambiguous. The exam may ask you to: * Write programs in the untyped lambda calculus using the encodings for let, booleans, and numbers * Devise new lambda-calculus encodings of simple (non-recursive) expression forms. * Write programs in a language with dynamic scoping. * Compare the values of expressions evaluated with static/dynamic scoping. * Complete the ML implementation of dynamic scoping for let expressions. * Complete an ML implementation of a variant of letrec. * Complete a store-passing interpreter for a new expression form. * Write programs with different forms of mutation (ML-style, Scheme-style, C-style etc.) * Compare the values of expressions evaluated with Call-by-value/name/need/reference.