Functional Programming
Keywords |
Classification |
Keyword |
OFICIAL |
Computer Science |
Instance: 2020/2021 - 2S

Cycles of Study/Courses
Teaching language
Portuguese
Objectives
Introduction to the functional programming paradigm using the Haskell language.
Learning outcomes and competences
After this course the student should be able to:
1. Define functions using equations and patterns
2. Implement simple recursive algorithms over lists and trees
3. Use algebraic data types for representing data for elementary programming problems;
4. Decompose programming problems as the composition of simpler functions using higher-order argument and lazy evaluation;
5. Prove elementary properties of programs using equational theory and induction.
Working method
B-learning
Program
Expressions, values and basic types. Defining simple functions; function types. Step by step evaluation using substitution. Compound types: lists and tuples. Some list functions of the standard prelude. Comprehension notation for lists. Recursive definitions. Parametric polymorphism. Basic type classes for operator overloading.
Higher-order functions. Programs that process files using the IO monad.
Examples of solving elementary programing contest using Haskell.
Defining new concrete data types. Case-study: implementing association tables using binary search trees. Representing sets, binary relations and graphs; elementary algorithms on tress and graph structures.
Proving properties about recursive programsusing equational theory and induction.
Mandatory literature
Hutton Graham 1968-;
Programming in Haskell. ISBN: 9780521692694 pbk
Complementary Bibliography
Richard Bird;
Introduction to functional programming using Haskell. ISBN: 978-0-13-484346-9 pbk
Richard Bird; Thinking functionally with Haskell, Cambridge University Press, 2015. ISBN: 978-1107452640
Teaching methods and learning activities
Lectures using video-conference with slide projection and interactive demonstrations.
Practical classes on a computer with video-conferencing support.
Evaluation Type
Distributed evaluation with final exam
Assessment Components
designation |
Weight (%) |
Exame |
80,00 |
Trabalho laboratorial |
20,00 |
Total: |
100,00 |
Amount of time allocated to each course unit
designation |
Time (hours) |
Estudo autónomo |
110,00 |
Frequência das aulas |
52,00 |
Total: |
162,00 |
Eligibility for exams
No requirements for this course.
Calculation formula of final grade
The final mark is given by a final exam together with a series of multiple choice and programming exercises presented in lectures and lab classes. Exercises should be solved individually. The automatic system MOSS will be used to detect and disqualify plagarism.
Final mark = 80% * Exam + 20% Exercises
Special assessment (TE, DA, ...)
Assement follows the same criteria described above as for ordinary students.
Classification improvement
The classification improvement is given by the mark for the final exam.