Syllabus --Fall 2022
Lecture: 1200 EECS Monday and Wednesday 1:30 PM – 3:00 PM.
Recordings available on Canvas afterwards.
Discussion: 1017 DOW Friday 12:30 PM – 1:30 PM
Tue & Wed 3:30-5:00pm (hybrid),
Tue 12:00-2:00p (Virtual)
Thu 5:00-6:00pm (Virtual)
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.
There will be no formal exams in this course. However, we will have one or two written assignments (as opposed to the programming assignments) that will serve a similar purpose. There is a final exam time scheduled for this course, but we may not use it.
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.
Rust Learning Materials. I especially recommend the Rust Book as a thorough introduction to most relevant language features. You might be interested in this version of the Rust Book which has interactive quizzes to test your understanding.
This blog post has some good advice on learning Rust for the first time.
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.
Topics (tentative and approximate)
Introduction to compilers, course overview
Rust practice, trees
No class: Labor Day
Our first compiler: grammar, abstract syntax, and x86
NO CLASS - rescheduled to Friday
Names, scope and (simple) stacks
(Online) Sequential Form
Multiple data types and tagging values
Errors, Calling into Rust
Functions Part I: Tail Calls
Desugaring Mutable Variables and Loops
Non-tail Calls and Stack Management
Heap allocation and pairs
No class: Fall Study Break
Mutable Arrays and Desugaring
Register Allocation 1: Liveness/Conflict Analysis
Register Allocation 2: Graph Coloring
Lexing & Parsing Overview, Regular Languages
Semantic Actions, Parsing in Practice
No class: Thanksgiving
Types in Compilation
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 5:00 PM on Fridays, but may vary on each individual assignment, so be sure to check the page every time. General homework policies are here.
This homework schedule is tentative and subject to change at the instructor’s discretion. There are expected to be 8 programming assignments, 1 written assignment and the final project
Programming assignments may be completed with a partner or solo. To make grading/presentation time manageable, the written assignment and the final project must be completed with a partner. Discuss with the professor if you have a very strong reason it is not possible to work with a partner (personal preference is not a strong reason).
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.
Homework will (typically) be due Friday at 5pm. Late work will be accepted until Sunday at 11:59pm but with 10% docked from the grade. After that, late submissions will not be accepted.
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, except for the final project will count for twice as much as a typical assignment. 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.