Search This Blog

Compiler Construction PPT PDF SLIDES



Compiler Construction

Instructor: Hal Perkins

Texts :

There are three good, recent compiler textbooks available, none of which clearly dominates the others. Lectures and course materials will draw on all three (among other sources). The current edition of the Dragon Book was picked as the "recommended" text for the course, since it seems to have the best overall balance of material, but any of these books would have been suitable as the choice, and you can use any of them that you'd like:
  • Compilers: Principles, Techniques, & Tools, Aho, Lam, Sethi, & Ullman (Addison-Wesley, 2nd ed., 2007). The "Dragon Book". This is the updated edition of the classic compiler textbook. The coverage of grammars, parsing and optimization is very strong (and has the best theoretical treatment - well beyond what we will do); but the material on semantics and type checking is mixed up with intermediate code generation (something we will deal with), and there is very little about SSA representations of programs (which we'll only touch on lightly). If you already have a copy of the first edition, that will be fine for this course.
  • Modern Compiler Implementation in Java, Appel (Cambridge University Press, 2nd edition, 2002). This book is oriented around a mini-java project that is the basis of our course project, but it has some idiosyncrasies because of the author's background in compilers for functional languages. Probably the most succinct of the three books, and we have used it successfully as the text for this course in the past.
  • Engineering a Compiler, Cooper and Torczon (Morgan-Kaufman, 2004). This book is particularly good on the design tradeoffs needed to build real compilers. Lecture organization and examples will follow this book to some extent. This is currently used as the textbook in the undergrad compiler course (CSE 401), so used copies might be more readily available.


Lecture Slides
Here are links to the PDF and PowerPoint lecture slides.
Title
PDF
PowerPoint
Slides with lecture annotations
Overview and Administrivia

Languages, Automata, Regular Expressions & Scanners

Parsing & Context-Free Grammars
LR Parsing
LR Parser Construction
LL and Recursive-Descent Parsing

Intermediate Representations

Implementing ASTs

Static Semantics

x86 Lite for Compiler Writers

Code Shape I –Basic Constructs

Code Shape II –Objects & Classes

Running MiniJava - Basic Code Generation and Bootstrapping

Instruction Selection

Instruction Scheduling

Register Allocation

Introduction to Optimization

Dataflow Analysis

Optimizing Transformations

Lecture 7 Whiteboards


Analysis & Optimizations & Loops

SSA
Exam Topics
Java Implementation –JVMs, JITs etc.

Memory Management & Garbage Collection

Logistics

 

Audio and Video Archives
On the day after the lecture, video archives will be posted here. If you are running Windows, we recommend that you install WebViewer. WebViewer permits viewing of specially prepared Windows Media live streams and archives with instructor slides and Tablet PC annotations. To use the WebViewer archives, install, then click on links in the WebViewer column below.
Lecture
Video Archive
Windows Media
MP4
Video with slides instead of talking head
(for mobile devices)
WebViewer
Download WebViewer Archive
Lecture 1: Overview, Administrivia, Languages, Automata, Regular Expressions
Lecture 2: Parsing & Context-Free Grammars, LR Parsing, LR Parser Construction
Lecture 3: LL and Recursive-Descent Parsing, Intermediate Representations, and Implementing ASTs
Lecture 4: Static Semantics, x86 Lite for Compiler Writers, Code Shape: Basic Constructs, Objects & Classes
Lecture 5: Code Shape II –Objects & Classes, Running MiniJava - Basic Code Generation and Bootstrapping, Instruction Selection
Lecture 6: Instruction Selection, Instruction Scheduling, Register Allocation, Introduction to Optimization
Lecture 7: Introduction to Optimization, Dataflow Analysis, Optimizing Transformations
Lecture 8: Analysis & Optimizations & Loops
Lecture 9: SSA, Exam Topics
Lecture 10: Java Implementation –JVMs, JITs etc., Memory Management & Garbage Collection, Logistics