[2023] FP
Quick Links:
Lectures • Exercises
• Lab 1 • Lab 2• Lab 3• Lab 4 • Fire Links to an external site. • Slack Links to an external site.• Schedule Links to an external site.
Please note that the exam (2024-01-09) will use the inspera electronic exam system. https://chalmers.inspera.com/
Links to an external site.
Please join this year's slack if you are a returning student.
- All the Kahoots available now
- Slides from Intro lecture 2023-10-20 Download Slides from Intro lecture 2023-10-20
- Slides from Final Lecture 2023
Download Slides from Final Lecture 2023
Course-PM
TDA452 / DIT143 Functional programming lp2 HT23 (7.5 hp)
The course is offered by the Department of Computer Science and Engineering
Contact details
- Examiner/lecturer: David Sands Links to an external site.
Teaching Assistants: |
Course Representatives
|
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 Links to an external site.
Lectures are pre-recorded. The scheduled meeting
Links to an external site. times are referred to as Class meetings.
Week 1: Intro meeting on Monday 15:15, regular class meeting on Tuesday 15:15 and Thursday at 10:00.
Week 2 & on, class meetings are on Mondays (13.15) and Thursdays (10.00).
In addition, we will schedule lab supervision hours where you can chat over Slack, and invite course assistants to your zoom rooms for more specific discussions of your lab solution. Head over to #lab-supervision Links to an external site. on Slack:
- In week 1 Matti will be available on Wednesday from 16-18 to help (mainly) with technical support.
- From week 2 onward: 15:15-17 on Mondays and Wednesdays
Course literature
There is no mandatory literature for this course. The following links are a sample of potentially useful resources:
- Slides and other material from the pre-recorded lectures
- Video lectures Links to an external site.
- Book: Programming in Haskell
Links to an external site. by Graham Hutton
- 2nd edition of a compact and well-written Haskell book that is a good fit for this course.
- Book: Learn You a Haskell for Great Good! (Links to an external site.) (freely available online).
- Real World Haskell
Links to an external site. by Bryan O'Sullivan, Don Stewart, and John Goerzen (freely available online).
- This is more advanced and more oriented toward practical Haskell programming. A good book to have on the shelf if you continue with Haskell. This is the course book for the Advanced Functional Programming course.
Course design
Teaching is through pre-recorded lectures and self-study exercises, supported by online meetings related to the most recent lecture. Class meetings 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 multiple chances to resubmit until the given final deadline. Those who choose to do a project for the final lab will give an oral presentation of the lab (usually over zoom).
The lab submission is through the Fire system (see links from the labs).
Changes made since the last occasion
No major changes. The content and labs will be very similar to 2021/22; we will have physical meetings for quizzes, questions and small exercises.
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.
Links to an external site.
Link to the syllabus GU.
Links to an external site.
Link to the study plan Links to an external site.
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). The re-exam is given in April.
Exam dates, once decided, are given on the student portal (search: TDA452 - the exam time is the same for GU students) https://www.student.chalmers.se/sp/examdates_list Links to an external site. - Exam times below give an indication only. For the definitive list please see the link above.
Note that exam time for 2024-01-09 has changed to the afternoon | ||||||
Course code Links to an external site. | Examination date Links to an external site. | Begins | Location | Length | First day for sign-up |
Last day for sign-up |
TDA452 Links to an external site. | 09 Jan 2024 | 14:00 | Johanneberg | 4 hours | 09 Oct 2023 | 19 Dec 2023 |
TDA452 Links to an external site. | 04 Apr 2024 | 14:00 | Johanneberg | 4 hours | 19 Feb 2024 | 17 Mar 2024 |
- 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 that 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 can resubmit several times if need be, until the cutoff deadline.
- The cutoff 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. This is graded orally (over zoom). For 2023 the grading will be on Friday 15 December.
Lab | Part | Submission deadline | Cutoff deadline |
---|---|---|---|
Lab 1 | Wednesday, Week 1 (2023-11-01) |
Friday, Week 2 (2023-11-10) |
|
Lab 2 | A | Wednesday, Week 2 (2023-11-08) |
Friday, Week 4 (2023-11-24) |
B | Wednesday, Week 3 (2023-11-15) |
||
Lab 3 | A | Wednesday, Week 4 (2023-11-22) |
Friday, Week 6 (2023-12-08) |
B | Wednesday, Week 5 (2023-11-29) |
||
Lab 4 | Proposal (projects only) | Monday, Week 6 (2023-12-04) |
Thursday, Week 6 (2023-12-07) |
Project/Standard Lab | Wednesday, Week 7 (2023-12-13) |
Wednesday 2024-01-10 |
Course summary:
Date | Details | Due |
---|---|---|
Tue, 31 Oct 2023 | Assignment Lecture 1A bonus-point quiz | due by 15:30 |
Wed, 1 Nov 2023 | Assignment Lab 1 | due by 23:59 |
Thu, 2 Nov 2023 | Assignment Lecture 1B bonus-point quiz | due by 10:15 |
Mon, 6 Nov 2023 | Assignment Lecture 2A bonus point quiz | due by 13:30 |
Wed, 8 Nov 2023 | Assignment Lab 2A | due by 23:59 |
Thu, 9 Nov 2023 | Assignment Lecture 2B bonus point quiz | due by 10:15 |
Mon, 13 Nov 2023 | Assignment Lecture 3A bonus point quiz | due by 13:30 |
Wed, 15 Nov 2023 | Assignment Lab 2B | due by 23:59 |
Thu, 16 Nov 2023 | Assignment Lecture 3B Bonus point quiz | due by 10:15 |
Mon, 20 Nov 2023 | Assignment Lecture 4A bonus point quiz | due by 13:28 |
Wed, 22 Nov 2023 | Assignment Lab 3A | due by 23:59 |
Thu, 23 Nov 2023 | Assignment Lecture 4B bonus point quiz | due by 10:15 |
Wed, 29 Nov 2023 | Assignment Lab 3B | due by 23:59 |
Thu, 30 Nov 2023 | Assignment Week 5 bonus point quiz | due by 10:15 |
Mon, 4 Dec 2023 | Assignment Guest Lecture Attendance 6A | due by 13:25 |
Assignment Lab 4A [Project proposals only - if you do the standard lab you should not submit 4A] | due by 23:59 | |
Thu, 7 Dec 2023 | Assignment Lecture 6B bonus point quiz | due by 10:15 |
Wed, 13 Dec 2023 | Assignment Lab 4B | due by 23:59 |