Advanced Functional Languages

Latest update Sep 7, 2000

To avoid spam, all mail addresses on this page have the "@" replaced by "#".

Advanced Functional Languages

Fall 2000 (and onwards)

Introduction

Advanced Functional Languages is a 5 cu Ph.D. level course at the Dept. of Computer Engineering (IDt), Mälardalen University. The course leader is Björn Lisper, e-mail bjorn.lisper#mdh.se, phone 021-151709.

The topic of this course is, more concretely, Haskell. This is a purely functional language with such features as higher order functions, lazy evaluation, an advanced type system, and features to include state and explicit sequencing without violating the pure functional semantics.

Motivation

Why do I bother to give a course on this topic? One reason is that languages in this class are powerful programming tools for applications which include symbolic computing and require elaborate, dynamic data structures: examples are compilers and program analysis tools. Another reason is that functional programs expose all the inherent parallelism in the implemented algorithm: thus, they are good for specifying computational tasks which may be implemented with a certain degree of parallelism. A third reason is their modeling capability: due to their level of abstraction, functional programs could be seen not only as pieces of software but also as specifications of other kinds of systems, like hardware systems on different level of abstraction, or co-designed hardware/software systems. Finally, they typically have a rigorous formal semantics, which makes formal verification of properties easier: this is of particular importance for safety-critical systems.

Goals

The student should master the language Haskell and its key concepts: higher order functions, lazy evaluation, the type system with Hindley-Milner type inference and classes, and the monadic style to add features such as hidden state and explicit sequencing to a purely functional language. Although formal semantics is not the focus of this course, the student should also be aware that there are underlying semantical models such as lambda-calculus and denotational semantics, and also have some feeling for how properties of purely functional programs can be proved. The student should also have some knowledge about optimising program transformations, like symbolic evaluation and simple unfold/fold-transformations. Finally, the student should have some knowledge of the common implementation method graph reduction for lazy functional languages.

Prerequisites

Good knowledge in general of programming, computer science, and discrete mathematics. It is helpful but not strictly necessary to know some functional programming beforehand. Similarly, it is an advantage but not required to have knowledge of formal semantics for programming languages.

Schedule

This is a reading course, i.e. there are no scheduled lectures. The schedule is thus up to the individual student. The course leader can be consulted when running into problems, preferrably via e-mail.

Course Literature

Simon Thompson: Haskell: The Craft of Functional Programming, Second Edition, Addison-Wesley, 507 pages, paperback, 1999. ISBN 0-201-34275-8. This book really teaches functional programming using Haskell rather than being a book on Haskell itself, but in doing so it also does provide a good introduction to the language.

For program transformations and implementation methods, Chapter 8 and 10 in Antony J. T. Davie: An Introduction to Functional Programming Systems Using Haskell, Cambridge University Press, 1992, ISBN 0-521-25830-8 (hardback), ISBN 0-521-27724-8 (paperback).

Here are directions for reading.

There are also some Haskell links with more reading.

Examination

The examination is via: assignments, which are to be solved at home and handed in, and a small programming project which is defined jointly by the student and the course leader (and possibly the supervisor of the student).

The result will be formally reported, through the students supervisor, at the university where the student is formaly enrolled. I will supply whatever evidence necessary for this of the achieved result.

Programming Environment

Haskell is available on the Sun systems at IDt. We recommend hugs, /usr/local/bin/hugs, which is an interactive Haskell interpreter. Our version implements Haskell 98: this is a standardised Haskell version that can be expected to be stable for a couple of years. Hugs can be downloaded for free and is available for many platforms, including Windows 95/98, linux, and Macintosh.

Björn Lisper
bjorn.lisper#mdh.se