CIS 4521/5521: Compilers - Spring 2025¶
You know how to program, but do you know how to implement a programming language? In this course you’ll learn how to build a compiler. Topics covered include: lexical analysis, grammars and parsing, intermediate representations, syntax-directed translation, code generation, type checking, simple dataflow and control-flow analyses, and optimizations. Along the way, we study objects and inheritance, first-class functions (closures), data representation and runtime-support issues such as garbage collection. This is a challenging, implementation-oriented course in which students build a full compiler from a simple, typed C-like language to fully operational x86 assembly. The course projects are implemented using OCaml, but no knowledge of OCaml is assumed.
Course Information¶
Instructor
-
office hours: Mondays 4:00-5:00pm and by appointment, Levine 511
Teaching Assistants
Gary Chen
office hours: TBD, Location: see Ed
Noé De Santo
office hours: TBD, Location: see Ed
Alex Shypula
office hours: TBD, Location: see Ed
Coordinates
Time: Tuesday, Thursday 10:15 - 11:45am
Location: Berger Auditorium (SKIR 013)
Contact: cis5521@seas.upenn.edu
Attention
CIS 4521/5521 is a re-numbered version of the previously offered course CIS 341(0). Aside from the number change, the course content will be similar to that class.
Homework Projects¶
Due: Wednesday, January 29th at 10:00pm
HW2: X86lite
Due: Wednesday, February 12th at 10:00pm
HW3: LLVMlite backend
Due: Wednesday, February 26th at 10:00pm
HW4: Oat language compiler v.1
Due: Wednesday, March 26th at 10:00pm
HW5: Oat language compiler v.2
Due: Wednesday, April 9th at 10:00pm
HW6: Program Analysis & Optimizations
Due: Wednesday, April 30th at 10:00pm
Textbooks and Resources¶
There is no required textbook for this course. However, you may find the following references useful for digging deeper into course topics.
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