Lecture Notes

CS421/521: Compilers and Interpreters, Spring 2017, Yale University

Lecture notes will be made shortly after each lecture.

  • Lecture 1 (Jan 17): Introduction (pdf)
  • Lectures 2-4 (Jan 19-26): Lexical Analysis (pdf)
  • Lectures 3-4 (Jan 24-26): ML and SML/NJ (pdf)
  • Lectures 5-7 (Jan 31 - Feb 7): Parsing (pdf)
  • Lecture 8 (Feb 14): Abstract Syntax (pdf)
  • Lectures 9-10 (Feb 16-21): Type Checking (pdf)
  • Lectures 11-12 (Feb 21-23): Stack Frames (pdf)
  • Lectures 13-14 (Feb 28-Mar 2): Intermediate Trees (pdf)
  • Lectures 15-16 (Mar 7-9): Canonical Trees; Instruction Selection (pdf)
  • Lectures 16-17 (Mar 9-28): Register Allocation; Assignment 6 Overview (pdf)
  • Lectures 17-18 (Mar 28-30): Higher-Order Functions and Closures (pdf)
  • Lecture 19 (Apr 4): Object-Oriented Languages (pdf)
  • Lectures 20-21 (Apr 6-11): Garbage Collection (pdf)
  • Lecture 22 (April 13): Program Analysis; Compiler Optimizations (pdf; figures in pdf)

  • The following are the lecture notes used in Spring 2015:
  • Lecture 1 (Jan 12): Introduction (pdf)
  • Lectures 2-4 (Jan 14-26): ML and SML/NJ (pdf)
  • Lectures 3-4 (Jan 21-26): Lexical Analysis (pdf)
  • Lectures 5-7 (Jan 28 - Feb 4): Parsing (pdf)
  • Lecture 7 (Feb 4): Parser Generation (pdf)
  • Lecture 8 (Feb 9): Abstract Syntax (pdf)
  • Lectures 9-10 (Feb 11-16): Type Checking (pdf)
  • Lectures 11-12 (Feb 18-23): Stack Frames (pdf)
  • Lectures 13-14 (Feb 25-Mar 2): Intermediate Trees (pdf)
  • Lectures 14-15 (Mar 2-4): Canonical Trees; Instruction Selection (pdf)
  • Lectures 16-17 (Mar 23-25): Register Allocation; Assignment 6 Overview (pdf)
  • Lecture 18 (March 30): Program Analysis; Compiler Optimizations (pdf; figures in pdf)
  • Lecture 19 (April 1): LLVM and Static Single Assignment (pdf)
  • Lectures 20-21 (April 6-8): Higher-Order Functions and Closures (pdf)
  • Lectures 21-22 (April 8-13): Object-Oriented Languages (pdf)
  • Lectures 22-23 (April 13-15): Garbage Collection (pdf)
  • Lectures 23-24 (April 15-20): Certified Compiler

  • Copyright (c) 1995-2017, Zhong Shao, Dept. of Computer Science, Yale University