CS3276 (CS5276) — Compiler Construction


Meetings and Details (Fall 2023)

Meetings

Meetings: MW 2:30p - 3:45p Central time

Featheringill Hall 244 (FGH 244)

Textbook
  • None required.
  • However, you may find the following textbooks useful:
    Compilers: Principles, Techniques, and Tools. (Second Edition or later). Aho, Lam, Sethi, and Ullman. ISBN: 0-321-48681-1. aka the Dragon Book.
    Programming Language Pragmatics. (any edition). Michael Scott. ISBN: 0-124-10409-6.

Instructional Staff

Prof. Kevin Leach
Office: Sony Building, 4110

Office Hours: W after class until 5pm, in Sony 4110 (tentative)

Yifan Zhang
Graduate Teaching Assistant

Office Hours: T/R 1:15pm to 3:15pm CT

Websites

Piazza Forum

Brightspace is not used for this course.


Overview

Compiler Construction (CS 3276) will aquaint you with the fundamental ideas surrounding the design and implementation of a compiler. The course will stress a significant, practical course project: an end-to-end optimizing compiler. You will produce a program that accepts as input source code in a high-level language and produces as output low-level assembly representing an executable program. You will master fundamental concepts of lexical analysis, parsing, code generation, optimization, as well as calling conventions, dataflow analysis, grammars, variable bindings, control flow, types, and object memory layout.

Students will gain experience with programming via the Cool programming language. In addition, students will complete assignments using Python.

Enrollment Restrictions

University-enforced prerequisites

CS3270 (Programming languages)

However, it is possible to request an override if you would like to take the course. If you want to take this course without the prequisite, please contact me. The course can be completed without the prerequisite.

Speaking personally, I do not think you need CS3270 to succeed in this class.


Recommended prerequisites

You should be willing to pick up new programming languages. More specifically, you will use Python to complete the programming assignments. While we will introduce Python in an early lecture, you will be expected to pick up the language on your own.


Project and Assignments

This course consists of 5 Programming Assignments. Taken together, the assignments form a complete compiler for Cool, the Classroom Object-Oriented Language. The project components are assigned in roughly increasing order of size and difficulty; proportionately more time is allotted for the later assignments. Later assignments will be weighted more heavily in the final grade.

Your program submissions will be evaluated for correctness, organization, and documentation.

Assignments may be done individually or in teams of two members. However, the first assignment must be completed individually to acquaint you with the Cool Language.

Students on teams are expected to participate equally in the effort and to be thoroughly familiar with all aspects of the joint work. All members bear full responsibilitiy for the completion of assignments. Members turn in one solution for each Assignment; each member receives the same grade for the assignment. While you are allowed to change teams between assignments, teams may not be dissolved in the middle of an assignment without instructor permission.

Assignments are due at 11:59pm Central time on the date in the course schedule. Assignments will be turned in electronically via a special submission server that we have set up: https://autograder.isis.vanderbilt.edu. If you are not enrolled in the autograder after the start of classes (8/23), please contact course staff.

Course Programming Languages

Additionally, you will construct your compiler using Python:

Attendance, Participation, and COVID

You must attend the lecture meeting time, 2:30PM - 3:45PM Central time in FGH 244 on Mondays and Wednesdays. Attendance may be assessed and may incorporate your participation as a component of the grade.

Students are also required to check the course website regularly for updates or changes to the schedule. You should also participate in the Piazza forum, in which you should be enrolled automatically. If you are not enrolled in the course Piazza, please email Kevin Leach (kevin.leach@vanderbilt.edu).

To reduce student stress and provide support for individual circumstances, each student may miss three classes without excuse without penalty. You don't need to report anything; these will be applied automatically. If other circumstances arise, please speak with me.

This class is currently scheduled to be in-person following guidelines from Vanderbilt administration. Please comply with relevant Vanderbilt policies. If you are feeling ill, please contact me and we will work to ensure you are not penalized in terms of participation or grade. Please self-isolate if you contract COVID-19.

Grading Breakdown

You must submit all assignments and complete the exams to receive a passing final grade.

  • Programming Assignment 15%
  • Programming Assignment 2 5%
  • Programming Assignment 310%
  • Programming Assignment 415%
  • Programming Assignment 5 20%
  • Midterm Exam 1 12%
  • Midterm Exam 2 12%
  • Final Exam 15%
  • Professionalism and participation 6%

Grading scale

By default, there is no curve for this class. We will follow a straight scale:

93+  A
90+  A-
87+  B+
83+  B
80+  B-
77+  C+
73+  C
70+  C-
60+  D
50+  F

If the final course average for all students is less than 80, we will add points until the average is 80. Historically, the course average has been around 85% (a "B").


Late Assignment Policy

During the semester, you will have a total of 4 late days to use how ever you like, no questions asked. These late days are distributed for all of PA1 through PA5. There are no extensions whatsoever for PA5 because of its proximity to the end of the semester. When using your late days, you do not have to tell the course staff. If you need more than 4 late days, it must be approved by course staff.

Exams must be taken the day they are assigned. If you have an emergency or documented excuse for missing an exam, please contact me as soon as possible to schedule a makeup exam.

Student Mental Health

Students often experience strained relationships, increased anxiety, alcohol or drug problems, feeling down, difficulting concentrating, family issues, or a lack of motivation, and certainly renewed risks associated with COVID are likely to introduce its own issues. Students often experience mental health problems but do not talk about them. I am committed to helping students that encounter such concerns. Please see the student care network for Vanderbilt resources for student support.

Research Materials

Your class work might be used for research purposes. For example, we may used anonymized student assignments (including reading reviews, project manuscripts, homework assignments, code, and exam answers) to help understand how computer science majors make various decisions. Any student who wishes to opt out can contact Kevin Leach (kevin.leach@vanderbilt.edu) to do so after final grades have been released. This has no impact on your grade in any manner.

If you are interested in pursuing research projects or are interested in eventually pursuing a PhD in comptuer science, please feel free to reach out to discuss. My reserach group is currently full for the forseeable future, but I am nonetheless happy to discuss your career, grad school applications, and strategy for attaining the career your want.