CC: Compiler Construction

Course: 21025 Compiler Construction (Spring 2017)
Lecturer:Prof. Oscar Nierstrasz, Mohammad Ghafari
Assistants:Yuriy Tymchuk, Manuel Leuenberger
Audience:Master students in computer science
Lecture:Fridays, 10h15 - 12h00
Exercises:Fridays, 12h00 - 12h45
Place:Engehaldenstrasse 8, 001
Start:Feb 24, 2017
Repetition:Spring 2019

St George

Summary

This course will provide students with an introduction to modern compiler construction. The first two-thirds of the course will cover fundamental topics, and will be based on the text book Modern Compiler Implementation in Java (Second edition), Cambridge University Press, New York, NY, USA, 2002, by Andrew W. Appel, with Jens Palsberg). The remaining third of the course covers advanced topics of current interest.

Learning Outcomes

On successful completion of this course, you will be able to:

  • Distinguish formal and practical properties of different approaches to parsing
  • Understand and implement various techniques to parse source code
  • Implement a basic compiler
  • Use visitors to process an abstract syntax tree (AST)
  • Transform an AST to intermediate representation (IR)
  • Perform peephole optimization on the IR
  • Generate target code (eg Java bytecode) from IR

Grading

The final grade will be based 10% on exercises, 30% on a team project and 60% on the final exam.

Schedule

Week Date Lecture Exercises
1 24-Feb-17 Introduction Assignment 1
2 03-Mar-17 Lexical Analysis Assignment 2
3 10-Mar-17 Parsing Assignment 3
4 17-Mar-17 Parsing in Practice Project 1 (src)
5 24-Mar-17 Intermediate Representation
6 31-Mar-17 Static Analysis (Olivier Flücker) Notes Project 2 (src)
7 07-Apr-17 Optimization
- 14-Apr-17 Good Friday
- 21-Apr-17 Spring break
8 28-Apr-17 Code Generation Project 3 (src)
9 05-May-17 Bytecode and Virtual Machines
10 12-May-17 PEGs, Packrats and Parser Combinators (Jan Kurš)
11 19-May-17 Program Transformation
12 26-May-17 Truffle — a language implementation framework (Boris Spasojević)
13 02-Jun-17 Final Exam

NB: The lecture notes are based partly on similar courses offered by Profs. Jens Palsberg (CS132) and Tony Hosking (CS502).

Last changed by oscar on 12 June 2017