Course Syllabus

Course-PM

TDA342 / DIT260 Advanced functional programming lp3 vt19 (7.5 hp)

Course is offered by the department of Computer Science and Engineering

Contact details

List of...

    Course-PM

    TDA342/DIT260 Advanced Functional Programming HT19 (7,5hp)

    Revised Dec. 28th, 2018

    Departmen 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

    TimeEdit

    Contact details

    Teaching staff

    • Alejandro Russo (Lecturer)
    • Fabian Ruch (TA)
    • Alejandro Gómez Londoño (TA)

    Student representatives

    • Danny Lam

      ldanny@student.chalmers.se MPSOF
      Jan Liu lijan@student.chalmers.se MPCAS
      Erik Ljungdahl ljerik@student.chalmers.se TKDAT
      Adam Olsson adaols15@student.hh.se MPALG
      Eric Wennerberg ericwe@student.chalmers.se MPALG 

                                                          

    Course literature

    Real world Haskell 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 The Haskell School of Expression by Paul Hudak

    The Fun of ProgrammingThe Fun of Programming edited by Jeremy Gibbons and Oege de Moor

    Thinking Functionally with HaskellThinking Functionally with Haskell by Richard Bird

    Programming in HaskellProgramming in Haskell by Graham Hutton

    Haskell — The Craft of Functional Programming 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 in order to pass the course.
    • Each of the assignments is divided into two parts with separate deadlines.

    Deadlines

    Deadlines are hard! Please read about them early and carefully!

    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

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

Where 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

For GU students

For Chalmers students

Changes made since the last occasion

  • Content moved into Canvas

 

  • examiner
  • lecturer
  • teachers
  • supervisors
  • ...along with their contact details. If the course have external guest lecturers or such, give a brief description of their role and the company or similar they represent.

    If needed, list administrative staff, along with their contact details.

    Course purpose

    Short description of the course purpose and content: can be copied from syllabus in Studieportalen. Additional information can be added.

    Schedule

    TimeEdit

    Course literature

    List all mandatory literature, including descriptions of how to access the texts (e.g. Cremona, Chalmers Library, links).

    Also list reference literature, further reading, and other non-mandatory texts.

    Course design

    Description of the course's learning activities; how they are implemented and how they are connected. This is the student's guide to navigating the course. Do not forget to give the student advice on how to learn as much as possible based on the pedagogy you have chosen. Often, you may need to emphasize concrete things like how often they should enter the learning space on the learning platform, how different issues are shared between supervisors, etc.

    Provide a plan for

    • lectures
    • exervises
    • laboratory work
    • projects
    • supervision
    • feedback
    • seminars

    Should contain a description of how the digital tools (Canvas and others) should be used and how they are organized, as well as how communication between teachers and students takes place (Canvas, e-mail, other).

    Do not forget to describe any resources that students need to use, such as lab equipment, studios, workshops, physical or digital materials.

    You should be clear how missed deadlines and revisions are handled.

    Changes made since the last occasion

    A summary of changes made since the last occasion.

    Learning objectives and syllabus

    Learning objectives:

     

    • 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

    Link to the syllabus on Studieportalen.

    Study plan

    If the course is a joint course (Chalmers and Göteborgs Universitet) you should link to both syllabus (Chalmers and Göteborgs Universitet).

    Examination form

    Description of how the examination – written examinations and other – is executed and assessed.

    Include:

    • what components are included, the purpose of these, and how they contribute to the learning objectives
    • how compulsory and/or voluntary components contribute to the final grade
    • grading limits and any other requirements for all forms of examination in order to pass the course (compulsory components)
    • examination form, e.g. if the examination is conducted as a digital examination
    • time and place of examination, both written exams and other exams such as project presentations
    • aids permitted during examinations, as well as which markings, indexes and notes in aids are permitted

    Do not forget to be extra clear with project assignments; what is the problem, what should be done, what is the expected result, and how should this result be reported. Details such as templates for project reports, what happens at missed deadlines etc. are extra important to include.

    Course Summary:

    Date Details Due