15-411: Compiler Design

  1. Home
  2. >>
  3. Courses
  4. >>
  5. Compiler Fa11
  6. >>
  7. Lab&Assign.
Table of Contents
  1. Labs & Assignments
    1. Lab Schedule
    2. Collaboration and Academic Integrity
    3. Due Dates
    4. Subversion
    5. Submission
    6. Grading
  2. Lab Machines
    1. Getting Help
    2. Frequently Asked Questions

Labs & Assignments

The labs are the heart of this course and count for 70% of your grade. Much of what you learn in this course will be through completing these labs. Labs can be done individually or in pairs. You must choose a partner by the due date of the tests for the first lab. If you have difficulty finding a partner, or if problems in your working relationship arise during the semester, please get in touch with the instructor as soon as possible.

The second component of your work consists of written assignments, accounting for 30% of your grade. Written assignments must be done individually. University standards for academic integrity will be applied rigorously (see the policy details below).

Lab Schedule

The Lab and Assignment Schedule is tentative!

Collaboration and Academic Integrity

The university policies and procedures on academic integrity will be applied rigorously.

All labs in this course must be done either by a single student or by a pair of students, at your discretion. The work must be your own and your partner's. Do not copy any parts of the lab from anyone. Do not look at other students' code. Do not make parts of your code available to anyone besides your partner, and make sure noone else can read your files.

General libraries, such as the SML Basis Library, the SML/NJ Library, or other publicly available libraries may be used in your code. This also includes the code supplied with the textbook. Please clearly identify if you used library code, credit its source, and summarize any changes you may have made to the library. Portions of other students' compilers, from this or previous semesters, are explicitly prohibited. If in doubt, please contact the instructor.

All assignments in this course are single-student assignments. The work must be all your own. Do not copy any parts of any of the assignments from anyone. Do not look at other students' papers. Do not make any parts of your assignments available to anyone, and make sure noone can read your files.

We will be using the Moss system to detect software plagiarism.

It is not considered cheating to clarify vague points in the labs, assignments, or textbook, or to give help or receive help in using the computer systems, compilers, debuggers, profilers, or other facilities.

Due Dates

All handins of labs are electronic via the Autolab system. All lab assignments are due at 11:59pm on the specified due date. These deadlines are firm and no extensions will be granted for lab due dates.

All handins of written assignments are on paper at the beginning of lecture (1:30pm) on the due date. Up to two assignments may be handed in late, any time before next lecture. The exception is Thanksgiving break, where you have to make separate arrangements for a late handin.

You may not submit a lab late. You will receive no credit for late labs.

Exceptions to the policies above will be granted only in exceptional circumstances and must be discussed with and approved by the course instructor in advance.


We are using a subversion repository administered by the course staff for distribution and autograding purposes.

Suppose your group name is GROUPID. To check out a working copy of the svn module for your group, do

svn co https://cvs.concert.cs.cmu.edu/15411-f11/groups/GROUPID
Your group id would be GROUPID and your password should have been mailed to you when you chose a team.

This will create a directory GROUPID/ with a subdirectory for each lab. For the very first lab, there is also some starter code in GROUPID/lab1/compiler which you may edit freely or replace entirely.

When you are ready to hand in your code (and you may hand in as often as you like), make sure you have committed the most recent version to the repository with svn add and svn commit.

Then go to the Autolab Server. Navigate to the appropriate assignment that you want to hand in and select

  Checkout your work for credit
Depending on whether you are handing in test cases or a compiler, the autograder for Lab 1 will do either
svn co https://cvs.concert.cs.cmu.edu/15411-f11/groups/GROUPID/lab1/tests
svn co https://cvs.concert.cs.cmu.edu/15411-f11/groups/GROUPID/lab1/compiler
and then run the driver to autograde your code. For each lab, the autograder will look for the two handin directories tests and compiler.

You are encouraged to use the svn repository to manage your development, but you are not required to do so as long as you hand in your code as specified above.

If you are submitting multiple versions, please remember to commit your changes to the repository before asking the Autolab server to grade them! And please do not include any compiled files or binaries in the repository!


We always count your latest submission, both for grading purposes and for the purpose of determining whether you have submitted in time. You should avoid the scenario where you make final clean-up edits close to the submission deadline without subsequently compiling and re-testing your code. You might end up with no credit if you accidentally fail to close a comment or miss a parenthesis!

Some labs may permit unofficial submissions in order to test your code with the Autolab grader. Unofficial submissions will not be graded. Please make sure to hand in at least one official submission, however, otherwise you will receive no credit. If you want to run an unofficial testrun on a lab machine without grading it, just call

driver.pl -f testfiles


Grading criteria are stated separately with each lab. Some of each score will be determined by the Autolab grading script. In addition, the teaching assistants will read your code and award additional points based on code quality.

The most important criterion is always correctness. Buggy code is useless, and is likely to get a low score. A secondary criterion is the selection of appropriate algorithms and data structures for your implementation. Finally, it is important that your code be readable and well-organized. This includes proper use of the module system and clear comments.

Grading for written assignments is based on the correctness of the answer and the presentation of your reasoning. Strive for clarity and conciseness, but show how you arrived at the answer. Stating an answer without explanation does not count as an answer. If you cannot solve a problem, explaining your approach and why you failed is encouraged. Such answers will be given partial credit.

Grades are based primarily on the total score for the class out of 1000 points. This includes 700 points for lab and 300 points for assignments. There are no predetermined cut-offs. Instead, the teaching staff will decide on grade boundaries at the end of the year. We will use intangibles, such as participation in class for those close to grade boundaries.

Lab Machines

You can develop and run your compilers on the andrew or GHC cluster. For example, if your Andrew ID is bovik, then you can login to the andrew servers using:

ssh bovik@unix.andrew.cmu.edu
You can login to the GHC machines using:
ssh bovik@ghcXX.ghc.andrew.cmu.edu

Getting Help

Information about the CS computing environment can be obtained from the SCS Help Desk.

Frequently Asked Questions

How do I get an account?
Svn accounts will be created for you automatically and assigned to you once you have chosen a team. Your machine login account is your standard ANDREWID.
SVN tells me "403 Forbidden"
Please make 100% sure that you have entered your groupid and password into svn correctly (not your ANDREWID!). Explicitly call (in one line)
svn co --username GROUPID --password XXX
Also make sure you are checkout out your group directory and no other directory.
SVN tells me "authorization failed"
If svn tells you
authorization failed: Could not authenticate to server:
rejected Basic challenge
Then please make 100% sure that you have entered your groupid and password into svn correctly. Explicitly call (in one line)
svn co --username GROUPID --password XXX
Autolab cannot find my files
Did you check to see if you can checkout your svn repository into a fresh directory or onto a different computer, and use the driver to compile and run it? Make sure you did not forget to svn add any required files.
How do I run test cases for my compiler?
For testing purposes, you can run your compiler against the test cases locally without submitting it, by running
driver.pl -f testfiles
The reference compiler is