L Computer Science & Electrical Engineering

Compiler Construction – SMD163
Lp3, 2006

New homepage for D7011E

There is a new course code and a new homepage for the new course 2007/2008, see this URL: D7001E


News


Jan 17 No lab on Jan 19
Jan 19First half of the project is now online.
Feb 1 Extension granted to the 8:th for homework 3.
Feb 7 Further extension granted to the 10:th for homework 3.
Feb 8Step 3 of the project is now online.
Feb 22Step 4 of the project is now online.
Mar 6Today was the last lecture. Remaining scheduled lectures are cancelled!.
Mar 6Schedule time for the lab-presentation!

Course aim

The goal of this course is to provide practically useful knowledge in how compilers translate programs
in a high-level language into executable machine code. In addition, the course aims to give skills in using
theoretical as well as concrete tools for compiler construction, and also to provide a comprehension for the
interplay between language design and implementation techniques for modern programming languages.

Course content


Official description in the course catalog.

Examiner

Johan Nordlander
E-mail: nordland@csee.ltu.se
Room: A2306 (part-time in Skellefteå)
Phone: 0920 - 49 21 56, alt. 0910 - 58 53 18

Lecturers & lab instructors

Peter A. Jonsson
E-mail: email adress
Room: A2306 (Due to change)

Viktor Leijon
E-mail: email adress
Room: A2310

Literature



Andrew W. Appel with Jens Palsberg
Modern compiler implementation in Java.
Cambridge University Press, 2nd edition, 2002.
ISBN: 0-521-82060-X.

Schedule

View the on-line schedule information.

Written exam: March 16 (5 hours)

Lecture notes

Note that some of these are pre-lecture slides, this means that they might not be fully updated to reflect the actual contents of the lecture. However, the actual science of compiler technology will be the same.
Lecture
Contents
Slides
Book chapter
1
Introduction
lecture1.pdf
1
2
3
Lexical analysis and finite automata
Lexer generators
lecture2.pdf
lecture3.pdf
2
2
4
5
6 (pre)
Introduction to parsing
Bottom-up parsing
Parser generators and abstract syntax
lecture4.pdf
lecture5.pdf
lecture6.pdf
3
3
3,4
7 (pre)
8
Semantic analysis
Introduction to code generation
lecture7.pdf
lecture8.pdf
5
6,7
9
10
Implementing functions and objects
Continuing code generation
lecture9.pdf
lecture10.pdf
6,7 (,14)
6,7
11
12
Introduction to optimization
Garbage Collection
lecture11.pdf
lecture12.pdf
7,8 (,18)
13
13
14
Instruction selection
Homework recapitulation
lecture13.pdf
-
9
-
15
16
Polymorhic types
Buffer / repetition
lecture15.pdf
-
16



Homework assignments


Assignment 1

Assignment 2

Assignment 3

Assignment 4

Assignment 5

Assignment 6


Programming project

Description

Example exam

exam.pdf

Course evaluation

Evaluation for 2006


Links to related information
The JFlex home page

The Jacc home page

The MiniJava project

The Java Language Specification

Online book on programming in IA32 assembler

How to write unmaintainable code

Java operator precedence