CS Department Logo

COMS W4115
Programming Languages and Translators
Spring 2015
  Class meets 2:40-3:55pm on Mondays and Wednesdays, 833 Mudd.

Course webpage: http://www.cs.columbia.edu/~aho/cs4115
Courseworks website: https://courseworks.columbia.edu
Piazza bulletin board: https://piazza.com/columbia/spring2015/comsw4115/home

Important Dates

  • The final project reports are due by 6:00pm, Sunday, May 10, 2015. Please deposit the final project report for your team in your team folder on Courseworks. See final project report for suggestions on how to organize your report.

  • Each team will be required to give a 20-minute presentation on their language and translator during May 11-13, 2015.

Guest Lecturer

On March 30, 2015, Dr. Robert L. Martin gave a talk on software project management titled "There is No Magic" Bob argued that producing a high quality programming product on time requires the disciplined application of well-tuned technical, inter-personal and managerial skills. While often repackaged with fancy consultant-expensive names, these skills are decades old. Intriguingly, many programmers and programming teams ignore them and assume, by magic, they will avoid repeating history's disasters. They don't - there is no magic.
    Bob serves on the advisory boards of several venture capital and startup companies. He was the Chief Technology Officer of Bell Laboratories and a Corporate Officer of the Software Business Unit at Bell Communications Research. He has extensive experience in the development of Unix and software systems for the telecommunications industry. He has served on the National Research Council's Computer Science and Telecommunications Board and the FCC's Technological Advisory Board. He is a Fellow of the IEEE and has a PhD in EECS from MIT.
 Teaching Staff
 Name   email   Office hours    Location 
Prof. Al Aho   aho@cs.columbia.edu   Mon & Wed 1:00-2:00   513 CSB
Livi Byer   okb2102@barnard.edu   Tue 3:00-5:00   TA Room, 122 Mudd
Chae Jubb   ecj2122@columbia.edu   Wed 11:30-1:00 & Tue 4:45-5:15   TA Room, 122 Mudd
Aquila Khanam   ak3654@columbia.edu   Fri 10:00-12:00   TA Room, 122 Mudd
Daniel Park   sjp2172@columbia.edu   Mon 4:00-6:00   TA Room, 122 Mudd
Kevin Walters   kmw2168@columbia.edu   Mon 10:00-12:00   TA Room, 122 Mudd
 Course Overview
  In PLT you will learn the syntactic and semantic elements and the computational models of the most important modern programming languages as well as the algorithms and techniques used by compilers to translate them into machine and other target languages. The course will cover imperative, object-oriented, functional, logic and scripting languages, as well as trends in the evolution of programming languages.

A highlight of this course is a semester-long programming project in which you will work in a small team to create and implement an innovative little language of your own design. This project will teach you computational thinking in language design as well as project management, teamwork, and communication skills that you can apply in all aspects of your career.

Examples of past languages created in PLT can be found at
    Fall 2014 PLT Languages
    Spring 2014 PLT Languages
    Fall 2013 PLT Languages
    Spring 2013 PLT Languages

The concepts, techniques, and tools that you will learn in this course have broad application to many areas of computer science outside of programming languages and compilers.

  Fluency in C, C++, Java, OCaml, Python or other high-level programming language
  COMS W3157 Advanced Programming
  COMS W3261 Computer Science Theory
  COMS W3827 Fundamentals of Computer Systems
  Knowledge about Makefiles and Source Code Control Systems
 Schedule 2015
Date  Lecture  Reading 
Jan 21   Introduction to PLT  Chs 1 and 2  
Jan 21   Introduction to PLT (powerpoint)   Chs 1 and 2  
Jan 26   Basic Elements of Programming Languages   Chs 1 and 2  
Jan 28   Structure of a Compiler & Lexical Analysis   Sects. 1.2, 3.1-3.3
Feb 2   Regular Expressions and Lexical Analysis   Sects. 3.3, 3.5 
Feb 4   Implementing a Lexical Analyzer   Ch. 3, except Sect. 3.9  
Feb 9   Context-Free Grammars   Sects. 4.1, 4.2, 4.9  
Feb 11   Parsing Context-Free Grammars   Sects. 2.4, 4.3,4.9  
Feb 16   Predictive Top-Down Parsers   Sect. 4.4  
Feb 16   Homework Assignment #1   Due Mar 4 
Feb 18   Bottom-Up Parsing   Sects. 4.5, 4.6 
Feb 23   Implementing a Parser with Yacc   Sects. 4.8, 4.9 
Feb 25   Syntax-Directed Translation   Sects. 5.1-5.4 
Mar 2   The Compiler Front End   Sects. 6.1 
Mar 4   Midterm Review   Chs. 1-5 
Mar 9   Solutions to HW1: See Courseworks/COMSW4115/Files & Resources    
Mar 11   Midterm    
Mar 23   Types   Sect. 6.1-6.3, 6.5 
Mar 25   Translating Statements into Three-Address Code   Sects. 6.4-6.8  
Mar 30   There is No Magic Dr. Robert L. Martin  
Apr 1   Translation of Arrays, Booleans, etc.   6.4-6.9, 7.1-7.2  
Apr 6   Procedures   6.9, 7.1-7.2 
Apr 8   Run-Time Memory Management   7.1, 7.2, 7.6.1  
Apr 13   Homework Assignment #2   Due Apr 22  
Apr 13   Introduction to the Lambda Calculus    
Apr 15   Code Generation   8.1-8.6, 8.10  
Apr 20   Lambda Calculus - II    
Apr 22   Code Optimization   8.5, 8.7, 9.1  
 Required Text
  Alfred V. Aho, Monica Lam, Ravi Sethi, and Jeffrey D. Ullman
Compilers: Principles, Techniques, and Tools, Second Edition
Addison-Wesley, 2007, ISBN 978-0321486813
 Additional References
  Alfred V. Aho and Jeffrey D. Ullman
Foundations of Computer Science, C Edition
W. H. Freeman, 1995
An online version of this book is available here.

  Andrew W. Appel
Modern Compiler Implementation in Java, Second Edition
Cambridge University Press, 2002

  Keith D. Cooper and Linda Torczon
Engineering a Compiler, Second Edition
Morgan Kaufmann, 2012

  Steven S. Muchnick
Advanced Compiler Design and Implementation
Morgan Kaufmann, 1997

  Michael L. Scott
Programming Language Pragmatics, Third Edition
Morgan Kaufmann, 2009

  Robert W. Sebesta
Concepts of Programming Languages, Tenth Edition
Pearson/Addison-Wesley, 2012

  Stephen Edward's CS4115 Web Page
 Class Policies
  Grading 40 % Project
10 % Homeworks
20 % Midterm
30 % Final

aho@cs.columbia.edu Updated 3/21/15