CSCE 330 (Fall 2009): Lecture Log

August 21 (Fri), 2009 Syllabus, grading policy handouts (also on the web site). Textbooks. Why study principles of PLs? What makes a PL successful? Two perspectives: [Scott] and [T]. HW1 assigned, due date TBD. (Tucker and Noonan [T], parts of Ch.1)

August 24 (Mon), 2009 HW2 assigned. HW1 and HW2 due date is Friday, August 28, 2009. Programming methodologies: waterfall, spiral, RUDE. Programming environments. Software tools, IDEs, Emacs. Examples of Unix software tools. The Unix shell as a glue language or simple scripting language.

August 26 (Wed), 2009 Problems with projector: we moved to 2A15. Discussion of HW1 (based on earlier student questions). Syntax. Sections 2.1.1-2.1.3 [T]: introduction, BNF grammars, derivations, parse trees. HW3 will include most exercises from Ch.2.

August 28 (Fri), 2009 Q1. HW1 and HW2 collected. HW3 on syntax assigned, due 2009-09-02 (Wednesday): 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 Homework 4 on syntax assigned, due 2009-09-04 (Friday): Exercises 2.12, 2.13, 2.14, 2.16, 2.18, 2.19, 2.20 (for the parse tree of 2.5(a) only) Syntax. Sections 2.1.4, 2.1.5: Associativity and Precendence, Ambiguity (including dangling else).

August 31 (Mon), 2009 HW1 and HW2 returned. All students who had done the homework collected it back. Grades are posted on blackboard---students should check them! Paper handed out will be the subject of a quiz: Jean-Marc Jezequel and Bertand Mayer. "Design by Contract: The Lessons of Ariane." _Computer_, January 1997, 129-130. Discussion of HW1, includind a review of intepretation, compilation, hybrid translation, and the von Neumann architecture.

September 2 (Wed), 2009 Q2 with discussion. HW3 collected. HW4 due date is moved to Wednesday, September 9---the first class period after Labor Day. Discussion of exercise 2.11 (in HW3). More on dangling else and its solution in various languages. EBNF, with some examples. Syntax diagrams.

September 4 (Fri), 2009 The compilation process. Lexical analysis and lexers (scanners). Abstract syntax grammars and abstract syntax trees. Chapter 2 (almost!) concluded.

September 9 (Wed), 2009 HW4 collected. Handout with the grammar of Pascal-S described using Syntax diagrams, in German, from: Nicklaus Wirth. _Systematisches Programmieren_. Teubner, 1978. Ch.3 (Lexical and Syntactic Analysis), Section 3.1 (Chomsky Hierarchy).

September 11 (Fri), 2009 Ch.3 (Lexical and Syntactic Analysis), Section 3.2 (Lexical Analysis). Some extra slides on JLex.

September 14 (Mon), 2009 Guest lecture by Dr. Jeffrey Mark Siskind, Associate Professor at Purdue University: An introduction to functional programming using Peano arithmetic.

September 16 (Wed), 2009 HW3 and HW4 returned. Correction of HW3 and HW4.

September 18 (Fri), 2009 Q4. Parsing: MicroEnglish Example. Recursive descent parsing: how to build a simple recursive descent parser---slides only. Ch.4 [T] (Names): Syntactic Issues, Variables, Scope, Symbol Tables.

September 21 (Mon), 2009 Reminder: Midterm on Friday! Ch.4 [T] (Names) concluded: Scope, Symbol Tables, Resolving References, Dynamic Scoping, Visibility, Overloading, Lifetime.

September 23 (Wed), 2009 Reminder: Midterm on Friday! Ch.5 [T]: Types started: Type Errors, Static and Dynamic Typing. Some slides on attribute grammars, a way to describe contextual languages, with an example of static type checking.

September 25 (Fri), 2009 MT1.

September 28 (Mon), 2009 MT1 returned. Correction of MT1. Types, up to pointers.

September 30 (Wed), 2009 Types (chapter 5, [T]) concluded.

October 2 (Fri), 2009 Brief discussion related to last Wednesday's career fair. Type Systems (ch.6 [T]) in full.

October 5 (Mon), 2009 Handouts on denotational semantics passed, but not yet used. Semantics (Ch.7 [T]) through 7.5.

October 7 (Wed), 2009 Backus tape on FP. (Jingsong Wang coordinates)

October 12 (Wed), 2009 Denotational semantics of a simple language with while loops (handout used).

October 14 (Wed), 2009 Q6 with much discussion. Denotational semantics, with the example of a program with a while loop.

October 16 (Fri), 2009 Q7 with much discussion. Homework 5 on axiomatic semantics, assigned 2009-10-16, due 2009-10-21 (Wednesday): Exercise 18.2 [T]. Please note that there is an error in the program fragment at the beginning of the exercise, and replace "n - - 1" with "n - 1". Axiomatic semantics.

October 19 (Mon), 2009 Program Correctness. Axiomatic Semantics (18.1 [T]): Hoare's method, preconditions, postconditions, loop invariants. Formal Method Tools: JML (18.2 [T]).

October 21 (Wed), 2009 HW5 collected. Discussion of HW5. Chapter 9 [T], Functions, through parts of Section 9.4.

October 23 (Fri), 2009 Handout from Ghezzi and Jazayeri (Sections 2.6 and 2.7) passed out, with publisher's permission: ******Friday, June 26, 2009***************************** You may reproduce chapter 2 and distribute copies to your class. As long as you don't charge your students for the copies, and as long as you use the material for educational purposes, and you don't copy more than one or two chapters, everything is legal. Margaret Barrett Senior Publishers Representative John Wiley & Sons mbarrett@wiley.com ******************************************************* Review of the operational approach to semantics. An abstract semantic processor: Simplesem. Run-time structure: introduction to static, stack-based, and dynamic languages. C1: a language with very simple statements. C2: adding simple routines.

October 26 (Mon), 2009 Q8. HW5 returned. PR1 assigned: Simplesem with static and stack-based languages, due Wednesday, November 4, 2009. Examples of use of Simplesem with C1. Early Fortran examples; early Fortran is similar to C2': it allows for separate compilation of units.

October 28 (Wed), 2009 Linking directives in C2'. Stack-dynamic languages. Introduction to C3. Example of direct recursion: comb (in ML). Example of indirect (mutual) recursion: take and skip (in ML).

October 30 (Fri), 2009 Stack-dynamic languages (C3) completed.

November 2 (Mon), 2009 Q9. Discussion of PR1. Block languages: C4', C4''.

November 4 (Wed), 2009 Q10. PR1 collected. C5': dynamic arrays. C5'': pointers. Semantics (lifetime) of dynamic variables. The heap. Heap management: free list. Explicit storage deallocation. Garbage collection. Handout (Sections 2.6 and 2.7 [G&J]) concluded.

November 6 (Fri), 2009 PR2 on Backus's fp assigned, due Wednesday, November 11. Backus's fp language.

November 9 (Mon), 2009 Q10. Examples of programs in Backus's fp.

November 11 (Wed), 2009 PR2 collected. Introduction to functional programming: the lambda calculus (14.1 [T]). The Scheme language: 14.2 through most of 14.2.6 [T]

November 13 (Fri), 2009 PR3 assigned: (1) install either hugs or ghc to your computer; (2) do all exercises at the end of chapter 2 [H], due 2009-11-20 The Scheme language, completed (14.2 through 14.2.8).

November 16 (Mon), 2009 Haskell introduction with examples from Ch.1 (and all exercises from Ch.1 done in class), most using hugs.

November 18 (Wed), 2009 PR4 assigned: Exercises 1,2,4,5,6 from Ch.4 [H] due Monday, November 30. Chapters 2 and 3 [H].

November 20 (Fri), 2009 Chapter 3 (concluded), chapter 4 (through section 4.5, lambda expressions)

November 23 (Mon), 2009 PR3 returned (at end of class; several students do not collect it.) PR5 assigned: Exercises 6.4 and 6.5 [H], due Friday, December 4. PR6 assigned: Prolog program, due Friday, December 4. Introduction to Prolog (see slides and Ch. 15 [T] through most of 15.2.1. Chapter 4 [H] completed.

November 30 (Mon), 2009 PR3 returned. PR4 collected. Chapter 5 [H]: List comprehensions. Literate programming in Haskell. The Caesar cipher example (Section 5.5 [H]), almost completed.

December 2 (Mon), 2009 PR4 returned. The Caesar cipher example (Section 5.5 [H]), completed. Chapter 6 [H]: Recursive Functions.