CS4212: Compiler Design (Autumn 2024)¶
Instructor: Ilya Sergey
Lectures: Mondays, 3:00pm-6:00pm
Location: LT18
Teaching Assistant: Qiyuan Zhao
Lectures¶
Week 01: Introduction [W01 Slides] [W01 Code]
Week 02: X86Lite [W02 Slides] [W02 Code] [X86lite Specification]
Week 03: Compiling Function Calls to X86 [W03 Slides] [W03 Code]
Week 04: Intermediate Representations and LLVM [W04 Slides] [W04 Code]
Week 05: LLVMlite [W05 Slides] [W05 Code] [LLVMlite Specification]
Week 06: Lexing and Parsing [W06 Slides] [W06 Code]
Week 07: Parsing (cont’d) [W07 Slides] [W07 Code]
Week 08: First-Class Functions, Lambda Calculus [W08 Slides] [W08 Code]
Week 09: Types and Type Checking [W09 Slides] [W09 Code] [Oat v.1 typing]
Week 10: No class (Ilya is away)
Week 11: Advanced Typing [W11 Slides] [W11 Code] [Java Arrays] [Full Oat]
Week 12: Code Optimizations and Dataflow Analysis [W12 Slides]
Week 13: Register Allocation and Wrap-Up [W13 Slides]
Homework Projects¶
Code¶
This course’s GitHub Organisation (please, email me your GitHub handle to have access)
Textbooks and Additional Resources¶
On General Principles of Compiler Construction
Compilers: Principles, Techniques, and Tools (2nd Edition) by Aho, Lam, Sethi, and Ullman
Advanced Compiler Design and Implementation by Muchnick
Modern Compiler Implementation in ML by Appel
On Compiling Functional Languages
The Implementation of Functional Programming Languages by Simon Peyton Jones
On Types and Programming Language Foundations
Types and Programming Languages by Pierce
Advanced Topics in Types and Programming Languages by Pierce et al.
Software Foundations by Pierce et al.
On Program Analysis
Static Program Analysis by Anders Møller and Michael I. Schwartzbach
Principles of Program Analysis by Nielson, Nielson, and Hankin
On OCaml
Real World OCaml by Yaron Minsky and Anil Madhavapeddy
Introduction to Objective Caml by Jason Hickey
Copyright¶
Most of the materials and assignments for this module have been adapted, with permission, from the UPenn’s compiler class by Steve Zdancewic.