|
Class information |
|
Time: Monday, Wednesday, 10:30am - 11:45am
Location: Halligan Hall 111a
Instructor: Sam Guyer
Office hours: Mondays 1pm - 2pm
Location: Halligan Hall 004 (extension)
|
TA: Noah Smith (nsmith09@cs.tufts.edu)
Office hours: Mon 3pm - 4pm, Thurs 3pm - 4pm
Location: Halligan Hall extension seminar space
|
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 |
|
Oct 12, 2005 -- Project stage 1 due.
Oct 19, 2005 -- Homework 1 due.
Oct 31, 2005 -- Midterm exam.
Nov 7, 2005 -- Project stage 2 due.
Nov 30, 2005 -- Project stage 3 due.
Dec 12, 2005 -- Project stage 4 due.
NEW: Dec 16, 2005 -- Turn in take-home exam at office.
|
Lectures |
|
Sept. 12, 2005 -- Overview
Sept. 14, 2005 -- Scanners (I)
Sept. 19, 2005 -- Scanners (II)
Sept. 26, 2005 -- Parsers (I) -- grammars
Sept. 28, 2005 -- Parsers (II) -- top-down parsers, LL(1) property
Oct. 3, 2005 -- Parsers (III) -- automatic top-down parsers, bottom-up parsers
Oct. 5, 2005 -- Parsers (IV) -- automatic LR parsers
Oct. 11, 2005 -- Post-parsing -- syntax-directed translation
Oct. 12, 2005 -- Static checking -- type systems
Oct. 17, 2005 -- The procedure abstraction
Oct. 24, 2005 -- Procedures and methods
Oct. 26, 2005 -- Internal representations
Nov 2, 2005 -- Code generation (I)
Nov 7, 2005 -- Code generation (II)
Nov 9, 2005 -- Introduction to optimization
Nov 21, 2005 -- Instruction selection
Nov 28, 2005 -- Control flow and liveness analysis
Nov 30, 2005 -- Register allocation
Dec 5, 2005 -- Compiling functional languages
Dec 7, 2005 -- Wrap up
|
Project |
|
The programming projects in this class will
involve building the major components of a compiler for a
subset of Pascal. You will implement this system in Java,
using components of a compiler infrastructure that I provide
for you.
Project overview -- See main project page fo an overview of
the project and descriptions of the input languages, Micro
Pascal and Mini Pascal.
Project stage 1 -- see the
stage 1 page for a full
description and code download.
Project stage 2 -- see the stage 2 page for a full description
and code download.
NEW: Project stage 3 -- see the
stage 3 page for a full
description and code download.
|
Text |
|
Engineering a Compiler
by Keith Cooper and Linda Torczon
See the publisher's
web-page and, in particular, the
errata
page. You can also find this book on
Amazon.
|
Course work |
|
Course work will consist of two exams, homeworks, and projects.
50% | Projects | Five 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)
|
|