Programming Languages ITU F2004
This course introduces programming language concepts and tools, such
as interpreters, compilers, grammars, parsers, parser generators,
abstract machines, type checking, etc. We shall model imperative,
functional, and object-oriented programming languages by means of
interpreters and simple compilers.
- June 9:
The exam questions: June 2004 with solutions
- May 25: A Q-and-A session (`spørgetime') will be organized
Friday 4 June at 9h-10h in the usual room 0.15.
- May 25: Pensum til skriftlig eksamen:
- Torben Mogensen: Basics of Compiler Design (DIKU, University of
Copenhagen, June 2003), afsnit 2.1-2.5, 2.9, 3.1-3.6, 3.16.
- Peter Sestoft: Programming Language Concepts, 2004. Also the SML
- Kernighan and Ritchie: The C Programming Language, sections 5.1-5.5.
- Moscow ML Owner's Manual, especially the descriptions of mosmllex
- Lecture slides for lectures 1-12 plus those exercises in exercise
sheets 1-10 that you were asked to hand in.
- Lecture plan with links to lecture
notes, slides, etc.
- When and where
- We meet Wednesdays at
ITU Glentevej, starting Wednesday 4
February and ending Wednesday 28 April.
- Course format
- There will be lectures in the morning (9h-12h in
room 0.15) and exercises in the afternoon (13h-16h in room 4.05 ---
NB: changed from 4.04). The weekly exercises require implementation
of programming language concepts. The exercises are voluntary, but it
is practically impossible to pass the course without doing them.
- Teaching language
- All course materials are in English and
lectures will be given in English (unless everybody understands Danish
- Programming language
- We shall use Standard ML (SML) as a
meta-language: the language we use to describe other languages, and
the language in which we implement interpreters and compilers.
- Course materials
- We start with a Standard ML crash course, using Appendix A
from Programming Language Concepts (see below). Reference
material on the Standard ML libraries is available from on the Moscow
ML homepage. For supplementary reading, a good beginners' book is
Hansen and Rischel's Introduction to Programming
Using SML. You can get it at Naturfagsbogladen,
Universitetsparken 13 (the first floor of the August Krogh Institute);
but they charge 640 kroner.
- We shall use the Moscow ML
implementation and the associated tools mosmllex and mosmlyac,
described in the Owner's
- Torben Mogensen's lecture notes Basics of Compiler Design
(DIKU 2003) are used to present the concepts of lexing and parsing.
We also need some research papers etc, all bound into one volume that
can be bought at ITU office 2.20.
- Peter Sestoft's lecture notes Programming Language Concepts
(PLC), KVL and ITU 2004, are used to present concepts of abstract
syntax, dynamic and static semantics, interpreters, virtual machines,
compilers, compilation, byte code, reflection, and runtime code
generation. These notes will be handed out in class a few chapters at
a time, and will be available electronically after the course.
Here is the April 2004
version of these notes, including all chapters handed out during
- To generate Java Virtual Machine code, we shall use Peter
- Here's a packaging
of the Emacs 20.7 editor for MS Windows NT/2000/XP that includes a
Standard ML mode. Unzip to C:\emacs-20.7 and copy
C:\emacs-20.7\.emacs to C:\.emacs for proper setup. Emacs is included
with all Linux distributions.
- A configuration file sml.syn for Standard ML
syntax highlighting in the JCreator
Pro editor. Here are the installation instructions.
We shall study programming language concepts in two ways. First, by
learning Standard ML, which is quite different from Java. Secondly,
and mostly, by creating implementations of other kinds of programming
languages: imperative (C style), functional (Standard ML-style), and
object-oriented (Java-style). That way we learn the concepts of those
languages and how they are implemented on the computer.
- It is very hard to follow the remainder of the
course if you do not get a good grasp of Standard ML early on; this
requires solving the weekly exercises.
- Official course description
- Here is the official
- There is a written examination on Wednesday 9 June 2004
from 9h00 to 13h00 (check with the course database!) with books
etc. but without computers.
- Old exam questions:
- Last year's course homepage
- Here is last
year's course homepage.
- Additional literature
- Here are a few pointers to the literature on compilers and
- Here is a list of project
proposals. It makes eminent good sense to do a four-week project
following the course.
Peter Sestoft (firstname.lastname@example.org) 2004-01-23