Functional programming2016VT
|
|
Course plan
No of lectures
20 h + 20 h of supervised practicals
Recommended for
PhD students in computer science
The course was last given
2010 (in a different form)
Goals
Provide a solid introduction into functional programming.
Together with a companion course on logic programming, the courses present two
programming paradigms, which differ from that of mainstream programming (i.e.
procedural and object oriented). The latter can be seen as still related to the
architecture of computer hardware. Its main concept - a mutable variable - is
an abstraction of a RAM memory cell. In such languages, roughly speaking,
programs are descriptions of sequences of computational steps. The role of the
steps is to modify the state.
In contrast, programs in (pure) logic or functional programming describe the
tasks of the computations. There is no state and mutable data; this makes it
easier to reason about complex programs.
Functional programming (FP) is a programming paradigm where the central
abstraction mechanism is a function. FP has solid mathematical foundations.
Many elegant programming techniques are specific for FP. Compilers for modern
functional languages, such as Haskell, OCaml and F#, can today both generate
highly efficient code and discover many programming errors at compile time. FP
has in the last decades mostly been used in academia, but has lately gained an
increasingly interest within industry (e.g. Erlang and F#).
Prerequisites
Good programming background; in particular, fundamental concepts such as
recursion and static typing, and familiarity with standard data structures such
as (linked) lists and trees.
Some mathematical maturity, for instance given by introductory courses on
discrete mathematics, formal languages and automata theory, and logic.
Organization
Part I (intensive):
* Lectures and supervised practicals
* Exercises, assignments
Part II (optional):
* Project
Part I will be given as an intensive (full time) course over 1 week in the time
frame second half of May - June 2016, preceded by an introductory assignment.
Part II is self-directed, about 2 weeks of work, and ends with a presentation.
Contents
* Mathematical foundations: the lambda calculus.
* Central concepts, such as: referential transparency, eager vs. lazy
evaluation, higher-order functions, algebraic data types, pattern matching,
purely functional data structures, type inference, parametric polymorphism,
type classes, monads.
* Advanced concepts and practical applications, such as: type-level
programming for strong static guarantees, embedded domain-specific languages,
functional reactive programming, declarative programming of video games,
concurrency
The pure, lazy functional language Haskell is used as a medium of instruction
throughout. Each participant is assumed to bring along a laptop with an
installation of a recent version of the Haskell Platform.
Literature
Articles, handouts, book chapters.
Lecturers
Henrik Nilsson (School of Computer Science, University of Nottingham)
Examiner
Examination
Part I: Participation in lectures and practicals; assessed assignments. The
aim is to assess the latter during the practicals, the number of students
permitting. The assignments will mainly focus on the mathematical foundations
and central concepts.
Part II: Small project with a presentation. The project should relate to one or
more of the advanced concepts or practical applications.
Credit
2 hp (assignments and participation) + 3 hp for the project
Comments
Page responsible: Director of Graduate Studies