Course Syllabus
Course-PM
TDA342/DIT260 Advanced Functional Programming HT19 (7,5hp)
Revised Dec. 28th, 2020
Department of Computer Science and Engineering
Chalmers University of Technology / Göteborg University
Course aim
The aim of the course is to explore the powerful mechanisms that functional programming languages offer to solve real problems and structure larger programs. The focus lies on library design and the concept of embedded languages.
Schedule
Contact details
Teaching staff
- Alejandro Russo (Lecturer)
- Robert Krook
Robert: "I will have office hours on Mondays (starting on the 23rd of January), between 10:00 and 11:45. This is a drop-in session in my office, 6215 (floor 6 of the EDIT-building). Please come prepared; be prepared to tell me clearly what your problem is and what you have tried yourself to solve it.
I will dedicate up to two hours more on Mondays towards office hours, but these needs to be scheduled with Robert beforehand. Priority will be given to students that have difficulty showing up during the drop-in session. Please send me an email to schedule such an appointment.
Please note that I am terrible at Windows, and if you have technical difficulties on your Windows-machine it is very unlikely that I will be able to help you. You can come and hope for the best, but prepare to be dissapointed :)!"
Student representatives
MPDSC oskar@giljegard.com Oskar Giljegård
MPALG hermansson.sebbe@gmail.com Sebastian Hermansson
TKDAT chrissetheboss@gmail.com Christoffer Ridderland
MPALG xbk_99@outlook.com Bokun Xiao
Course code
The code for the whole course is in the following repo -- and you can clone it!
Course literature
Real World Haskell by Bryan O'Sullivan, Don Stewart, and John Goerzen
There is an online version of it. Some related papers to read and other material will be provided with the lectures.
Extra reading material
These books are all good but presented in order of decreasing relevance for the AFP course.
The Haskell School of Expression by Paul Hudak
The Fun of Programming edited by Jeremy Gibbons and Oege de Moor
Thinking Functionally with Haskell by Richard Bird
Programming in Haskell by Graham Hutton
Haskell — The Craft of Functional Programming
Course design
Lectures
There are two 1.5-hour lectures every week. The students are expected to do a lot of independent programming and self-study. Lots of help is provided.
Assignments
There are three programming assignments, which you should do in pairs. If you have a good reason for doing the assignments by yourself, please contact the lecturer.
- You need to pass all three assignments and the exam in order to pass the course.
- Each of the assignments (except the last one) is divided into two parts with separate deadlines.
Deadlines
Examination form
Assignments
Laborations are graded with 3,4, and 5. Once you finish all the labs, you will get the following temporary grade:
tmp = (3*grade lab 1 + 5*grade lab 2 + 4*grade lab 3)/12
Above, the 3,5, and 4 coefficients are the weights of the labs based on their difficulty.
To fix some round errors, the final score of the lab is:
grade_labs = (tmp - 3) * 1,4999 + 2.5
Exam
The exam is graded as 3,4, and 5.
Final grade
To obtain the final grade, you need to pass all the assignments and the exam. The final grade for the course is composed of 60% for the lab's score and 40% for the exam's score.
total_grade = 0.6 * grade_labs + 0.4 * grade_exam
In the above formula, grade_labs and grade_exam are integers numbers (i.e., 3, 4, or 5).
The total_grade
then gets rounded generously, meaning, 4.5 -> 5.
If you are a Chalmers student, then you get the score total_grade
as the grade for the whole course.
GU students get G if total_grade
is 3 or 4 and VG if it is 5.
Learning objectives and syllabus
Learning outcomes
- Design embedded domain specific languages (EDSLs)
- Explain and exemplify (abstract) syntax, semantics
- Implement EDSLs in Haskell (as combinator libraries)
- Read, understand and extend Haskell programs which use advanced type system features
- Type classes
- (Generalized) algebraic datatypes
- Functors, monads and monad transformers
- Use specification based development techniques
- Formulate and test properties about the program
- Reason about correctness of functional programs
- Transform programs on the basis of such reasoning
- Explain and discuss the above topics
Detailed course syllabus
Changes made since the last occasion
- Move lecture of Functors and Applicative Functors before the ones about Monads
Course Summary:
Date | Details | Due |
---|---|---|