Types and Programming Languages: Lecture Log
This log summarises what was covered in lectures, highlighting
points that might not be covered in TAPL. Although I aim to make
this list definitive, it is no substitute for attending lectures; if
you miss a lecture please check with a colleague for any
additional notes.
- Lecture 1, 9th Jan.
Introduction and motivations, format of the course.
Basic notions: conservative approximation, slack,
language "safety".
Reading: chapters 1-2 of TAPL.
- Lecture 2, 12th Jan.
Notions of term, reduction and values.
Operational semantics of boolean expressions.
Typing rules for boolean expressions.
Reading: chapters 2,3 of TAPL.
- Lecture 3, 16th Jan.
Evaluation and typing rules for numbers.
Explanation of: normal form, stuck term,
informal idea of typing algorithm.
Introduction to Type Safety captured by
Preservation and Progress properties.
Reading: chapters 3,8 of TAPL.
- Lecture 4, 19th Jan.
Proof of Type Safety for the language of
boolean expressions and natural numbers.
Canonical Forms lemma for helping to prove
Progress.
Reading: chapter 8 of TAPL.
- Lecture 5, 23rd Jan.
Introducing FOFL, a first-order functional
programming language. Variables and
simultaneous substitution.
Adding evaluation and typing rules for variables.
- Lecture 6, 26th Jan.
Typing rules for FOFL, continued.
Example FOFL program. Outline of how type checking works
in FOFL. Type soundness of FOFL: progress theorem.
- Lecture 7, 30th Jan.
Type soundness of FOFL: preservation theorem.
Needs standard lemmas about contexts:
Permutation and Weakening (or Thinning),
and Substitution for typing.
- Lecture 8, 2nd Feb.
Elaborated use of Renaming in proving
Preservation for FOFL.
Some further remarks concerning typing.
FOFL program bodies do not determine their
types, although Uniqueness of Types holds
for terms in a given context.
Idea of syntax directed typing
rules.
- Lecture 9, 6th Feb.
Adding structured types.
Remarks on nominal versus structural
types. Ascription.
Atomic types. Empty function bodies
for FOFL programs and patching Progress.
Products and the unit type (used
as an empty or ``void'' result).
Reading: chapter 11 of TAPL.
- Lecture 10, 9th Feb.
Adding structured types.
Product types continued: hints for
proving safety; n-ary products
(tuples) and records.
Sum types: typing rules for binary sums,
need for labels to preserve Uniqueness
of Types. Variant types.
Reading: chapter 11 of TAPL.
- Lecture 11, 13th Feb.
References. Typing and evaluation
rules.
Reading: chapter 13 of TAPL.
- Lecture 12, 16th Feb.
References, continued.
Safety proofs and the need to add
store typings.
Reading: chapter 13 of TAPL.
- Lecture 13, 20th Feb.
Exceptions. The simple error term,
try expressions, and value-carrying
exceptions. Type safety with exceptions:
an extra case in the Progress theorem.
Reading: chapter 14 of TAPL.
- Lecture 14, 23rd Feb.
Subtyping. The subtyping relation
and the subsumption rule. Subtyping
for records, products and sums.
The top and bottom types.
Ideas about eliminating reflexivity
and transitivity from derivations.
Reading: chapter 15 of TAPL.
- Lecture 15, 2nd Mar.
Subtyping, continued. The subtyping relation
and the subsumption rule. Subtyping
for records, products and sums.
The top and bottom types.
Ideas about eliminating reflexivity
and transitivity from derivations.
Reading: chapters 15, 16 of TAPL.
- Lecture 16, 6th Mar.
On to arrows. Untyped lambda-calculus,
simply-typed lambda calculus and
brief introduction to universal types.
Reading: chapters 5, 9 and 23 of TAPL.
- Lecture 17, 9th Mar.
Recursion: terms and types. Lists
as primitive and recursive functions over
them in FOFL. Adding the fixpoint operator
to simply-typed lambda calculus to define
recursive functions there. Recursive types:
iso- and equi- interpretations. Terms and
typing for iso-recursive types.
Reading: chapter 11 (11.11, 11.12), chapter 20.
- Lecture 18, 13th Mar.
Subtyping and the algorithmic typing relation:
removing subsumption by postponing it until
the last step of typing. Use of joins and
meets in algorithmic typing and subtyping.
A sketch of encoding object oriented programming
using typing features studied: record types,
subtyping, recursion.
Reading: chapter 16, chapter 18.
David Aspinall
Last modified: Mon Mar 13 11:24:45 GMT 2006