CS 107 Compilers (Fall 2026)
1 Description
Topics and Format
2 Grading
3 Resources
4 Schedule
Sept 4, 2026

CS 107 Compilers (Fall 2026)🔗

Quick links
Projects
Piazza
Canvas
Scala 3 Book
X86 Cheat Sheet

1 Description🔗

Instructor: Guannan Wei (guannan.wei@tufts.edu), Assistant Professor in Computer Science

Course URL: https://continuation.passing.style/teaching/cs107-fall26

Piazza: https://piazza.com/tufts/fall2026/cs107/home

Credits: 4 credits

Prerequisite: CS105 and CS40. Students should have strong programming skills, and be comfortable with pattern matching, recursion, higher-order functions, algebraic data types, reading assembly code, and debugging complex code. Reviewing CS105 and CS40 materials is highly recommended before taking this course.

Time and Where: Tuesday and Thursday 12:00 - 1:15 PM, JCC 280

TA: Jonah Weinbaum

Office hours: TBD

The course website is still under construction.

Topics and Format🔗

This course covers the theory and practice of programming language interpretation, compilation, and run-time systems. You will be learning how compilers work by spending a lot time building internal components of a compiler, including parser, type checkers, intermediate representations, code generators, and runtime systems.

  • Lectures: Lectures and projects will cover basic and advanced topics in compiler design and implementation, including different intermediate representations, continuation-passing style (CPS) transformation, closure conversion, register allocation, garbage collection, etc. Attendance is encouraged but not required.

  • Projects: There are 7 required programming projects. Throughout these projects, you will learn how to build compilers for a growing toy language, generating x86-64 assembly code. Through out the semester, the language will be extended with new features, and you will implement arithmetic expressions, arrays, conditionals, while loops, mutable variables, first-class functions and recursion, etc.

    There is one special project (the 6th) in the middle of the semester. In this project, you will have three choices:
    • You may implement an optimizer on top of the compiler you have built in previous projects.

    • You may implement a new, creative, non-trivial language feature.

    • You may survey a real-world compiler or a component from a real-world compiler and write a report.

    You are also required to give a presentation on your choice of project 6 in the last week of the semester. For this project and only for this project, you are allowed to use AI tools in any way to help you with the implementation or survey, but you will be graded by the quality of your final implementation and the depth of your understanding showed from the presentation.

  • Lab sessions: There are lab sessions for students to get help on projects and ask questions. For each project, there will be a lab session led by the instructor or TA to go through the project skeleton and provide guidance on how to get started. The time and location of the lab sessions will be decided according to student availability. Attendance is encouraged but not required.

  • Communication: We will use Piazza for announcements and discussions. Participating in Piazza discussions with your peers is highly encouraged. We will use Canvas for project submission and grading.

2 Grading🔗

Final grades will be assigned according to the following breakdown:

  • Project: 42%. See general submission guidelines.
    There will be 7 programming projects throughout the semester. Tentative breakdown of project weights: 3 + 4 + 8 + 7 + 7 + 7 + 6.

  • Midterm: 25%.

  • Final: 30%.

  • Participation: In-class and Piazza participation count 3% of the final grade. Additional extra credits will be given for instructor-endorsed answers on Piazza.

You need to achieve a minimum of 30% in each of the three components (projects, midterm, final) for a passing grade. Failing to meet this requirement will result in an automatic failing grade for the course.

Late Submission Policy: Projects are due at 11:59pm on the due date. You automatically have a 24-hour grace period for each project, during which you can submit late, but you will only receive a maximum of 90% of the points.

Typically new projects will be released after the 24-hour grace period of the preceding project. Succeeding projects build upon previous ones and will reveal solutions of preceding projects, so late submissions after the grace period will receive 0 points.

If you experience an extraordinary difficulty, such as serious illness, family emergencies, or other extraordinary unpleasant events, your first step should be to contact your advising dean (see advising deans for A&S students and SoE students) as soon as you can: explain the situation to them and ask them to contact the course instructor. Your dean will work with the instructor to make appropriate arrangements. IMPORTANT: The earlier you notify your dean, the more flexibility the course staff will have to make appropriate arrangements.

3 Resources🔗

On learning Scala:
  • The Scala 3 Tutorial: We will use Scala 3 to build compilers, so you need to be comfortable with programming in Scala to complete the projects. This document surveys the basic language features.

  • Scala Books: If you want to learn Scala in more depth, you can check out some of the books listed on this page.

On x86-64 assembly:
  • X86 Cheat Sheet: In the projects, your compiler will generate x86-64 assembly code, so you need to be familiar with x86-64 assembly to understand what to be generated.

Optional textbooks on compilers and type systems:

4 Schedule🔗

Tentative schedule for the course:

Week

  

Date

  

Topic

Week 1

  

Sept 8, Tue

  

Lecture: Introduction & first compilers

  

Sept 8, Tue

  

Project 1 Release

  

Sept 10, Thu

  

Lecture: Parsing and compiling variable bindings

Week 2

  

Sept 15, Tue

  

Lecture: Error handling, semantics, and branches

  

Sept 15, Tue

  

Project 1 Due, Project 2 Release

  

Sept 17, Thu

  

Lecture: Variables, loops, and type checking

5 Academic Integrity, Plagiarism, and Student Support🔗

Academic Integrity Policy: Tufts holds its students strictly accountable for adherence to academic integrity. The consequences for violations can be severe. It is critical that you understand the requirements of ethical behavior and academic work as described in Tufts’ Academic Integrity handbook. If you ever have a question about the expectations concerning a particular assignment or project in this course, be sure to ask me for clarification. The Faculty of the School of Arts and Sciences and the School of Engineering are required to report suspected cases of academic integrity violations to the Dean of Student Affairs Office. If I suspect that you have cheated or plagiarized, I must report the situation to the Office of Community Standards.

Plagiarism Detection: As part of this course, I will use TurnItIn to help determine the originality of your work. TurnItIn is an automated system which instructors can use to quickly and easily compare each student’s assignment with billions of websites, as well as an enormous database of student papers that grows with each submission. When papers are submitted to TurnItIn, the service will retain a copy of the submitted work in the TurnItIn database for the sole purpose of detecting plagiarism in future submitted works. Students retain copyright on their original course work.

I may also use Language Learning Model (LLM, e.g. ChatGPT, Gemini, etc.) and/or LLM detection tools to evaluate the originality of your work. LLM detection tools attempt to assess if submitted content was potentially created by an LLM platform through the analysis of linguistic patterns and statistical properties of the content. While students retain copyright on their original course work, LLMs and LLM detection platforms may absorb the content as part of their functionality. Please note that while LLM detections may suggest a potential probability that a percentage of the work was generated by an LLM site, it does NOT confirm that there was a violation of the Academic Misconduct policy. This probability may, however, initiate inquiry from your instructor regarding how the assignment was completed.

Accommodations for Students with Disabilities: Tufts is committed to providing equal access and support to all qualified students through the provision of reasonable accommodations. If you have a disability that requires reasonable accommodations, contact the StAAR Center at StaarCenter@tufts.edu or 617-627-4539. Please be aware that accommodations cannot be enacted retroactively, making timeliness a critical aspect for their provision.

Student Support, including Mental Health: As a student, there may be times when personal stressors or difficulties interfere with your academic performance or well-being. The Dean of Student Affairs Office offers support and care to undergraduates and graduate students who are experiencing difficulties, and can also aid faculty in their work with students. In addition, through Tufts’ Counseling and Mental Health Service (CMHS) students can access mental health support 24/7, and they can provide information on additional resources. CMHS also provides confidential consultation, brief counseling, and urgent care at no cost for all Tufts undergraduates as well as for graduate students who have paid the student health fee. To make an appointment, call 617-627-3360. Please visit the CMHS website: http://go.tufts.edu/Counseling to learn more about their services and resources.

6 Acknowledgments🔗

Parts of the class are based on the Compiler class taught by Tiark Rompf at Purdue and the Advanced Compiler Construction class taught by Michel Schinz at EPFL.