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

Lectures

Class meets Mondays and Wednesdays 4:10 - 5:25 PM 207 Mathematics.

Staff

Name Email Office hours Location
Prof. Stephen A. Edwards sedwards@cs.columbia.edu see my home page 462 CSB
David Watkins djw2146@columbia.edu Wednesday 5:30-7:30 468 CSB
Rachael Gordon rcg2130@columbia.edu Wednesday 10-12 TA Room, 1st floor Mudd
Daniel Echikson dje2125@columbia.edu Thursday 12-2 468 CSB
Alexandra Medway afm2134@columbia.edu Tuesday 11-1 468 CSB
Graham Gobieski gsg2120@columbia.edu Sunday 3-5 TA Room (1st floor Mudd)
Jacob Graff jag2302@columbia.edu Monday 1-2, Friday 2-3 468 CSB

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 team 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 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 Session Lecture Notes Reading Due
Wed Sep 7 1
Intro. to Languages
pdf
Ch 1, 2
Mon Sep 12 2
Language Processors
pdf
Ch. 2
Wed Sep 14 3
Some Outstanding Projects
pdf

Mon Sep 19 4
Programming in OCaml
pdf

Wed Sep 21 5
"

Mon Sep 26 6
"

pdf HW1
Wed Sep 28 7
Syntax and Parsing
pdf
Ch. 3, 4
Proposal
Mon Oct 3 8
"

Wed Oct 5 9
"

Mon Oct 10 10
"

pdf HW2
Wed Oct 12 11
Review for Midterm
pdf

Mon Oct 17 Midterm 1
Wed Oct 19 12
The MicroC Compiler
pdf
App. A
Mon Oct 24 13
"

Wed Oct 26 14
"

LRM
Mon Oct 31 15
Types and Static Semantics
pdf
Sec. 6.5
Wed Nov 2 16
"

Mon Nov 7 Election Day Holiday
Wed Nov 9 17
Runtime Environments
pdf
Ch. 7
Mon Nov 14 18
"

Wed Nov 16 19
"

Mon Nov 21 20
Code Generation
pdf

Hello World
Wed Nov 23 21
"

Mon Nov 28 22
The Lambda Calculus
pdf

Wed Nov 30 23
"

Mon Dec 5 24
Logic Programming
pdf

pdf HW3
Wed Dec 7 26
Review for Final
pdf

Mon Dec 12 Midterm 2
Tue Dec 20 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

Related 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 ML.
Cambridge University Press, 1998.

The opposite of Scott: focuses on compiler construction, not language design issues.
It uses the functional language ML, which is closely related to O'Caml, but just different enough to be annoying.

Cover of Appel

Lawrence C. Paulson
ML for the Working Programmer.
Cambridge University Press, 1996. Second edition.

A book about functional programming. It's written for the ML language, not O'Caml, but the two are closely related.

Cover of Paulson

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

Objective Caml Resources

webpage The Caml Language Homepage. Compiler downloads and documentation. Start here.
webpage The Objective Caml System. Documentation and User's Manual for the whole system, including documentation for ocamllex, ocamlyacc, ocamldep, ocamldebug, and all the standard libraries.
webpage Emmanuel Chailloux, Pascal Manoury, and Bruno Pagano, Developing Applications with Objective Caml. An online book translated from the French (O'Reilly).
webpage Objective CAML Tutorial
.tar.gz file OCaml source for the four-function calculator.
.tar.gz file OCaml source and test cases for the MicroC language, which generates LLVM IR.

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 the CVS version control system. I strongly suggest you keep your project under some version control system.
pdf An excellent final report: the Funk language by 4115 students Naser AlDuaij, Senyao Du, Noura Farra, Yuan Kang, and Andrea Lottarini.
pdf An excellent final report: the Sheets language by 4115 students Benjamin Barg, Gabriel Blanco, Amelia Brunner, and Ruchir Khaitan.

Language Reference Manuals

pdf Dennis M. Ritchie, C Reference Manual
pdf Kernighan & Ritchie, The C Programming Language
pdf The C Language Reference Manual (SGI)
pdf Stroustrup, The C++ Programming Language
pdf The Java Language Specification
pdf The C# Language Specification

Projects

MathLang:
pdfFinal Report pdfSlides ArchiveProject Files
Ravie Lakshmanan, and Sophie Lucy
CMAT: Matrix Language (AM)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Michael Berkowitz, Frank Cabada, Marissa Ojeda, and Daniel Rojas
Cimple: C-like Language (AM)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Graham Barab, Panchampreet Kaur, and Shankara Pailoor
Circline: Graph Language (AM)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Qing Lan, Haikuo Liu, Zehao Song, and Jia Zhang
DARN: Matrix/Array Manipulation (AM)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Daisy Chaussee, Anthony Kim, Rafael Takasu, and Ignacio Torras Jr.
Beathoven: MIDI/MusicXML generation (DE)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Eunice Kokor, Jae Hyun Kwon, Rodrigo Manubens, Sonakshi Roy, and Ruonan Xu
Blox: Lego Block Language (DE)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Naeem Bhatti, Jonathan Voss, and Tyrone Wilkinson
Harmonica: Parallel Language (DE)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Zizhang Hu, Jincheng Li, Guihao Liang, and Xue Wang
MAZE: Multiple Adventure Zone Environments (DE)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Alexander Brown, Alexander Freemantle, Michelle Navarro, and Lindsay Schiminske
DNAsharp: Molecular Biology Computation Language (DW)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Min Fan, Oriana Fuentes, Aalhad Patankar, Stanislav Peceny Jr., and Nan Yu
GOBLIN: Turn­based Adventure Games (DW)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Christina Floristean, Bayard Neville, Gabriel Uribe, and Kevin Xiao
Oscar: Functional, Actor-based Programming Language (DW)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Ethan Adams, Howon Byun, Jibben Hillen, Anthony Holley, and Vladislav Scherbich
StockX: Financial Language (DW)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Jesse Van Marter, and Ricardo Martinez
Espresso: Functional OO Language (GG)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Somdeep Dey, Rohit Gurunath, Jianfeng Qian, and Oliver Willens
LaTenS: A Tensor Manipulation Language (GG)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Mohit Rajpal, Daniel Schwartz, Elsbeth Turcan, and Eliana Ward-Lev
PhysEx: Physics Engine Language (GG)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Joshua Nuez, David Pu, Justin Pugliese, and Steven Ulahannan
rusty: A Simplified Version of Rust (GG)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Yanlin Duan, Zhuo Kong, Emily Meng, and Shiyu Qiu
Extend: Spreadsheet Language (JG)
pdfProposal pdfLRM pdfFinal Report Powerpoint FileSlides ArchiveProject Files
Ishaan Kolluri, Jared Samet, Nigel Schuster, and Kevin Ye
Java+-: Java but better but also worse (JG)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Amel Abid, Ashley Daguanno, Zeynep Ejder, Tin Nilar Hlaing, and Anna Wen
PolyGo!: Polynomial Language (JG)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Pu Ke, Jianpu Ma, Yanglu Piao, and Jin Zhou
ShapeShifter: Programmatic Geometry Modelling (JG)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Stephanie Burgos, Ishan Guru, Rashida Kamal, Eszter Offertaler, and Rajiv Thamburaj
ART: Animation Rendering Tool (RG)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Bretton Jervey, Soul Joshi, Natan Kibret, and Gedion Metaferia
TAPE: A File Handling Language (RG)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Chi Kwan Edwin Chan, Tianhua Fang, Alexander Sato, and Priscilla Wang
blur: ASCII Art Animation (RG)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Dexter Callender III, Timothy Goodwin, Daniel Hong, and Melissa Kaufman-Gomez
eGrapher: A Programming Language for Art (RG)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Darren Chen, Xinli Jia, Long Long, Linnan Wang, and Jiefu Ying
easel: Mathematic Visualization (RG)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Xiaofei Chen, Yuan-Chao Chou, Danielle Crosswell, and Tyrus Cukavac
LePiX: Ceci n'est pas un Photoshop (SE)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Akshaan Kakar, Fatimazohra Koli, Jackie Lin, and Gabrielle Taylor
LePiX2: General-purpose language (SE)
pdfFinal Report pdfSlides ArchiveProject Files
JeanHeyd Meneide
fobi: Mathematical Calculation & Graphical Language (SE)
pdfProposal
Patrick Afrifah
replay: A language for simple repeated games (SE)
pdfProposal pdfLRM pdfFinal Report ArchiveProject Files
Eric Bolton
sstats: Simple Statistical Programming Language (SE)
pdfProposal pdfLRM
Philip Park

Grading

40 % Project
20 % Midterm
30 % Final
10 % Homework

Collaboration

You will collaborate with your own small team on the programming project, but you may not collaborate with others on homeworks. Teams may share ideas about the programming assignments, but not code. Any two teams 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.

Other

Valid HTML 4.01Valid CSS