CMSC 22100/32100: Programming Languages

Fall Quarter, 2009 
TTh, 1:30 pm - 2:50 pm
Ryerson 251


Instructor Contact Info
Course Description
Course Textbooks
Programming Exercises
Course Policies
Course Mailing List
Course Schedule
Homework Assignments
Homework Solutions
Sample Code
Programming in SML


The first class will be on Tuesday, Sept. 29, 2009 at 1:30pm in Ry 251.

The Midterm Exam will take place in class on Thursday, November 5.

The Final Exam will take place on Tuesday, December 8 from 1:30pm to 3:30pm in Ry 251.

Instructor Contact Info

Name Role Office Office hours Phone Email
David MacQueen Professor Ryerson 250 By appointment 2-4980

Course Description

Programming languages are the most fundamental tools involved in the creation of software, and thus play a key role in computing. This is a foundational course exploring the principles and concepts underlying the design of programming languages. We use a formal approach based on operational semantics to give clear and precise descriptions of language concepts, such as flow of control, data structures and types, modularity and abstraction, and concurrency. The major paradigms of imperative, functional, and object-oriented paradigms will be covered, though the functional paradigm will be the main focus because of its simplicity.

Students should have experience programming in one or more programming languages, and familiarity with basic concepts of naive set theory and logic would be helpful. Inductive definitions and inductive proofs will play a central role.

The course is being taught as a combinded graduate/undergraduate course this year. There will be additional reading and assignments for the graduate students.

Course Textbook

The main textbook for the course is Programming Languages: Theory and Practice (2005 Edition) by Robert Harper. This is available in two versions as pdf files: online.pdf suitable for online viewing, or offline.pdf suitable for printing. Note that this is a different (and older) version of the book from what was originally posted on this page.

Other references that are useful for background material or further study are:

Programming Exercises

This is not a course centered on programming projects, but programming examples and exercises that show how to implement the ideas expressed in operational semantics will be given using the language Standard ML. There are several good sources of documentation and tutorials for SML/NJ available online, and some of these are given in the course SML/NJ page.

Course Policies

Course Mailing List

A mailing list has been created for the course. The address is The web page for the mailing list is at a

Midterm Solution

Midterm solution.

Homework Assignments

Here are links to PDF files of the homework assignments (to be supplied).
Homework 1 (due Tuesday, Oct 13);
Homework 1 solution;
Homework 2 (due Tuesday, Oct 20);
Homework 2 solution (revised) (with the original version, which covers Problem 3;
Homework 3 (due Thursday, Oct 29);
Homework 3 solution;
Homework 3, Problem 5 programming solution (arith-SOS-oper.sml);
Homework 4 (due Thursday, Nov 12);
Homework 4 solution;
Homework 5 (due Tuesday, Nov 24);
Homework 6 (due Tuesday, Dec 1);


Here are links to PDF files of the handouts.
Rule Induction for Arith+Let
with LaTeX source files: arith-ind.tex, Static and Dynamic semantics of Arith.
Description of dynamic and static semantics of the C-machine.
Description of the E-machine.
Description of Landin's SECD machine.

Mathias Blume Notes from 2008

Supplementary lecture notes.
An Overview of Standard ML.
Homework 1.
Homework 1 solutions.
Homework 1 comments.

Sample Code

Here are links to sample code.

arith.sml: arithmetic with let, calculating free variables
arith-interp.sml: simple interpreter for arithmetic with let (single variable substitutions)
arith-SOS.sml: SOS-style evaluator for arithmetic using substitutions
arith-ENV.sml: environment-based evaluator for arithmetic
arith-EV.sml: EV-style evaluator for arithmetic using substitutions
arith.scm: environment-based evaluator for arithmetic (scheme version)
Type checker and evaluator for MiniML
Big-step evaluator for pure lambda calculus
Big-step evaluator for pure lambda calculus (alternate version)
Evaluator for lambda calculus using environments
Tarball of code for Reynolds "Definitional Interpreters" paper
C-machine evaluator for MinML
E-machine evaluator for MinML
SECD machine evaluator for MinML
SECD compiler for MinML
E-machine evaluator for MinML with products
Type checker and evaluator for MinML with recursive types
Interactive interpreter for extended MinML (tarball)

Papers and Presentations

The Mechanical Evaluation of Expressions by Peter Landin (Computer Journal, 1964)
The Next 700 Programming Languages by Peter Landin (CACM, 1966)
Definitional Interpreters for Higher-Order Progamming Languages by John Reynolds (1972)
The Revised Report on the Syntactic Theories of Sequential Control and State by Matthias Felleisen and Robert Hieb
A Functional Correspondence Between Evaluators and Abstract Machines by Olivier Danvy et al.
From Interpreter to Compiler and Abstract Machine by Olivier Danvy et al.
A Structural Approach to Operational Semantics by Gordon Plotkin.
The Discoveries of Continuations by John Reynolds.
Structure and Abstraction in HOT Languages (Marktoberdorf Summer School Notes, 2000).

Additional Useful Links

Frank Pfenning at CMU has a web site for his version of a course 15-312 Foundations of Programming Languages based on Harpers draft book. This web site has some very useful supplementary lecture notes (found under the Schedule page), as well as assignments, software, and other resources. You may find it useful to browse through this site and download some of the material.

Dave MacQueen
Last modified: Wed Dec 5 16:46:41 CST 2007