Department of Computer Science and Technology

Course pages 2017–18

Advanced Functional Programming


The course is assessed via three take-home exercises, comprising a mixture of programming and written questions. Each exercise carries approximately a third of the available marks.

The exercises are released over the course of the term, after the relevant material has been covered in lectures. Each of the first two exercises is due back approximately two weeks after it is released; the final exercise is released at the end of the course and due back at the start of Easter term.

Exercises from earlier years

Exercise dates

Exercise 1
Set: Monday 29 January 2018
Due: Monday 12 February 2018
System Fω template
(Note: There was an error in the opened_gates_builtin example, which has now been corrected.)
Exercise 2
Set: Saturday 24 February 2018
Due: Monday 12 March 2018
OCaml template
Note: For some parts of the exercise you'll need the modular implicits OCaml fork, which can be installed as follows:
  opam switch 4.02.0+modular-implicits
Note: in the last question (3(e)) your implementation should use the types to ensure that inq cannot grow longer than outq.
Exercise 3
Set: Tuesday 13 March 2018
Due: Tuesday 24 April 2018
Note (29 March 2018): a small error in an example has been corrected: (ab|ac)d previously read (ab|ac)c*d.
Note (9 April 2018): an error in the third benchmark test re_staged (a?ⁿaⁿ) has been corrected: Re_staged_tests.test_a_star_a previously read Re_staged_tests.test_ab_star_c.
Note (18 April 2018): the name of the stub function (mem_static_interval) in the code for question 1(b) has been corrected, and some missing parentheses have been added to the corresponding example.