Stephen A. Edwards Columbia University Crown
  COMS W4115
Programming Languages and Translators
Spring 2002
Home
 General Information
  Classes meet Monday and Wednesdays from 2:40 to 3:55 PM in Room 207, Mathematics.
  Office hours for the instructor are on his home page
  Office hours for the TAs are on the secondary class home page
 Overview
  The goal of PLT is to teach you both about the structure of computer programming languages and the basics of implementing compilers for such languages.

The course will focus mostly on traditional imperative and object-oriented languages, but will also cover functional and logic programming, concurrency issues, and some aspects of scripting languages. Homework and tests will cover language issues. You will implement a simple compiler for the Tiger language in a semester-long group project.

While few of you will ever implement a full commercial compiler professionally, the concepts, techniques, and tools you will learn have broad application.

 Prerequisites
  COMS W3156 Introduction to Software Engineering: You will be dividing into teams to build a compiler, so you need to have some idea how to keep this under control
  COMS W3261 Computability and Models of Computation: You will need an understanding of formal languages and grammar to build the parser and lexical analyzer.
  COMS W3824 Computer Organization: We will be generating assembly code, so you need to understand how to write it.
 Required Text
  Cover of Programming Language Pragmatics Michael L. Scott.
Programming Language Pragmatics
Morgan Kaufmann, 2000

Near Columbia, this is available at Papyrus Booksellers at the corner of 114th and Broadway. Textbooks are downstairs.
 Optional Texts
  Cover of Appel Andrew W. Appel.
Modern Compiler Implementation in Java.
Cambridge University Press, 1998.

This focuses much more on compiler construction than Scott, but does not discuss as many diverse language issues. It is the source for the Tiger language used in the project.
  Cover of the Dragon Book Alfred V. Aho, Ravi Rethi, and Jeffrey D. Ullman.
Compilers: Principles, Techniques, and Tools.
Addison-Wesley, 1985.

Long the standard text on compilers, the ``dragon book'' is now a little dated. It remains one of the more readable books on the topic.
  Cover of Muchnick Steven S. Muchnick
Advanced Compiler Design and Implementation.
Morgan Kaufmann, 1997.

A very extensive book on many aspects of compiler design. Starts about halfway through Appel and goes much farther. Recommended for serious compiler hackers only.
 Schedule
Date  Lecture  Notes  Reading  Assignment  Due 
January 23   PLT   PDF File (for Acrobat) PDF File (for Acrobat)   Ch 1      
January 28   Syntax and parsing   PDF File (for Acrobat) PDF File (for Acrobat)   Ch. 2      
January 30         PROG 1 PDF File (for Acrobat)    
February 4   ASTs   PDF File (for Acrobat) PDF File (for Acrobat)   Tiger PDF File (for Acrobat)      
February 6   ANTLR and Tiger   PDF File (for Acrobat) PDF File (for Acrobat)        
February 11   Names, Scope, and Bindings   PDF File (for Acrobat) PDF File (for Acrobat)   Ch. 3      
February 13         HW 1 PDF File (for Acrobat)   PROG 1  
February 18   Types   PDF File (for Acrobat) PDF File (for Acrobat)   Ch. 7      
February 20         PROG 2 PDF File (for Acrobat)   HW 1  
February 25   OO Types   PDF File (for Acrobat) PDF File (for Acrobat)   Ch. 10      
February 27            
March 4   Review (TAs)          
March 6   Midterm 1          
March 11   Control Flow   PDF File (for Acrobat) PDF File (for Acrobat)   Ch. 6      
March 13            
March 15   Assignment due at 11:59 PM         PROG 2  
March 18   Spring Break: No Class  
March 20   Spring Break: No Class  
March 25   Interpreters   PDF File (for Acrobat) PDF File (for Acrobat)     PROG 3 PDF File (for Acrobat)    
March 27   Subroutines   PDF File (for Acrobat) PDF File (for Acrobat)   Ch. 8      
April 1   Code Generation   PDF File (for Acrobat) PDF File (for Acrobat)   Ch. 9      
April 3     PDF File (for Acrobat) PDF File (for Acrobat)        
April 8   Logic Programming   PDF File (for Acrobat) PDF File (for Acrobat)   Ch. 11   HW 2 PDF File (for Acrobat)   PROG 3 (11:59 PM)  
April 10   GL: Functional Programming   PDF File (for Acrobat) PDF File (for Acrobat)   Ch. 11      
April 15   GL: Functional Programming   PDF File (for Acrobat) PDF File (for Acrobat)   Ch. 11      
April 17   MIPS Code for Tiger   PDF File (for Acrobat) PDF File (for Acrobat)     PROG 4 PDF File (for Acrobat)   HW 2  
April 22   Concurrency   PDF File (for Acrobat) PDF File (for Acrobat)   Ch. 12      
April 24            
April 29   Review   PDF File (for Acrobat) PDF File (for Acrobat)        
May 1   Midterm 2          
May 6   Scripting Languages   PDF File (for Acrobat) PDF File (for Acrobat)       PROG 4  
 Programming Assignments
  The class is centered around a compiler implementation project divided into four programming assignments as follows:
  1. Build a scanner/parser and generate an AST PDF File (for Acrobat)
  2. Perform static semantic checking on the AST PDF File (for Acrobat)
  3. Dismantle the AST into three-address code PDF File (for Acrobat)
  4. Generate assembly code PDF File (for Acrobat)
  PDF File (for Acrobat) The language reference manual, adapted from Appel.
  PDF File (for Acrobat) A two-page introduction to ANTLR.
  Homepage We will be implementing a compiler for the Tiger language described in Appel.
  Homepage The compiler will be implemented in the Java language.
  Homepage We will be using ANTLR for constructing much of the compiler.
  Homepage We will be using the SPIM simulator for executing the MIPS assembly code we will produce.
 Class Policies
  Grading 40 % Project
25 % Midterm 1
25 % Midterm 2
10 % Homework
  Collaboration You will collaborate with your own small group on the programming project, but you may not collaborate with others on homeworks. Groups may share ideas about the programming assignments, but not code. Any two groups found submitting similar code will receive zero credit for the whole assignment, and repeat offenses will be referred to the dean. See Columbia academic policies for more details.
  Late Policy Zero credit for anything handed in after it is due without explicit approval of the instructor.
 Related Classes
  Homepage COMS W4115 from Fall 2001 taught by Michah Lerner

Copyright © 2001 Stephen A. Edwards Updated Thu May 2 16:55:33 EDT 2002 All Rights reserved