CSCE 330 (Fall 2011): Lecture Log

August 18 (Thu), 2011 Syllabus, grading policy handouts (also on the web site). Textbook. Why study principles of PLs? HW1 assigned, due date Friday, August 27. What makes a PL successful? Two perspectives: [S] and [T]. Programming methodologies: waterfall, spiral, RUDE. Software tools, IDEs, Emacs. Examples of Unix software tools. The Unix shell as a glue language or simple scripting language.

August 23 (Tue), 2011 Software tools, IDEs, Emacs. Examples of Unix software tools. The Unix shell as a glue language or simple scripting language. Data and control abstraction. Von Neumann architecture. Harvard architecture. Computers for functional languages (Symbolics, Lisp machine, Mago reduction machine) and for logic languages (PIM from the Japanese Fifth Generation Computer Programme). Translation, compilation, interpretation. The three major language families.

August 25 (Thu), 2011 Q1. Translation, compilation, interpretation. The three major language families. Syntax vs. semantics. Syntax. The Chomsky hierarchy. Regular languages.

August 30 (Tue), 2011 HW1 collected. HW2 assigned, due Thursday, September 8, 2011: Exercises 2.1, 2.2, 2.3 (the grammar in figure 2.7 is EBNF, not BNF), 2.4 (same comment as for 2.3), 2.5(a), 2.6(a), 2.7(a), 2.8(a), 2.9(a), 2.10(a), 2.11, 2,12 (all from [T]). (See homework link in course for text of exercises.) Regular, context-sensitive, and general grammars (briefly). Context-free (BNF) grammars, derivations, parse trees. Associativity and precedence (started).

September 1 (Thu), 2011 Q2. Associativity and precedence. Ambiguity.

September 6 (Tue), 2011 Q&A on HW2 problems, with emphasis on ambiguity (or lack thereof). Syntax of Pascal-S (in German): syntax diagrams. Syntax of CLite. Slides on syntax concluded.

September 8 (Thu), 2011 HW2 collected. Q3 assigned. Declarations, expressions, and commands. Binding. Variables. Static vs. dynamic scoping.

September 13 (Tue), 2011 HW2 returned. Routines (functions and procedures), declaration, definition, and mutual recursion with the take and skip example in ML and a brief description of recursive descent parsers for EBNF grammars, which are mutually recursive. Overloading and aliasing. Brief introduction to the three techniques for describing semantics of PLs: axiomatic, denotational, and operational. The SIMPLESEM machine: Harvard (two stores/memories: data and code, instruction pointer), the SIMPLESEM machine cycle: 1. Get the current instruction (C[ip]), 2. increment instruction pointer, 3. execute instruction.

September 15 (Thu), 2011 Q4. PR1 assigned, due 2011-09-27. SIMPLESEM instructions: set, jump, jumpt. Language families according to run-time memory usage: static, stack-based, dynamic. Static languages: C1 and C2.

September 20 (Tue), 2011 Q5. Examples of use of Simplesem with C1 (Euclid's algorithm for GCD aka MCD). Early Fortran examples; early Fortran is similar to C2': it allows for separate compilation of units. Linking directives in C2'. Stack-dynamic languages. Introduction to C3.

September 22 (Thu), 2011 PR1 due date changed to Thursday 2011-09-29. Midterm is likely to be either Tuesday, October 4, or Thursday, October 6. Review of Q5 in detail. More on C3.

September 27 (Tue), 2011 C3. Use the program on Figure 2.19 (p.82) [G&J] (in the document on blackboard) and not other versions for PR1. Block structure: C4', C4''.

September 29 (Thu), 2011 PR1 collected. Midterm will be either Tuesday, October 4, or Thursday, October 6. Dynamic languages (C5): dynamic typing and dynamic scoping, as in APL. Parameter passing: by value, value-result, reference (in detail), and by name (briefly).

October 4 (Tue), 2011 Q6. Midterm will be on Thursday, October 6. Review session with exercises on syntax and operational semantics.

October 6 (Thu), 2011 Midterm 1 (MT1).

October 11 (Tue), 2011 MT1 corrected. Axiomatic semantics---partially done, using slides from [T], ch.18 and Ch.9 of [G&J, 1987], posted on blackboard.

October 13 (Thu), 2011 MT1 returned. More axiomatic semantics.

October 18 (Tue), 2011 Videotape: John Backus on the FP/FL System. (A link to the video is on the course website, under "Lecture Notes.")

October 25 (Tue), 2011 PR2 on FP assigned, due on Tuesday, November 1, 2011. Q7. FP examples, including use of Carter Bays's FP interpreter.

October 27 (Thu), 2011 More FP examples, including matrix multiplication from Backus's 1977 Turing Award presentation: {mm ((& &ip) @ (& distl) @ distr @ [1, trans @2]}.

November 1 (Tue), 2011 PR2 collected. Discussion of PR2. Denotational semantics of a simple imperative language: handouts. (Handouts are on web site for the course. Language is from Ch. 9 of [G&J, 1987], which is available on blackboard.)

November 3 (Thu), 2011 HW3 assigned: exercises 1-5 of Ch.1 [H}. PR2 returned. More comments on PR2. Haskell: introduction. Students are asked to install WinHugs or GHCI on their computers.

November 8 (Tue), 2011 PR1 returned. PR3 assigned: do all exercises from Ch. 4 [H], due Tuesday, 2011-11-15. Discussion of Q8 on denotational semantics. Q9. Ch.2 [H] completed.

November 10 (Thu), 2011 HW4 assigned: all exercises of Ch.3 [H], due Tuesday, 2011-11-15. PR3 due date changed to Thursday, 2011-11-17. HW3 collected. Discussion of Q9. Ch.3 [H] completed.

November 15 (Tue), 2011 HW3 returned. HW4 collected. Ch. 4 [H], completed. Some discussion of student presentations.

November 17 (Thu), 2011 PR3 collected. PR4 assigned: exercises 3, 4, and 7 Ch.5 [H], due Tuesday, November 22. List comprehensions (Ch. 5 [H]). The Caesar cypher example.

November 22 (Tue), 2011 PR4 collected. PR5 assigned: exercises 2, 4, and 5 CH. 6 [H]. Ch. 6 (Recursive functions) completed. Ch. 7 (Higher-order functions) started.

November 29 (Tue), 2011 PR4 returned. PR5 collected. The string transmitter program (section 7.6 [H]). Video: The Countdown Problem, by Gregory Hutton.