Course Policies
Overview
This course covers the design and implementation of compiler and runtime systems for high-level languages, and examines the interaction between language design, compiler design, and runtime organization. Topics covered include lexical and syntactic analysis, type-checking, program analysis, code generation and optimization, memory management, and runtime organization. Please see the calendar for the lecture topics and links to the references and notes. The schedule is subject to change.
The course covers both the theory and practice of compiler design, and students implement a compiler that translates C0 programs to x86-64 assembly. The compiler can be implemented in any programming language. Students are strongly encouraged to work on the implementation in teams of two.
Lecture is your primary source of information in this course. The course notes and texts are supplementary to lecture, rather than the primary sources of information. You are strongly urged to attend lecture every week. There will also be weekly recitation.
Grading
This is a project-based course that is graded out of 1000 points. 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.
There are six implementation projects (labs) and five written homework assignments. You are strongly encouraged to work in teams of two for the labs. It is expected that each team member implements about 50 percent of each lab and that each team member is familiar with all components of the implementation. To ensure this, there are code reviews after Lab 3. The homework assignments are completed individually, not with a partner.
The first four projects entail writing test cases and compilers for the programming languages L1, L2, L3, and L4, which are subsets of C0. Each project is worth 100 points (400 points total). The code review after Lab 3 is worth 50 points. The fifth project is to optimize your L4 compiler to produce faster executable files. For the sixth project, you can pick one of several pre-defined projects or define your own project. Projects five and six include a written component and are worth 150 points (300 points total). The five written homework assignments are each worth 50 points (250 points total).
Teaming
Choose partners carefully; except for exceptional cases, you will work with the same partner for the entire semester. It is important that you have an honest discussion with your partner about what you expect to get out of the course, what grades you are willing to accept, how much time you are able to spend in the best case and the worst case, what times of day you work best, and how you will manage stress and conflict.
Think in advance about who to partner with and what programming language to use. (Don’t panic if you don’t have a partner. Students will be matched at the beginning of the class, and you will find a partner then.)
The deadline for teaming is September 3, 2019.
Deadlines and Late Days
Labs
All lab deadlines are at 11:59pm on the due date.
You have a total of six (6) late days for the labs to use throughout the semester. Assuming a Tuesday deadline, any submission between 11:59pm Tuesday and 11:59pm Wednesday automatically consumes one late day. These late days can only be used for compiler deadlines: test cases and papers must be turned in by 11:59pm on the due date for credit.
You can use a maximum of two (2) late days each on labs 1 and 2. You can use a maximum of three (3) late days each on labs 3 and 4. You can use up to five (5) late days on lab 5 if you still have late days available. You may not use any late days on lab 6.
Written Assignments
All written deadlines are at 11:59pm on the due date.
You have a total of 3 late days for individual written assignments. Assuming a Thursday deadline, any submission between 11:59pm Thursday and 11:59pm Friday automatically consumes one late day. These late days can be used in any combination, but after they are exhausted, no credit will be given.
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. 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 no one 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 written 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 no one 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.
Also see Academic Integrity at Carnegie Mellon.
Well-Being
Don’t forget that this is just a course. You can contact the instructor or your undergrad adviser with any concerns or issues.
Take care of yourself. Do your best to maintain a healthy lifestyle this semester by eating well, exercising, avoiding drugs and alcohol, getting enough sleep and taking some time to relax. This will help you achieve your goals and cope with stress.
All of us benefit from support during times of struggle. You are not alone. There are many helpful resources available on campus and an important part of the college experience is learning how to ask for help. Asking for support sooner rather than later is often helpful.
If you or anyone you know experiences any academic stress, difficult life events, or feelings like anxiety or depression, we strongly encourage you to seek support. Counseling and Psychological Services (CaPS) is here to help: call 412-268-2922 and visit their website at http://www.cmu.edu/counseling/. Consider reaching out to a friend, faculty or family member you trust for help getting connected to the support that can help.
If you or someone you know is feeling suicidal or in danger of self-harm, call someone immediately, day or night:
CaPS: 412-268-2922
Re:solve Crisis Network: 888-796-8226
If the situation is life threatening, call the police:
On campus: CMU Police: 412-268-2323
Off campus: 911