Enrolment options

Time and Location

  • Lecture: Wednesdays, 14:00-16:00 (from 10 April to 17 July)
    • The lecture takes place in lecture hall HGB 30 in the HGB building (between GA and GB)
    • For everyone's benefit though, we would like this to remain a mostly in-person course, so to get the best out of it, we encourage everyone to attend the lecture in person whenever possible. When you cannot attend the lecture in person here is the Zoom room you can use: <please log in to see link>.
  • Exercise sessions: Thursdays 10:00-12:00 and 14:00-16:00 and Fridays 10:00-12:00 (from 18 April to 19 July)
    • Starting on May 16 the exercise sessions will take place in person in building MB, floor 5(!!!), room SM-MO-506 (an MPI-SP seminar room). Building MB was formerly also known as Technologiezentrum Ruhr (or TZR). Please enter via the main MB entrance, which faces the MC building and the parking lots between MC and MB. Then take the glass elevator right next to the entrance or the stairs up to floor 1. On floor 1 enter the open door of the Max Planck Institute for Security and Privacy (MPI-SP) and the seminar room is only a few steps away. Should the MPI-SP door be closed, please ring the bell and someone will open for you.
Exam Dates

  • Midterm exam (optional): Friday, 7 June 2024 at 10:00
  • Final exam: 7 August 2024 at 10:30
  • Re-exam: 27 September 2024 at 13:30

Course Description

This class provides a rigorous yet hands-on introduction to the principles and practice of programming under the functional paradigm. This increasingly popular discipline is based on the definition and execution of functions to perform computations. In pure functional programming, the focus of the class, those functions represent self-contained computations that do not affect other parts of the program. As a result, functional programs are elegant, efficient, and easy to understand and to modify, ruling out many common sources of errors that plague imperative programming by construction. We study the principles that guide the design of functional languages, how they work, and why. Central to this exploration is the notion of strong typing and the design of type systems that allow us to write expressive and well-behaved programs.

Throughout the class, the theoretical foundations of the OCaml programming language are explained carefully from first principles, and immediately put into practice through interactive exercises. These cover everything students will need to develop complex functional programs, including extended case studies like a small programming language based on OCaml itself. The techniques learned throughout the class will allow students to become skillful programmers and let them make use of many advanced features also in mainstream programming languages, as those are increasingly influenced by advances in functional programming. Moreover, they will acquire the bases needed to deepen their knowledge of programming and its connection to computer science, mathematics and logic. With functional programming as the primary alternative to imperative programming and the most direct means of crafting correct programs, anyone who wishes to become a better programmer could benefit from taking this course.

Learning Outcomes

After successful completion of this course, students will:

  • develop programs in high-level, functional programming languages, in particular OCaml
  • understand and apply the use of recursion to define data structures (lists, maps, trees, etc.) and purely functional algorithms
  • understand the structure and advantages of type systems and use them to support program design and implementation
  • study advanced functional programming features, including type polymorphism and higher-order functions
  • reason informally about the correctness and efficiency of functional programs and be aware of more formal alternatives to reasoning
  • apply type abstraction and modularization to structure programs into collections of libraries and use those to build more complex programs on top of them
  • understand the fundamental principles of programming language design, especially applied to functional programming
  • design and develop simple programming languages, covering their formal definition and subsequent implementation as interpreters

Textbook

The course is based on the first half of the following freely available textbook:


Prerequisites

No specific prior knowledge is required. The course is broadly accessible to students of all levels and should be interesting both to students who already know programming and want to learn a more elegant programming paradigm, and also to students without prior programming experience.

Requirements for getting credit points

There will be a mandatory written final exam (120 minutes) that counts for 100% of the grade. In addition there will be weekly exercise sheets that have to be submitted on time and that count for bonus points, up to 20% of the final grade. We will also have an optional midterm exam that helps students practice for the final exam, but only counts for bonus points, up to 10% of the final grade.

To pass the course and receive credit points one has to attend the final exam and the weighed sum of your scores including bonus points (which can add up to a maximum of 130%) has to be at least 50%.

Which students can attend this course and get official credit?

  • Computer Science BSc and MSc students (CS MSc students can only take this as a free elective, ger. “Freier Wahlbereich”)
  • Applied Computer Science BSc and MSc students (ACS MSc students can only take this as a free elective, ger. “Freier Wahlbereich”)
  • IT Security MSc and BSc students (ITS BSc students can only take this as a free elective, ger. “Freier Wahlbereich”)
  • Mathematics MSc students ("Nebenfach Informatik")
  • CASA PhD students (attendance requirement is to reach 50% of the points in the exercise sheets)

If you are in another program and still want to attend the course for credit please get in touch with us and the examination office.

External Links

eCampus page



Semester: ST 2024
Self enrolment (Teilnehmer/in)
Self enrolment (Teilnehmer/in)