| Course week | ISO week | Date | Subject | Materials | |
|---|---|---|---|---|---|
| 1 | 35 | Mon 24 Aug | F# as a meta language, abstract syntax, a simple expression
language,
direct interpretation of expressions in F# and C#, environments.
In the lecture I mentioned Josh Bloch: Effective Java, 2nd edition (2008), especially Item 15: Minimize Mutability. | lecture01.pdf
and exercise01.pdf and appendix.fs and sem1.fs and PLCSD chapter 1-2 and PLCSD Appendix A | |
| 2 | 36 | Mon 31 Aug | Interpreters and compilers, static checking of programs, postfix (reverse Polish) notation, a simple abstract machine with stack, Postscript. Concrete syntax, overview of lexing and parsing: from linear text to abstract syntax tree. | lecture02.pdf
and exercise02.pdf and examples02.zip and PLCSD chapter 2 and Mogensen sections 2.1-2.5 | |
| 3 | 37 | Mon 7 Sep | Lexing (scanning) and parsing using fslex and fsyacc. Scanner and parser specifications for the expression language and for micro-SQL. Lexer implementation: from regular expression to nondeterministic and deterministic finite automata. Parser implementation: From grammars to parsers; LR and LL grammars; bottom-up and top-down (recursive descent) parsers. | lecture03.pdf
and Mogensen sections 2.6-2.9 except 2.6.1, 2.8.2 and Mogensen sections 3.1-3.6 and PLCSD chapter 3 and exercise03.pdf and expr.zip and usql.zip | |
| 4 | 38 | Mon 14 Sep | Interpretation of a first-order functional language: arithmetic and logical expressions, non-assignable variables, if-then-else expressions, function calls (without explicit evaluation stack), and recursive closures. Explicit monomorphic types; type rules; monomorphic type checking. |
lecture04.pdf
and Mogensen sections 3.11, 3.16 and PLCSD chapter 4 and exercise04.pdf and fun1.zip and typedfun.zip | |
| 5 | 39 | Mon 21 Sep | Higher-order functions in F# and C# and Java. Google MapReduce. |
lecture05.pdf
and PLCSD chapter 5 sections 5.1-5.5 and Google MapReduce paper and exercise05.pdf | |
| 6 | 40 | Mon 28 Sep | A higher-order functional language. Parametric polymorphic types. Polymorphic type inference. Parametric polymorphism (generics) in Java and C#. |
lecture06.pdf
and PLCSD chapter 6 and fun2.zip and exercise06.pdf | |
| 7 | 41 | Mon 5 Oct | Modelling an imperative language: assignable variables, arithmetic and logical expressions, variable declarations, assignment, loops, output; expressions and statements; lvalues and rvalues; environment and store; parameter passing mechanisms; modelling pointers, pointer arithmetics and arrays. |
lecture07.pdf
and PLCSD chapter 7 and Fundamental Concepts (PDF) and imp.zip and microc2.zip and exercise07.pdf | |
| 42 | Fall break | ||||
| 8 | 43 | Mon 19 Oct | An abstract machine with program counter, explicit evaluation stack, and instructions for arithmetics, jumps, conditional jumps, function call, return etc. Compilation of the imperative language micro-C to a sequence of abstract machine instructions, whose store is a collection of numbered storage cells. |
lecture08.pdf
and PLCSD chapter 8 and exercise08.pdf | |
| 9 | 44 | Mon 26 Oct | Real-world abstract machines such as the Java Virtual Machine (JVM) and the Common Language Infrastructure (CLI, .NET); a comparison of JVM and CLI. A comparison of JVM implementations. Just-in-time compilation. Garbage collection techniques (reference counting, mark-sweep, stop-and-copy, generational), stack, and heap. |
lecture09.pdf
and PLCSD chapter 9 and PLCSD chapter 10 and and Memory Management in the Java HotSpot Virtual Machine and Realtime Garbage Collection (IBM next-generation JVM) and virtual.zip and exercise09.pdf | |
| 10 | 45 | Mon 2 Nov | Continuations; a continuation-based interpreter for a functional language; exception-free modelling of exceptions; continuation-based interpreter for micro-Icon, a language with backtracking. |
lecture10.pdf
and PLCSD chapter 11 and cont.zip and listc2.zip and exercise10.pdf | |
| 46 | No lecture or exercises | ||||
| 11 | 47 | Mon 16 Nov | Backwards (continuation-based) code generation for micro-C, one-pass compilation of boolean expressions into control flow code, avoid jumps to jumps, compile tail calls to execute in constant space. |
lecture11.pdf
and PLCSD chapter 12 and microc2.zip and exercise11.pdf and ex13-code.txt | |
| 12 | 48 | Mon 23 Nov | Prøveeksamenssæt. | ||
| 13 | 49 | Mon 30 Nov | 0915-1100: Scheme (a dynamically typed functional programming language), backquote and comma, automatic program generation, binding times. Runtime code generation in Java/JVM and C#/CLR. |
lecture12.pdf
and PLCSD chapters 13 and 14 and The Scheme Programming Language sections 2.1-2.8 and frivillige exercise12.pdf and rtcg.zip |