Programming Languages F2004

SubjectMaterialsWhen
1Standard ML as a meta language, the Moscow ML system, abstract syntax, a simple expression language, direct interpretation of expressions, environments. Lecture 1 slides
Exercise sheet 1
sem1.sml
sem1-new.sml
Moscow ML
Read Chapter 1 and Appendix A: Standard ML crash course from Programming Language Concepts.
Wed 4 Feb at 9h (lecture only, no exercises)
2Interpreters and compilers, static checking of programs, postfix (reverse Polish) notation, a stack (abstract) machine, Postscript, correctness of compilation relative to interpretation Lecture 2 slides
Exercise sheet 2
sem2.sml
sierpinski.eps
expr/Machine.java
Read Chapter 2 of Programming Language Concepts.
Wed 11 Feb at 9h
3Concrete syntax, regular expressions, context free grammars, scanning and parsing: from linear text to abstract syntax tree, using mosmllex and mosmlyac, a scanner and parser for the expression language, a scanner and a parser for micro-SQL, a sublanguage of SQL; SML: simple Moscow ML modules and compilation units. Lecture 3 slides
Exercise sheet 3
expr.zip
usql.zip
Read Sections 2.1-2.5, 2.9, 3.1-3.6, and 3.16 of Torben Mogensen's Basics of Compiler Design.
Read Chapter 3 of Programming Language Concepts.
Wed 18 Feb
4Interpretation 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 checking. Lecture 4 slides
Exercise sheet 4
fun1.zip
Read Chapter 4 of Programming Language Concepts.
Wed 25 Feb
5A higher-order functional language. An implicitly typed language. Parametric polymorphic types. Type inference. We will not go through the type inference implementation. Lecture 5 slides
Exercise sheet 5
sem5.sml
fun2.zip
Read Chapter 5 of Programming Language Concepts.
Wed 3 Mar
6Modelling an imperative language: assignable variables, arithmetic and logical expressions, variable declarations, assignment, loops, output; lvalues and rvalues; environment and store; parameter passing mechanisms; C pointers and arrays. Lecture 6 slides
Exercise sheet 6
imp1.zip
Read Sections 5.1-5.5 of Kernighan and Ritchie.
Read Chapter 6 of Programming Language Concepts.
Read Christopher Strachey: Fundamental Concepts in Programming Languages.
Wed 17 Mar
7An 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. Lecture 7 slides
Exercise sheet 7
imp2.zip
Read Chapter 7 of Programming Language Concepts.
Wed 24 Mar
8A continuation-based interpreter for a functional language, exception-free modelling of exceptions; continuation-based interpreter for an imperative language, modelling micro-Icon, a language with backtracking. Lecture 8 slides
Exercise sheet 8
cont.zip
Read Chapter 8 of Programming Language Concepts.
Wed 31 Mar
 
9Backwards (continuation-based) code generation, one-pass compilation of boolean expressions into control flow code, avoid jumps to jumps, compile tail calls to execute in constant space. Lecture 9 slides
Exercise sheet 9
imp3.zip
Read Chapter 9 of Programming Language Concepts.
Wed 14 Apr
10Java Virtual Machine (JVM) as a realistic abstract machine. A comparison of JVM and CLR (Microsoft's Common Language Runtime) as used in Microsoft .NET. Garbage collection, stack, and heap. Lecture 10 slides
imp4.zip
Overview of CLR by Meijer and Gough.
Read Chapters 10 and 11 of Programming Language Concepts.
Wed 21 Apr
11 Modelling of an object-oriented language: classes, objects with fields, objects with methods. Lexer and parser specifications for micro-Java, a sublanguage of Java. Lecture 11 slides
Exercise sheet 10
oo.zip
Read Chapter 12 of Programming Language Concepts.
Wed 21 Apr
12 Javascript, a class-less object-oriented language. Comparison of Java and C#. Recent trends and techniques in programming languages: Reflection and runtime code generation in Java/JVM and C#/CLR. Lecture 12 slides
rtcg.zip
Read Chapters 13 and 14 of Programming Language Concepts.
Wed 28 Apr


Peter Sestoft (sestoft@dina.kvl.dk) 2004-01-23