...collaborate on

Programação Funcional Avançada 2004 / 2005

AKA: Advanced Functional Programming

General information

Advanced Functional Programming is an optional course made available for 5th year students of the following degrees:

  • 5309?? - Licenciatura em Engenharia de Sistemas e Informática
  • 7009?? - Licenciatura em Matemática e Ciências da Computação

Course Staff

(Alphabetically ordered by surname) J.C. Bacelar, J.B. Barros, M.A. Cunha, J.N. Oliveira J.S. Pinto, J.A. Saraiva (course leader), Joost Visser,

Structure of the Course

The course is organised into two parts:

  1. A set of seminars introducing relevant topics to be covered. This seminars will be primarily given by the students. Some more advanced material, however, can/will be presented by the course lecturers or by guests visiting the department.
  2. In the second, more substantial part of the course, students will develop a project (see List of Projects Available).

Number of students: Minimum 5, maximum 10.


The following three items will be taken into account for student evaluation:

A - Background lecture

The students will deliver a short lecture (20m) introducing one of the topics covered in the course.

B - Brief Project/Tool Presentation

The different groups will give a lecture (30m) presenting the project they have chosen for development and the tool(s) that will be used in this task.

C - Project Presentation and Report

Each group will give a lecture presenting the project.

The final mark is computed according to the formula:

A * 0.2 + B * 0.3 + C * 0.5

Program synopsis

Main topics of the course are:

  • Imperative Functional Programming
    • Monads and Effects
    • Robots
    • Graphical User Interfaces
      • Functional Programming for the Web
        • Scripting Combinators (Wash-CGI)
        • HaXML? /XQuery
        • Language Processing in Strafunski
        • HASKELL development tools
    • Advanced Functional Data Structures
    • Program transformation techniques

Program in detail

  • Week 1 (2004.10.06): kick off: definition of topics and projects

  • Week 2 (2004.10.13): meetings with supervisors

  • Week 3 (2004.10.17): talk by Simon Thompson
    • When/Where: Oct 20nd, 3pm, room DI-A1
    • Title: Refactoring Functional Programs
    • Abstract: Refactoring is about improving the design of existing computer programs and systems; as such it is familiar to every programmer, software engineer and designer. Its key characteristic is the focus on structural change, strictly separated from changes in functionality. A structural change can make a program simpler, by removing duplicate code, say, or can be the preparatory step for an upgrade or extension of a system.
      It is characteristic of refactorings that they are 'diffuse' and 'bureaucratic': consider the example of the simplest possible refactoring: renaming a component of a program. To effect this change requires not only the component definition to be changed, but also every use of the component must be similiarly modified. This involves changing every file/module which might use the component, potentially tens or hundreds of modules. Moreover, it is equally vital not to change any components hidden in other parts of the system which happen to share the same name. Of course, it is possible to do refactorings 'by hand', but this process is tedious and, more importantly, error-prone. Automated support for refactorings makes them safe and easy to perform and also secure in their implementation.
      The 'Refactoring Functional Programs' project comprising Huiqing Li, Claus Reinke and Simon Thompson is building the HaRe system to support refactorings for Haskell programs. HaRe is designed as a serious tool for use by practising programmers: HaRe supports the whole of the Haskell; it is integrated into standard development environments and it preserves the 'look and feel' of refactored programs. HaRe is built using a number of existing libraries: 'Programatica' provides tools on which to build the language-analysis components, and 'Strafunski' gives general support for tree transformations.
    • Links: http://www.cs.kent.ac.uk/projects/refactor-fp

  • Week 4 (2003.10.24): students project presentations (item B)

  • Week 5 (2004.11.31): talk by Joost Visser
    • When/Where: Oct 28, 16:00-18:00, room DI-1.04
    • Title: Strafunski: a Haskell-centered bundle for generic programming and language processing
    • Abstract: Strafunski is a bundle of a combinator library and various generative tools that support key tasks in language processing: parser generation and traversal. The traversal support is based on the notion of functional strategies: generic functions that can traverse into terms of any type while mixing type-specific and uniform behaviour. The parsing support is involves connectivity to the Generalized LR parser SGLR. Finally, an enhanced version of DrIFT ensures that traversal and parsing support can easily be deployed for (extremely) large languages such as Java or Cobol. The following will be covered in the talk:
      • Essentials of Strafunski: concepts and architecture, relationship to GHC's Data.Generics.
      • Hands-on session of strategic programming with Strafunski.
      • Design patterns for programming with Strafunski.
    • Slides: http://www.di.uminho.pt/~jno/html/StrafunskiAFP.pdf
    • Links:

  • Week 7 (2003.11.17): meetings with supervisors

  • Week 8 (2003.11.24): Tutorials by Doaitse Swierstra
    • When/Where: Nov 23, 14:00-16:00, room Sala de Reuniões
    • Title: Linear, Online, Functional Pretty Printing
    • Abstract: We present an implementation of Oppen's Pretty printing solution in Haskell. The algorithm is linear in the size of the input, independent of the line width, uses limited look ahead, and has online behaviour.
    • Title: Parsing permutation phrases
    • Abstract: A permutation phrase is a sequence of elements (possibly of different types) in which each element occurs exactly once and the order is irrelevant. Some of the permutable elements may be optional. We show how to extend a parser combinator library with support for parsing such free-order constructs. A user of the library can easily write parsers for permutation phrases and does not need to care about checking and reordering the recognized elements. Applications include the generation of parsers for attributes of XML tags and Haskell's record syntax.

  • Week 9 (2003.12.01):
    • Luís Pedro Machado presents the project: Embedding Disambiguation Rules in the HaGLR System
    • meetings with supervisors

  • Week 10 (2003.12.08): J.M.Valença
    • Monadic Strategies - the teachers allocation problem
    • program files here

  • Week 11 (2003.12.15):
    • Students present the studied papers (see literature section in projects).

  • January 2004: project presentations (item C)

List of Projects Available

List of projects announced so far :

Final Marks

Information to become available in due time.

Outras disciplinas leccionadas pelo DIUM:

r10 - 20 Sep 2005 - 14:48:46 - MariaJoaoFrade
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Syndicate this site RSSATOM