COMP0020 Functional Programming
This database contains the 2018-19 versions of syllabuses.
Note: Whilst every effort is made to keep the syllabus and assessment records correct, the precise details must be checked with the lecturer(s).
This course explores the functional programming paradigm and the implementation technology for functional programming languages. It aims to develop a broad understanding of the functional programming style and recursive programming techniques using the language Miranda, together with an understanding of implementation issues that are relevant not only to functional languages but also to other systems that require automatic dynamic memory management. The course explores the underlying mechanics of strict and lazy functional languages; it does not use Haskell or F# or OOCAML and does not aim to provide training in such languages, though an introduction to Miranda is provided and students are expected to improve their functional programming skills through independent study. In the second half of the course students are expected to use independent study to read extensively about implementation issues which are then discussed in the lectures.
On successful completion of the module, a student will be able to do the following at a level suitable for a Year 3 undergraduate:
- understand the basics of the lambda calculus and combinators and how they are used in the implementation of functional languages;
- understand the main features of a lazy functional language;
- understand type checking, type-inference and the operation of the Hindley-Milner type system;
- write and understand non-trivial functional programs in Miranda;
- understand the computation and memory management issues affecting the sequential implementation of lazy functional languages;
- solve problems relating to all of the above, under examination conditions.
Availability and prerequisites
This module delivery is available for selection on the below-listed programmes. The relevant programme structure will specify whether the module is core, optional, or elective.
In order to be eligible to select this module as optional or elective, where available, students must meet all prerequisite conditions to the satisfaction of the module leader. Places for students taking the module as optional or elective are limited and will be allocated according to the department’s module selection policy.
Programmes on which available:
In order to be eligible to select this module, student must have:
- Classification of Programming Languages
- Distinctive Features of Functional Programming Languages
The Lambda Calculus and Combinators
- Versions of the Lambda Calculus - syntax and semantics
- Reduction orders, strong normalisation
- Combinators - computationally complete sets
Introduction to Miranda
- Programming Environment
- Higher-Order Functions
- User-Defined Types
- A brief introduction to Hindley-Milner type inference as implemented in Miranda.
Recursive Programming Techniques
Introduction to Implementation Techniques
- Strict Evaluation and Lazy Evaluation
- The Need for Automatic Memory Management
Automatic Memory Management
- Memory Allocation and Garbage Collection
- Garbage Collection Techniques
A full reading list is available on the module’s Moodle page. Further indicative reading material may be available via http://readinglists.ucl.ac.uk/departments/comps_eng.html.
The module is delivered through a combination of lectures and guided reading.
This module delivery is assessed as below:
Written examination (2hrs 30mins)
In order to pass this Module Delivery, students must:
- achieve an overall weighted Module mark of at least 40.00%;
AND, when taken as part of BSc Computer Science; MEng Computer Science, and MEng Mathematical Computation:
- achieve a mark of at least 30.00% in any Components of assessment weighed ≥ 30% of the module.
Where a Component comprises multiple Assessment Tasks, the minimum mark applies to the overall component.