Course pages 2014–15
Advanced Functional Programming
There is a mailing list for the course: firstname.lastname@example.org.
Announcements, questions and discussion. Feel free to post!
Have a question but feeling shy? Mail a lecturer instead and we'll anonymise and post your question: email@example.com or firstname.lastname@example.org.
If you haven't used a typed functional language before then it would be wise to familiarize yourself with the basics before the course starts. We'll be using OCaml in the course, and recommend starting with either of the following books:
- Real World OCaml
Yaron Minsky, Anil Madhavapeddy, Jason Hickey
Available in print, or online. Chapters 1 to 6 give enough background for this course.
- OCaml from the Very Beginning
Available in print, or as a PDF ($14.99)
The OCaml Beginners mailing list is also a useful resource.
The first few lectures are quite theory oriented: we'll be looking at various typed lambda calculi, along with type inference in ML-family languages. If you haven't studied the lambda calculus before then some background reading is likely to make these lectures much easier to follow. There are many introductions available; one which fits well with our approach is
- Types and Programming Languages
Benjamin C. Pierce
There are copies in the Computer Laboratory library and many of the college libraries.
The material in chapters 5 (The Untyped Lambda-Calculus) and 9 (Simply Typed Lambda-Calculus) is essential. We'll also be covering material from later chapters (11, 23, 24, 29, 30), although in much less detail than Pierce.
Additionally, the Part II (third year undergraduate) Types course is a less-advanced course covering ML, System F and the Curry-Howard correspondence.
Installing the tools beforehand will also make things easier when the course starts.
We will be using System Fω in the course to illustrate theoretical aspects of functional programming. We have provided an Fω interpreter (based on the interpreters by Pierce for the "Types and Programming Languages" book) so you can try out the examples.
The interpreter can be installed using opam with the following instructions:
$ opam remote add advanced-fp git://github.com/ocamllabs/advanced-fp-repo $ opam install fomega
The interpreter can also be used directly in the browser.
Tentative lecture schedule
- Thursday 15 January 2015
- Introduction. The lambda calculus
- Monday 19 January 2015
- The lambda calculus (continued)
Online Fω interpreter (example files: nats.f perfect.f equality.f)
(Lecture notes: see notes for Thursday 15 January.)
- Thursday 22 January 2015
- Type inference
- Monday 26 January 2015
- The Curry-Howard correspondence
The Part II Types course is a less-advanced course covering ML, System F and the Curry-Howard correspondence.
- Thursday 29 January 2015
- Abstraction and parametricity part 1
- Monday 2 February 2015
- Abstraction and parametricity part 2
- Thursday 5 February 2015
- Abstraction and parametricity part 3
- Monday 9 February 2015
- Generalized algebraic data types (GADTs)
- Thursday 12 February 2015
- Monday 16 February 2015
- Monads etc.
- Thursday 19 February 2015
- Monads etc. (continued)
- Monday 23 February 2015
- Domain-specific languages
- Thursday 26 February 2015
- Domain-specific languages (continued)
- Monday 2 March 2015
- Generic programming
- Thursday 5 March 2015
- Monday 9 March 2015
- Staging (continued)