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

Lectures

Class meets Mondays and Wednesdays 4:10 - 5:25 PM 501 Northwest Corner Building.

Staff

Name Email Office hours Location
Prof. Stephen A. Edwards sedwards@cs.columbia.edu see my home page 462 CSB
Connor Abbott cwa2112@columbia.edu 12-2 F 468 CSB
Frederick Kellison-Linn fjk2119@columbia.edu 4-6 T CS TA Room
Kai-Zhan Lee kl2792@columbia.edu F 4-6 CS TA Room
Chang Liu cl3403@columbia.edu 11:30 - 1:30 M 468 CSB
Wode 'Nimo' Ni wn2155@columbia.edu 1:30 - 3:30 W 468 CSB
Lizzie Paquette edp2132@columbia.edu 2-4 M 468 CSB
Heather Preslier hnp2108@columbia.edu 11:30-1:30 W 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 6 1
Intro. to Languages
pdf
Ch 1, 2
Mon Sep 11 2
"

Wed Sep 13 3
Language Processors
pdf
Ch. 2
Mon Sep 18 4
Syntax and Parsing (Al Aho)
pdf
Ch. 3, 4
Wed Sep 20 5
5
Lessons from Compiler Architecture (Jared Pochtar)
Some Outstanding Projects
pdf
pdf


Mon Sep 25 6
Syntax and Parsing contd.

Tue Sep 26 Proposal
Wed Sep 27 7
"

Mon Oct 2 No Lecture
Wed Oct 4 8
Programming in OCaml
pdf

Mon Oct 9 9
"

pdf HW1
Wed Oct 11 10
"

Mon Oct 16 11
Review for Midterm
pdf

LRM
Wed Oct 18 Midterm Exam
Mon Oct 23 12
The MicroC Compiler
pdf
App. A
Wed Oct 25 13
"

Fri Oct 27 pdf HW2
Mon Oct 30 14
Types and Static Semantics
pdf
Sec. 6.5
Wed Nov 1 15
"

Mon Nov 6 Election Day Holiday
Wed Nov 8 16
Runtime Environments
pdf
Ch. 7
Hello World
Mon Nov 13 17
"

Wed Nov 15 18
"

Mon Nov 20 19
Code Generation
pdf

Wed Nov 22 Thanksgiving Holiday
Mon Nov 27 20
The Lambda Calculus (Townsend)
pdf

Wed Nov 29 21
"

Mon Dec 4 20
(Code gen. contd.)

pdf HW3
Wed Dec 6 23
Review for Final
pdf

Mon Dec 11 Final Exam
Wed Dec 20 Project Reports Due

Suggested 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

BURGer: (FK)
pdfProposal pdfLRM
Jacqueline Kong, Jordan Lee, Ashley Nguyen, and Adrian Traviezo
CompA: (WN)
pdfProposal pdfLRM
Xiping Liu, Jianshuo Qiu, Zhanpeng Su, Tianwu Wang, and Yingshuang Zheng
Cryptal: (HP)
pdfProposal pdfLRM
Carolina Almirola, Jaewan Bahk, Rahul Kapur, Michail Oikonomou, and Sammy Tbeile
English: (KL)
pdfProposal pdfLRM
Rabia Akhtar, Nivita Arora, Emily Bau, Candace Johnson, and Michele Lin
FPL: (WN)
pdfProposal pdfLRM
Namo LU, Dongdong She, Xinwei Zhang, and Yipeng Zhou
Facelab: (CL)
pdfProposal pdfLRM
Kejia Chen, Xin Chen, Tongfei Guo, and Weiman Sun
GOLD: (FK)
pdfProposal pdfLRM
Timothy Chung, Dennis Guzman, Ezekiel Reyna, and Aidan Rivera
Gantry: (KL)
pdfProposal pdfLRM
Audrey Copeland, Walter Meyer, Taimur Samee, and Rizwan Syed
Genesis: (KL)
pdfProposal pdfLRM
Sam Cohen, Saahil Jain, Leon Stilwell, Michael Wang, and Jason Zhao
GoBackwards: (SE)
pdfProposal pdfLRM
Tahmid Munat, Shaquan Nelson, Peter Richards, Julian Antonio Silerio, and Catherine Zhao
GraphC: (LP)
pdfProposal pdfLRM
Jason Delancey, and Montana St.Pierre
Inception: (KL)
pdfProposal pdfLRM
Andrew Aday, Amol Kapoor, and Jonathan Zhang
LOON: (LP)
pdfProposal pdfLRM
Niles Christensen, Erin Houston-Burroughs, Kyle Hughes, Habin Lee, and Jack Ricci
Logisimple: (SE)
pdfProposal pdfLRM
Kundan Guha, Yuanxia Lee, Hannah Pierce-Hoffman, and Sarah Walker
M2: (CL)
pdfProposal pdfLRM
Jeffrey Monahan, Christine Pape, TENGYU ZHOU, and Shelley Zhong
MakerGame: (FK)
pdfProposal pdfLRM
Yuncheng Jiang, Steven Shao, and Xinyue Wang
MiniMap: (CA)
pdfProposal pdfLRM
Ryan DeCosmo, Charis Lam, Olessya Medvedeva, and Jyhyun Song
Newbie: (WN)
pdfProposal pdfLRM
John Anukem Jr., Clyde Bazile III, Braxton Gunter, Terence Jacobs, and Sebastien Siclait
NumNum: (KL)
pdfProposal pdfLRM
Sharon Chen, Kaustubh Chiplunkar, Paul Czopowik, David Tofu, and Art Zuks
PIXL: (HP)
pdfProposal pdfLRM
Justin Borczuk, Jacob Gold, Maxwell Hu, Shiv Sakhuja, and Marco Starger
Pie-Num: (WN)
pdfProposal pdfLRM
Hana Fusman, Ogochukwu Nwodoh, and Hadiah Venner
PixMix: (HP)
pdfProposal pdfLRM
Nathan Burgess, Christina Charles, Edvard Eriksson, and Alexandra Taylor-Gutt
SIPL: (CA)
pdfProposal pdfLRM
Ci Chen, Yuedong Wang, Simon Zhai, Shanshan Zhang, and Yihan Zhao
SOL: (CA)
pdfProposal pdfLRM
Gergana Alteva, Kunal Baweja, Erik Dyer, and Aditya Narayanamoorthy
Sandbox: (SE)
pdfProposal pdfLRM
Megan Fillion, Gabriel Guzman, and Dimitri Leggas
Sandbox2D: (CA)
pdfProposal pdfLRM
Martin Fagerhus, Abhijeet Mehrotra, Roy Prigat, and Daniel Tal
Strux: (CL)
pdfProposal pdfLRM
Josh Bartlett, Sophie Stadler, Fredrick Tam, and Millie Mei Lam Yang
WebLang: (LP)
pdfProposal pdfLRM
Ryan Bernstein, Brendan Burke, Christophe Rimann, Julian Serra, and Jordan Vega
giraph: (LP)
pdfProposal pdfLRM
Daniel Benett, Seth Benjamin, Jennifer Bi, and Jessie Liu
pixelman: (HP)
pdfProposal pdfLRM
Tony Chan, Teresa Choe, Gabriel Kramer-Garcia, and Brian Tsau
tiler: (FK)
pdfProposal pdfLRM
Jacky Cheung, Jason Lei, Jiayin Tang, Monica Ting, and Evan Ziebart

star My favorites

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