BU CAS CS 525
Compiler Design
Semester: Spring 2004

Course Information

  • Instructor: Hongwei Xi (email: hwxi@cs.bu.edu)
  • Instructor's Office: MCS 172
  • Instructor's Office Hours: Tuesday 1:00-3:00 PM, Friday 3:00-4:00 PM
  • Grader: Chiyan Chen
  • Lecture Times: MWF 2:00-3:00 PM
  • Classroom: KCB, Room 103, 565 Commonwealth Avenue
  • Tuesday, February 17 (after five weeks) is the last day to drop a course without a notation of "W" on the transcript
  • Friday, March 5 (end of the eighth week) is the last day to drop a course with a notation of "W" on the transcript
  • Midterm Exam is a one-hour in-class exam scheduled on Friday, March 5, 2004
  • Final Exam is a two-hour exam officially scheduled on Saturday, May 8, 2004, from 9 to 11AM
  • Overview

    Compiler Design is a course that introduces students to some basics in the design and implementation of compilers. In this course, we are to teach the theory behind various components of a compiler, the programming techniques involved to put the theory into practice, and the interfaces used to modularize the compiler. In particular, we choose Standard ML (SML) as the implementation language, allowing students to learn first-handedly as to how the module system of SML can be used effectively in constructing (relatively) large programs. We plan to cover the first part, that is, the first twelve chapters of the following textbook by Andrew Appel.

    Textbook

  • Modern Compiler Implementation in ML by Andrew W. Appel. ISBN 0-521-58274-1. Cambridge University Press.
  • Reference Books

  • Introduction to the Theory of Computation, by Michael Sipser. ISBN 0-534-95651-3. PWS Publishing Company, 20 Park Plaza, Boston, MA 02116.
  • ML for the Working Programmer by Daniel Larry C. Paulson. ISBN 0-521-57050-6 (hardback) and 0-521-56543-X (paperback). Cambridge University Press.
  • Elements of ML Programming by Jeffery D. Ullman. ISBN 0-13-790387-1. Prentice-Hall.
  • Introduction to Programming using SML by Michael R. Hansen and Hans Rischel. ISBN 0-201-39820-6. Addison-Wesley 1999.
  • Prerequisites

  • Familiarity with programming in general.
  • CS320 (Concepts of Programming Languages)
  • Programming Languages

  • Standard ML of New Jersey
  • C
  • Logistics

  • Syllabus (ps)(pdf)
  • Schedules
  • Guidelines for Homework Submission (ps) (pdf)
  • How to use gsubmit to submit homework?
  • Archived Messages(new!)
  • Slides

  • Introduction (ppt) (ps)
  • Parsing Combinators (ppt) (ps)
  • Notes

  • A Crash Course on SML (ps) (pdf)
  • A session on using Standard ML.
  • Code

  • A parsing combinator package and an example on using parsing combinators.
  • Tutorials

    Mailing List

  • To join the course mailing list, type csmail -a cs525 at the Unix prompt
  • To inspect who else is on the mailing list, type csmail -p cs525
  • To remove yourself from the mailing list, type csmail -r cs525
  • Class Calendar

  • Class begins on Monday, January 12, 2004
  • Class suspended on Monday, January 19, 2004
  • Class suspended on Monday, February 16, 2004
  • Substitute Monday Schedule of Classes Tuesday, February 17, 2004
  • Midterm Exam is a one-hour in-class exam scheduled on Friday, March 5, 2004
  • Spring Recess Saturday, March 6, through Sunday, March 14, 2004
  • Class suspended on Monday, April 19, 2004
  • Final Exam is a two-hour exam officially scheduled on Saturday, May 8, 2004, from 9 to 11AM
  • Assignments

  • Assignment 1 (ps) (pdf) (Due on Monday, the 26th of January, 2004)
  • Assignment 2 (ps) (pdf) (Due on Monday, the 2nd of February, 2004)
  • Assignment 3 (ps) (pdf) (Due on Monday, the 17th of February, 2004)
  • Assignment 4 (ps) (pdf) (Due on Monday, the 1st of March, 2004)
    Here is some information on the programming language Geizela (ps) (pdf)
  • Assignment 5 (ps) (pdf) (Due on Monday, the 22nd of March, 2004)
    symbol.sml  expressions.sml
  • Assignment 6 (ps) (pdf) (Due on Monday, the 29th of March, 2004)
  • Assignment 7 (ps) (pdf) (Due on Monday, the 5th of April, 2004)
  • Assignment 8 (ps) (pdf) (Due on Monday, the 12th of April, 2004)
  • Assignment 9 (ps) (pdf) (Due on Tuesday, the 20th of April, 2004)
  • Assignment 10 (ps) (pdf) (Due on Tuesday, the 27th of April, 2004)
  • Assignment 11 (ps) (pdf) (Due on Tuesday, the 4th of May, 2004)
  • Solutions

  • Solutiont 4 (A Parser for Tiger)
  • Solutiont 5 (A Typechecker for Tiger)
  • Solutiont 6 (Escape) (Temp) (Tree) (Frame)
  • Solution 7 (Translate)
  • Solution 8 (Canon)
  • Examination

  • Midterm Exam (ps) (pdf)