Prof. Stephen Chong
Fall 2018

Announcements

Course information

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.

Recommended Prerequisites

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.

Course staff

See below for Office Hours.

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).

Textbooks

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).

Lectures/schedule

See here for more information.

Office hours

TF office hours:

Prof. Chong's course office hours (in MD145) for the next two weeks are:

Prof. Chong's course office hours are drop-in group based: you don't need an appointment and there may be many students in the room at the same time. If you'd like a private meeting, you can attend his DUS office hours which are drop-in individual meetings, or contact him to make an appointment.

Projects

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 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.

Collaboration Policy

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.


Some text for this course's policies is based on material by Monica Linden, Neuroscience, Brown University and David Malan, Computer Science, Harvard University.