Stephen A. Edwards Columbia University Crown
  COMS W4115
Programming Languages and Translators
Fall 2007

General Information

Class meets Tuesdays and Thursdays, 2:40 - 3:55 PM in 535 Mudd.

Staff

Name Email Office hours Location
Prof. Stephen A. Edwards sedwards@cs.columbia.edu T 4-5, W 4-5 462 CSB
Phong T. Pham tp2210@columbia.edu TBD TA Room
Dhivya Khrishnan dsk2121@columbia.edu M 1-2, W 2-3 TA Room
Abhilash Itharaju ai2160@columbia.edu M 12-1, W 1-2 TA Room

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 design and implement a language of your own design 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

Java fluency: You will be writing a large Java program and must know the language well.

COMS W3157 Advanced Programming: You will be dividing into teams to build a compiler, so you need to have some idea how to keep this under control. Quick test: you need to know about Makefiles and source code control systems.

COMS W3261 Computability and Models of Computation: You will need an understanding of formal languages and grammar to build the parser and lexical analyzer. Quick test: you must know about regular expressions, context-free grammars, and NFAs.

Schedule

Date Lecture Notes Reading Due
September 4 Intro. to Languages pdf pdf Ch. 1, 2
September 6 Language Design pdf pdf
September 11 Language Processors pdf pdf Ch. 2
September 13 Scripting Languages pdf pdf Ch. 2
September 18 Syntax and Parsing pdf pdf Ch 3, 4
September 20 "
September 25 Getting it right pdf pdf Proposal
September 27 ANTLR pdf pdf Ch. 4
October 2 ASTs pdf pdf Ch. 4, 5
October 4 Names, Scope, and Bindings pdf pdf Ch. 6
October 9 " HW1 pdf
October 11 "
October 16 Jim Miller, Where's My Compiler? ppt
October 18 Small Examples pdf pdf App. A LRM
October 23 Midterm review pdf pdf pdf
October 25 Midterm
October 30 Types pdf pdf Ch. 6
November 1 "
November 6 Election Day
November 8 Control-flow pdf pdf Ch. 6
November 13 "
November 15 Code Generation pdf pdf Ch. 6, 7, 8
November 20 Logic Programming pdf pdf
November 22 Thanksgiving Holiday
November 27 Functional Programming pdf pdf
November 29 " HW2 pdf
December 4 Review for final pdf pdf
December 6 Final Exam
December 18 Project reports due

Required Text

Alfred V. Aho, Monica Lam, Ravi Sethi, and Jeffrey D. Ullman.
Compilers: Principles, Techniques, and Tools.
Addison-Wesley, 2006. Second Edition.

The first edition was long the standard text on compilers; the second edition of the ``dragon book'' has now been updated and continues to be one of the more readable books on the topic. Columbia's own Prof. Al Aho is one of the authors.

Cover of the Dragon Book 2nd edition

Optional Texts

Michael L. Scott.
Programming Language Pragmatics
Morgan Kaufmann, 2006. Second Edition.

A broad-minded book about languages in general, but has less on practical details of compiler construction.

Cover of Programming Language Pragmatics 2nd edition

Andrew W. Appel.
Modern Compiler Implementation in Java.
Cambridge University Press, 1998.

The opposite of Scott: focuses on compiler construction, not language design issues.

Cover of Appel

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.

Cover of Muchnick

The Project

The focus of 4115 is the design and implementation of a little language. You will divide into teams and design the goals, syntax, and semantics of your language, and implement a compiler for your language.

Exception: CVN students will do the project individually.

Final Report Outline

This is a critical part of the project and will be a substantial fraction of the grade.

Include the following sections:

  1. Introduction
  2. Language Tutorial
  3. Language Manual
  4. Project Plan
  5. Architectural Design
  6. Test Plan
  7. Lessons Learned
  8. Appendix

Project Resources

pdf A Two-page Introduction to ANTLR
pdf tar.gz file An ANTLR implementation of the little language from Appendix A of the second edition of the Dragon Book.
directory An ANTLR example illustrating how to display ASTs. Run SimpLexer.g through ANTLR, compile the generated .java files along with Main.java and run "java Main < test.txt" to both print the AST in a human-readable way and display it in a window.
ANTLR home The ANTLR homepage
pdf A two-page introduction to the CVS version control system. I strongly suggest you keep your project under some version control system.
pdf A sample final report by Chris Conway, Cheng-Hong Li, and Megan Pengelly. It includes the white paper, tutorial, language reference manual, project plan, architectural design, and testing plan. It does not include the lessons learned and code listings sections, although it should.
.zip Source for the very successful MX language project from Spring 2003.
project home Other projects from Spring 2003
project home Other projects from Fall 2003

White Papers

pdf The Java white paper from Sun Microsystems
webpage C# Introduction and Overview

Language Reference Manuals

pdf Dennis M. Ritchie, C Reference Manual
pdf Kernighan & Ritchie, The C Programming Language
pdf The C Language Reference Manual (DEC)
pdf The C Language Reference Manual (SGI)
pdf The C Language Reference Manual (Microsoft)
pdf Stroustrup, The C++ Programming Language
pdf The Java Language Specification
pdf The C# Language Specification
home Aho, Kernighan, and Weinberger, The AWK Programming Language

This Term's Projects

BDPL: Binary Data Processing Language (AI)
PDF fileProposal    PDF fileLRM    PDF fileFinal Report   
Aditi Rajoriya    Akshay Pundle    Preethi Narayan    Bharadwaj Vellore   
BELL: Web Widget Language (DK)
PDF fileProposal    PDF fileLRM    PDF fileFinal Report    Powerpoint fileSlides   
Alicia Bozyk    Yousry ElMallah    Robert Lin    Carlene Liriano   
Bellows: File Format Description Language (SE)
PDF fileProposal    PDF fileLRM    PDF fileFinal Report   
Richard Hanson   
CRAWL: A Graph Language (SE)
PDF fileProposal    PDF fileLRM    PDF fileFinal Report   
Rajesh Venkataraman    Amoghavarsha Ramappa   
DX: A language useful to transform delimited data to XML (PP)
PDF fileProposal    PDF fileLRM    PDF fileFinal Report   
Archana Mandape   
EcoSL: Econmical Spreadsheet Language (PP)
PDF fileProposal    PDF fileLRM    PDF fileFinal Report    Powerpoint fileSlides   
Somenath Das    Satish Srinivas Nidadavolu    Lalit Kanteti   
EDSL: Event Driven State Language (SE)
PDF fileProposal    PDF fileLRM    PDF fileFinal Report   
Christopher Sargent   
EZIP: Easy Image Processing (DK)
PDF fileProposal    PDF fileLRM    PDF fileFinal Report   
Kevin Chiu    Tejas Nadkarni    Swati Kumar    Avanti Dharkar   
FFSTC: Fantasy Football Stat Tracker Compiler (DK)
PDF fileProposal    PDF fileLRM    PDF fileFinal Report   
Michael Lam   
FlashTree: Animating tree structures and various traversals of them using Adobe Flash (DK)
PDF fileLRM    PDF fileFinal Report    Compressed Tar ArchiveProject Files   
Antonio Cruz   
Graphr: Data Graphing Language (AI)
PDF fileProposal    PDF fileLRM    PDF fileFinal Report    Compressed Tar ArchiveProject Files   
Paul Dix    Joseph Kamien    Michael Cole    Zhe Chen   
HCAS: Haskell Computer Algebra System (SE)
PDF fileProposal    PDF fileLRM    PDF fileFinal Report    PDF fileSlides   
Robert Tougher   
MASC: Web-browser plugin language (AI)
PDF fileProposal    PDF fileLRM    PDF fileFinal Report    Powerpoint fileSlides   
Christos Angelopoulos    Kristina Chodorow    Michael Masullo    Vaibhav Saharan   
MatPix: Matrix Arithmetic on a GPU (SE)
PDF fileProposal    PDF fileLRM    PDF fileFinal Report   
David Burkat    Oliver Cossairt    Robert Hawkins    Benjamin London   
NPSL-2D: A 2D Newtonian Physics Simulation Language (SE)
PDF fileProposal    PDF fileLRM    PDF fileFinal Report   
Glenn Barney   
OWGAL: Orange White Green Animation Language (AI)
PDF fileProposal    PDF fileLRM    PDF fileFinal Report   
Meenakshi Sripal   
PERIL: Protocol Extraction, Reporting, and Indentification Language (SE)
PDF fileProposal    PDF fileLRM    PDF fileFinal Report   
Nathan Steinmann   
Perdix: A Query Language for Security Logs (PP)
PDF fileProposal    PDF fileLRM    PDF fileFinal Report   
Orr Bibring    Justin Prosco    Bing Wu    Angeliki Zavou   
Physicalc: A Language for (simple) Scientific Calculation (PP)
PDF fileProposal    PDF fileLRM    PDF fileFinal Report   
Brian Foo    Changlong Jiang    Ici Li    Stuart Sierra   
SL: Search Language (SE)
PDF fileProposal    PDF fileLRM    PDF fileFinal Report   
Majid Khan   
Sprite: Language for Animation within a Web Browser (AI)
PDF fileProposal    PDF fileLRM    PDF fileFinal Report    PDF fileSlides   
David Smith    Daniel Benamy    John Morales    Monica Ranadive   
Swarm: A Cellular Programming Language (PP)
PDF fileProposal    PDF fileLRM    PDF fileFinal Report   
Gregory Bramble    Thomas Chau    Jason Gluckman    Rajesh Ramakrishnan   
TableGen: Table Generation Language (DK)
PDF fileProposal    PDF fileLRM    PDF fileFinal Report    Compressed Tar ArchiveProject Files   
Andrey Falko    Daniel Pestov    Del Slane    Timothy Washington   
TASL: Travel Assist Scripting Language (DK)
PDF fileProposal    PDF fileLRM    PDF fileFinal Report   
Yogesh Saxena   
TMIL: Text Manipulation Imaging Language (AI)
PDF fileProposal    PDF fileLRM    PDF fileFinal Report    Powerpoint fileSlides   
Elliot Hamburger    Michele Merler    Jimmy Wei    Lin Yang   
TweaXML: (PP)
PDF fileProposal    PDF fileLRM    PDF fileFinal Report    Powerpoint fileSlides   
Kaushal Kumar    Srinivasa Valluripalli   
uPerm: A Small Permutation Group Engine (SE)
PDF fileProposal    PDF fileLRM   
Gregory Kip   

Grading

40 % Project
20 % Midterm
30 % Final
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 the Columbia CS department academic policies for more details.

Valid HTML 4.01 Valid CSS