CS3142 - Compilers
Announcements
- 2003 exam model answers
- 2002 exam model answers
-
- May 17: Provided that you get a first, the department
can support you to do a PhD and i'd be happy to be the
supervisor of a compiler-related topic.
- May 17: Hints to answer last year's exam questions
are available here.
- Extra exam preparation lecture will take place on
Wednesday May 14, 11-12, LF15.
- May 1: Updated version of the questions below has been
distributed; will be discussed on May 7,8.
- April 15: Sample exam questions (to be precise, parts of)
are available here (as a pdf file)
- Due to my absence abroad to attend a project meeting,
the lecture on Wednesday March 26 will be
delivered by Chris Kirkham and
there will be no lecture on Thursday March 27.
Course Book
The module textbook is
"Compilers: Principles, Techniques, and Tools"
by Alfred V. Aho, Ravi Sethi, Jeffrey D. Ullman. Widely known as the
"Dragon book", it has been a standard reference for two generations.
Other recommended books:
- Modern Compiler Design, by Grune et al. This is a new book
and has good coverage.
- The essence of compilers, by Hunter. Somewhat compact.
Schedule
- Lectures (LF15): Wednesdays 11-12; Thursdays 9-10
Handouts
(NB: Accessible from Computer Science machines only)
- Lecture 01 (Introduction): [powerpoint],
[pdf]
[Aho, 1.1]
- Lecture 02 (General Structure of a Compiler): [powerpoint],
[pdf]
[Aho, pp. 1-24]
- Lecture 03 (Introduction to Lexical Analysis): [powerpoint],
[pdf]
[Aho, pp.25-29; 84-87; 92-105]
- Lecture 04 (Lexical Analysis II: from REs to DFAs): [powerpoint],
[pdf]
[Aho, pp.113-125]
- Lecture 05 (Lexical Analysis III): [powerpoint],
[pdf]
[Aho, pp.141-144]
- Lecture 06 (Introduction to Parsing): [powerpoint],
[pdf]
[Aho, pp.160-175]
- Lecture 07 (Top-Down Parsing): [powerpoint],
[pdf]
[Aho, pp.176-178; 181-185]
- Lecture 08 (Bottom-Up Parsing): [powerpoint],
[pdf]
[Aho, pp.195-202]
- Lecture 09 (LR(1) Parsing): [powerpoint],
[pdf]
[Aho, pp.215-220; 230-236]
(Check this for the answer to the
example in slide 5)
- Lecture 10 (Context Sensitive Analysis: Attribute Grammars): [powerpoint],
[pdf]
[Aho, pp.279-287]
- Lecture 11 (Symbol Tables): [powerpoint],
[pdf]
[Aho, pp.429-440]
- Lecture 12 (Intermediate Representations): [powerpoint],
[pdf]
[Aho, pp.287-293 & 463-472]
- Lecture 13 (The Procedure Abstraction - Run-Time Storage Organisation): [powerpoint],
[pdf]
[Aho, pp.389-423]
- Lecture 14 (Code Generation - Instruction Selection): [powerpoint],
[pdf]
[Aho, pp.478-500]
- Lecture 15 (Register Allocation): [powerpoint],
[pdf]
[Aho, pp.541-546]
- Lecture 16 (Register Allocation via Graph Colouring): [powerpoint],
[pdf]
[Aho, pp.545-546 - too condensed]
- Lecture 17 (Global Register Allocation via Graph Colouring): [powerpoint],
[pdf]
[Aho, pp.545-546 - too condensed]
- Lecture 18 (Instruction Scheduling): [powerpoint],
[pdf]
- Lecture 19 (Code Optimisation): [powerpoint],
[pdf]
Resources on the web
Exam Papers from past years
(accessible from UoM machines only - NB: exams prior to 2002 were set by the
lecturer who taught the Compilers course in previous years)
Staff