CS 4470-001 Fall 2026 Compilers

Syllabus

CS 4470: Compilers

ARCH 127, TR 9:10--10:30am

(livestreamed and recorded via Zoom)

Instructors

Instructor:

Ben Greenman <blg@cs.utah.edu> MEB 3252 GitHub: bennn

TA:

David Yue <david.yue@utah.edu> MEB 3515 GitHub: CoconutJJ

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:

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.

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

University Policies

Americans with Disabilities Act (ADA)

The University of Utah seeks to provide equal access to its programs, services, and activities for people with disabilities.

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.

In compliance with ADA requirements, some students may need to record course content. Any recordings of course content are for personal use only, should not be shared, and should never be made publicly available. In addition, recordings must be destroyed at the conclusion of the course.

If you will need accommodations in this class, or for more information about what support they provide, contact:

Center for Disability & Access

  801-581-5020
  disability.utah.edu
 Third Floor, Room 350
 Student Services Building
 201 S 1460 E
 Salt Lake City, UT 84112

Safety at the U

The University of Utah values the safety of all campus community members. You will receive important emergency alerts and safety messages regarding campus safety via text message. For more safety information and to view available training resources, including helpful videos, visit safeu.utah.edu.

To report suspicious activity or to request a courtesy escort, contact:

Campus Police & Department of Public Safety

  801-585-COPS (801-585-2677)
  dps.utah.edu
  1735 E. S. Campus Dr.
  Salt Lake City, UT 84112

Addressing Sexual Misconduct

Title IX makes it clear that violence and harassment based on sex and gender (which includes sexual orientation and gender identity/expression) is a civil rights offense subject to the same kinds of accountability and the same kinds of support applied to offenses against other protected categories such as race, national origin, color, religion, age, status as a person with a disability, veteran’s status, or genetic information.

If you or someone you know has been harassed or assaulted, you are encouraged to report it to university officials: 

Title IX Coordinator & Office of Equal Opportunity and Affirmative Action

  801-581-8365
  oeo.utah.edu
  135 Park Building
  201 Presidents' Cir.
  Salt Lake City, UT 84112

Office of the Dean of Students

  801-581-7066
  deanofstudents.utah.edu
  270 Union Building
  200 S. Central Campus Dr.
  Salt Lake City, UT 84112

To file a police report, contact:

Campus Police & Department of Public Safety

  801-585-COPS (801-585-2677)
  dps.utah.edu
  1735 E. S. Campus Dr.
  Salt Lake City, UT 84112

If you do not feel comfortable reporting to authorities, the U's Victim-Survivor Advocates provide free, confidential, and trauma-informed support services to students, faculty, and staff who have experienced interpersonal violence.

To privately explore options and resources available to you with an advocate, contact:

Center for Student Wellness

  801-581-7776
  wellness.utah.edu
 350 Student Services Building
 201 S. 1460 E.
 Salt Lake City, UT 84112

Academic Misconduct

It is expected that students comply with University of Utah policies regarding academic honesty, including but not limited to refraining from cheating, plagiarizing, misrepresenting one’s work, and/or inappropriately collaborating. This includes the use of generative artificial intelligence (AI) tools without citation, documentation, or authorization. Students are expected to adhere to the prescribed professional and ethical standards of the profession/discipline for which they are preparing. Any student who engages in academic dishonesty or who violates the professional and ethical standards for their profession/discipline may be subject to academic sanctions as per the University of Utah’s Student Code: Policy 6-410: Student Academic Performance, Academic Conduct, and Professional and Ethical Conduct.

Plagiarism and cheating are serious offenses and may be punished by failure on an individual assignment, and/or failure in the course. Academic misconduct, according to the University of Utah Student Code:

“...Includes, but is not limited to, cheating, misrepresenting one’s work, inappropriately collaborating, plagiarism, and fabrication or falsification of information…It also includes facilitating academic misconduct by intentionally helping or attempting to help another to commit an act of academic misconduct.”

For details on plagiarism and other important course conduct issues, see the U's Code of Student Rights and Responsibilities.