Applicative Programming

Description

This module provides an introduction to programming in Standard ML including the use of the facilities it offers for structuring programs into modules. The clean applicative programming paradigm represented by ML is quite different from the imperative object-oriented paradigm represented by Java, making it more suitable for many applications.

This module is suitable for students whose programming experience is relatively limited. Students who have a good background in Computer Science, particularly those having prior experience with an applicative programming language (ML, Haskell, Mirando, LISP etc.), should take the module “Functional Programming and Specification” which covers the same material much more quickly with excursions into more advanced topics, and then goes on to cover formal methods for specification and development of programs.

Syllabus

• Programming in ML: The functional paradigm. Polymorphic types, static typing and type inference. Recursion and induction. List processing. Higher-order functions. Eager and lazy evaluation. Imperative features.

• Structuring programs into modules: Signatures, structures, functors. Module hierarchy, sharing and data abstraction.

Assessed Coursework

There will be three exercises, two on programming in the ML “core” language and one covering the use of ML modules. These will count equally, and together they will account for 25% of the mark for this module.

Examination

A two-part examination is (tentatively) planned: one part will be a conventional written examination while the other part will be a programming exercise done on-line under exam conditions. These will count equally, and together they will account for 75% of the mark.

References

(***) R. Harper. Programming in Standard ML. Carnegie Mellon University. Soon to be a book. Available on-line, with printed copies to be produced by the ITO.

(**) S. Gilmore. Programming in Standard ML’97: A tutorial introduction. Edinburgh report ECS-LFCS-97-364, 1997.

(**) L. Paulson. ML for the Working Programmer, second edition. Cambridge University Press, 1996. Currently £21.95 in paperback.

(*) J. Ullman. Elements of ML Programming, second edition. Prentice-Hall, 1997.