Princeton University
Computer Science Department

Computer Science 320
Compiling Techniques

Prof. David August

Spring 2013

Directory
Schedule and Readings | Assignments | Lecture Notes

Course Summary

Understand the design and construction of compilers. Concepts include syntactical analysis, semantics, code generation, optimization, and run-time systems. Problems in processing imperative languages, such as C and Pascal, as well as functional languages such as ML, will be examined. A complete compiler for a small language will be implemented in ML.

This year, we will examine the multicore problem and JITs.

Prerequisites: 217 and 226.


Announcements

2/5 - Welcome!
3/1 - Old Midterms and Finals are here.
3/1 - The midterm in class on Thursday March 14 and is closed book/closed notes. You will have exactly 1 hour and 20 minutes for the exam.
3/11 - The midterm will NOT cover type analysis.
3/15 - The midterm and solutions have been posted; grades are on blackboard.

FINAL EXAM: Wed, May 22 9:00 AM in Computer Science Building Room 104

Special Project

The special project is an independent work alternative to the canned compiler project. Participation in this alternative is by special arrangement with Prof. August.


Administrative Information

Lectures: TTh 3:00-4:20pm, Room: Friend 008
Professor: David August
Teaching Assistant (director of programming assignments): Jordan Fix
Piazza: We have set up a Piazza site for the class here.

Required Texts:
Recommended Text:

Software

Install SML/NJ on your computer. We will be using SML/NJ version 110.67. Follow the instructions on this page.

You may find it useful to run SML under emacs. This will let you take advantage of rudimentary support for automatic indentation, syntax-highlighting, and special keybindings. Details.

Documentation: Source code useful for the programming assignments is available on the Web.

Grading

Your grade will be calculated as follows (with adjustment for quizzes and participation):

The final exam is worth twice as much as the midterm.

Exams

There will be a midterm exam and a final exam. The exercises at the end of each chapter of Modern Compiler Implementation in ML are representative of the questions that will appear on the exam. The best way to study for the exams is to do these exercises.


Assignments

There will be 9 weekly programming assignments. These assignments are described in Modern Compiler Implementation in ML and in these Web pages: Assignment 1 Assignment 2 Assignment 3 Assignment 4 Assignment 5 Assignment 6 Assignment 7 Assignment 8 Assignment 9 and are (mostly) due Mondays at 9:00pm. You can get help with the assignments by sending electronic mail to cos320 or directly to the teaching assistant (see above), posting questions to Piazza, or by calling or visiting Professor August or the teaching assistant. Ask for help when you need it!

The late policy is to encourage submissions that are on-time. Any project can be late for up to 3 days without penalty. Up to 7 days total may be used during the semester, so use your late days wisely. After 3 days, zero credit is given for the assignment.

There will be no extensions due to scheduling conflicts, computer downtime, or other such factors, except under truly extraordinary circumstances. Extensions will be granted only for university-sanctioned excuses such as illness, and then only with the proper documentation. You are responsible for planning ahead and managing your time so that you can complete the assignments on time. You must either finish on time or accept the consequences of doing otherwise.

Penalties are waived only for unforeseen circumstances, like illness, and then only with an appropriate written excuse.

Programming, like composition, is an individual creative process. Individuals must reach their own understanding of the problem and discover a path to its solution. During this time, discussions with friends are encouraged. However, when the time comes to write the code that solves the problem, such discussions are no longer appropriate - the program must be your own work (although you may ask teaching assistants for help in debugging). If you have a question about how to use some feature of C, UNIX, ML, etc., then you can certainly ask your friends or the teaching assistants.

Do not, under any circumstances, copy another person's program. Writing code for use by another or using another code in any form violates the University's academic regulations.

Submitting Programming Assignments

Submit your solutions to the programming assignments electronically using dropbox. Details will be provided for each assignment.