- 7-Oct: Office Hours 11:30am-2:30pm on Monday Oct 8 are cancelled, but CS Nights office hours 8pm-9pm Monday Oct 8 in MD119 are still on!
- 7-Sep: Project 1 release slightly delayed due to GitHub Classroom issues. In the meantime, a copy of the project is available through Canvas so you can start looking at code and material.
This course introduces students to the design and implementation of compilers for programming languages. Specifically, students will learn how to systematically translate modern, high-level, programming languages into efficient, executable machine code.
The course introduces a number of important concepts, such as parsing and program analysis that are useful in many other contexts beyond compilers, such as software engineering and security. Perhaps the most useful outcome of the course is that students will deeply understand the capabilities and limitations of modern compilers, and how they can be used most effectively. This knowledge is important for aspiring language designers and implementors, but also for debugging and optimizing just about any application.
This course is extremely programming intensive, as most of the understanding comes from constructing (small) compilers. In particular, students will construct a series of compilers that translate from successively higher-level languages to lower-level languages.
Computer Science 51 or Computer Science 61. (Ideally, both CS51 and CS61.) Students should be comfortable programming in OCaml.
Time and Place
Tuesdays and Thursdays, 12:00pm-1:15pm, room MD G125.
- Instructor: Stephen Chong
- Teaching Fellows:
- Aaron Bembenek
- Nicholas Hasselmo
- Andrew Wong-Rolle
All questions and issues related to assignments, course content, etc., should be posted to Piazza. Questions related to grades, special consideration, etc. can be sent directly to Prof. Chong. In general, sending email to individual course staff will delay a response. Note that course staff may take up to 48 hours to respond.
Homeworks, exams, and grading
There will be a final exam on Wednesday December 12 9am-12pm (no midterms). There will be 8 projects during the semester.
Your grade will be determined by a weighted average of your scores on projects, the final exam, and class participation. The percentage breakdown (roughly and subject to change) is 70% projects, 25% final exam, and 5% participation (which includes attendance and participation in class and office hours, and contributing to online discussion).
The textbook "Modern Compiler Implementaton in ML" by Andrew W. Appel is recommended but not required. In most cases, the class materials should suffice. The instructor will provide the lecture slides after the lecture (or before if they are ready in time).
See here for more information.
TF office hours:
- Mondays 11:30am-2:30pm Andrew (Location: Maxwell-Dworkin first floor lobby)
- Mondays 8:00pm-9:00pm Nicholas (Location: CS Nights, MD199)
- Tuesdays 3:00pm-4:30pm: Aaron (Location: Maxwell-Dworkin first floor lobby)
- Thursdays 10:15am-11:45am: Aaron (Location: Maxwell-Dworkin first floor lobby)
Prof. Chong's course office hours (in MD145) for the next two weeks are:
- Loading... See Prof. Chong's schedule for full details.
There are 8 projects in this course, mostly involve implementing parts of a compiler. Implementation will be in OCaml, and we assume that students are comfortable with programming in OCaml. See the schedule for the timing of the projects.
We encourage you to work with a partner on the projects. There is a lot of coding! However, all students should respect the Harvard academic integrity policy and the course collaboration policy below.
There will also be ample opportunity for extra credit by augmenting your compilers (or that language we're compiling) with new features or optimizations. However, a word of warning: the extra credit only applies if the rest of the compiler is working.
Plan ahead and get the work done. We will not accept late submissions, nor submissions that do not type-check and compile.
Diversity and Inclusion
I would like to create a learning environment that supports a diversity of thoughts, perspectives and experiences, and honors your identities (including race, gender, class, sexuality, religion, ability, etc.) To help accomplish this:
- If you have a name and/or set of pronouns that differ from those that appear in your official Harvard records, please let me know!
- If you feel like your performance in the class is being impacted by your experiences outside of class, please don't hesitate to come and talk with me. I want to be a resource for you. If you prefer to speak with someone outside of the course, members of the SEAS Committee on Diversity, Inclusion, and Belonging are excellent resources.
- I (like many people) am still in the process of learning about diverse perspectives and identities. If something was said (by anyone) in class, office hours, Piazza, or project group work that made you feel uncomfortable, please talk to me about it.
- As a participant in course discussions, office hours, and group projects, you should also strive to honor the diversity of your classmates.
If you ever are struggling and just need someone to talk to, feel free to stop by office hours, or to reach out to me and we can arrange a private meeting.
Discussion and the exchange of ideas are essential to doing academic work. For projects in this course, you are encouraged to consult with your classmates as you work on problem sets. However, after discussions with peers, make sure that you can work through the problem yourself and ensure that any answers you submit for evaluation are the result only of your and your project partner's efforts. In addition, you must cite any books, articles, websites, lectures, etc that have helped you with your work using appropriate citation practices. Similarly, you must list the names of students with whom you have collaborated on problems.
Do not pass solutions to problem sets nor accept them from another student. For programming projects, this means do not share code. Do not post course materials (including problem sets, solutions, exams, etc.) to websites (including public GitHub repositories, and similar) or course-content archives. Also, it is never okay to look up solutions to homework problems in this class, i.e., don't look on the web for solutions. If you are ever in doubt, ask the course staff to clarify what is and isn't appropriate.