CS 434T: Compilers

Stephen Freund, Fall 2026

This tutorial covers the principles and practices for the design and implementation of compilers and interpreters. Topics include all stages of the compilation and execution process: lexical analysis; parsing; symbol tables; type systems; scope; semantic analysis; intermediate representations; run-time environments and interpreters; code generation; program analysis and optimization; and garbage collection. The course covers both the theoretical and practical implications of these topics. As a project course, students will construct a full compiler for a simple object-oriented language.

Full Syllabus

Calendar

Week 0 (Sep 11)

Week 0 (Sep 11): Lab: Course Overview and Scala Crash Course

Week 1 (Sep 14)

Week 1 (Sep 14): Overview and Lexical Analysis
Reading
Due Wednesday, Sep. 16 Lab 0: A Scala Crash Course
Friday Meeting HW 1
Friday Lab Lab 1: NFA Simulation

Week 2 (Sep 21)

Week 2 (Sep 21): Lexical Analysis, Grammars, Top-Down Parsing
Reading
  • Dragon 3.8, 3.9.6
  • Dragon 4.1-4.4
  • The slex tutorial – lex-style scanning: declare tokens as regular expressions.
  • The slex source code – the engine is HW 2’s Thompson construction, HW 1’s subset construction, and a simple DFA simulation.
Due Wednesday, Sep. 23 Lab 1: NFA Simulation
Friday Meeting HW 2
Friday Lab PA 1

Week 3 (Sep 28)

Week 3 (Sep 28): Grammars and Writing a Parser
Reading
  • The scup tutorial – the LL(1) grammar DSL and worked examples with the library.
  • Dragon 4.4 (predictive parsing, FIRST and FOLLOW, LL(1) grammars) – the theory the library mechanizes; HW 2’s computations become running code this week.
  • The scup source code – read all of it; it is short: Syntax.scala, Analysis.scala, Parse.scala.
Due Wednesday, Sep. 30 PA 1
Friday Meeting HW 3
Friday Lab Lab 2: A Calculator

Week 4 (Oct 5)

Week 4 (Oct 5): Parsing IC, ASTs, and Symbol Tables