The first midterm is on Friday, Sept. 28, in class at the usual classtime. **The exam is closed book/notes etc. but, you may bring to the exam a single "cheat sheet": an 8"X11" double-sided sheet of paper with whatever notes you want to bring to the exam. If you bring a cheat sheet, please write your name on it and turn it in with your midterm.** I have posted a sample midterm (and solutions to the problems on the sample) on the course web site. [The two Lisp-related questions in the sample are perhaps too focused on what we did today ... the actual midterm is likely to have questions from our earlier discussions on Lisp.] I will be in my office between 1:00 and 2:30 on Thursday. I probably won't be available on Friday morning but if you have questions, post on Piazza and I will respond as soon as I am able to. Here is a brief review: ========= BNF allows you to specify only context free conditions. Attribute grammars is an extension to include context sens. conditions. The key idea: associate specific attributes with specific non-terminals, define evaluation rules that let you obtain, for any occurrence of a non-terminal the value of each attribute associated with that non-terminal. Require certain conditions to be satisfied by these values. If a given parse tree has a node at which one or more of these conditions are not satisfied, that tree is illegal. Two kinds of attributes: Synthesized and inherited. If A is synthesized, its value generally depends only on the children of the node and their attributes. If A is inherited, the parent of the particular occurence of the non-terminal passes down a value for A. Translational semantics: Use the attribute to do translations also. The key attribute is Code, a synthesized attribute whose value for any given occurrence of say will be the code for that . Discussion of fundamental ideas underlying Lisp: its data structures, details of how s-expressions are represented, and the list *notation*; the primitive functions for manipulating s-expressions, and some discussion of how to define new functions. You should be able to write simple Lisp functions of the kind we discussed in class (in the notation we used in class; do not use the notations you may have seen in any earlier exposure to Lisp/Scheme etc). Good luck! --Neelam. p.s.: The questions on the mid-term will be both conceptual and `problem solving' type questions. The latter questions will be like the ones in the assignments; the former will have more to do with what various notations mean, why things are defined the way they are, how things work, etc.; in other words, conceptual, as I said.