Stephen A. Edwards Columbia University Crown
COMS W4115
Programming Languages and Translators
Spring 2021

Lectures

Class meets Mondays and Wednesdays 5:40 - 6:55 PM Online.

Staff

Name Email Office hours Location
Prof. Stephen A. Edwards sedwards@cs.columbia.edu see Courseworks Online
Wonhyuk Choi wc2737@columbia.edu See Courseworks Online
Evan Mesterhazy etm2131@columbia.edu See Courseworks Online
Hans Montero hjm2133@columbia.edu See Courseworks Online
Dipankar Niranjan dipankar.n@columbia.edu See Courseworks Online
Jianan Yao jy3022@columbia.edu See Courseworks Online
Xijiao Li xl2950@columbia.edu See Courseworks Online
Arjun Ahua aa4664@columbia.edu See Courseworks Online

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 Computer Science Theory: 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
Mon Jan 11 1
1
Intro. to Languages
(annotated)
pdf
pdf
Ch 1, 2

Wed Jan 13 2
2
Language Processors
(annotated)
pdf
pdf
Ch. 2

Mon Jan 18 MLK Holiday
Wed Jan 20 3
Some Outstanding Projects
pdf

Mon Jan 25 4
4
Programming in OCaml
(annotated)
pdf
pdf


Wed Jan 27 5
"

Mon Feb 1 6
"

Wed Feb 3 7
"

Proposal
Mon Feb 8 8
8
Syntax and Parsing
(annotated)
pdf
pdf
Ch. 3, 4

Wed Feb 10 9
"

HW1 .tar.gz filehw1.tar.gz
Mon Feb 15 10
"

Wed Feb 17 11
"

Mon Feb 22 11
"

Wed Feb 24 11
"

LRM, Parser
Mon Mar 1 Spring Break
Mon Mar 8 11
"

Wed Mar 10 12
12
The MicroC Compiler
(annotated)
pdf
pdf
App. A

Fri Mar 12
(no lecture; turn in homework)

HW2 p1hw2-1.svg p2hw2-2.svg p3hw2-3.svg
Mon Mar 15 16
MicroC contd.

Wed Mar 17 17
"

Mon Mar 22 18
"

Wed Mar 24 19
"

Hello World
Mon Mar 29 20
"

Wed Mar 31 21
21
Runtime Environments
(annotated)
pdf
pdf
Ch. 7

Mon Apr 5 22
"

Wed Apr 7 23
23
The Lambda Calculus
(annotated)
pdf
pdf


Mon Apr 12 24
"

Wed Apr 14 25
25
Review for Final
Coversheet for Final
pdf
pdf


pdf HW3
Fri Apr 16 Final Exam
Mon Apr 26 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 OCaml books, many available for free online
.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.

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 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

AHOD: AllHandsOnDeck: Card game language (XL)
pdfProposal pdfLRM
Caitlyn Chen, Tiffeny Chen, Jang Hun Choi, Mara Dimofte, and Christi Kim
Arbol: Tree language (AA)
pdfProposal pdfLRM
Andrea McCormick, Anthony Nascimento, and Derek Zhang
BLAStoff: Matrix manipulation language (DN)
pdfProposal pdfLRM
Jacob Fisher, Michael Jan, Jason Kao, and Katon Luaces
C-flat: Computer Music Language (WC)
pdfProposal pdfLRM
Jiayi Chen, Isabella Cho, Katie Kim, and Jasmine Valera
C-net: Language for File I/O and Networking (EM)
pdfProposal pdfLRM
Rediet Bekele, Kidus Mulu, Kingsley Neequaye, William Oseghare, and Bruk Zewdie
CGC: C with garbage collection (EM)
pdfProposal pdfLRM
Lieyang Chen, Tianze Huang, Zhuoxuan Li, and Fanhao Zeng
CaRdY: Card Game Language (XL)
pdfProposal pdfLRM
Liseidy Bueno, Kenya Plenty, Pazit Schrecker, Lindsey Wales, and Katrina Zhao
CompArt: Drawing Language (WC)
pdfProposal pdfLRM
Aaron Priven, Julia Reichel, Asher Willner, and Evan Zauderer
Digo: Distributed Go-like Language (AA)
pdfProposal pdfLRM
Yufan Chen, Sida Huang, Hanxiao Lu, and Wenqian Yan
E-CATZ: Music Language (WC)
pdfProposal pdfLRM
Chianna Cohen, Ethiopia Mengesha, Annie Sui, and Timothy Vallancourt
FFBB: Imperative Language (JY)
pdfProposal pdfLRM
Bowen Chen, Xiaosheng Chen, Joseph Yang, and Jianan Yao
GASSP: OO Language (JY)
pdfProposal pdfLRM
Adam Fowler, Swan Htet, Patrycja Przewoznik, Samuel Weissmann, and Yuanxin Yang
GRACL: Parallel Graph Algorithm Language (AA)
pdfProposal pdfLRM
Hadley Callaway, Pelin Cetin, Eilam Lehrman, Defne Sonmez, and Maya Venkatraman
GWiz: GPS Exchange Format (GPX) Langauge (EM)
pdfProposal pdfLRM
Katherine Duff, Ashley Kim, Elisa Luo, and Rebecca Yao
Go--: C-like Language with Concurrency (XL)
pdfProposal pdfLRM
Chen Chen, Yuyan Ke, Yang Li, and Arya Zhao
Graphene: Graph Algorithm Language (AA)
pdfProposal pdfLRM
Vasileios Kopanas, Ashar Nadeem, and Matthew Sanchez
Improv: Improvisational Music Language (HM)
pdfProposal pdfLRM
Joshua Choi, Natalia Dorogi, Emily Li, and Alice Zhang
JQER: Python-like language for trees (SE)
pdfProposal pdfLRM
Qianjun Chen, Roger Lu, Eurey Noguchi, and Jiaxuan Pan
JavaLite: A Java-like Language (JY)
pdfProposal pdfLRM
Frances Cao, Hongfei Chen, Yen-Lin Chen, and Mateo Maturana
Konig: Graph Algorithm Language (AA)
pdfProposal pdfLRM
Delilah Beverly, Lord Crawford, and Matteo Sandrin
Lilac: Lambda-calculus-like language (SE)
pdfProposal
Shengtan Mao
Lingo: Functional Language with Linear Types (SE)
pdfProposal pdfLRM
Benjamin Flin, Jay Karp, and Sophia Kolak
Lucifer: 2D Video Game Language (WC)
pdfProposal pdfLRM
Robert Becker, Cherry Chu, Michael Fagan, and Elliott Morelli
MM: Matrix Mania (DN)
pdfProposal pdfLRM
Cindy Espinosa, Desu Imudia, Diego Prado, Sophie Reese-Wirpsa, and Emily Ringel
Matcat: Linear Algebra Language (XL)
pdfProposal pdfLRM
Davit Barblishvili, Andreas Cheng, Mariam Khmaladze, and James Ryan
Meowlang: LOLCODE-like OO language (HM)
pdfProposal pdfLRM
Carolyn Chen, Megan Frenkel, Michelle Lin, William Penney, and Lauren Pham
PRIME: Cryptography Language (SE)
pdfProposal pdfLRM
Pedro Barbosa Teixeira Santos, Alexander Liebeskind, Nikhil Mehta, and Thomas Tran
PartialC: C-like language (EM)
pdfProposal pdfLRM
MINGJIE LAO, and JIAYING SONG
Photon: Image Editing Language (JY)
pdfProposal pdfLRM
Franky Campuzano, Akira Higaki, CALUM MCCARTAN, and Phu Pham
Pixel: Image Processing Language (JY)
pdfProposal pdfLRM
Alex Anthony Cortes-Ose, Dillon Davis, Jessica Kim, and Jessica Peng
PolyWiz: Symbolic Math Language (HM)
pdfProposal pdfLRM
Tamjeed Azad, Rose Chrin, Max Helman, Aditya Kankariya, and Anthony Pitts
PyThon: Python-like Language (XL)
pdfProposal pdfLRM
Gabriel Clinger, George DiNicola, Daniel Hanoch, and Cameron Miller
Python++: Python-like Language (XL)
pdfProposal pdfLRM
Nathan Cuevas, Robert Kim, Nikhil Kovelamudi, and David Steiner
QWEB: Website Language (HM)
pdfProposal pdfLRM
Kamrul Hossain, Tamanna Hussain, Ramisa Murshed, and Xabier Peralta
RJEC: Go-like Really Just Elementary Concurrency (AA)
pdfProposal pdfLRM
Riya Chakraborty, Justin Chen, Caroline HOANG, and Yuanyuting Wang
Racontr: Text Adventure Game Language (SE)
pdfProposal pdfLRM
Saumya Agarwal, Xinye Jiang, Janelle Ponnor, Shuyu Ye, and Morgan Zee
Reptile: Geometric Figure Drawing Language (JY)
pdfProposal pdfLRM
Aileen Cano, Hariti Patel, Aviva Weinbaum, and Lindsey Weiskopf
SCIC: Scientific Calculation Language (EM)
pdfProposal pdfLRM
Zhengyuan Dong, ZHENGYI LI, and Yucen Sun
SOS: Graphics Language (WC)
pdfProposal pdfLRM
Terric Abella, Sitong Feng, G Pershing, and Sheron Wang
Seaflow: Reactive Programming Language (EM)
pdfProposal pdfLRM
Rohan Arora, Junyang Jin, Sanlok Lee, and Sarah Seidman
TiMRS: Timers, Made Readable and Simple (EM)
pdfProposal pdfLRM
Jeffrey Kline, Faisal Rahman, Daniel Rindone, and Eric Webb
Viper: Python-like Language (HM)
pdfProposal pdfLRM
Mustafa Eyceoz, Trey Gilliland, Thomas Kaufman-Gomez, Raghav Mecheri, and Matthew Ottomano Jr.
XIRTAM: Matrix Manipulation Language (DN)
pdfProposal pdfLRM
Lior Attias, Andrew Gorovoy, Bailey Hwa, Shida Jing, and Annie Wang
YAGL: Yet Another Graph Language (SE)
pdfProposal pdfLRM
Adam Carpentieri, Jack Hurley, James Mastran, and Shvetank Prakash
YAMML: Yet Another Matrix Manipulation Language (DN)
pdfProposal pdfLRM
Bill Chen, Doria Chen, Kent Hall, James Xu Jr., and Janet Zhang
bugsy: 2D Animation Language (HM)
pdfProposal pdfLRM
Jason Cardinale, Sofia Sanchez-Zarate, Benjamin Snyder, Evan Tilley, and Michael Winitch
nodable: Graph Language (SE)
pdfProposal pdfLRM
Ajita Bala, Ariel Goldman, Naviya Makhija, and Karen Shi
red-pandas: Matrix Manipulation Language (DN)
pdfProposal pdfLRM
Amina Assal, Ivan Barral, Rafail Khalilov, and Myric Lehner

star My favorites

Grading

40 % Project
40 % Final
20 % 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