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

Lectures

Class meets Mondays and Wednesdays 2:40 - 3:55 PM 207 Mathematics.

Staff

Name Email Office hours Location
Prof. Stephen A. Edwards sedwards@cs.columbia.edu see my home page 462 CSB
Yu-Chun (Julie) Chien yc2937@columbia.edu 3-5 Th, 4-6 F TA Room (1st floor Mudd)
Jacob Graff jag2302@columbia.edu 5-7 Th 468 CSB
Alexandra Medway afm2134@columbia.edu 4-6 W 468 CSB
Daniel Echikson dje2125@columbia.edu 10A-12 T 468 CSB
Graham Gobieski gsg2120@columbia.edu 10A-12 M 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 Jan 18 1
Intro. to Languages
pdf
Ch 1, 2
Mon Jan 23 2
"

Wed Jan 25 3
Language Processors
pdf
Ch. 2
Mon Jan 30 4
4
Some Outstanding Projects
Programming in OCaml
pdf
pdf


Wed Feb 1 5
"

Mon Feb 6 No Lecture
Wed Feb 8 6
"

Proposal
Mon Feb 13 7
Syntax and Parsing
pdf
Ch. 3, 4
Wed Feb 15 8
"

Mon Feb 20 9
"

pdf HW1
Wed Feb 22 10
"

LRM
Mon Feb 27 11
The MicroC Compiler
pdf
App. A
Wed Mar 1 12
"

Fri Mar 3
(homework due only)

pdf HW2
Mon Mar 6 13
Review for Midterm
pdf

Wed Mar 8 Exam 1
Mar 13-17 Spring Break
Mon Mar 20 14
Types and Static Semantics
pdf
Sec. 6.5
Wed Mar 22 15
"

Mon Mar 27 16
"

Hello World
Wed Mar 29 17
Runtime Environments
pdf
Ch. 7
Mon Apr 3 18
"

Wed Apr 5 19
"

Mon Apr 10 20
"

Wed Apr 12 21
Code Generation
pdf

Mon Apr 17 22
"

Wed Apr 19 23
The Lambda Calculus
pdf

pdf HW3
Mon Apr 24 24
"

Wed Apr 26 25
Review for Final
pdf

Mon May 1 Exam 2
Wed May 10 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

J-STEM: Matrix Manipulation Language (AM)
pdfProposal pdfLRM
Tessa Hurr, Michelle Lu, Emily Song, Samantha Stultz, and Julia Troxell
MatCV: Matrix Manipulation Language (AM)
pdfProposal pdfLRM
Anuraag Advani, Shardendu Gautam, Rahul Kapur, and Abhishek Walia
Pseudo: Pseudocode-style programming language (AM)
pdfProposal pdfLRM
Kristy Choi, Kevin Lin, Benjamin Low, Dennis Wei, and Raymond Xu
Twister: Matrix Language (AM)
pdfProposal pdfLRM
Arushi Gupta, Annalise Mariottini, Anand Sundaram, and Chuan Tian
yeezyGraph: Graph Language (AM)
pdfProposal pdfLRM
Caroline Kim, Yiming Sun, Wanlin Xie, and Nancy Xu
ALACS: Functional object-oriented langauge (DE)
pdfProposal pdfLRM
Terence Jacobs, Candace Johnson, Gabriel Kramer-Garcia, and Gabriel Lopez
GRAIL: Graph Rendering Articulate Innovation Language (DE)
pdfProposal pdfLRM
Aashima Arora, Rose Sloan, Jiaxin Su, and Riva Tropp
MatchaScript: JavaScript-like language (DE)
pdfProposal pdfLRM
Kimberly Hou, Rebecca Mahany, Jorge Orbay, and Ruijia Yang
THEATR: Actor-based Language (DE)
pdfProposal pdfLRM
Beatrix Carroll, Suraj Keshri, Michael Lin, and Linda Ortega Cordoves
shux: Particle-based physics language (DE)
pdfProposal pdfLRM
John Hui, Lucas Schuermann, Mert Ussakli, and Andy Xu
CARL: Columbia's Awk Replacement Language (GG)
pdfProposal pdfLRM
Darren Hakimi, Keir Lauritzen, Leon Song, and Guy Yardeni
DCL: Dynamic Callback Language (GG)
pdfProposal pdfLRM
William Essilfie, Chang Liu, Ashutosh Nanda, and Craig Rhodes III
Damo: Mathematical Function Language (GG)
pdfProposal pdfLRM
Ian Covert, Hari Devaraj, Abhiroop Gangopadhyay, and Alan Gou
ManiT: C-like Language for Large Integers and Matrices (GG)
pdfProposal pdfLRM
Akiva Dollin, Seungmin Lee, Irwin Li, and Dong Hyeon Seo
SetC: Language for Set Theory (GG)
pdfProposal pdfLRM
Julian Kocher, Frank Ling, and Heather Preslier
Ballr: 2D Game Generator (JC)
pdfProposal pdfLRM
Rochelle Jackson, Frederick Kellison-Linn, Jessica Vandebon, and Noah Zweben
Blis: Better Language for Image Stuff (JC)
pdfProposal pdfLRM
Connor Abbott, Wendy Pan, Klint Qinami, and Jason Vaccaro
Crayon: A Raster Graphics Creation Language (JC)
pdfProposal pdfLRM
Naman Agrawal, Vaidehi Dalmia, Ganesh Ravichandran, and David Smart
GIRAPHE: Graph Creation and Manipulation Language (JC)
pdfProposal pdfLRM
Dianya Jiang, Vince Pallone, Minh Truong, Tongyun Wu, and Yoki Yuan
GridLang: Grid-Based Game Development Language (JC)
pdfProposal pdfLRM
Sagar Damani, Akshay Nagpal, Parth Panchmatia, and Dhruv Shekhawat
MPL: Matrix Processing Language (JC)
pdfProposal pdfLRM
Wode (Nimo) Ni, David Rincon-Cruz, Jiangfeng Wang, and Chi Zhang
MatriCs: Linear Algebra-specific Language (JC)
pdfProposal pdfLRM
Nikhil Baradwaj, Duru Kahyaoglu, Emmanuel Koumandakis, Florian Shabanaj, and Talal Toukan
TuSimple: An Easy Graph Language (JC)
pdfProposal pdfLRM
Yunzi Chai, Ziyi Mu, Zicheng Xu, Jihao Zhang, and Shen Zhu
VENTURE: Adventure game language (JC)
pdfProposal pdfLRM
Zachary Adler, Benjamin Carlin, Naina Sahrawat, and James Sands
WARHOL: Functional Language for Images (JC)
pdfProposal pdfLRM
Martina Atabong, Charvinia Neblett, Samuel Nnodim, Catherine Wes, and Sarina Xie
DECAF: General-purpose Object-oriented Langauge (JG)
pdfProposal pdfLRM
Hidy Han, JiaYan Hu, Kim Tao, and Kylie Wu
Lava: Yet Another Dialact of Java on JVM (JG)
pdfProposal pdfLRM
Jiacheng Liu, An Wang, Yimin Wei, and Hongning Yuan
Music-mike: Music Language (JG)
pdfProposal pdfLRM
Husam Abdul-Kafi, Lakshmi Bodapati, and Harvey Wu
Sick-Beets: Audio Generation Language (JG)
pdfProposal pdfLRM
Jin Peng, Kevin Shen, Courtney Wong, and Angel Yang
modC: A Language for Cryptographic Applications (JG)
pdfProposal pdfLRM
Margaret Mallernee, Zachary Silber, Michael Tong, Richard Zhang, and Joshua Zweig
C+: More than C, less than C++ (SE)
pdfProposal pdfLRM
Eric Johnson, and Alexander Stein
Ms: M/s: Managing Distributed Workloads (SE)
pdfProposal pdfLRM
Benjamin Hanser, Miranda Li, and Mengdi Lin
Pipeline: Asynchronous Programming Language (SE)
pdfProposal pdfLRM
Brandon Bakhshai, Ben Lai, Jeffrey Serio Jr., and Somya Vasudevan
SAKE: Finite State Machine Language (SE)
pdfProposal pdfLRM
Arunavha Chanda, Emma Etherington, Shalva Kohen, and Kai-Zhan Lee
TPL: Table Programming Language (SE)
pdfProposal pdfLRM
Hamza Jazmati

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