Functional programming

Quick Links: Lectures Lab 1 Lab 2Lab 3Lab 4 Fire Slack


Course-PM

TDA452 / DIT143 Functional programming lp2 HT19 (7.5 hp)

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

Contact details

Teaching Assistants: 

Course Representatives

  • TKITE  Lukas Andersson
  • MPALG  Oskar Eriksson
  • TKITE    David Möller
  • TKDAT  Konrad Olsson
  • TKITE  Johanna Wiberg

Course purpose

In this course you will learn about functional programming through the Haskell programming language. Concrete topics encountered in the course include:

  • functions as first-class values
  • data structures (lists, tuples, user-defined data types)
  • recursion and recursive data types
  • polymorphism and type classes
  • pure functions vs input-output
  • modules and abstract data types
  • testing functional programs
  • lazy evaluations and infinite objects
  • introduction to monads

Schedule

TimeEdit

Additionally, there will be scheduled drop-in hours where you can get face-to-face help from the course assistants. 

Drop-in office hours

Starting in Week 3, the teaching assistants have open office hours when you can drop in and ask questions about the lab assignments.

When Where Who
Monday 15:15-16:15 EDIT 5453 Elisabet Lobo-Vesga
Tuesday 14:00-15:00 EDIT 6113A Herbert Lange
Wednesday 11:00-12:00 EDIT 5128 Arianna Masciolini
Wednesday 15:15-16:15 EDIT 5128 Simon Sundqvist

Course literature

There is no mandatory literature for this course.  The following links are a sample of potentially useful resources: 

Course design

Teaching is through lectures and self-study exercises, supported by drop-in consultation times and on-line help.   Lectures are given two times a week. 

There are four programming labs which are done in groups of two.  Some of the labs are divided into two parts, so there are hand-in deadlines most study weeks.  The final lab is a choice between an own mini project or a more conventional lab.   Conventional labs are graded electronically; if a lab is not passed then students get chances to resubmit until the given final deadline.  The project lab is graded by an oral presentation of the lab. 

The lab submission is through the Fire system (see links from the labs).

Changes made since the last occasion

There are no major changes in relation to last year's instance

Learning objectives and syllabus

Learning objectives:

- write small to medium-sized functional programs for a variety of applications;
- exploit a variety of programming techniques typical in functional programming, such as: use of recursion, modelling with recursive datatypes, abstraction and reuse with the help of higher order functions and monads;
- appreciate the strengths and possible weaknesses of the functional programming paradigm.

Link to the syllabus Chalmers.
Link to the syllabus GU.

Examination form

The examination of the course has two parts:

  • Weekly assignments ("labs"), done in groups of 2 students.
  • An individual written exam after the end of the course (in January), on Saturday 2019-01-18, 8:30-12:30 at Lindholmen Campus.  The re-exam is given in April.
    Exam dates, once decided, are given on the student portal  (search: TDA452) https://www.student.chalmers.se/sp/examdates_list
  • Remember that you have to sign up for the exam ahead of time!

To pass the course it is necessary to pass all assignments and the written exam. Your final grade is determined by your grade on the written exam only.

Written Exam

The grades awarded on the exam are 3, 4, 5 for Chalmers students, and G, VG for GU students. (G on the GU side corresponds to 3 or 4 on the Chalmers side; VG corresponds to a 5.)

A sample of old exams is available. Note that the exam includes a list of useful functions.  The only other permitted materials are a dictionary. 

Lab Assignments

In the table below you will find links to lab assignments which have to be handed in.

  • Each assignment has a submission deadline at which you must submit your solutions. Your first submission is expected to be a serious attempt to complete the lab.
  • If your submission does not pass (it's incorrect or simply badly coded) then you must resubmit. You have until the final deadline.
  • The final deadline is absolute: it is the last possible date to hand in your solutions. If your solutions are not passed you get no further chances this term.
  • Lab 4 here refers to the project option. Note that you need to be present at an oral presentation of your project (times will be posted nearer week 7).
Lab Part Submission deadline Final deadline
Lab 1 Wednesday, Week 1
(2019-11-06)
Friday, Week 2
(2019-11-15)
Lab 2 A Wednesday, Week 2
(2019-11-13)
Friday, Week 4
(2019-11-29)
B Wednesday, Week 3
(2019-11-20)
Lab 3 A Wednesday, Week 4
(2019-11-27)
Friday, Week 6
(2019-12-13)
B Wednesday, Week 5
(2019-12-04)
Lab 4 Proposal Monday, Week 6
(2019-12-09)
Thursday, Week 6
(2019-12-12)
Project Wednesday, Week 7
(2019-12-18)
Friday, TBD

Course summary:

Date Details Due