Syllabus --Fall 2021
Discussion: 1670 Beyster Friday 12:00 PM – 1:00 PM
Mon & Thu 4-5:30pm,
EECS 483 covers the implementation of efficient compilers for programming languages. The course focuses on the connections between language features and the impact they have on the design of a compilier, including any associated algorithms and pragmatic issues, and practical applications including those outside of programming languages proper. Participants build a working compiler including lexical analysis, parsing, register allocation and code generation. As a secondary emphasis, the course exposes students to run-time issues and optimization.
At the moment, I am not planning on giving formal exams. However, we will likely have two or three written assignments (as opposed to the project assignments) that will serve a similar purpose. There is a final exam time scheduled for this course, but we may not use it. We will likely have project presentations due during exam week, so don’t assume the course is over before then.
This is the main website for this course. We will also use the following sites:
Grades and video lectures will be posted on Canvas
The Piazza bulletin board will be our main discussion forum.
Homework assignments will be submitted through Gradescope. Programming assignments will have an autograder portion that should provide quick feedback.
Programming assignments will use several pieces of software:
Rust, version 1.54 this includes the package manager/build tool Cargo
nasm, an open-source assembler
Valgrind, a tool for checking memory-safety
Clang, a compiler for C programs. (You may use gcc if you prefer, but you’ll be on your own to ensure that everything works correctly.)
Rust is supported by many editors you may use any editor you wish.
Compilers written in the class will be graded on Linux, and code is not cross-platform. I will provide pointers to how Mac users can easily make their code work on Linux, but Windows users are recommended to install a Linux distribution using WSL for testing. Instructions are provided here.
There is no required textbook, but you may find these books useful.
An interactive tutorial on using Git
(I will add to this list over the semester as I find useful guides. Email me if you have suggestions.)
A tutorial on NASM (specifically x64- and macOS-related issues)
This table specifies the lecture schedule; topics are tentative.
I will be publishing lectures notes somewhat on-demand, as I update them for Rust. In the meantime I’m leaving them private, so they are not needlessly confusing.
Topics (tentative and approximate)
Introduction to compilers, course overview
Rust practice, trees
No class: Labor Day
Tiny compiler: grammar, abstract syntax, and instructions
Names, scope and (simple) stacks
Multiple data types and tagging values
Errors and calling functions
Overflow and Tail Calls
Register Allocation 1: Liveness Analysis
Register Allocation 2: Graph Coloring
Heap allocation and pairs
No class: Fall Study Break
More memory management, Mark/compact
No class: Thanksgiving
No class: Thanksgiving
Testing your code is sufficiently important that we’ve devoted an entire page to it. Please read these notes, for each and every assignment you work on.
Homework will usually be due at 8:59 PM; the day of the week varies, so you should check each individual assignment to be sure. General homework policies are here.
This homework schedule is tentative and subject to change at the instructor’s discretion.
You may not collaborate with anyone on any of the exams. You may not use any electronic tools, including phones, tablets, netbooks, laptops, desktop computers, etc. If in doubt, ask a member of the course staff.
All homework assignments, will be completed with a partner; some may involve a larger team (TBD). You must collaborate with your assigned partner or team, as specified, on homework assignments. You may request help from any staff member on homework. (When you are working with a partner, we strongly recommend that you request help with your partner, rather than solo.) You may use the Piazza bulletin board to ask questions regarding assignments, so long as your questions (and answers) do not reveal information regarding solutions. You may not get any help from anyone else on a homework assignment; all material submitted must be your own. If in doubt, ask a member of the course staff.
Providing illicit help to another student is also cheating, and will be punished the same as receiving illicit help. It is your responsibility to safeguard your own work.
Students who cheat will be reported to the university’s office on academic integrity and penalized by the course staff, at our discretion, up to and including failing the course.
If you are unclear on any of these policies, please ask a member of the course staff.
We will be using the following gradescope page for homework submissions.
Each student gets four free, no-questions-asked late days for the term.
The purpose of late days is make the extension process fair and
transparent by getting the instructors out of the extension-granting
business entirely. Instead, when you need an extension, you can take
Using a late day is automatic: simply submit the homework up to one day late. The server will keep track of the number of used late days. Conserve your late days carefully.
No more than one late day may be used on any one homework. Late days cannot be divided fractionally, but must be used whole. Late days cannot be transferred to or shared with a partner, so in order to take an extension both you and your partner must have sufficient late days remaining. Choose your partners carefully.
Your grade will be based on your performance on the programming assignments and written assignments. Each assignment will be given an equal weight to the final grade. There will likely be around 12 total assignments but this is subject to change based on the pace of the course.
The grades will computed on an absolute basis: there will be no overall curving. The instructor may choose to curve an individual assignment, but please do not bank on such a chance.
The estimated mapping of raw point totals to letter grades is given below. Please note that these grade boundaries may move slightly in either direction at the discretion of the instructor: if a particular breakpoint falls in the middle of a tight cluster of numeric grades, we will attempt to move the breakpoint to give that whole cluster the same letter grade. If, near the end of the semester, you are concerned that your grade is hovering near a breakpoint, see me to discuss your concerns.