Compiler Design (COMP 520)

Purpose:

This course covers modern compiler techniques and their application to both general purpose and domain specific languages. The practical aspects focus on current technologies, primarily Java and interactive web services.

Contents:

A detailed syllabus is available from the course website. This is a summary of the core topics that will be covered:
  • Deterministic parsing: LR parsers, the flex/bison and SableCC tools.
  • Semantic analysis: abstract syntax trees, symbol tables, type checking, resource allocation.
  • Virtual machines and run-time environments: stacks, heaps, objects.
  • Code generation: resources, templates, optimizations.
  • Surveys on: garbage collection, native code generation, static analysis.

Schedule:

Lectures: 3 hours/week. MWF 11:35--12:25, ENGTR (Trottier) 0070

Prerequisites:

Officially Required: COMP 273 (Introduction to Computer Systems), COMP 302 (Programming Languages and Paradigms). Students registering without the official prerequisites may find the course removed from their transcript by their faculty. This should not be a problem for graduate students. Speak to the instructor if you are unsure about whether you should take the course.

Other: COMP 330 (Theoretical Aspects of Computer Science) is also recommended. Students without COMP 330 should familiarize themselves with regular and context-free languages.

This is a programming-intensive course. The primary languages used are C and Java and familiarity with them is assumed.

Lecturer:

Chris Pickett, McConnell 226, office hours in ENGTR 0070 right after class ends or by appointment.
Email: chris [dot] pickett [at] mail [dot] mcgill [dot] ca

Teaching Assistants:

Jesse Doherty and Nurudeen Lameed, McConnell 226, office hours Monday--Friday 13:00-16:00 or by appointment.
e-mail: jdoher1 [AT] cs [DOT] mcgill [DOT] ca, nlamee [AT] cs [DOT] mcgill [DOT] ca

Mailing List:

cs520-students [AT] cs [DOT] mcgill [DOT] ca

Your McGill email will be added to the list. We will use it for announcements, and you can use it for public discussions as you wish.

Evaluation

Project: 50%
Assignments: 25%
Midterm: 10%
In-class Final: 15%
Participation: up to 10% (bonus)

Assignment marks are allocated as follows:
  • 5% for each of the first three JOOS deliverables (15% total)
  • 10% for the JOOS peephole optimizer
  • 10% for the first two WIG project milestones combined
  • 5% each for the next four project milestones (20% total)
  • 10% for the final WIG compiler
  • 10% for the final WIG report
Both project and assignments are completed by groups, meaning that 75% of the marks in this course come from group work. The contributions of each group member will be considered in grading. If there is a significant difference between the contributions of different group members, the grades may be redistributed accordingly.

Credits:

4 credits

Text

The readings consist of chapters from the following two textbooks:
  • Compiler Construction, Kenneth C. Louden, 582 pages
  • Modern Compiler Implementation in C, Andrew W. Appel, 544 pages
plus additional readings available online. Further, the class slides contain essential material not found elsewhere. See this page for details.

Detailed Course Schedule and Links:

The course web page contains a detailed course schedule, links to the course notes and links to relevant software. You should visit this page often to get the most recent information.

http://www.cs.mcgill.ca/~cs520/

Assignment and Exam Policy

All assignments (deliverables, milestones, and the project) are due at midnight. We will be using Subversion for all group submissions. Marks will be generously deducted for lateness. No assignment submissions will be accepted after marked assignments have been returned or after solutions have been discussed in class.

Both in-class exams are closed book. If you miss either midterm you will require a medical note or written permission from the instructor to reschedule.

Academic Integrity at McGill University

McGill University values academic integrity. Therefore all students must understand the meaning and consequences of cheating, plagiarism and other academic offences under the Code of Student Conduct and Disciplinary Procedures (see http://www.mcgill.ca/integrity/ for more information). A helpful article on how to avoid plagiarism can be found at: http://www.mcgill.ca/integrity/studentguide/.

In terms of this course, part of your responsibility is to ensure that you put the name of the author on all code that is submitted. By putting your name on the code you are indicating that it is completely your own work. If you use some third-party code you must have permission to use it and you must clearly indicate the source of the code.

In general, work submitted for this course must represent your own efforts. Copying assignments or tests, or allowing others to copy your work, will not be tolerated. Note that introducing syntactic changes into a copied program is still considered plagiarism.

You may submit all work in either English or French. English is strongly preferred.

Maintained by Christopher J. F. Pickett. [HOME]