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

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
Richard Townsend rtownsend@cs.columbia.edu F 2-4 TA Room (Mudd 1st floor)
Prachi Shukla ps2829@columbia.edu T 10-12 468 CSB
David Arthur da2647@columbia.edu Th 2-4 TA Room (Mudd 1st floor)
Lixin Yao ly2328@columbia.edu M 10-11, W 11-12 TA Room (Mudd 1st floor)
Aquila Khanam ak3654@columbia.edu T 5:30-7:30 TA Room (Mudd 1st floor)

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

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 9 1
Intro. to Languages
pdf
Ch 1, 2
Mon Sep 14 2
Language Processors
pdf
Ch. 2
Wed Sep 16 3
Programming in OCaml
pdf

Mon Sep 21 4
"

Wed Sep 23 5
Guest lecture

Mon Sep 28 6
Ocaml contd.

Wed Sep 30 7
"

Proposal
Mon Oct 5 8
"

Wed Oct 7 9
Syntax and Parsing
pdf
Ch. 3, 4
Mon Oct 12 10
"

Wed Oct 14 11
"

pdf HW1
Mon Oct 19 12
"

Wed Oct 21 13
The MicroC Compiler
pdf
App. A
pdf HW2
Mon Oct 26 14
Review for Midterm
pdf

LRM
Wed Oct 28 Midterm Exam
Mon Nov 2 Election Day Holiday
Wed Nov 4 15
MicroC Contd.

Mon Nov 9 16
MicroC Contd.

Wed Nov 11 17
Types and Static Semantics
pdf
Sec. 6.5
Mon Nov 16 18
Runtime Environments
pdf
Ch. 7
Hello World
Wed Nov 18 19
"

Mon Nov 23 20
"

Wed Nov 25 21
Code Generation
pdf

Mon Nov 30 22
The Lambda Calculus
pdf

Wed Dec 2 23
"

Mon Dec 7 24
Logic Programming
pdf

pdf HW3
Wed Dec 9 25
Review for Final
pdf

Mon Dec 14 Final Exam
Tue Dec 22 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.
PDF file Jason Hickey, Introduction to Objective Caml. One of my favorite books on O'Caml.
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 O'Caml source for the four-function calculator.
.tar.gz file O'Caml source and test cases for the microc language.

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
home Aho, Kernighan, and Weinberger, The AWK Programming Language

Projects

LFLA: Language for Linear Algebra (AK)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Zhiyuan Guo, Guitang Lan, Jin Liang, and Chenzhe Qian
dots: A Graph Language (AK)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Hosanna Fuller, Rachel Gordon, Adam Incera, and Yumeng Liao
finl: Finance Language (AK)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Robert Cornacchia, Josh Fram, Lauren O'Connor, and Padraic Quinn
kgl: Knowledge Graph Language (AK)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Bingyan Hu, Cheng Huang, Ruoxin Jiang, and Nicholas Mariconda
ted: Web Crawling Language (AK)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Theodore Ahlfeld, Matthew Haigh, Konstantin Itskov, and Gideon Mendels
Accelerator: Matrix language (DA)
pdfProposal pdfLRM pdfFinal Report ArchiveProject Files
Avi Chad-Friedman, Alan McNaney, and Evan O'Connor
arg: Language with explicit type safety control (DA)
pdfProposal pdfLRM pdfFinal Report ArchiveProject Files
Ryan Eagan, Michael Goldin, River Keefer, and Shivangi Saxena
marmalade: Music Language (DA)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Uzodinma Amuzie, Cathy Jin, Raphael Norwitz, and Savvas Petridis
note-hashtag: Music Language (DA) star
pdfProposal pdfLRM pdfFinal Report ArchiveProject Files
Kevin Chen, Brian Kim, and Edward Li
Geo: Geometric Solution Language (LY)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Zichen Chao, Ziyi Luo, Qi Wang, and Yuechen Zhao
Senet: Board Game Language (LY)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Dhruvkumar Motwani, Richard Munoz, Lilia Nikolova, Maxim Sigalov, and Srihari Sridhar
WASP: Web API Specification Protocol (LY)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Dustin Burge, John Chung, Tingting Li, and Neelamohan Vadoothker
gridworld: Role-Playing Games (LY)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Zikai Lin, Andrew Phan, Kevin Weng, and Loren Weng
tbag: Text-Based Adventure Game Language (LY)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Gregory Chen, Yu-Chun Chien, Brian Slakter, Maria Van Keulen, and Iris Zhang
dave: Data Analytical Visualization with Ease (PS)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
HyunSeung Hong, MinWoo Kim, Fan Yang, and Chen Yu
frac: Recursive Art Compiler (PS)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Justin Chiang, Kunal Kamath, Calvin Li, and Anne Zhang
mandala: Geometric Design Language (PS)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Edo Roth, Harsha Vemuri, Kanika Verma, and Samantha Wiener
odds: Statistical Programming Language (PS)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Daniel Echikson, Alexander Kalicki, Alexandra Medway, and Lilly Wang
vc: Virtual Classroom (PS)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Carolyn Fine, Marissa Golden, and Michelle Levine
HAWK: HTML is All We Know (RT)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Jonathan Adelson, Ethan Benjamin, Justin Chang, Graham Gobieski, and George Yu
PLTree: Tree Programming Language (RT)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Jacob Graff, Shruti Kulkarni, Luis Ramirez, and Justin Walters
StoryBook: Story-like syntax (RT)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Nina Baculinao, Beth Green, Anna Lawson, and Pratishta Yerakala
cmajor: Music Composition Language (RT)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Stephanie Huang, Andrew OReilly, Jonathan Sun, and Laura Tang
ql: Database language (RT)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Anshul Gupta, Gary Lin, Mayank Mahajan, Matthew Piccolella, and Evan Tarrh
yo: Video Editing Language (RT)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Munan Cheng, Tiezheng Li, Yufei Ou, and Mengqing Wang
Dice: Distributed Systems Language (SE) star
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Khaled Atef, Emily Chen, Philip Schiffrin, and David Watkins
Flow: Kahn Process Network Language (SE)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Adam Chelminski, Zachary Gleicher, Mitchell Gouzenko, and Hyonjee Joo
SEAM: Simulation Language (SE)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Akira Baruah, Maclyn Brandwein, Sean Inouye, and Edmund Qiu
Stitch: Threading language (SE)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Daniel Cole, Rashedul Haydar, Megan Skrypek, and Timothy Waterman
Towel: Stack-based postfix language (SE)
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
GUANLIN CHEN, Zihang Chen, and Baochan ZHENG
superscript: Typed LISP-like language (SE) star
pdfProposal pdfLRM pdfFinal Report pdfSlides ArchiveProject Files
Samurdha Jayasinghe Mudi, Tommy Orok, Uday Singh, Yu Wang, and Michelle Zheng

Grading

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

Collaboration

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.

Other

Valid HTML 4.01Valid CSS