Topics for Test on EOPL Chapters 1 to 2.2 * Reminders This test is closed book and notes. If you need more space, use the back of a page. Note when you do that on the front. This test is timed. We will not grade your test if you try to take more than the time allowed. Therefore, before you begin, please take a moment to look over the entire test so that you can budget your time. For programs, indentation is important to us for ``clarity'' points; if your code is sloppy or hard to read, you will lose points. We will take off a small amount if you do not give TYPE comments for recursive helping procedures. However, you do not have to write such comments for procedures for which the type is stated in the problem. Correct syntax also matters. Check your code over for syntax errors. You will lose points if your code has syntax errors. TOPICS Topics marked + below are more important than topics marked - below. In general, things that are more like the homework will be more important. * Language design, goals - Means of computation, combination, and abstraction. - Special forms - if expressions * Chapter 1 ** Expressions (1.1) + syntax and semantics of a language - variable terminology: "denotes", "is bound to", "is the binding of", expressed values, denoted values, keywords vs. identifiers vs. reserved words - procedure terminology: procedure (Scheme), function (math), application, combination operator, operand, subexpressions, arguments, actual parameters, actuals, parameters + regularity + definitions - read-eval-print loop ** data types (1.2) - how to describe abstract data types literals, special forms + built-in types in Scheme, especially lists, numbers, and symbols - (other types, e.g., strings, are less important) - (you don't need to know all the details of operations we haven't used in homework) + write Scheme code to: + construct and lists and improper lists + use of quote, cons, and list primitives (and when to use each) + extract parts of lists and improper lists + dot-notation + read dot-notation - translate back and forth between dot and list notation + static vs. dynamic type checking + read and write our type notation (see $PUB/docs/type-notation.txt) ** procedures (1.3) - what lambda does - first-class values ++ know how to curry a procedure, or uncurry a curried procedure + explain what a curried procedure would be used for + be able to write a variable arity procedure * Chapter 2 ** Inductive specifications (2.1) - write an inductive specification of a set + base cases, inductive cases + use a grammar to describe a language or data ++ given a grammar, say whether a sentence is in the language + BNF notation ** Deriving programs from grammars (2.2) - write grammatical derivations of sentences from a grammar +++ how grammar relates to the outline of a recursive procedure ++ write recursive programs over flat lists ++ write recursive programs over s-lists and symbol-expressions ++ write recursive programs over grammars Note that tail recursion will not be tested on this test, but will be on the next one.