CMSC 336: Type Systems for Programming Languages


  • [3/8/08] Homework 5 is due Thursday, March 13th.
  • [2/26/08] Homework 4 is available. It is due on Tuesday, March 4th.
  • [1/31/08] Both instructors will be away next week because of an area conference. Matthias Blume will lecture on Tuesday and Matthew Hammer will give the midterm on Thursday.
  • [1/31/08] There is a inclass midterm next Thursday.
  • [1/22/08] Homeworks 1, 2, 3, are available. They are due one week after the date on which they are posted in the schedule below. They are posted early in case you want to start them early.


    Umut Acar and Amal Ahmed

    Teaching Assistant

    Matthew Hammer (hammer [at] tti-c [dot] org)


    Place: Ryerson 277
    Time: Tue and Thu: 1:30-2:50pm

    Office Hours

    Place: TTI-C, room 253
    Time: 3:30-4:00pm

    Course Schedule

    Date Topic Chapters Lecture Notes Homework
    Jan 8 Introduction, Inductive Definitions TAPL 1-3; PFPL 1 course info, lecture 1
    Jan 10 Programming in Standard ML SML overview
    Jan 15 Operational Semantics TAPL 3 lecture 2 Homework 0
    Jan 17 Untyped Lambda Calculus TAPL 5 lecture 3
    Jan 22 Programming in the Lambda Calculus and de Bruijn Indices TAPL 5-6 lecture 4 Homework 1
    Jan 24 Simply Typed Lambda Calculus TAPL 8-9 lecture 5
    Jan 29 Type Safety TAPL 9 lecture 6 Homework 2
    Jan 31 PCF, Sums, Products, Records TAPL 11 lecture 7
    Feb 5 Goedel's T and Termination PFPL 15
    Feb 7 Midterm
    Feb 12 References TAPL 13 lecture 8 Homework 3
    Feb 14 Type Safety of References
    Feb 19 Polymorphism, Church Encodings TAPL 23; PFPL 24 lecture 10
    Feb 21 Data Abstraction, Existential Types TAPL 24; PFPL 25 lecture 11
    Feb 26 Equational Reasoning, Parametricity PFPL 48 lecture 12 Homework 4, source, mathpartir.sty
    Feb 28 Parametricity PFPL 50 lectures 13-14
    Mar 4 Representation Independence PFPL 51 lectures 13-14
    Mar 6 Recursive Types, Subtyping TAPL 20,15; PFPL 20,33 Homework 5, source
    Mar 11 Exceptions (last class) TAPL 14
    Mar 13 Reading Period (no class)

    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.


    We will assume knowledge of basic mathematical concepts such as sets, and inductive proofs. If you are not readily familiar with these, then we recommend studying the first few chapters of Pierce's book. We 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 Books and Course Software

    The text books for the course are:

    1. Benjamin Pierce, Types and Programming Languages (errata.)
    2. Robert Harper, Practical Foundations for Programming Languages

    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.

    Homeworks, Exams, Grading

    There will be a number of homework assignments (about one a week) and a number of exercises. Homework assignments will be due at the specified day at 10pm. All written homework assignments need to typeset (using LaTeX) and submitted via blackboard. For programming portions, you should submit your tar ball via blackboard.

    At the end of some classes, we will assign an exercise. These need to be solved and handed in at the beginning of the next class.

    You are required to achieve a minimum grade of B on each homework assignment. If your assignment does not meet this standard, then you have to re-submit within one week a revised solution that corrects any errors or omissions to achieve a grade of B.

    Homework and exercises will make up 60% of your final grade. The midterm and the final will each make up 20% of your final grade. The final will be a 24-hour take home.

    Last modified: Fri Jan 18 22:57:28 PST 2008