CMCS 321: Programming Languages


Announcements

The final will be a 48-hour take-home exam. You can start the exam whenever you want between December 4 and December 6 from 10am to 5pm. George will e-mail you the final at the time of your choosing (between 10am and 5pm) if you let him know when you want to start. You will have 48 hours to finish and return the test after you receive it. You can return the exam to George or to me.

There will be no recitation Friday, Dec. 1. However, George will be available to answer questions by email or by appointment.

Solutions to Homework 6 have been posted.

The revised version of Homework 7 is posted.
Part 1 of Homework 7 (the paper-and-pencil part) is due Tuesday, Nov. 28.
Part 2 (the coding part) is due Thursday, Nov. 30.
Homework 6 is posted. The due date is postponed to Tuesday, Nov. 21.
Derek Dreyer will be guest lecturing Nov. 7 through Nov. 16.


Instructor

Umut Acar

Teaching Assistant

George Kuan (gkuan [at] cs [dot] uchicago [dot] edu)

Meetings

Place: Ryerson 251
Times: Tue and Thu: 3:00-4:20pm

Office Hours

Place: TTI-C, room 253
Times: Th: 4:30-5:00pm.

Course Schedule

Date Topic Chapters Lecture Notes Homework
Sep 26 Introduction, Syntax and Induction Chapters 1, 2, 3 syllabus lecture 1 Homework 0
Solution 0
September 28 Semantics Chapter 3 lecture 2
September 29 An overview of SML SML overview
Oct 3 Lambda Calculus: Syntax, Substitution, Beta Reduction Chapter 5 lecture 3 Homework 1
Solution 1
Oct 5 Programming in the Lambda Calculus Chapter 5 lecture 4 Solution Ex. 3 & 4
Oct 6 ml-lex and ml-yacc Intro ml-lex and ml-yacc Lecture
Oct 10 de Bruijn Indices Chapter 6 lecture 5 Homework 2
Solution 2
Oct 12 Simply Typed Lambda Calculus Chapters 8 & 9 lecture 6
Oct 17 Type Safety Chapters 8 & 9 lecture 7 Homework 3
Solution 3
Oct 19 Unit, let, products, records, recursion Chapter 11 lecture 8 Homework 4
Sample Parser
Solution 4
Oct 24 References Chapter 13 no notes
Oct 26 Type Safety of References Chapter 13 no notes
Oct 31 Midterm Review
Nov 2 Midterm Homework 5
Nov 7 Explicit polymorphism (System F) Girard: Chapter 11 no notes
Nov 9 Church encodings Girard: Chapter 11 no notes Homework 6
Solution 6
Nov 14 Existential types, Girard's J operator Harper-Mitchell no notes
Nov 16 Implicit ML polymorphism, Damas-Milner type inference Damas-Milner no notes Homework 7
Nov 21 Exceptions Chapter 14 no notes Homework 6 due
Nov 23 Thanksgiving
Nov 28 Last Class: Variants and Recursive Types Chapters 11 and 20 no notes

Course Description

The course studies the theory and practice of programming languages. On the theory side, we will learn about what makes a programming language safe and sound by using mathematical models of execution and types. On the practical side, we will implement projects in the Standard ML language; these projects aim to put the theory to work.

You should consider taking this course if you are interested in (or want to learn about) programming languages, and/or high-level languages such as Standard ML.

Prerequisites

I will assume knowledge of basic mathematical concepts such as sets, and inductive proofs. If you are not readily familiar with these, then I recommend studying the first few chapters of the textbook. I will not assume any prior knowledge of the Standard ML language but you will be expected to learn the language on a step by step basis as the projects develop.

Text Book and Course Software

The text book for the course is Benjamin Pierce's Types and Programming Languages (errata.)

For projects, we will use the Standard ML language and the SML/NJ implementation. For further information on SML, see Bob Harper's Programming in Standard ML book, and the documentation for the SML'97 Basis Library.

You should install SML/NJ on your computer. You can either have the system administrator install it for you, or install it yourself. For installation instructions see the SML/NJ website. Make sure that you install a relatively recent version (110.4x or later). Since the Compilation Manager (CM) underwent a recent redesign, you may experience incompatibilities with the earlier versions.

Exams, Homeworks, Grading

There will be a midterm and a final exam. Each will contribute 25/100 points toward the final grade. The homeworks will make the remaining half. The final will be a 24-hour take home. Both written and programming assignments are due at the beginning of lecture on the due date. Written assignments will be collected in class. For programming assignments, please e-mail your code to the TA.