15814 Types and Programming Languages
Course Information
Time:  TueThu 1:302:50  
Room:  4303 GHC  
Instructors:  Robert Harper  Yitzhak Mandelbaum 
Teaching Assistant:  Favonia  
Discussion Bboard:  Piazza Page  
Office Hours  
Harper:  Tue 12:001:00  GHC 9207 
Mandelbaum:  By Appointment  GHC 9007 
Favonia:  Wed 12:001:00  GHC 9015 
Synopsis
This is an introductory course on the foundations of programming languages. The central organizing principle of language design 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. We will place special emphasis on the propositionsastypes correspondence, in which programs of a type are identified with proofs of the corresponding proposition. (Similar correspondences hold between type theory and category theory (types are objects, programs are maps) and between category theory and proof theory (propositions are objects, proofs are maps), but we shall not consider these in this course.)
References
Primary
Robert Harper, Practical Foundations for Programming Languages , Spring 2012. 
Secondary
JeanYves Girard (with Yves Lafont and Paul Taylor), Proofs and Types, Cambridge University Press, 1990. (Outofprint, available online as linked.) 
Benjamin C. Pierce, Types and Programming Languages , MIT Press, 2002. 
Benjamin C. Pierce, ed., Advanced Topics in Types and Programming Languages , MIT Press, 2005. 
Homework
You are required to achieve a grade of B on each homework assignment. If you fail to turn in an assignment on time, or if your initial grade is F, then you will not have the opportunity to redo the assignment, and will fail the course. If your initial grade is D or C, you must revise it to a B standard within three days. This policy ensures that the emphasis is properly on learning the course material, and not on "getting through it."
All homeworks are due at the beginning of lecture on the due date. Homeworks are to be submitted in PDF format (only!), and must be typeset. All homeworks are to be submitted by sending the PDF via email to Favonia 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 24hour takehome final examination during the exam period at the end of the semester. LaTeX macros are available now (passwordprotected). The solution is also available now.
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 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  11  λCalculus  PFPL 12,17  
13 
HW1 out
(handout [sample] [macros]) (more examples [source]) 

18  λCalculus  Lecture Notes  
20 
HW1 due. HW2 Part1 out. (handout, part 1 [sample] [macros]) 

25  Type Safety and Primitive and General Recursion  PFPL 36 (optional), 810  HW2 Part2 out. Note on Simultaneous Induction (handout, part 2 [sample] [macros]) 

27  
Oct  2  Finite and Infinite Types  PFPL 1112,16  HW1 solution out. 
4  Lecture Notes: Recursive Types Dynamic Typing 
HW2 due.
HW3 out. (handout [sample] [macros]) 

9  Dynamic and Hybrid Typing  PFPL 1819  
11  
16  Variable Types  PFPL 2021  
18 
HW3 due.
HW4 out. (handout [sample] [macros]) 

23  Mutation and State  PFPL 3536  
25  
30  Concurrency and Interaction  PFPL 41  
Nov  1 
HW4 due.
HW5 out. (handout [sample] [macros]) 

6  Continuations  PFPL 5.3,2729; Lecture notes  
8  Concurrency  PFPL 41  HW2 solution out.  
13  Spatial and Temporal Distribution  PFPL 4243  
15 
HW5 due.
HW6 out. (handout [sample] [macros]) 

20  Subtyping  PFPL 23  HW3 solution out.  
22  (Thanksgiving: no class)  
27  Kinding  PFPL 22,24 
HW6 due.
HW4 solution out. 

29  Dynamic Dispatch  PFPL 25  
Dec  4  Modularity  PFPL 45 
HW5 solution out.
HW6 solution out. 
6 