Lecture Notes


CS4410/6410: Compilers
Spring 2013

There will be 9 projects, a midterm exam, and a comprehensive final exam. The projects and exams will contribute to your course grade as follows:

Projects 75%
Midterm (Thurs. Feb 28, in class) 10%
Final (Fri. Apr 19, 10:30am-12:30pm, Snell Library 045) 15%

This is the expected outline for the course.

  • Overview and Intro to OCaml
  • Simple Control Flow
  • Global Variables
  • Parsing Combinators
  • Lexical Analysis
  • Parsing and Abstract Syntax
  • First-order Procedures
  • Data Types
  • Closures
  • Type Checking
  • Type Inference
  • Garbage Collection
  • Objects and Classes
  • Algebraic Optimization
  • Control-Flow Graphs
  • Dataflow Analysis
  • Register Allocation
  • Static Single Assignment
  • More Analysis and Optimization

The projects and tentative due dates are as follows. (Dates are subject to change.)

Wed, Jan 23 Project 0: A MIPS Interpreter 6 points
Sat, Feb 2 Project 1: A Fortran-ish Front End 6 points
Mon, Feb 11 Project 2: A Fortran-ish Back End 8 points
Wed, Feb 20 Project 3: A C-ish Back End 8 points
Mon, Mar 4 Project 4: From Scheme-ish to C-ish 10 points
Wed, Mar 13 Project 5: From ML-ish to Scheme-ish 10 points
Fri, Mar 22 Project 6: Algebraic Optimization 10 points
Tue, Apr 9 Project 7: Liveness Analysis 15 points
Thu, Apr 25 Project 8: Register Allocation 10 points

Students may work with a partner on the projects (and I encourage this because there's a lot of coding here!)

There will also be ample opportunity for extra credit by augmenting your compiler (or the language we're compiling) with new features or optimizations. However, a word of warning: the extra credit only applies if the rest of the compiler is working.

There won't be any "late dates" or anything like that, so plan ahead and get the work done. We will not accept late submissions.