Document details

Recursion patterns and time-analysis

Author(s): Barbosa, Manuel Bernardo cv logo 1 ; Cunha, Alcino cv logo 2 ; Pinto, Jorge Sousa cv logo 3

Date: 2005

Persistent ID: http://hdl.handle.net/1822/2762

Origin: RepositóriUM - Universidade do Minho

Subject(s): Functional programming; Time analysis; Recursion patterns


Description
This paper explores some ideas concerning the time-analysis of functional programs defined by instantiating typical recursion patterns such as folds, unfolds, and hylomorphisms. The concepts in this paper are illustrated through a rich set of examples in the Haskell programming language. We concentrate on unfolds and folds (also known as anamorphisms and catamorphisms respectively) of recursively defined types, as well as the more general hylomorphism pattern. For the latter, we use as case-studies two famous sorting algorithms, mergesort and quicksort. Even though time analysis is not compositional, we argue that splitting functions to expose the explicit construction of the recursion tree and its later consumption helps with this analysis.
Document Type Article
Language English
delicious logo  facebook logo  linkedin logo  twitter logo 
degois logo
mendeley logo

Related documents



    Financiadores do RCAAP

Fundação para a Ciência e a Tecnologia Universidade do Minho   Governo Português Ministério da Educação e Ciência Programa Operacional da Sociedade do Conhecimento EU