Instructor: Allison Randal
Lectures: Tuesday & Thursday, 1:30pm-2:45pm (Sanders Physics 105)
Office Hours: (Sanders Classroom 016) by appointment.

Overview

Compilers are used throughout the world of computers and computing. But what is a compiler? What functions and purposes do they serve? How do they operate? What problems do they solve? How might one be designed?

This capstone course examines these questions and others to develop a deeper understanding of computers, their operation and their programming, using a combination of lectures, in-class discussions, exercises and an incremental semester-long project.

Prerequisites: CMPU 224, CMPU 240
Recommended: CMPU 235, CMPU 245, CMPU 231

Calendar

The calendar page will be updated throughout the semester with readings, assignments, and project deadlines.

Textbook

The textbook for this class is A Practical Approach to Compiler Construction by Des Watson, which is available for free online through SpringerLink. To access from outside the Vassar network, you may need to search for the book on the library website, which will prompt you to log in.

Optional additional readings are given from Compilers: Principles, Techniques, and Tools (2nd Edition), by Alfred V. Aho, Monica S. Lam, Ravi Sethi, and Jeffrey D. Ullman.

Course Requirements

Requirements for the course consist of written assignments and completion of a large programming project. See the calendar for the schedule of readings, lecture topics, assignments, and project submission milestones.

  • Written Assignments: 40%
  • Project: 60%

The project and assignments are each graded on a 100 point scale. There will be no final exam for the course, since the primary focus is on the programming project. The written assignments assess your understanding of the concepts of compilers, while the project assesses your practical application of the concepts.

Project

The project consists of implementing a compiler front-end, in four parts: lexical analysis, parsing, semantic analysis, and intermediate code generation. Each part will be integrated with what has been completed previously, but a reference solution to each part will be provided after the submission date, so students will have the option to build on the reference code for earlier parts, rather than their own code.

See the calendar for the project submission due dates. Please follow the submission instructions when handing assignments in.

The lexer, parser, semantic analyzer, and generator each count for 15% of the final grade. For extra credit, students may also choose to submit a final optimizer project part. The grade on the extra credit part will replace the lowest grade on the first four project parts, only if the extra credit grade is higher than the lowest grade, so there's no risk in attempting the extra credit part.

Your compiler front-end will parse and generate intermediate code for a subset of the C language, a little language called “DL”, described in the textbook. The intermediate code you generate will be interpreted and executed by LLVM. Detailed specifications for each phase of the compiler project will be provided as they are assigned.

This is a large project and you should regard it as on-going over the semester. It is not a trivial exercise and cannot be put off for a week's intensive effort at the end of the semester. Project pieces must be handed in on the due date or be subject to the following penalty: if handed in up to 3 days late, a penalty of 5 points; 4-7 days late, 10 point penalty; after 7 days an automatic grade of 0 is given.

Students can optionally collaborate on the project with one other student on the course. Two students working together will share the same project grade. If you choose to collaborate, let me know early in the semester who you have chosen to work with. With such a large project, it can sometimes save time to work together on the code. But, pick a partner you know and have experience working with, because collaboration does require clear communication between the partners and more careful time planning.

Getting help

Your first resource for help is the Moodle forum for the course. Check it to see if your question has already been asked or answered. If not, then post a message to the forum.

If you need more help, you can come to my office hours or email me with questions, or to set up an appointment. I'm happy to make appointments to meet by Zoom or Google Hangouts.

Academic Accommodations

Academic accommodations are available for students registered with the Office for Accessibility and Educational Opportunity (AEO). Students in need of disability (ADA/504) accommodations should schedule an appointment with me early in the semester to discuss any accommodations for this course that have been approved by the Office for Accessibility and Educational Opportunity, as indicated in your AEO accommodation letter.

Title IX

Vassar College is committed to providing a safe learning environment for all students that is free of all forms of discrimination and sexual harassment, including sexual assault, relationship abuse, and stalking. If you (or someone you know) has experienced or experiences any of these incidents, know that you are not alone. Vassar College has staff members trained to support you in navigating campus life, accessing health and counseling services, providing academic and housing accommodations, helping with legal protective orders, and more. If you wish to speak to someone privately, you can contact any of the following on-campus resources:

  • Counseling Service (845-437-5700)
  • Health Service (845-437-5800)
  • SART (Sexual Assault Response Team) advocate, available 24 / 7 by calling 845-437-7333 and asking for SART

The SAVP website and the Title IX section of the EOAA website have more information, as well as links to both on- and off-campus resources.

Acknowledgments

This course includes extensive material developed by Nancy Ide.