CS 4470-001 Fall 2026 Compilers
Instructors
| Instructor: |
Ben Greenman <blg@cs.utah.edu> MEB 3252 GitHub: |
| TA: |
David Yue <david.yue@utah.edu> MEB 3515 GitHub: |
Course Description
Overview
| Course | CS 4470 |
| Department | School of Computing |
| Credit Hours | 3 |
| Semester | Fall 2026 |
Outcomes
- Describe the major components of a compiler and their roles, including the:
- front end (lexer, parser, type checker),
- middle end (analysis and optimization), and
- back end (layout and code generation).
- Understand how a programming language is represented by a grammar, and implement a lexer and parser.
- Describe type systems using type rules and implement type checkers for simple type systems.
- Design memory layouts and implement basic code generation
- Write and read assembly code
- Implement analyses such as constant folding, dead code elimination, and inlining
Materials
There are no required materials / textbooks.
Optional reading:
- Appel. Modern Compiler Implementation. Any edition, for Java, ML, or C.
- Cooper & Torczon. Engineering a Compiler. 2nd edition. ISBN13 9780120884780
Slides and lecture notes to appear on Pages in Canvas: /courses/1265707/pages
Communication
Office Hours
Tuesdays and Thursdays in MEB 3515:
- 1-2pm Ben (prof)
- 2-3pm David (TA)
The office hours room is big. Come over, find a seat, hack on your compiler, and ask questions when/if they arise. You don't need to come prepared with questions.
Prof. Ben can also meet by appointment. If you have any concerns, send an email. We'll find time for an in-person (preferred) or zoom meeting; I want to meet with you.
Evaluation
- Grades will be assigned on a 90/80/70/60 scale,
- We reserve the option to curve raw scores before assigning grades if they judge that students’ numeric performance is not representative of the grades they deserve.
- We will use +/- for difficult borderline cases. For example, an A- would have a raw score slightly lower than 90 with several mitigating factors.
- Grade components
- 60% programming assignments
- Pair programming required. You must collaborate with another student and you must both take ownership of the submitted code.
- Grades will be computed through GitHub actions on your code repository. Every time you push, you will know your current score on the homework.
- 30% exams
- There will be 2 mandatory in-class exams, and 1 optional final exam. If you do not take the final exam, the midterms will count for 15% each. If you do take the final, the final will count for 15% and the midterms will count for 7.5% each.
- Contact the instructor ASAP if you have issues with the exam date/time.
- 10% quizzes, including course evaluations.
- 60% programming assignments
Teaching and Learning Methods
Class time will be used for lecture and discussion. Attendance is optional. Recordings will be available.
Outside of class, most of your time will be spent implementing a compiler for a language called JPL (John Pavel Language). JPL is a small language designed by professors at the University of Utah to provide a relevant, challenging, and interesting learning experience. The instructors will provide extensive test cases to guide your journey toward a correct compiler. Writing compiler code is the most effective way to learn about how compilers work.
Students will build a real compiler, in stages, throughout the semester. Subsequent assignments will build upon early ones. Do a good job each week to avoid falling behind.
Exams will be used to assess your knowledge of compiler internals. Exams will take place in person. Your answers must be written by hand on paper unless you qualify for an exemption through CDA (see below). You will not be asked to write long programs in an exam.
Course Policies
Late work: Assignments are due weekly at 11:59pm on Fridays. Late submissions are allowed until Monday 11:59pm without penalty; we will not accept submissions after that time.
Participation: We strongly encourage your participation in both in-class discussions and online forums. The instructor will provide a welcoming environment. Remember: all code has bugs and the purpose of reviewing code is to find more bugs, not to disparage the person who wrote the bugs. (Laughing at bugs is good, especially if the bugs are by the professor.)
Online: We will use Canvas, Discord, and GitHub. Grades and lecture materials will be on Canvas. Online discussion will use Discord or email. Programming artifacts, including your project code, will live on GitHub.
Academic Misconduct: We follow the Kahlert School of Computing policy. See below. Academic dishonesty results in a failing grade for the course. Two instances of academic dishonestly lead to expulsion from the major.
Zoom: Lectures will be streamed on zoom and recordings will be available on Canvas for several weeks. Zoom attendance is allowed but not encouraged. We will not actively monitor the chat. We will not encourage audio from participants. The positioning of the recording camera and microphone may be poor.
AI + LLM: You may use AI tools for any part of this course, except the exams. Thoughtful use of AI on homeworks is encouraged because, for better or worse, AI tools are now a standard part of software development. You should experiment with AI tools while a student. It is acceptable to vibe-code your entire compiler --- but note that you will need to demonstrate competency on the exams to pass this course. You must take full responsibility for AI-generated artifacts submitted for grading. Be advised that AI tools may produce wrong and misleading output, and that their cost to the environment may not be factored in to their usage price.
Schedule
Bold dates = Ben absent
| Week | Tuesday | Thursday |
| 1 | Aug 25: JPL, Course Intro | Aug 27: (no class, get JPL running!) |
| 2 | Sep 1: Lexing 1 | Sep 3: Lexing 2 |
| 3 | Sep 8: Parsing 1 | Sep 10: Parsing 2 |
| 4 | Sep 15: Types 1 | Sep 17: Types 2: Environments |
| 5 | Sep 22: Runtime Representations | Sep 24: Ugly C Compilation 1 |
| 6 | Sep 29: Midterm 1 Review | Oct 1: Midterm 1 |
| 7 | Oct 6: Ugly C 2 | Oct 8: Ugly C 3 |
| 8 | Oct 13: No class, Fall break | Oct 15: No class, Fall break |
| 9 | Oct 20: ASM Compilation 1 | Oct 22: ASM 2 |
| 10 | Oct 27: ASM 3 | Oct 29: ASM 4 |
| 11 | Nov 3: Correctness | Nov 5: Peephole optimization |
| 12 | Nov 10: Dataflow Analysis | Nov 12: Access patterns, Tiling |
| 13 | Nov 17: IRs |
Nov 19: Objects MIDTERM 2 |
| 14 | Nov 24: Sparsity | Nov 26: No class, Happy Thanskgiving |
| 15 | Dec 1: Midterm 2 Review | Dec 3: Midterm 2 |
| 16 | Dec 8: Memory Hierarchy | Dec 10: Linking |
Support
Accommodations will be considered on an individual basis and may require documentation.
Please contact the instructor as soon as possible (preferably shortly before the semester begins) to request accommodations of any kind.
Contact your instructor as soon as possible if an extreme personal circumstance
(hospitalization, death of a close relative, natural disaster, etc.) is interfering with your ability to
complete your work.
To request an accommodation for religious practices, contact your instructor at the beginning of the semester.
If you are student on active duty with the military and experience issues that prevent you from participating in the course because of deployment or service responsibilities, contact your instructor as soon as possible to discuss appropriate accommodations.
Disability Access
All written information in this course can be made available in an alternative format with prior notification to the Center for Disability & Access (CDA). CDA will work with you and the instructor to make arrangements for accommodations. Prior notice is appreciated. To read the full accommodations policy for the University of Utah, please see Section Q of the Instruction & Evaluation regulations.
If you will need accommodations in this class, contact:
Center for Disability & Access
801-581-5020
disability.utah.edu
162 Union Building
200 S. Central Campus Dr.
Salt Lake City, UT 84112
Office of Equal Opportunity
The Office of Equal Opportunity And Affirmative Action (OEO/AA) is dedicated to providing a fair and equitable environment for all to pursue their academic and professional endeavors and to equally access University programs.
OEA/AA
801-581-8365
oeo.utah.edu
383 South University Street
Level 1, OEO Suite
Salt Lake City, UT 84112
Price College Counseling Service
Goal: provide a confidential, safe, and non-judgmental space to address any stressor or concern in your life. Empower you to take actions to meet your needs, values, and goals.
Call to schedule an Initial Consultation (IC) appointment. Be sure to ask for “embedded counseling for College of Engineering”.
Counseling Center
801-581-6826
www.price.utah.edu/students/current/counseling
WEB 1707