Functional Programming
(V4 + Ü2, WS 2002/2003)


Contents
The course gives an introduction to functional programming
using the language Haskell. Moreover, we will discuss
models for the semantics and the implementation of
functional languages. This also includes techniques for
type checking and type inference as well as methods for
the optimization of functional programs.
Language
The course is given in English.
References
 P. Thiemann: Grundlagen der funktionalen Programmierung, Teubner, 1994.
 A. Field, P. Harrison: Functional Programming, AddisonWesley, 1988.
 C. Reade: Elements of Functional Programming, AddisonWesley, 1989.
 R. Bird: Introduction to Functional Programming using Haskell,
Prentice Hall Press, 1998.
 P. Pepper: Funktionale Programmierung, Springer, 2002.
 S. J. Thompson: Haskell: The Craft of Functional Programming, AddisonWesley, 1999.
 S. Peyton Jones: The Implementation of Functional Programming Languages, Prentice Hall, 1987.
 J. Loeckx, K. Sieber: The Foundations of Program Verification, WileyTeubner, 1987.
 S. Peyton Jones, J. Hughes (eds.): Report on the Programming Language Haskell 98. (Available from http://haskell.org/definition)
 S. Peyton Jones: Tackling the Awkward Squad: monadic input/output,
concurrency, exceptions, and foreignlanguage calls in Haskell, Marktoberdorf
Summer School 2000. (Available from http://research.microsoft.com/users/simonpj/papers/marktoberdorf)
Here is a short overview on the correspondence of the material in the lecture
to material in the books mentioned above. However, the
material is not identical to the one in the books.
 Chapter 1.1 1.3
of the lecture corresponds to Chapters 27 of
Thiemann's book. A good source
for an introduction to Haskell is also the book by
Bird.
 Chapter 1.4 of the lecture corresponds to Chapter 10 in Bird's book
and Chapter 18 in Thompson's book.
 Chapter 2.1 of the lecture corresponds to Chapter 3.3 and 4 in the book
by Loeckx and Sieber.
 Chapter 2.2 of the lecture corresponds to Chapter 10 and 12.2 in Reade's
book.
 Chapter 3 corresponds to Chapter 12 of Reade's book. Additional material
can be found in Chapter 15 of Thiemann's book and
Chapter 6 and Appendix B and C of the book by Field
& Harrison.
 Chapter 4 corresponds to Chapter 7 of Field & Harrison's book. Additional
material can be found in Chapter 15.4 and 15.5 of
Thiemann's book and Chapter 11 of the book by
Reade.
Course Notes
The course notes for the lecture are now available. They can be obtained
from the secretary for copying.
Area
Theoretical Computer Science, Area of Specialization
Certificate
To get a certificate for this course (Übungsschein) you must reach at
least 50 % of the points on the exercise sheets and pass a test at the end
of the course. We recommend the acquisition of this certificate, since this
is a good opportunity to prepare for the diploma or master examination.
The test will be in the weeks 24.28.2.03 and 8.11.4.03. If you want
to participate and have
reached the necessary 50 %, just send an email with the week in that
you want to make the test to
René Thiemann.
Exercises
The exercise sheets will be handed out each Friday in the lecture. They can
also be downloaded on this site.
Your solutions can be handed in until the next Thursday in the exercise
course or in Room 4211 (Building E1). In the exercise course the solutions of the latest
exercise sheet will be presented and the your reviewed solutions of last week's
exercises will be handed out.
There are some reviewed exercise sheets that have not been collected in the exercise course.
So, if you are missing some of your sheets come to my office and I will hand them out to you. René
 Sheet 1 (Oct 17, 2002)
ps,
pdf,
ps.gz,
pdf.gz,
solution1.hs
 Sheet 2 (Oct 24, 2002)
ps,
pdf,
ps.gz,
pdf.gz,
Poly.hs,
solution2.hs
 Sheet 3 (Oct 28, 2002)
ps,
pdf,
ps.gz,
pdf.gz,
Poly2.hs,
solution3.hs
 Sheet 4 (Nov 7, 2002)
ps,
pdf,
ps.gz,
pdf.gz,
solution4.hs
 Sheet 5 (Nov 15, 2002)
ps,
pdf,
ps.gz,
pdf.gz,
Monad.hs,
solution5.hs
 Sheet 6 (Nov 20, 2002)
ps,
pdf,
ps.gz,
pdf.gz,
solution6.dotty,
solution6.ps,
solution6.pdf
 Sheet 7 (Nov 27, 2002)
ps,
pdf,
ps.gz,
pdf.gz
 Sheet 8 (Dec 4, 2002)
ps,
pdf,
ps.gz,
pdf.gz,
solution83.ps,
solution83.pdf,
solution84.dotty,
solution84.ps,
solution84.pdf
 Sheet 9 (Dec 12, 2002)
ps,
pdf,
ps.gz,
pdf.gz,
solution9.ps,
solution9.pdf
 Sheet 10 (Dec 20, 2002)
ps,
pdf,
ps.gz,
pdf.gz
 Sheet 11 (Jan 10, 2003)
ps,
pdf,
ps.gz,
pdf.gz,
Alpha_Beta.hs,
FunctionSet.hs,
solution11.hs,
slides11.tgz (dotty),
slides11.tgz (ps)
 Sheet 12 (Jan 17, 2003)
ps,
pdf,
ps.gz,
pdf.gz,
Delta.hs,
(DeltaRuleSet.hs,
Term.hs,
SetMap.hs,
Reduction.hs,
CompleteFramework.tgz),
solution12.hs,
new Term.hs (needed for solution12),
slides12.tgz (dotty),
slides11.tgz (ps)
 Sheet 13 (Jan 24, 2003)
ps,
pdf,
ps.gz,
pdf.gz,
PureLambda.hs,
(STerm.hs,
SetMap.hs,
Reduction.hs,
Term.hs),
solution13.hs
 Sheet 14 (Jan 31, 2003)
ps,
pdf,
ps.gz,
pdf.gz
 Sheet 15 (Feb 7, 2003)
ps,
pdf,
ps.gz,
pdf.gz,
solution.tgz,
typeChecker (linuxbinary),
typeChecker (gzippedbinary)
Haskell
In the course, we use the functional programming language Haskell. Information
on Haskell as well as (free) interpreters and
compilers can be found on the Haskell home page www.haskell.org.
To learn Haskell, we recommend the Haskell interpreter Hugs.
Transparencies
Here are the transparencies used in the lecture.
 Transparency 1 (Oct 16, 2002)
ps,
pdf,
ps.gz,
pdf.gz
 Transparency 2 (Oct 18, 2002)
ps,
pdf,
ps.gz,
pdf.gz
 Transparency 3 (Oct 23, 2002)
ps,
pdf,
ps.gz,
pdf.gz
 Transparency 4 (Oct 25, 2002)
ps,
pdf,
ps.gz,
pdf.gz
 Transparency 5 (Oct 30, 2002)
ps,
pdf,
ps.gz,
pdf.gz
 Transparency 6 (Nov 6, 2002)
ps,
pdf,
ps.gz,
pdf.gz
 Transparency 7 (Nov 8, 2002)
ps,
pdf,
ps.gz,
pdf.gz
 Transparency 8 (Nov 15, 2002)
ps,
pdf,
ps.gz,
pdf.gz
 Transparency 9 (Nov 22, 2002)
ps,
pdf,
ps.gz,
pdf.gz
 Transparency 10 (Nov 27, 2002)
ps,
pdf,
ps.gz,
pdf.gz
 Transparency 11 (Nov 29, 2002)
ps,
pdf,
ps.gz,
pdf.gz
 Transparency 12 (Dec 4, 2002)
ps,
pdf,
ps.gz,
pdf.gz
 Transparency 13 (Dec 11, 2002)
ps,
pdf,
ps.gz,
pdf.gz
 Transparency 14 (Dec 13 & 18, 2002)
ps,
pdf,
ps.gz,
pdf.gz
 Transparency 15 (Dec 18 & 20, 2002)
ps,
pdf,
ps.gz,
pdf.gz
 Transparency 16 (Jan 8, 2003)
ps,
pdf,
ps.gz,
pdf.gz
 Transparency 17 (Jan 10, 2003)
ps,
pdf,
ps.gz,
pdf.gz
 Transparency 18 (Jan 15, 2003)
ps,
pdf,
ps.gz,
pdf.gz
 Transparency 19 (Jan 17, 2003)
ps,
pdf,
ps.gz,
pdf.gz
 Transparency 20 (Feb 5, 2003)
ps,
pdf,
ps.gz,
pdf.gz
Proofs
Here are the proofs omitted in the lecture.
Functional Programming in Companies
Here are the transparencies of the talk on the use of Dylan at sd&m by Oliver
Juwig (Feb 12, 2003)
pdf,
pdf.gz