Principles of Programming Languages 2011/2012

Facebook group for this module

Class test 2

Class test and model answer.

Marks for class test 2.

Schedule of lectures

3.2. Big-step semantics for call-by-name and call-by-value
6.2. Big-step exercise
7.2. Ocaml state intro and objects
10.2. Big-step for state
13.2. Exercise on big-step state
14.2. Closures intro
17.2. A simple interpreter; slides
20.2. CEK machine; CEK machine overview sheet and CEK machine slides
21.2. CEK machine implements static binding via closures
24.2. CEK machine exercise
27.2. CEK+go machine with control
28.2. contextual equivalence and effects
2.3. no exercise class this week: revise for test and use Peerwise
5.3. revision
6.3. Class test 2

Peerwise marks

Peerwise contributions so far and basic mark for participation (0 or 1). Note that many students did far more than the minimum. Bonus points can still be won.

The deadline for making a basic contribution to Peerwise (at least one reasonable question and three answers) is 20 February at 12:00 noon. The deadline for bonus points in Peerwise is 12 March at 12:00 noon. Both the basic and bonus marks count for 10% of the continuous assessment mark.


Please sign up for this module on Peerwise immediately; it only takes a few minutes.

10% of the continuous assessment mark will be given for participation in Peerwise. See the instructions for students on that page.

To gain points, you must write at least one multiple-choice question on a topic covered in the module, and answer at least three other questions.

Another 10% of the mark may be given as discretionary bonus points. The bonus marks may be awarded for active participation (e.g. leaderboard status), but in particular for writing insightful questions.

The more questions you create, answer, comment on, etc, the more you will learn and the more you will help other students on the module. If a fair number of students contribute good questions, there will be plenty of revision material for everyone before the exams. You may also enjoy winning badges and trying to get on the leaderboard.

You need to register on the Peerwise server.

Course overview

This module will be taught in Semester 2, half by Achim Jung and half by me. Achim Jung's teaching will probably be on lambda calculus and type systems. See the page for his part of the module for details.

My section will focus on operational semantics and abstract machines.

I have decided to use abstract machines, as that allows us to get some of the flavour of a lot of current programming language research, including my own, without getting too technical.

There are some (still evolving) notes on operational semantics and abstract machines. (These were last updated on Wednesday, 29-Feb-2012 15:02:37 GMT.)


This module provides a theoretical basis for programming in a mostly functional language like OCaml.

Books for further reading

You are not required to read any books for this module, as the notes are self-contained. Nonetheless, here are some books that I enjoyed when I was an undergraduate:

Pre- and corequisites of this course

None. Models of Computation is useful background, as is general knowledge about programming languages. There are some connections to Compilers and Languages.