|
Functional Programming
(V3 resp. 4 + Ü2, WS 2009/10)
|
|
The lecture has 3 hours per week for students in Bachelor Informatik and Master Informatik.
It has 4 hours per week for students in Diplom Informatik, Diplom Mathematik, and Master of Software Systems Engineering (see below for details).
News
- All students except "Diplom" students should register for the written exam on February 24, 2010. To do this, please proceed as follows:
- Master Informatik, Master Mathematik: Please register via Campus and use the "modulares Anmeldeverfahren". Registration is possible from November 1 - November 27, 2009.
- Bachelor Informatik, Master SSE: Please register via the ZPA or the VZPA. If you do it via VZPA, it is possible from December 1 - December 18, 2009.
- Bachelor Informatik attending the "Master Course": Please register by sending an e-mail to Carsten Fuhs until December 18, 2009.
- The final exam for the lecture will be a written exam for all students except those studying in a "Diplom" program. For "Diplom" students, the exam is oral.
-
The date for the written exam will be February 24, 2010. If you fail this exam, there is a second written exam to repeat it on March 19, 2010.
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.
Language
The course is given in English.
References
- P. Thiemann: Grundlagen der funktionalen Programmierung, Teubner, 1994.
- A. Field, P. Harrison: Functional Programming, Addison-Wesley, 1988.
- C. Reade: Elements of Functional Programming, Addison-Wesley, 1989.
- R. Bird: Introduction to Functional Programming using Haskell,
Prentice Hall Press, 1998.
- P. Pepper: Funktionale Programmierung, Springer, 2002.
- M. M. T. Chakravarty, G. C. Keller: An Introduction to Computing With
Haskell, Pearson, 2002.
Also appeared as "Einführung
in die Programmierung mit Haskell", Pearson, 2004.
- S. J. Thompson: Haskell: The Craft of Functional Programming, Addison-Wesley, 1999.
- S. Peyton Jones: The Implementation of Functional Programming Languages, Prentice Hall, 1987.
- J. Loeckx, K. Sieber: The Foundations of Program Verification, Wiley-Teubner, 1987.
- S. Peyton Jones (ed.): Haskell 98 Languages and Libraries: The Revised Report.
Cambridge University Press, 2003. (Available from http://haskell.org/onlinereport/)
- S. Peyton Jones: Tackling the Awkward Squad: monadic input/output,
concurrency, exceptions, and foreign-language 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 2-7 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.
Versions of the Lecture
Not all material of the lecture is needed for all students. More precisely, there are three versions of the lecture:
- V4 This version contains the full lecture (with 4 hours per week). It
is relevant for students in Diplom Informatik, Diplom Mathematik, and Master of Software Systems Engineering.
- V3B This version only contains a subset of the full lecture (with 3 hours per week). It
is relevant for students in Bachelor Informatik and Master Mathematik. Compared to V4, the following material is missing in V3B:
- Section 1.4 (Monads)
- Section 2.2.3 (Semantics of complex Haskell programs)
- Section 4.3 (Type inference for Haskell programs)
- V3M This version only contains a subset of the full lecture (with 3 hours per week). It
is relevant for students in Master Informatik. This is also the version that is relevant for those students in Bachelor Informatik which already want to attend the master-version of this course (they can transfer the credits obtained here as soon as they enter the master program). Compared to V4, the following material is missing in V3M:
- "Operators and infix declarations" (in Section 1.1)
- "List comprehensions" (in Section 1.2)
- "Cyclic data objects" (in Section 1.3)
- Section 1.4.2 (Programming with monads)
- "Transformation rules (10)-(12)" (in Section 2.2.3)
- Section 3.4 (Pure lambda calculus)
- "Compilation of Haskell" (in Section 4.3)
Area
Theoretical Computer Science, Area of Specialization
Exercises
The exercise sheets will be handed out during the lectures. They can
also be downloaded on this site.
You should hand in your solutions in groups of 2 or 3 students.
In the exercise course the solutions of the latest
exercise sheet will be presented and your reviewed solutions of last week's
exercises will be handed out.
If you want to hand in your solutions earlier than the deadline requires,
please go to Carsten Fuhs's office (room 4209, building E1).
In order to take part in the exercises, please sign
up here.
If you have questions regarding the review of your solution, please contact
one of the student teaching assistants.
- Sheet 1 (handed out on Oct 21, 2009, due on Oct 27, 2009)
ps,
pdf,
solution1.hs
- Sheet 2 (handed out on Oct 23, 2009, due on Oct 28, 2009)
ps,
pdf
solution2.hs
- Sheet 3 (handed out on Nov 4, 2009, due on Nov 11, 2009)
ps,
pdf
solution3.hs
- Sheet 4 (handed out on Nov 10, 2009, due on Nov 18, 2009)
ps,
pdf
solution4.hs
- Sheet 5 (handed out on Nov 17, 2009, due on Nov 25, 2009)
ps,
pdf
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 haskell.org.
To learn Haskell, we recommend the Haskell interpreter Hugs.
Transparencies
Here are the transparencies used in the lecture.
- Transparency 1 (October 16, 2009)
ps,
pdf
- Transparency 2 (October 16, 2009)
ps,
pdf
- Transparency 3 (October 20, 2009)
ps,
pdf
- Transparency 4 (October 23, 2009)
ps,
pdf
- Transparency 5 (October 30, 2009)
ps,
pdf
- Transparency 6 (November 4, 2009)
ps,
pdf
- Transparency 7 (November 6, 2009)
ps,
pdf
- Transparency 8 (November 10, 2009)
ps,
pdf
- Transparency 9 (November 17, 2009)
ps,
pdf