CS Department Logo

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

Important Dates

  • Homework Assignment #2 is due April 23, 2014 on Courseworks/COMSW4115/Assignments.

  • The final exam for COMS W4115 will be held Monday, May 5, 2014, 2:40-3:55pm, in 833 Mudd for people whose last names begin with A-O, and in 417 Math for people whose last names begin with P-Z. It will be based on material covered in the lectures throughout the semester. See final exam information for the coverage of the final.

  • The final project reports are due by 3:00pm, May 11, 2014. 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 12-14, 2014.

Guest Lecturers

On January 29, 2014, Prof. Bjarne Stroustrup gave a talk on The Essence of C++ with Examples in C++84, C++98, C++11, and C++14.
    Bjarne is a Managing Director in the technology division of Morgan Stanley in New York City, a Visiting Professor in Computer Science at Columbia University, and a Research Distinguished Professor at Texas A&M University. Bjarne is the creator and implementor of the C++ programming language.
On February 12, 2014, Dr. Robert L. Martin gave a talk on software project management: 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. He speculated on what problems the initial rollout of the HealthCare.gov website might have had.
    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.
On March 10, 2014, Dr. Thomas Ball gave a talk on TouchDevelop, a programming environment that provides high-level abstractions to enable the productive creation of scripts on and for mobile devices that access web services.
    Tom is a Principal Researcher and Research Manager at Microsoft. His 1997 PLDI paper on path profiling with Ammons and Larus received the PLDI 2007 Most Influential Paper Award. In 2011 Tom and Sriram Rajamani received the 2011 CAV award for their development of the SLAM software model checker. Tom is an ACM Fellow.
On April 2, 2014, Prof. Stephen Edwards gave a talk on Getting It Right explaining how to design and implement a translator smoothly without getting into trouble.
 Teaching Staff
 Name   email   Office hours    Location 
Prof. Al Aho   aho@cs.columbia.edu   Mon & Wed 1:00-2:00   513 CSB
Ming-Ying Chung   mc3808@columbia.edu   Thursdays 1:00-3:00   TA Room, 122 Mudd
William Falk-Wallace   wgf2104@columbia.edu   Fridays 11:00-12:00 & 1:10-2:10   TA Room, 122 Mudd
Junde Huang   jh3419@columbia.edu   Fridays 2:00-4:00   TA Room, 122 Mudd
Vaibhav Jagannathan   vj2192@columbia.edu   Tuesdays 10:00-12:00   TA Room, 122 Mudd
Kevin Walters   kmw2168@columbia.edu   Thursdays 11:00-1: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 2013 PLT Languages
    Spring 2013 PLT Languages
    Fall 2012 PLT Languages
    Spring 2012 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 and Java
  COMS W3137 Data Structures and Algorithms
  COMS W3261 Computer Science Theory
 Schedule 2014
Date  Lecture  Reading 
Jan 22   Introduction to PLT  Chs 1 and 2  
Jan 22   Introduction to PLT (powerpoint)   Chs 1 and 2  
Jan 27   The Basic Elements of Languages   Chs 1 and 2  
Jan 29   The Essence of C++ (abstract)   Prof. Bjarne Stroustrup  
Jan 29   The Essence of C++ (slides)   Prof. Bjarne Stroustrup 
Feb 3   Structure of a Compiler & Lexical Analysis   Sects. 1.2, 3.1-3.3  
Feb 5   Regular Expressions & Lexical Analysis   Sects. 3.3, 3.5  
Feb 10   Implementing a Lexical Analyzer   Ch 3, except Sect. 3.9  
Feb 12   Software Project Management: There is No Magic Dr. Robert L. Martin 
Feb 12   Homework Assignment #1   Due Mar 3 
Feb 17   Context-Free Grammars   Sects. 4.1, 4.2 
Feb 19   Parsing Context-Free Grammars   Sects. 4.3, 4.4 
Feb 24   Predictive Top-Down Parsers   Sect. 4.4 
Feb 26   Bottom-Up Parsing   Sects. 4.5, 4.6 
Mar 3   Implementing a Parser   Sects. 4.8, 4.9 
Mar 5   Syntax-Directed Translation   Sects. 5.1-5.4 
Mar 10   TouchDevelop (abstract)   Dr. Thomas Ball 
Mar 10   TouchDevelop (powerpoint)   Dr. Thomas Ball 
Mar 12   Midterm    
Mar 24   The Compiler Front End   Sect. 6.1 
Mar 26   Types   Sects. 6.1-6.3, 6.5 
Mar 31   Translating Statements into Three-Address Code   6.4-6.8  
Apr 2   Getting It Right   Prof. Stephen Edwards  
Apr 7   Procedures   6.9, 7.1-7.2 
Apr 9   Homework Assignment #2   Due Apr 23  
Apr 9   Run-Time Environments   7.1, 7.2, 7.6.1  
Apr 14   Introduction to the Lambda Calculus    
Apr 16   Code Generation   8.1-8.6, 8.10  
Apr 21   Code Optimization   8.5, 8.7, 9.1  
Apr 23   The Lambda Calculus II    
Apr 28   Model Project Presentations by the svelTest and arthur Teams   
Apr 30   Sample Final  
 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 January 20, 2014