103 research outputs found

    Functional programming with bananas, lenses, envelopes and barbed wire

    Get PDF
    We develop a calculus for lazy functional programming based on recursion operators associated with data type definitions. For these operators we derive various algebraic laws that are useful in deriving and manipulating programs. We shall show that all example functions in Bird and Wadler's Introduction to Functional Programming can be expressed using these operators

    Application of isocapnic hyperpnea in the treatment of vertebral column paramorphisms: Clinical case reports

    Get PDF
    The aim of the study is to frame the use of Isocapnic Hyperpnea in the treatment of different spine paramorphisms through the use of SpiroTiger©. Several studies in recent years are increasingly looking for the current correlations between the respiratory musculature and the Fine Postural System. Based on this consideration, we decided to use respiratory exercise to induce a considerable modification of postural alignment. To provide meaningful data, we associated an objective baseline assessment with an objective assessment using spinometry. Four subjects are identified, undergoing an initial objective assessment of posture and spinometry (Spinal mouse M360©) who, after having carried out Respiratory Training with SpiroTiger© and postural gymnastics, were followed-up between the 5th and 8th sessions. The first two cases had postural alterations (lumbar hyperlordosis and dorsal cyphosis) while the assessment of the other subjects showed no postural deficits in the upright station. However, during anterior bending and/or the extension of the trunk in maximum inhalation, there were joint limitations that reduced the Range of Motion (ROM). Although the subjects examined had different Paramorphisms, the final assessment shows in all cases an increase in the ROM of the spine (bending=6-12°/extension=2°), better postural alignment resulting in a reduction in algies

    Clinical Kinesiology and Posturology Applied to a Group of Italian Students. A Morphological Observational Study.

    Get PDF
    50%), pelvis (≈50%), and hips (36.25%). A prominent malleolus was observed in 17.5% of student

    Algebraic specialization of generic functions for recursive types

    Get PDF
    Defining functions over large, possibly recursive, data structures usually involves a lot of boilerplate. This code simply traverses non-interesting parts of the data, and rapidly becomes a maintainability problem. Many generic programming libraries have been proposed to address this issue. Most of them allow the user to specify the behavior just for the interesting bits of the structure, and provide traversal combinators to “scrap the boilerplate”. The expressive power of these libraries usually comes at the cost of efficiency, since runtime checks are used to detect where to apply the type-specific behavior. In previous work we have developed an effective rewrite system for specialization and optimization of generic programs. In this paper we extend it to also cover recursive data types. The key idea is to specialize traversal combinators using well-known recursion patterns, such as folds or paramorphisms. These are ruled by a rich set of algebraic laws that enable aggressive optimizations. We present a type-safe encoding of this rewrite system in Haskell, based on recent language extensions such as type-indexed type families

    Hfusion : a fusion tool based on acid rain plus extensions

    Get PDF
    When constructing programs, it is a usual practice to compose algorithms that solve simpler problems to solve a more complex one. This principle adapts so well to software development because it provides a structure to understand, design, reuse and test programs. In functional languages, algorithms are usually connected through the use of intermediate data structures, which carry the data from one algorithm to another one. The data structures impose a load on the algorithms to allocate, traverse and deallocate them. To alleviate this ine ciency, automatic program transformations have been studied, which produce equivalent programs that make less use of intermediate data structures. We present a set of automatic program transformation techniques based on algebraic laws known as Acid Rain. These techniques allow to remove intermediate data structures in programs containing primitive recursive functions, mutually recursive functions and functions with multiple recursive arguments. We also provide an experimental implementation of our techniques which allows their application on user supplied programs

    The Sketch of a Polymorphic Symphony

    Full text link
    In previous work, we have introduced functional strategies, that is, first-class generic functions that can traverse into terms of any type while mixing uniform and type-specific behaviour. In the present paper, we give a detailed description of one particular Haskell-based model of functional strategies. This model is characterised as follows. Firstly, we employ first-class polymorphism as a form of second-order polymorphism as for the mere types of functional strategies. Secondly, we use an encoding scheme of run-time type case for mixing uniform and type-specific behaviour. Thirdly, we base all traversal on a fundamental combinator for folding over constructor applications. Using this model, we capture common strategic traversal schemes in a highly parameterised style. We study two original forms of parameterisation. Firstly, we design parameters for the specific control-flow, data-flow and traversal characteristics of more concrete traversal schemes. Secondly, we use overloading to postpone commitment to a specific type scheme of traversal. The resulting portfolio of traversal schemes can be regarded as a challenging benchmark for setups for typed generic programming. The way we develop the model and the suite of traversal schemes, it becomes clear that parameterised + typed strategic programming is best viewed as a potent combination of certain bits of parametric, intensional, polytypic, and ad-hoc polymorphism

    Coinductive interpreters for process calculi

    Get PDF
    This paper suggests functional programming languages with coinductive types as suitable devices for prototyping process calculi. The proposed approach is independent of any particular process calculus and makes explicit the different ingredients present in the design of any such calculi. In particular structural aspects of the underlying behaviour model (e.g. the dichotomies such as active vs reactive, deterministic vs nondeterministic) become clearly separated from the interaction structure which defines the synchronisation discipline. The approach is illustrated by the detailed development in Charity of an interpreter for a family of process languages.(undefined

    An exercise in transformational programming: Backtracking and Branch-and-Bound

    Get PDF
    We present a formal derivation of program schemes that are usually called Backtracking programs and Branch-and-Bound programs. The derivation consists of a series of transformation steps, specifically algebraic manipulations, on the initial specification until the desired programs are obtained. The well-known notions of linear recursion and tail recursion are extended, for structures, to elementwise linear recursion and elementwise tail recursion; and a transformation between them is derived too

    Recursion patterns and time-analysis

    Get PDF
    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.Fundação do Ministério de Ciência e Tecnologia (FCT) - POSI/CHS/44304/2002

    A BMF FOR SEMANTICS

    Get PDF
    We show how the Bird-Meertens formalism (BMF) can be based on continuous algebras such that finite and infinite datatypes may peacefully coexist. Until recently the theory could only deal with either finite datatypes (= initial algebra) or infinite datatypes (= final co-algebra). In the context of continuous algebras the initial algebra coincides with the final co-algebra. Elements of this algebra can be finite, infinite or partial. We intend to use EBMF for semantics directed compiler generation by combining initial algebra semantics with the calculational power of BMF
    corecore