Computer Science Department
Programming Methods Laboratory
Ecole Polytechnique Federale de Lausanne
Concurrence et Compilation (Compilation)     summer semester 2001

After discussion with some of you and other people, I have decided to drop the project. I misestimated the amount of work involved in it, it simply is too big for this class. We will still do small programming exercises, but this leaves also more room for blackboard exercises. The planned schedule for the next weeks is as follows:
  • 11.05.: Abstract Syntax / Blackboard Exercises (Automata)
  • 18.05.: Blackboard Exercises (Parsing) / Programming Exercise
  • 25.05.: Visitors
  • 01.06.: Blackboard Exercises / Programming Exercise
  • 08.06.: Name Analysis
  • 15.06.: Blackboard Exercises / Programming Exercise
  • 22.06.: Interpretation


In this part of the course, the student should learn the basic principles of compilers. Emphasized are parts of the compiler which are of general interest. On the practical side an interpreter for a small programming language will be written. The language used for implementation will be Java.

At the end of the course the student should

  • know about the internal structure of a compiler/interpreter
  • be able to implement a compiler/interpreter for a simple programming language
  • know and be able to use frameworks, patterns, and data structures common in compilation
  • be able to specify the components of a compiler/interpreter
  • have gained experience in programming in a group


    1. Overview Compiler
    2. Lexical Analysis
    3. Syntactic Analysis
    4. Abstract Syntax
    6. Semantic Analysis
    7. Interpretation
This part of the course is given in English.


  • Andrew W. Appel, Modern compiler implementation in Java. Addison-Wesley, 1997.
  • Niklaus Wirth. Compiler Construction. Addison-Wesley, 1996.
  • Alfred V. Aho, Ravi Sethi, Jeffrey D. Ullman, Compilers Principles, Techniques, and Tools. Addison-Wesley, 1985.
  • Erich Gamma, Richard Helm, Ralph Johnson, John M. Vlissides, Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, 1995.
Lecturer: Dr. Christoph Zenger


Lectures: Friday 8:00-10:00, room CO2
Tutorials: Friday 9:00-10:00, IN/1 or CO2
Practical tutorials are held in room IN/1


The exam is on July, 10th, 8.15. It is closed books, but everyone is allowed to bring two A4 sheets summary. You may write on the front- and backside of the sheets. It will last 90 min.


The slides are available in three formats, PDF, Postscript, and 4-sided Postscript. The PDF format is best read with acroread. The PDF files have a document structure, so you can click through the slides. Make sure you use the setting "View visible area". The 4-sided Postscript files have 4 slides on each page and are best used if you want to print the slides.


Each of the course sessions is accompanied by an exercise sheet consisting of two parts:
  • A keywords section contains a couple of essential notions presented during the course. Be aware that this list cannot - and is not intended to - be complete. It should rather be considered as a starting point for a brief repetition of the course material. We recommend to invest five to ten minutes (which is not much, but will pay off for sure) into each week's keywords section, trying to recall the notions and discuss them with other students. Writing down explanations, on the other hand, should not be necessary.
  • An exercise section is dedicated to an exploration of the background material provided during the sessions. We would like to encourage all students to hand in solutions to the exercises, which are then corrected individually. Hand-ins of teams of students are highly appreciated.
Solutions The solutions of the programming exercises are each contained in the following programming exercise.



We have opened a newsgroup epfl.di.cours.dsc.compilation. for the discussion of course topics.

Related Links

LAMP homepage
Last modified: 12.03.2001, Christoph Zenger <>