Review of first third of lecture notes for cs440, fall, 2006 Wai Gen Yee ------------------------------------------------------------ Based on Course-Intro-Handout.pdf, date range is 8/28/06-9/27/06. Topics are: Intro to languages Intro to OCaml Recursion User-defined Types Higher order functions Automata Grammars LL Parsing LR Parsing At the highest level, the course’s objectives were stated in five bullet points: what is a language, why it’s important to have different languages, what are the features of languages, and how to implement a language. In the 1/3 of the lecture slides I reviewed, there was ample progress toward these objectives, with the most progress toward formal specification, recursion, and abstraction. With regard to the numbered items on the next page, items 4, 5, 7, 9, 10, 11, 14b, 14c were covered. Evaluation: The submitted materials are organized in folders, which are named by topic. (An additional numerical naming system would have been useful in this case, as the reviewer must match topics with the schedule in the syllabus.) Every folder generally contains a handout.pdf file as well as lecture slides. (There is an additional "4-up" pdf file that contains the slides formatted in a different way.) The handouts are useful in that they summarize the content of the corresponding lecture and include diagnostic questions that are meant to be helpful in learning the material and preparing for the exam. Every slide has a header that includes a topic, a subtopic and a date. This helps orient the student. Every slide set contains an "objective" slide, indicating what the student should learn in the lecture AND sometimes motivating its importance. When the latter is missing, it should be added if not self-evident. Slides also contain pointers to sections of the text that are relevant. Commentary about PDF: it is very good for displaying mathematical expressions, but PDF does not allow animations and WYSIWYG modifications (which, admittedly, may be a feature). The animation limitation is handled by using a sequence of nearly-identical slides. I. Intro The course begins with the instructor handing out a writeup of course objectives and a schedule. The objectives specify in a high level what is expected of the student and gives details of the particular topics to be covered and the particular dates. Contact information, workload, and grading criteria are indicated. A survey of expectations is also included in the introductory handout. II. OCaml OCaml is the "host language" of the course and its use for practical and pedagogical reasons is stated. Lots of examples of its basic sytax are covered. No comparison with other more well-known languages is done. This is perhaps not necessary and excluded by design. The "goal" of each code snippet is written in plain English. Comments: there are some errors in the handouts for the OCaml lecture. III. Recursion Recursion is well motivated by its relationship to inductive proofs (assuming students know what induction is). There is a lot of code in these slides. The explanation of the code is made more clearly with the use of "animation", occasional comments, different fonts, and some graphics. IV. User-defined types Lecture starts out with trivial examples with built-in types (e.g., lists) and moves on to structures with named contents. Common examples are used for motivation. The topics of custom type manipulation and type construction are then covered. A fine way to introduce user-defined types. V. Higher order functions Technical point in slide 3: shouldn't the definition of first class object include the ability to create them at runtime? What is the definition of a higher order function and why are they useful? VI. Automata ? - Which folder? FSA-Regexp? Why are the use of FSAs useful in parsing? How are FSAs linked to the goals in the first four slides? (Mention of Turing machine outlook on programs?) Where are the "vocabulary" defined? What is an accept state in the context of programming? What is determinism? Does something have to be said about the codability of FSAs? Interesting problem at the end. Good overall. VII. Grammars Techical point: Should "validation" be part of the first four slides? English parsing examples are used. However, perhaps English that "breaks" a grammar should also be included in the slides. I believe a little more time could be spent on explaining the importance of consistent grammars to machines understanding the intentions of programmers (i.e., expressing the desires of the programmer). It is also important to make clear the relationship that the grammar might have to the efficiency of the language. Finally, what are the good characteristics of a grammar that make validating code unambiguous? There are several examples at the end of the lecture, that, on face, look very similar to each other. These examples are hard to evaluate without the accompanying lectures. VIII. LL Parsing Motivation? IX. LR Parsing Good. Compares LL to LR and uses automata to do so. Somewhat heavy on the algebra. Where is the code? Overall, very good slides. Pretty comprehensive, full of examples. CS440 MP review: 1. according to course syllabus, there should be 7 MPs. I only have four of them, MP 1-3 and MP 5. 2. I really like the "Objective and Background" part of each MP, it clearly describes the goal of each MP. MP 1 is an introduction on OCaml, MP 2 is on higher order functions, MP 3 is on type inferencer, and MP 5 is on prolog. For the MPs I have, they are well-designed. I have no complaint. 3. It is not clear to me: is this course a compiler course? Does the department offer any course in compiler? 4. One more thing, which is not directly related to my assignment: does the course have any required textbook? I checked the course from www.cs.iit.edu, it lists some testbook. However, the course website clearly states that "no textbook for this couse.... use an online book as a tutorial for the OCaml lanaguage ....". It will be better to make them consistent with each other.