Programming Languages and Translators
Spring 2008 (CVN)
|Prof. Stephen A. Edwardsemail@example.com||T 4-5, W 4-5 Eastern time||+1 212 939 7019|
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.
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.
|January 22||Intro. to Languages||Ch. 1, 2|
|January 24||Language Design|
|January 29||Language Processors||Ch. 2|
|January 31||Scripting Languages||Ch. 2|
|February 5||Syntax and Parsing||Ch 3, 4|
|February 12||Getting it right||Proposal|
|February 14||ANTLR||Ch. 4|
|February 19||ASTs||Ch. 4, 5|
|February 21||Names, Scope, and Bindings||Ch. 6|
|March 4||Jim Miller, Where's My Compiler?|
|March 6||Small Examples||App. A||LRM|
|March 11||Midterm review|
|March 17-21||Spring Break|
|March 25||Types||Ch. 6|
|April 1||Control-flow||Ch. 6|
|April 8||Code Generation||Ch. 6, 7, 8|
|April 10||Logic Programming|
|April 15||Functional Programming|
|April 22||Review for final|
|April 24||Final Exam|
|May 10||Project reports due|
Alfred V. Aho, Monica Lam, Ravi Sethi, and Jeffrey D. Ullman.
Michael L. Scott.
Andrew W. Appel.
Steven S. Muchnick
The focus of 4115 is the design and implementation of a little language. CVN students will do the project individually.
This is a critical part of the project and will be a substantial fraction of the grade.
Include the following sections:
|A Two-page Introduction to ANTLR. These are for ANTLR 2.x, not 3.x|
|An ANTLR implementation of the little language from Appendix A of the second edition of the Dragon Book.|
|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.|
|The ANTLR homepage|
|A two-page introduction to the CVS version control system. I strongly suggest you keep your project under some version control system.|
|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.|
|Source for the very successful MX language project from Spring 2003.|
|Other projects from Spring 2003|
|Other projects from Fall 2003|
|The Java white paper from Sun Microsystems|
|C# Introduction and Overview|
|Dennis M. Ritchie, C Reference Manual|
|Kernighan & Ritchie, The C Programming Language|
|The C Language Reference Manual (DEC)|
|The C Language Reference Manual (SGI)|
|The C Language Reference Manual (Microsoft)|
|Stroustrup, The C++ Programming Language|
|The Java Language Specification|
|The C# Language Specification|
|Aho, Kernighan, and Weinberger, The AWK Programming Language|
Structured Language Applied to Gaming
An Environment for Experimental Machine Learning
Simple Flash Animation Language 2.0
|40 % Project|
|20 % Midterm|
|30 % Final|
|10 % Homework|
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.