CS 4120/4121/5120/5121
Introduction to Compilers
Fall 2011
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 build a working compiler for an object-oriented language.

Web Page

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

Prerequisites

Computer Science 3110 and either CS 3410 or 3420. The practicum (CS 4121 or 5121) is a required co-requisite. You may not take CS 4120 without taking CS 4121 too, a similarly for CS 5120 and CS 5121. 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 Hollister 306. 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 the course staff mailing list. 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
Wenzel Jakob TA Upson 5156 M 4-5
Gregor Stocks Consultant Upson 328B Th 1:40-2:40

Reading

There is no required textbook this semester, but the following textbooks will be helpful sources of information. All of these books will be available on reserve in Uris 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:

Here are a couple of useful books on coding and software engineering:

 

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 4
Homework 2 5
Homework 3 3
Homework 4 3
Homework 5 5
Programming Assignments: 50% Programming assignment 1 5
Programming assignment 2 6
Programming assignment 3 7
Programming assignment 4 7
Programming assignment 5 7
Programming assignment 6 8
Programming assignment 7 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.