Applicative Programming

Applicative Programming

Time, place and scope

This module runs in term 2. The official syllabus is here. Lectures take place in JCMB 5325 on Mondays 9-10 and Thursdays 9-10; tutorials take place on ??? at ??-??.

Students with a first degree in Computer Science or equivalent, or prior experience with a functional programming language like SML or Haskell, should take the Functional Programming and Specification module in term 1 instead.

Lecture log and examples

The lecture log is a concise record of the lectures on the course.

These examples from the lectures are suitable for cutting and pasting into an SML or EML session.

Running Standard ML

On Linux
Type mosml to the shell to start Moscow ML version 2.00. Then type use "file.sml"; to load an SML source file called file.sml.

Documentation: try typing help "topic"; in Moscow ML for information about topic. There are various manuals at the Moscow ML website, including the Moscow ML library manual (local 2-up postscript version).

If you have a home machine

Moscow ML version 2.00 is free and can be downloaded from here. (You can borrow a CD ROM with this on it from the Support Office in JCMB 2421.)

Reading list

Essential reading
R. Harper. Programming in Standard ML. Carnegie Mellon University, 2001. This is available for reading online, with clickable links, and for printing. Printed copies are available from the ITO. This is a draft textbook so there may be some rough spots. The author would like feedback; please send it to me in the first instance so I can give a quick reaction and filter out any misunderstandings.
Supplementary reading
S. Gilmore. Programming in Standard ML'97: A tutorial introduction. Edinburgh report ECS-LFCS-97-364, 1997. This is an alternative to Harper's book for the core ML programming part of the course. The treatment of modules is insufficiently detailed for our purposes. It is available in the Computer Science reports room or in various printable formats. A slightly revised version of this is available as hypertext, or for printing.

M. Tofte. Essentials of Standard ML modules. Notes for Summer School on Advanced Functional programming, held at the Oregon Graduate Institute, August, 1996. This is an alternative to the modules part of Harper's book.

L. Paulson. ML for the Working Programmer, second edition. Cambridge University Press, 1996. Currently £21.95 in paperback. This is a possible alternative to Harper's book. The examples in the book are here; answers to selected exercises are here; errata are here.

J. Ullman. Elements of ML Programming, second edition. Prentice-Hall, 1997. Currently £34.99 in paperback. This is another alternative to Harper's book but I recommend Paulson's book instead.

D. Sannella. Formal specification of ML programs. Jornadas Rank Xerox Sobre Inteligencia Artificial Razonamiento Automatizado, 79-98, 1987. Edinburgh report ECS-LFCS-86-15. This explains how ML programs can be formally specified and proved correct in an language called Extended ML. It is available in the Computer Science reports room, or in postscript.

D. Sannella. Formal program development in Extended ML for the working programmer. Proc. 3rd BCS/FACS Workshop on Refinement, Hursley Park, 1990. Springer Workshops in Computing, 99-130, 1991. Edinburgh report ECS-LFCS-89-102. More information about specification and formal development in Extended ML. It is available in the Computer Science reports room, or in postscript.

Standard ML resources

¤ The Comp.Lang.ML newsgroup and its FAQ ¤ Moscow ML ¤ Standard ML of New Jersey ¤ HaMLet, a platform for experimentation with ML variants ¤ A Gentle Introduction to ML ¤ Mads Tofte's papers ¤ Mads' "Tips for Computer Scientists On Standard ML" ¤ Andrew Appel's papers ¤ Extended ML ¤

Some Standard ML papers for background reading

¤ How ML Evolved, Robin Milner ¤ A Standard ML Compiler, Andrew Appel and Dave MacQueen ¤ Standard ML of New Jersey, Andrew Appel and Dave MacQueen ¤ A run-time system, Andrew Appel ¤ A Critique of Standard ML, Andrew Appel ¤ A Tutorial on Co-induction and Functional Programming, Andrew Gordon ¤ Simple Imperative Polymorphism, Andrew Wright ¤ Principal type-schemes for functional programs, Luis Damas and Robin Milner ¤ Type Systems, Luca Cardelli ¤ A semantics for ML concurrency primitives, Dave Berry, Robin Milner and David Turner ¤

Related languages

¤ CAML: CAML light and Objective CAML (CAML light plus objects and classes) ¤ Haskell, a lazy functional language ¤ DML, an extension of ML with restricted dependent types ¤ Cayenne, a Haskell-like language with dependent types ¤


Don Sannella. Please mail me if you have any comments on this page.
Last modified: Tue Jun 29 18:01:47 BST 2004