Course syllabus

Course-PM

DAT280 / DIT261 Parallel functional programming lp4 VT25 (7.5 hp)

The course is offered by the department of Computer Science and Engineering

Contact details

Examiner

Teacher

TAs

(See info about office hours in the "Schedule" section below.)

Student Representatives

The following students have kindly agreed to be student representatives:

Chalmers:

  • Jakob Lund Persson (MPSOF) <jakoblun AT student DOT chalmers DOT se>
  • Karl Göransson Kjellmer (MPALG) <karl DOT kjellmer AT gmail DOT com>
  • Mostafa Mohamed Ibrahim Elsayed (MPICT) <mostafa90ibrahim AT gmail DOT com>
  • Qiqi Lin (MPSOF) <linqiqi1577 AT outlook DOT com>
  • Steffanie Kristiansson (MPALG) <stekris AT student DOT chalmers DOT se>

GU:

  • Davian Kho Yong Quan <guskhoyda AT student DOT gu DOT se>
  • Georgios Panagiotis Tsionos <gustsioge AT student DOT gu DOT se>

Please feel free to email Sandro, the TAs, or one of the student representatives if you have questions or concerns about the course.

The minutes of the mid-course meeting are available here.

Guest Lecturers

  • Troels Henriksen, designer and implementor of Futhark, DIKU Copenhagen
  • Gabriele Keller, Research group leader, Utrecht University
  • Peter Sestoft, Java expert, ITU Copenhagen
  • KC Sivaramakrishnan, developer of Multicore OCaml and CTO of Tarides, IIT Madras
  • Robert Krook, former PFP teacher, Chalmers
  • Thomas Arts, Erlang expert, CTO & co-founder of QuviQ, Gothenburg
  • Erik Stenman, CEO & Founder at Kindio, Stockholm
  • Karol Ostrovsky, enior Software Specialist at Jeppesen/Boeing, Gothenburg

Course purpose

The aim of the course is to introduce the principles and practice of parallel programming in a functional programming language. By parallel programming, we mean programming using multiple hardware cores or processors in order to gain speed. The course covers approaches to parallel functional programming in both Haskell and Erlang. It covers current research on these topics, and also research on other approaches. The course relies heavily on scientific papers as its source materials and is intended also to give students some insights into research in computer science by considering the development of a sub-field over time. Guest lectures from both academia and industry help to place the presented research and programming methods in context.

Schedule

The full schedule is on TimeEdit, including both lectures and office hours.

There will be no teaching or office hours on holiday or self-study days, and the schedule will be adjusted accordingly.

Lectures

Lectures are given in person at campus, and will not be streamed.

A table with an overview of the lectures and associated material can be found here.

Lab deadlines

May change, but will probably not (an announcement will me bade in that case):

Lab Initial deadline Final deadline
Lab A: Haskell Fri, 11 April Fri, 25 April
Lab B: Sudoku Fri, 2 May Fri, 16 May
Lab C: Futhark Fri, 9 May Fri, 23 May
Lab D: Map-Reduce Fri, 23 May Fri, 6 June

Each lab has two deadlines: an initial deadline, to submit a first version of your solution, and a final deadline, typically two weeks after the first deadline, where you may resubmit a revised version.

PLEASE NOTE that in order to submit for the final deadline, you need to have given the lab a serious attempt by the initial deadline.

Office hours

There are no dedicated lab sessions, but the TAs hold office hours most weeks, where you can get help with the labs. Typically, there is one 2h office hours slot per week, either on Mon, 15:15–17:00 in EL42 or on Thu, 13:15–15:00 in EL41, but there are exceptions (see the schedule in TimeEdit).

Each TA is responsible for two labs:

  • Alex: Lab A (Haskell) and C (Futhark),
  • Evan: Lab B (Sudoku) and D (Map-Reduce).

When using office hours, it is a good idea to send an email to the responsible TA, preferably the day before, explaining your problem and of what you have tried to do to solve it. It may turn out that an email discussion is sufficient to solve your problem. Please do not expect instant turnaround, however. Our TAs have a lot to do, and need to avoid fragmentation.

Course literature

This course does not have a set book. Instead, you will be expected to read a number of research papers. Links to those papers will be made available through the lectures page. However, note that Simon Marlow’s book on Parallel and Concurrent Programming in Haskell (Links to an external site.) covers a good chunk of the course (and lots of other interesting stuff). The book is currently free to read online at the O'Reilly site.

The lectures appear under Modules and we will also add them to the calendar.  Click on a lecture and you will get a description of what the lecture is about, related reading material and the slides.

Course design

The course has four compulsory lab exercises, which should be done in pairs. Only in special circumstances will we permit students to work alone, as we must conserve scarce TA resources. We suggest using the Discussions area of the course Canvas to help in the search for a lab partner.

We will use Fire for submission and grading of labs. The submission link is https://pfp-lp4-25.fire.cse.chalmers.se/.

The lab exercises are central to your learning on this course. Those who take them seriously typically also pass the written exam easily. That is our intention.

You must pass all four lab exercises (as well as the final written exam) to complete the course.

The course has two main parts, each of which in turn has two parts, and hence the four lab exercises.

  • Lab A: Parallel Programming in Haskell
  • Lab B: Parallelizing a Sudoku Solver in Erlang
  • Lab C: Data Parallel Programming in Futhark
  • Lab D: Map-reduce in Erlang

The guest lectures on the course are not just entertaining additions but contain examinable material. For example, there is a lab exercise related to the lecture on Futhark. So come to the guest lectures! They also broaden the view of parallel functional programming presented by the course.

Changes made since the last occasion

Mary Sheeran and John Hughes, who were teaching and examining the course for many years, have now retired; Koen Claessen is the new examiner. Robert Krook, who was both a teacher and the main TA for several years, is replaced by Sandro (as teacher) and Evan Cavallo (as main TA) in this course instance. Alex Ionescu is joining as a new TA.

Learning objectives and syllabus

Learning objectives

Knowledge and understanding

  1. Distinguish between concurrency and parallelism.
  2. Give an overview of approaches to parallelism in functional programming languages in the scientific literature.

Skills and abilities

  1. Write, modify and test parallel functional programs, to run on a variety of architectures such as shared memory multiprocessors, networks of commodity servers, and GPUs.
  2. Interpret parallelism profiles and address bottlenecks.

Judgement and approach

  1. Identify when using a functional language may be appropriate for solving a parallel programming problem.
  2. Select an appropriate form of parallel functional programming for a given problem, and explain the choice.

Syllabus

Examination form

You must complete all four lab exercises to complete the course. Labs are done in pairs.

You must also pass the written exam at the end of the course. Your grade on the course is determined entirely by your result on the written exam. We generally do not provide old exams, but here is one from 2023 to give you an indication of what the exam might look like.