Note: The mercurial server is disabled at the moment while I investigate whether it can run with an acceptably low CPU load – Mike.
Laboratory exercises (Programming Languages)
Jump to navigation
Jump to search
There are three laboratory exercises for the course:
- An exercise asking you to write a functional program for flattening nested lists, transform it into iterative form using an explicit stack, and then rewrite it using assignable variables and a loop. All this will be done in the Fun language that we will be studying in the course.
- An exercise where you will write a monadic interpreter for a language that combines call-by-name with assignable variables. This combination leads to a language with some strange features that are interesting to exploit.
- An exercise in exploring the semantics of a loop-with-exit construct that extends one present in Oberon.
I suggest that you attempt all three exercises, omitting the first one if it does not seem helpful.
Materials
Instructions for the labs are contained in a laboratory manual.
The supporting materials are accessible in a Mercurial repository that can be cloned with the command
hg clone http://spivey.oriel.ox.ac.uk/hg/proglan
For safety's sake, I've also provided the materials here, packed into a single archive.
Hints and solutions are on a separate page.