CS 4120/4121
Introduction to Compilers
Fall 2009
Cornell University Computer Science Department


Course Description

An introduction to the specification and implementation of modern compilers. Topics covered include lexical scanning, parsing, type checking, code generation and translation, an introduction to optimization, and compile-time and run-time support for modern programming languages.  As part of the course, students will build a working compiler for an object-oriented language.

Web Page

The course web page is located at http://courses.cs.cornell.edu/cs4120/2009fa. All course materials will be available at this site or on CMS.

Prerequisites

Computer Science 3110, 3410 or 3420. The practicum (CS 4121) is a required co-requisite. You may not take CS 4120 without taking CS 4121 too. The reason for this is that the group project is part of the grade for both 4120 and 4121. Familiarity with programming in Java is also expected.

Course Meetings

Lectures are MWF 1:25-2:15, in Phillips 203. Attendance at lecture is expected. The lectures will complement rather than replicate material in the textbook.

Teaching Staff

The best way to reach the course staff is by sending mail to Turn on JavaScript to view the email address Please include 4120 somewhere in the Subject line. The newsgroup cornell.class.cs4120 is also a good way to get in touch with the course staff, particularly if you want to have a discussion about the course material.
 

Name Role E-mail Office Office hours
Andrew Myers Instructor Upson 4133 MTh 11-12
Anthony Jawad TA Upson 328 M 4-5
Maksim Orlovich TA Upson 5152 Th 2–3

Reading

Textbook

Modern Compiler Implementation in Java, 2nd ed. Andrew Appel and Jens Palsberg, Cambridge University Press, 2002. ISBN 0-521-82060-X.

Other Reading

Copies of these books will be on reserve in the Engineering library. The Java language specification may also be useful to you either online or in its printed form:

Another useful text, on linking and loading, is:

A couple of useful books on coding and software engineering are the following:

 

Coursework

Assignments and Grading

There are four written homework assignments. You may discuss assignments with other students, but the work must be done on an individual basis. The names of any students you discussed the problems with must be recorded with the corresponding problems.

The compiler project is divided up into six programming assignments that are due at various points throughout the term. Compiler projects will be performed by groups of three or four students. Groups will be created by the course staff, but taking into account student preferences. The same groups will be maintained throughout the semester if possible.

Homework and programming assignments will be accepted up to 4 days late, but at a penalty. The penalty is 5% for one day late, 15% for two days late, 30% for 3 days late, and 50% for 4 days late. Weekends are considered to be a single day when applying this formula. These penalties may be avoided by obtaining an extension on the assignment, but any extensions must be approved by the instructor at least two days before the due date—last-minute extensions will not be granted.

Except in unusual circumstances, you will receive the same grade in CS 4120 and CS 4121, and all members of a group will receive the same grade on programming assignments. Exceptions to these rules are dealt with on a case-by-case basis.

The breakdown of points per assignment is as follows:

Homework: 20% Homework 1 5
Homework 2 5
Homework 3 5
Homework 4 5
Programming Assignments: 50% Programming assignment 1 5
Programming assignment 2 7
Programming assignment 3 8
Programming assignment 4 10
Programming assignment 5 10
Programming assignment 6 10
Prelims: 30% Prelim 1 15
Prelim 2 15
Total 100

Exams

The prelims will cover material from the textbook, lectures, and homework assignments. Both prelims will be evening exams. There will be no final exam, but your final report and demo will be due on the first day of finals.

Academic Integrity

The Cornell Code of Academic Integrity will be strictly enforced in this class. A Cornell student's submission of work for academic credit indicates that the work is the student's own. All outside assistance must be acknowledged, and students' academic position must be truthfully reported at all times.