15814 Types and Programming Languages
Course Information
Time:  TueThu10:3011:50  
Room:  4303 GHC  
Instructor:  Robert Harper  
Teaching Assistant:  Evan Cavallo  
Discussion Bboard:  Piazza Page  
Office Hours  
Harper:  Tue 13:0014:00  9207 GHC 
Cavallo:  Mon 10:3012:00  6221 GHC 
Synopsis
This is an introductory course on the foundations of programming languages. The central organizing principle is the identification of language features with types. The theory of programming languages, therefore, reduces to the theory of types. Type theory is a comprehensive foundational theory of computation. Type theory has its orgins in proof theory (the theory of human reason) and is closely related to category theory (the general theory of mathematical structures). The tripartite relationship between type theory, proof theory, and category theory is fundamental to the study of programming languages.
Text
Robert Harper, Practical Foundations for Programming Languages (Second Edition), Cambridge University Press, 2015 (to appear). 
[Online Preview.] 
Homework
You are required to achieve a grade of B on each homework assignment, and on the final exam. If you receive a C or D on an ontime submission, you will be given three days in which to revise to achieve a B grade on that assignment. Failure to submit on time, or a failing grade on an assignment, precludes resubmission and will result in a failing grade in the course.
All homeworks are due at the beginning of lecture on the stated due date. No late homeworks will be accepted, unless prior permission is obtained from the instructor, which will be granted only under exceptional circumstances. Homeworks are to be submitted in PDF format, and must be typeset. (LaTeX is recommended; we will provide macros).
All homeworks are to be submitted by sending the PDF via email to the teaching assistant with "15814 Homework" as the subject line. No late homeworks will be accepted. Any redo's must be finished within three days of their being returned to you. Only one redo is permitted per assignment.
Final Exam
There will be a 48hour takehome final examination during the exam period at the end of semester. You will be assigned a letter grade as for homework, but with no possibility of resubmission.
Academic Integrity
Unless explicitly instructed otherwise, all homework and exam work is to be solely your own, and may not be shared with or borrowed from any other person in the course. You are not permitted to draw upon assignments or solutions from previous instances of the course, nor to use course materials (such as assignments or programs) obtained from any web site or other external source in preparing your work.
You may discuss homework assignments with other students in the class, but you must adhere to the whiteboard policy. At the end of discussion the whiteboard must be erased, and you must not transcribe or take with you anything that has been written on the board during your discussion. You must be able to reproduce the results solely on your own after any such discussion.
Grading
CS PhD students are assigned a pass/fail grade in the University grading system, but are given an internal letter grade for Black Friday purposes. A final letter grade of B is required to pass this course. To achieve this, you must have (1) completed all homework assignments ontime with a grade of B; and (2) earned a grade of B or better on the final exam.
Undergraduate students and students in other programs will be assigned letter grades according to the same policies used to assign internal letter grades for CS PhD students.
Schedule of Lectures
Date  Topic  Reading  Homework  

Sep  8  What is a programming language?  PFPL17  
10 
HW1 out
(handout [LaTeX template] [macros]) (corrected 9/15/15) 

15  Functions, Products, and Sums  PFPL811  
17  
22  Generic Programming, Inductive and CoInductive Types  PFPL 1415  
24 
HW1 due. (solutions) HW2 out. (handout [LaTeX template] [macros]) 

29  Polymorphic Types, Abstract Types, Parametricity  PFPL 1617, 49  
Oct  1  
6  Partiality and Recursive Types  PFPL 1920  
8 
HW2 due. (solutions) HW3 out. (handout [LaTeX template] [macros]) 

13  Dynamic Typing  PFPL 2223  
15  
20  Dynamic Dispatch  PFPL 26 
HW3 due. HW4 out. (handout [LaTeX template] [macros]) 

22  (Guest lecture by Dana Scott)  
27  Parallelism  PFPL 3738  
29  
Nov  3  Stacks and Continuations  PFPL 2830  
5 
HW4 due. HW5 out. (handout [LaTeX template] [macros]) (notes on continuations and logic) 

10  Modernized Algol  PFPL 34  
12  
17  References; Benign Effects  PFPL 35 
HW5 due. 

19  Dynamic Classification, Exception Values  PFPL 33 
HW6 out.
(handout [LaTeX template] [macros]) 

24  Laziness  PFPL 36  
26  (Thanksgiving)  
Dec  1  Concurrency  PFPL 3940  
3  HW6 Due 12/6.  
Dec  8  Modularity  PFPL 4244  
10 