Functional Programming
(V3 + Ü2, SS 2012)


The lecture has 3 hours per week for Bachelor and Master students.
News
 Accidentally, the page numbers had been omitted in the course notes. We replaced the course notes by a version with page numbers now.
 The results of the exam of Monday, September 10th are now available. For students participating in the V3B exam, the results are here, and students participating in the V3M version can find their results here (the lists are in the format "public id, grade, total achieved points, points in exercise 1, ..., points in exercise 5", where your public id is shown in our exercise management system after you log in). Due to a small arithmetic error, 119 points could be achieved in the V3B version of the exam and 121 points in the V3M version.
Statistics for the V3B version:
Point range 
Grade 
Number of occurrences 
059 
5.0 
9 
59.563 
4.0 
2 
63.567 
3.7 
3 
67.571 
3.3 
2 
71.575 
3.0 
3 
75.579 
2.7 
4 
79.583 
2.3 
0 
83.587 
2.0 
2 
87.591 
1.7 
1 
91.595 
1.3 
1 
95.5119 
1.0 
5 
Statistics for the V3M version:
Point range 
Grade 
Number of occurrences 
060 
5.0 
11 
60.564 
4.0 
2 
64.568 
3.7 
3 
68.572 
3.3 
2 
72.576 
3.0 
1 
76.580 
2.7 
0 
80.584 
2.3 
2 
84.588 
2.0 
1 
88.592 
1.7 
3 
92.596 
1.3 
0 
96.5121 
1.0 
6 

The exam inspection is scheduled for Wednesday, September 19th, 2012 from 10:00am to 11:30pm. It will take place in the chair's seminar room (room 4201b) in the computer science building at Ahornstraße 55. Please bring your student ID to the inspection!

The second exam will start at 14:30 on Monday, September 10th. The room where you write the exam depends on the version of the lecture that you have attended. The distribution of students to rooms is as follows:
 V3B (Informatik Bachelor, Mathematik Master): AH IV
 V3M (Informatik Master, Software Systems Engineering Master): Aula 2
Please note that the first exam is available to help you prepare.

The revised results of the exam of Wednesday, August 15th are now available (the list is in the format "public id, grade, total achieved points, points in exercise 1, ..., points in exercise 5", where your public id is shown in our exercise management system after you log in). The grades have also been entered into the Campus system.
Certificates for students in nonCampus managed situations (i.e., Erasmus students, Bachelor students who did the V3M version and were not registered via Campus, ...) have been prepared and can be picked up at our secretary's office.

The exam inspection is scheduled for Wednesday, August 22, 2012 from 2:00pm to 3:30pm. It will take place in room 5052 in the computer science building at Ahornstraße 55. Please bring your student ID to the inspection!
 The results of the exam of Wednesday, August 15th are now available (the list is in the format "public id, grade, total achieved points, points in exercise 1, ..., points in exercise 5", where your public id is shown in our exercise management system after you log in). Some statistics are available:
Point range 
Grade 
Number of occurrences 
059.5 
5.0 
38 
6063.5 
4.0 
13 
6467.5 
3.7 
19 
6871.5 
3.3 
9 
7275.5 
3.0 
8 
7679.5 
2.7 
10 
8083.5 
2.3 
11 
8487.5 
2.0 
10 
8891.5 
1.7 
6 
9295.5 
1.3 
9 
96120 
1.0 
26 
There is also a graph of the point distribution and of the grade distribution.
Grouped by course of study, we have the following results:
Course of studies 
Average number of points 
Pass rate 
Master SSE 
56.6 
50% 
Bachelor Informatik 
66.4 
67.4% 
Master Informatik 
73.9 
80.8% 
Bachelor Informatik (for Master Informatik) 
76.8 
90.5% 
Master Mathematik 
95.5 
100% 
 The written exam on Wednesday, August 15th will start at 14:00 and take 120 minutes. The room where you write the exam depends on the version of the lecture that you have attended and your matriculation number. The distribution of students to rooms is as follows:
 V3B (Informatik Bachelor, Mathematik Master): Aula 2
 V3M (Informatik Master, Software Systems Engineering Master), matriculation number < 291000: AH IV
 V3M (Informatik Master, Software Systems Engineering Master), matriculation number ≥ 291000: AH V
 We have updated the CAMPUS data to reflect exam admissions. If you registered via CAMPUS, you can now check if you were admitted to the exam there. If you notice any problems, send us a mail.
All students who registered via email to us had enough exercise points to be admitted to exam.
 To help you prepare for the exam, we have provided links to old functional programming exams.
 Corrected exercise submissions may be collected next Tuesday (July 31) between 10:00 and 12:00.
 In total, Bachelor students could achieve 174 points in the exercises (without the bonus tasks) and Master students could achieve 170 points. Hence, to be admitted to the exam, you need 87 points (for Bachelor students) resp. 85 (for Master students).
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.
Course Notes
The course notes are available here (in German): Course Notes (version of April 11, 2012)
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.
 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, 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 (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 foreignlanguage calls in Haskell, Marktoberdorf
Summer School 2000. (Available from http://research.microsoft.com/users/simonpj/papers/marktoberdorf)
Versions of the Lecture
Not all material of the lecture is needed for all students. More precisely, there are two versions of the lecture:
 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. The
following material from the course notes is missing in V3B:
 Section 1.4 (Monads)
 "Transformation rules (10)(12)" (in Section 2.2.3)
 Section 3.4 (Pure lambda calculus)
 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 and Master SSE. This is also the version that is relevant for those students in Bachelor Informatik who already want to attend the masterversion of this course (they can transfer the credits obtained here as soon as they enter the master program). The
following material from the course notes is missing in V3M:
 "List comprehensions" (in Section 1.2)
 "Cyclic data objects" (in Section 1.3)
 Section 1.4.2 (Programming with monads)
 Section 2.2.3 (Semantics of complex Haskell programs)
 Section 4.3 (Type inference for Haskell programs)
Area
Theoretical Computer Science, Area of Specialization
Haskell
In the course, we use the functional programming language Haskell. Information
on Haskell can be found on the Haskell home page www.haskell.org.
To interpret or compile Haskell programs, one can use the Glasgow Haskell Compiler (GHC). For the lecture, we recommend the interactive mode of the GHC (called GHCi). To this end, we recommend to download the Haskell Platform.
Transparencies
Here are the transparencies used in the lecture.
 Transparency 1 (April 12, 2012)
 Transparency 2 (April 12, 2012)
 Transparency 3 (April 16, 2012)
 Transparency 4 (April 20, 2012)
 Transparency 5 (April 20, 2012)
 Transparency 6 (April 30, 2012)
 Transparency 7 (May 2, 2012)
 Transparency 8 (May 7, 2012)
 Transparency 9 (May 11, 2012)
 Transparency 10 (May 11, 2012)
 Transparency 11 (May 18, 2012)
 Transparency 12 (May 21, 2012)
 Transparency 13 (May 25, 2012)
 Transparency 14 (June 4, 2012)
 Transparency 15 (June 6, 2012)
 Transparency 16 (June 11, 2012)
 Transparency 17 (June 15, 2012)
 Transparency 18 (June 15, 2012)
 Transparency 19 (July 2, 2012)
There will be a written exam on
the lecture. It takes place on
August 15, 2012. The second written exam will take place on September 10, 2012.
Registering for the exam in August should be done via Campus for Bachelor students taking the Bachelor exam and for Master students taking the Master exam. All other students should register by email (including name and matriculation id) to us until July 13, 2012.
To help you prepare, here are the exams used in the winter semester 2009/2010. Please note that the differences between the V3B and V3M versions of the lecture have changed since then. Each of these exams took 120 minutes. We put them online so that they can help you when you are preparing for the final exam. We strongly recommend you to solve these exams without looking at the solutions first! It is a good idea to solve these exams also under the conditions of the original exam (i.e., closed book and with a time limit of 120 minutes):
 Exam February 24, 2010 (V3B) / Solutions (V3B)
 Exam February 24, 2010 (V3M) / Solutions (V3M)
 Exam February 24, 2010 (V4) / Solutions (V4)
 Exam March 19, 2010 (V3B) / Solutions (V3B)
 Exam March 19, 2010 (V3M) / Solutions (V3M)
 Exam March 19, 2010 (V4) / Solutions (V4)
 Exam August 15, 2012 (V3B) / Solutions (V3B)
 Exam August 15, 2012 (V3M) / Solutions (V3M)
 Exam September 10, 2012 (V3B) / Solutions (V3B)
 Exam September 10, 2012 (V3M) / Solutions (V3M)
Due to changes in the computer science curriculum, before 2009 there have not been any written exams to determine the final grade for the course "Functional Programming". However, the following old exams were used in earlier semesters for the acquisition of the exercise certificate for students of "Diplom" curricula. Each of these exams took 90 minutes: