Programming Language Design and Implementation (Autumn 2021)
Instructor: Ilya Sergey
Lectures: Wednesdays, 9:00am-12:00pm
Location: Yale-NUS College, Elm Common Lounge (level 2, next to Elm Dining Hall)
Office hours: Mondays, 3:30pm-5:00pm, #RC3-01-03E (Cendana)
Peer Tutor: Hoang Ngoc Tram
Tutoring Sessions: Saturdays, 1-3pm, Classroom 22 (RC3-02-03)
Lectures
Lecture materials will be posted gradually as we progress through the course.
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 and Lexing [W05 Slides] [W05 Code] [LLVMlite Specification]
Week 06: Lexing (cont’d) 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]
Week 10: Advanced Typing [W10 Slides] [W10 Code] [Oat v.1 typing] [Java Arrays]
Week 11: Code Optimizations [W11 Slides]
Week 12: Dataflow Analysis [W12 Slides]
Week 13: Register Allocation and Wrap-Up [W13 Slides]
Code
This course’s GitHub Organisation (please, email me your GitHub handle to have access)
Homework Projects
Textbooks and Resources
On 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 Types and Type Systems
Types and Programming Languages by Pierce
Advanced Topics in Types and Programming Languages by Pierce et al.
On Program Analysis
Principles of Program Analysis by Nielson, Nielson, and Hankin
On OCaml
Introduction to Objective Caml by Jason Hickey
Real World OCaml by Yaron Minsky, Anil Madhavapeddy, and 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.