CSCE 330 (Spring 2006): Lecture Log

January 10 (Tue), 2006 Syllabus, grading policy handouts (also on the web site). Presentation of course objectives. Questionnaire, with discussion. Why study principles of PLs? (Ghezzi and Jazayeri, parts of Ch.1)

January 12 (Thu), 2006 HW1 assigned, due on Thursday, January 19. Programming methodologies: waterfall, spiral, RUDE. Programming environments. Influences on PL design. The von Neumann computer organization ("architecture") and its effect on PLs. Other architectures. Symbolics, Japanese fifth generation.

January 17 (Tue), 2006 Quiz 1. Data and control abstraction. Language translation: compilation, interpretation, hybrid.

January 19 (Thu), 2006 Quiz 2. HW1 collected. HW2 assigned, due Thursday, January 26. Genealogy of PLs. Features of three main families of PLs: imperative (or procedural or assignment-based), functional or applicative, logic or declarative. Some examples.

January 24 (Tue), 2006 Quiz 3. Ariane handout given. Syntax and Semantics: Introduction. Lexical analysis and syntactic analysis.

January 26 (Thu), 2006 Quiz 4. HW1 returned. HW2 collected. HW3 assigned: exercise 3 ch.1, ex.1,2 ch.2, due Thursday, February 2, 2006. BNF. Definitions and examples: sentence, sentential form, derivation, ambiguous grammar, with examples. EBNF, syntax graphs, Pascal-S syntax graphs (in German).

January 31 (Tue), 2006 Quiz 5. Type and scope rules (static semantics), contextual languages, attribute grammars, with an example. Binding and binding times. Variables.

February 2 (Thu), 2006 Quiz 6. HW2 returned. HW3 collected. Handouts: denotational semantics, and attribute grammar example from: Sebesta, Robert. _Concepts of Programming Languages, Seventh Edition_. Pearson Addison-Wesley, 2006. (Note: the handout is from an earlier edition.) Declarations, expressions, and commands. Introduction to axiomatic, denotational, and operational semantics. Denotational semantics of a simple imperative language: handout.

February 7 (Tue), 2006 Quiz 7. Handout: example of use of denotational semantics: a simple program with a while loop: computing the factorial. Axiomatic semantics. Example of use of axiomatic semantics: a program with a while loop to compute the sum of consecutive integers.

February 9 (Thu), 2006 Quiz 8. More examples of use of axiomatic semantics. Brief review of topics for the midterm.

February 14 (Tue), 2006 Quiz 9. HW4 assigned, due Tuesday, February 21. Midterm will be on Thursday, February 16. Review of a sample midterm, posted on line. Static and dynamic scope rules. Ambiguity of the if then else grammar rules of the original Algol 60. Different notations in Extended BNF.

February 9 (Thu), 2006 Midterm 1 (MT1).

February 21 (Thu), 2006 Q10. MT1 returned. HW4 collected. Introduction to operational semantics. Introduction to Simplesem.

February 23 (Thu), 2006 Q11. Categorization of PLs by data memory use: static, stack-based, dynamic. C1 language, with Euclid's algorithm example. C2 language, with example.

February 28 (Tue), 2006 Q12. HW4 returned. Review of C2. C2' language, with example. Introduction to C3 language. Simply recursive and mutually recursive functions (examples: comb; take and skip).

March 2 (Thu), 2006 Q13. PR 1 assigned: exercise 19 in chapter 2 of [G&J] (for C2). C3 in detail. Stepping through C3 example program (recursive factorial) in simplesem.

March 14 (Tue), 2006 Q14. Block structure: C4, C4', C4''.

March 16 (Thu), 2006 Q15. PR1 collection delayed, to allow use of dropbox, opened today. PR1 is due Tuesday, March 21. Example of memory management for C4''. C5': Semidynamic arrays. Introduction to C5'': Dynamic typing, non-automatic variables, pointers.

March 21 (Tue), 2006 Q16. Pointers (C5''). The heap. Heap management, coalescing, compaction. Explicit storage deallocation. Garbace collection. The mark and sweep algorithm. Parameter passing methods. Function parameters (assigned).

March 23 (Thu), 2006 Q17. Introduction to the ML language.

March 28 (Tue), 2006 No quiz. HW5 assigned: 2.1.2, 2.2.2, 2.4.1, 2.4.3, 2.4.5, 2.4.6 [U98]. PR2 assigned: 2.1.1, 3.1.1, 3.1.2, 3.2.1 [U98]. Both due on Tuesday, April 4. The ML type system. Simple functions in ML. Lists. Patterns. Simple recursive functions: factorial and list membership, with and without patterns.

March 30 (Thu), 2006 Q18. Naive reverse. Comb. Take and skip. Recursive factorial, iterative factorial, tail recursive factorial, accumulators. Complexity of list append. Complexity of naive reverse. Fast reverse with an accumulator.

April 4 (Tue), 2006 Q19. PR3 assigned: 3.3.1, 3.3.2, 3.3.3, 3.3.8, 3.3.11 [U98]. Review of fast reverse. Naive exponentiation. Decrease and conquer exponentiation. Local declarations: the let form. Powerset programs with and without let. The length function. Simulation of imperative programs by their denotational semantics: the goto program example.

April 6 (Thu), 2006 No quiz. Midterm 2 will be on Thursday, April 13. Review of the goto example. Review of tail recursive (iterative) and non-tail recursive factorial program, with discussion of memory use. Eager (strict) and lazy evaluation: the cond example. Insertion sort. Insertion sort with comparison operator as a parameter.

April 11 (Tue), 2006 Q20. Midterm 2 will be on Thursday, April 13. PR4 (Prolog, due Tuesday, April 18) and PR5 (FP, due April 20). Students are asked to provide teams for presentations, which will take place on Thursday, April 20: send an email to me with a three-person team, and the names of three languages, in order. Requirements, an example, and the rubric to be used are linked to the course web site. Higher-order functions in ML: map, curried map (shown, with examples), filter, reduce. Prolog: introduction using SWI-Prolog and the notes on the web.

April 13 (Thu), 2006 MT2. Some Q&A at the beginning of class, in particular on how to write and run Prolog programs.

April 18 (Tue), 2006 Class meeting led by Mr. Sen Xu, Teaching Assistant. Backus videotape on the FP language and the FL programming system.

April 20 (Thu), 2006 Last class meeting of the year. Class meeting led by Mr. Sen Xu, Teaching Assistant. Oral presentation by student teams. Rubric used.