|
Class information |
|
Time: Tuesday, Thursday, 1:30pm - 2:45pm
Location: Halligan Hall 108
Instructor: Sam Guyer
Office hours: Tuesdays 3pm - 4pm
Location: Halligan Hall 004 (extension)
|
|
TA: Noah Smith (nsmith09@cs.tufts.edu)
Office hours: Wednesday 4pm-5pm
Location: Halligan Hall 107 (knock on the door)
|
Mailing list: https://www.eecs.tufts.edu/mailman/listinfo/comp181
|
Description |
|
This course explores the basic problems that
arise in the design and construction of translators for
programming languages. It focuses on both the underlying
theory of compilation as well as its implementation in
real systems. The course work is centered around a set of
projects that involve building a substantial fragment of a
realistic compiler for a simple imperative programming
language.
|
Important dates |
|
Sept 26, 2006 -- Homework 1 due: download PDF here
Sept 28, 2006 -- Programming assignment 1 due
Oct 7, 2006 -- Homework 2 due: download PDF here
Oct 24, 2006 -- Midterm exam
Oct 31, 2006 -- Programming assignment 2 due.
Dec 12, 2006 -- Programming assignment 3 due.
|
Lectures |
|
Sept 5, 2006 -- Introduction
Sept 7, 2006 -- Compiler from 35,000 feet
Sept 12, 2006 -- Lexical analysis -- part 1
Sept 14, 2006 -- Lexical analysis -- part 2
Sept 19, 2006 -- Parsing -- part 1
Sept 21, 2006 -- Top-down parsing
Sept 26, 2006 -- More top-down parsing
Sept 28, 2006 -- Bottom-up parsing -- part 1
Oct 3, 2006 -- Bottom-up parsing -- part 2
Oct 5, 2006 -- Parsing wrap-up, syntax-directed translation
Oct 10, 2006 -- Static checking
Oct 12, 2006 -- Procedures and symbol tables
Oct 17, 2006 -- Procedures and methods
Oct 19, 2006 -- Code generation I
Oct 26, 2006 -- Code generation II
Oct 31, 2006 -- Instruction selection
Nov 2, 2006 -- Intro to optimization -- Claytronics web site
Nov 9, 2006 -- Program analysis
Nov 14, 2006 -- Register allocation
Nov 19, 2006 -- Some of my research
Nov 21, 2006 -- Program analysis
Nov 28, 2006 -- Dataflow analysis
Nov 30, 2006 -- Compiling for modern architectures
Dec 5, 2006 -- Memory management
Dec 7, 2006 -- Wrap up
Thanks to many people for generously sharing lecture content
|
Project |
|
The programming projects in this class will
involve building the major components of a compiler for a
subset of Java. You will implement this system in Java,
using components of a compiler infrastructure that I provide
for you.
Programming assignment 1 -- due Sept 28
For programming assignment 1 you will
implement an interpreter for SkimDecaf, a very small
subset of Java. Start by reading the handout for this project, which
describes the problem. Then download the starter kit, which includes
skeleton code and a working parser for the language. We
will be using the Eclipse
development environment for the project. The handout
describes how to load the starter kit into Eclipse and get
going.
Programming assignment 2 -- due Oct 31
For programming assignment 2 you will
implement a parser for a subset of Java (very similar to
Decaf). Please see the full project
description
Programming assignment 3 -- due Dec 12
For programming assignment 3 you will
implement a code generator and semantic checker for a very
small subset of Java (almost identical to the SkimDecaf
language from programming assignment 1). Please see the full
project description
|
Text |
|
|
Course work |
|
Course work will consist of two exams, homeworks, and projects.
50% | Projects | Four parts, spread out over semester |
15% | Midterm | In class exam |
20% | Final | Probaby a take-home |
15% | Homeworks | A few problem sets
to help solidify the material |
|
Schedule |
|
Here is a tentative list of topics we will cover in this course:
- Lexical scanning
- Parsing
- Semantic analysis and type checking
- Intermediate representations
- The procedure abstraction
- Code generation
- Instruction scheduling
- Register allocation
- Introduction to optimization
- Value numbering, common subexpression elimination
- Other optimization problems (time permitting)
|
|