Course Information

CS4210/5210: Compilers and Interpreters, Fall 2025, Yale University

  • General Information
  • Textbooks
  • Grading
  • Attendance
  • Assignments
  • Late-Assignments Policy
  • Collaboration Policy
  • Keeping In Touch

  • General Information

    Lectures:
    MW 2:30 PM -3:45 PM, HLH17 Room 05.

    Instructor:
    Zhong Shao, Room 314 AKW, 432-6828, zhong dot shao at yale dot edu
    Office hours: M 4 - 5 PM, or by appt.

    Teaching Assistant:
    Longfei Qiu, Room 313 AKW, 432-xxxx. longfei dot qiu at yale dot edu
    office hours: by appointment (evenings or weekends welcome).


    Textbooks

    The recommended textbook is:

  • A. W. Appel, Modern Compiler Implementation in ML (Paperback), 552 pages. Cambridge University Press 2004, ISBN-10: 0521607647.
  • Also, the following books are optional readings:
  • Y. Minsky, A. Madhavapeddy, and J. Hickey, Real World OCaml: Functional Programming for the Masses, O'Reilly Media 2013.
  • J. Hickey, Introduction to Objective Caml, 2008
  • A. V. Aho, M. S. Lam, R. Sethi, and J. D. Ullman, Compilers: Principles, Techniques, and Tools (2nd Edition), Addison Wesley 2006.
  • S. Muchnick, Advanced Compiler Design and Implementation, Morgan Kaufmann 1997.

  • Grading

    This course will have six programming assignments (+ 1 ungraded assignment) and one take-home exam. This course focuses heavily on programming assignments. Each programming assignment implements parts of a compiler. At the end of the semester, you will have implemented a full fledged compiler!

    Your grade will be calculated as follows:

    These weights are subject to minor variation.

    Additionally, CPSC 5210 students must review an academic paper by the end of the semester to receive a credit.


    Attendance

    Attendance at lectures is expected but will not be recorded. Students are, however, fully responsible for all material presented in lectures, even if some of it does not appear in the "official" lecture notes. Class attendance is recommended strongly.

    Lecture notes will be made available. Watch for an announcement of their availability.


    Programming Assignments

    This course is driven by programming assignments. Throughout the semester, you will be completing 6 programming assignments. These 6 assignments together will create a compiler. The programming assignments will be announced from canvas. The skeleton code will be distributed using GitHub Classroom and they will be implemented with the OCaml language.

    All assignments come with autograder. There are two methods in deploying the autograder, which will be detailed in Assignment 0. So it is highly recommended to follow the instructions in Assignment 0 to both install necessary tools and understand the programming assignments workflow, when it is released.

    Late-Assignments Policy

    Each student is given 120 discretionary late hours for programming assignments, but any one assignment may only be up to 48 hours late (this is because we will post the sample solution after then). These are calendar hours, not business hours. As the homework assignments are submitted electronically, the "write date" on the student's homework file will be considered the completion date for late assignments.

    After you use up all of your discretionary late hours, assignments turned in late will be graded according to the following formula: S = R * (1 - t / c), where S is the grade given, R is the grade the work would have gotten if turned in on time, t is the amount of time by which the work was late, and c is equal to four days. Thus, the value of a late assignment decays daily, with a half-life of just over two days. Examples: work turned in five minutes late gets 99.9% credit, one hour late gets 99.0% credit, six hours late gets 93.8% credit, one day late gets 75.0% credit, and two days late gets 50.0%. Again late submissions beyond 48 hours late are not accepted.

    There will be no extensions due to scheduling conflicts, computer downtime, or other such factors, except under truly extraordinary circumstances. Extensions will be granted only for university-sanctioned excuses such as illness, and then only with the proper documentation. You are responsible for planning ahead and managing your time so that you can complete the assignments on time. You must either finish on time or accept the consequences of doing otherwise.

    Collaboration Policy

    Programming, like composition, is an individual creative process. Individuals must reach their own understanding of the problem and discover a path to its solution. During this time, discussions with friends are encouraged. However, when the time comes to write the code that solves the problem, such discussions are no longer appropriate -- the program must be your own work (although you may ask teaching assistants or lab assistants for help in debugging).

    Do not, under any circumstances, copy another person's program. Writing code for use by another or using another's code in any form violates the University's academic regulations and will be dealt with harshly.


    Keeping In Touch

    We will use the Ed Discussion forum for announcements and discussions. See the Quick Start Guide to learn how to use Ed Discussion.


    Copyright (c) 2025, Zhong Shao, Dept. of Computer Science, Yale University