Advanced Topics in Functional Programming
Keywords |
Classification |
Keyword |
OFICIAL |
Computer Science |
Instance: 2014/2015 - 2S
Cycles of Study/Courses
Teaching language
English
Objectives
Stengthen functional programming slills with emphasis em advanced techniques for improving modularity e correctness in software construction.
Learning outcomes and competences
At the end of this unit students should be able to:
* understand and modify programs structured using type classes, monads, functors and aplicative functors;
* write properties and generators using QuickCheck for testing correctness of functional code;
* understand and implement embedded domain specific languages as Haskell libraries of combinators
Working method
Presencial
Pre-requirements (prior knowledge) and co-requirements (common knowledge)
Functional programming
Program
Parametric polymorphism and "ad-hoc" polymorphism. Type classes. Type checking and type inference.
Specific type classes for structuring functional programs: monads, functors and applicative functors.
Monadic programming: partiality, state, non-determinsm, readers and writers. Monadc parsing. Monad transformers. Functors and applicatives.
Property-bases testing. Specifying properties and generators using the QuickCheck library. Automatic simplification of counter-examples ("shrinking").
Design and implementation of domain-specific languages (DSELs). Shallow and deep embeddings.
Mandatory literature
Bryan O'Sullivan, John Goerzen, Don Stewart; Real World Haskell, O'Reilley, 2008 (http://book.realworldhaskell.org/read/)
Miran Lipovaca; Learn you a Haskell for Great Good!, 2011 (http://learnyouahaskell.com/)
Teaching methods and learning activities
Lectures and demonstration classes combining concept exposure and interactive examples.
Evaluation Type
Distributed evaluation with final exam
Assessment Components
designation |
Weight (%) |
Exame |
60,00 |
Trabalho laboratorial |
40,00 |
Total: |
100,00 |
Calculation formula of final grade
40% * assignment grade + 60 * final exam grade
Observations
Requires "Programação Funcional" (or equivalent)