Coursework and grading
Our study of compilers takes the form of four, multi-week investigations:
- Small compiler
~2 weeks -
We will implement a compiler for regular expressions.
The compiler takes as input a text description of a regular expression and produces as output a picture of the expression’s corresponding deterministic finite automaton.
You will also create a presentation about the compiler.
- Larger compiler
~3 weeks -
We will implement an x86 compiler for a general-purpose language.
You will also create a presentation about the compiler.
- Compiler extension(s)
~6-week project -
You will propose and implement one or more extensions to the x86 compiler. We will then merge all the extensions into a single compiler.
You will also create a presentation about your extension(s).
- Compiler fundamentals
throughout semester -
We will learn some concepts, algorithms, and data structures that are fundamental to the study of compilers.
You will demonstrate your understanding in 3 problem sets.
Coursework
In addition to in-class work there will be three main kinds of work outside of class: Coding assignments, presentations, and problem sets.
- Coding assignments
not graded -
We will have one coding assignment per week, in the first half of the course.
The purpose of the coding assignments is to get practice with the concepts from class. Because we are practicing and still building up knowledge, these assignments are not graded.
You can collaborate with a partner on any of the coding assignments, except for the first one.
- Presentations
graded -
You will create three presentations this semester: one for the small compiler, one for the larger compiler, and one for your extension(s).
The presentations give you an opportunity to zoom out from the code, consolidate your learning, and demonstrate both your understanding and any interesting design choices you made along the way. Each of the three presentations will come with instructions for what to include and a rubric for how it will be graded. “Presentation” is broadly construed: it can be a video, a zine, a poster, a podcast, or anything else that meets the requirements of the assignment.
Presentations are individual: even if you collaborated with someone on the coding part, you will create your own presentation.
- Problem sets
graded -
There will be 3 short problem sets. Each problem set will focus on one fundamental concept of compilers: parsing, analysis/optimization, and register allocation.
The purpose of the problem sets is to focus our attention on concepts, without the distraction of code.
You must complete each problem set on your own.
Grades
All graded work will be graded based on a scale of “Not yet attempted”, “Not yet demonstrated”, and “Demonstrated”. Each graded assignment will have a rubric that describes the requirements for “demonstrated”.
- A
- Everything required for a grade of B, plus some excellent work.
- B
- A grade of “demonstrated” on all presentations and problem sets.
- C
- A grade of “demonstrated” on all problem sets, but “not yet attempted” or “not yet demonstrated” on at least one presentation.
- D
- All presentations and problem sets have been attempted, but at least one is not “demonstrated”.
- F
- At least one presentation or problem set not attempted.
Getting an A
I want to make it possible for anyone to get an A in the course, if that is what they want. There are many ways to do so. Generally, it is by doing something that goes significantly beyond the requirements. Here are a few examples:
- In addition to a compiler extension, you provide significant infrastructure for the compiler (for example, a set of benchmarks).
- For your compiler extension, you successfully implement something that is new to you and which we have not covered at all in class. You must also get a “demonstrated” on your presentation.
- You create a presentation, at the “demonstrated” level, of an advanced version of one of the topics of foundational compilers, and that topic is not directly related to your compiler extension.
You can also propose your own idea!
Retakes
If a graded assignment is assessed as “not yet demonstrated”, it will come with feedback. You will then have a chance to address the feedback and resubmit the work. I will use the highest grade achieved on the work.
Deadlines
There will be roughly one assignment due per week (either coding, presentation, or problem set). To allow for flexibility, the deadlines are not strict. The only strict deadline is that everything must be in by the end of the course. However, it is good to adhere as closely as possible to the deadlines (say, within a few days), so as not to get behind. Also, turning in graded work on time will allow more time for retakes, if needed.
AI Policy
I think it is a good idea to consider your position on generative AI, independent of the policies of this course. What is your position about using generative AI as a tool in and of itself? For you, how does generative AI help and / or hinder your learning?
In this course, you may use generative AI for any coding assignment, but not for presentations or for problem sets. If you choose to use generative AI, I recommend you use to either: (a) explain bugs in code you have written, (b) explain provided code that is not clear to you, or (c) write very tiny pieces of code when you know exactly how the code should work, but aren’t sure how to say it in Haskell, x86, etc. I do not recommend using generative AI to write large pieces of the code. Compilers is a topic that is perhaps best understood by implementing the concepts yourself, by hand.