Results 1  10
of
12
Proof Methods for Corecursive Programs
 Fundamenta Informaticae Special Issue on Program Transformation
, 1999
"... This article is a tutorial on four methods for proving properties of corecursive programs: fixpoint induction, the approximation lemma, coinduction, and fusion. ..."
Abstract

Cited by 21 (6 self)
 Add to MetaCart
This article is a tutorial on four methods for proving properties of corecursive programs: fixpoint induction, the approximation lemma, coinduction, and fusion.
Design Patterns as HigherOrder DatatypeGeneric Programs
, 2006
"... Design patterns are reusable abstractions in objectoriented software. However, using current mainstream programming languages, these elements can only be expressed extralinguistically: as prose, pictures, and prototypes. We believe that this is not inherent in the patterns themselves, but evidence ..."
Abstract

Cited by 14 (6 self)
 Add to MetaCart
Design patterns are reusable abstractions in objectoriented software. However, using current mainstream programming languages, these elements can only be expressed extralinguistically: as prose, pictures, and prototypes. We believe that this is not inherent in the patterns themselves, but evidence of a lack of expressivity in the languages of today. We expect that, in the languages of the future, the code parts of design patterns will be expressible as reusable library components. Indeed, we claim that the languages of tomorrow will suffice; the future is not far away. All that is needed, in addition to commonlyavailable features, are higherorder and datatypegeneric constructs; these features are already or nearly available now. We argue the case by presenting higherorder datatypegeneric programs capturing ORIGAMI, a small suite of patterns for recursive data structures.
The Generic Approximation Lemma
 Information Processing Letters
, 2001
"... The approximation lemma is a simplification of the wellknown take lemma, and is used to prove properties of programs that produce lists of values. We show how the approximation lemma, unlike the take lemma, can naturally be generalised from lists to a large class of datatypes, and present a gen ..."
Abstract

Cited by 13 (2 self)
 Add to MetaCart
The approximation lemma is a simplification of the wellknown take lemma, and is used to prove properties of programs that produce lists of values. We show how the approximation lemma, unlike the take lemma, can naturally be generalised from lists to a large class of datatypes, and present a generic approximation lemma that is parametric in the datatype to which it applies. As a useful byproduct, we find that generalising the approximation lemma in this way also simplifies its proof. Keywords: Programming calculi; Functional Programming 1 Introduction The standard proof method for programs that consume lists of values is structural induction. However, this method is not applicable to the dual case of programs that produce lists of values, because in general such programs do not have a list argument over which to perform induction. Proof methods that are applicable to such programs have recently been surveyed in [6], and include fixpoint induction [4], the take lemma [3], coin...
Programming with inductive and coinductive types
, 1992
"... Abstract We look at programming with inductive and coinductive datatypes, which are inspired theoretically by initial algebras and final coalgebras, respectively. A predicative calculus which incorporates these datatypes as primitive constructs is presented. This calculus allows reduction sequence ..."
Abstract

Cited by 7 (0 self)
 Add to MetaCart
Abstract We look at programming with inductive and coinductive datatypes, which are inspired theoretically by initial algebras and final coalgebras, respectively. A predicative calculus which incorporates these datatypes as primitive constructs is presented. This calculus allows reduction sequences which are significantly more efficient for two dual classes of common programs than do previous calculi using similar primitives. Several techniques for programming in this calculus are illustrated with numerous examples. A short survey of related work is also included.
Gradual Refinement Blending Pattern Matching with Data Abstraction
"... Abstract. Pattern matching is advantageous for understanding and reasoning about function definitions, but it tends to tightly couple the interface and implementation of a datatype. Significant effort has been invested in tackling this loss of modularity; however, decoupling patterns from concrete r ..."
Abstract

Cited by 4 (2 self)
 Add to MetaCart
Abstract. Pattern matching is advantageous for understanding and reasoning about function definitions, but it tends to tightly couple the interface and implementation of a datatype. Significant effort has been invested in tackling this loss of modularity; however, decoupling patterns from concrete representations while maintaining soundness of reasoning has been a challenge. Inspired by the development of invertible programming, we propose an approach to abstract datatypes based on a rightinvertible language rinv—every function has a right (or pre) inverse. We show how this new design is able to permit a smooth incremental transition from programs with algebraic datatypes and pattern matching, to ones with proper encapsulation (implemented as abstract datatypes), while maintaining simple and sound reasoning.
Program fusion with paramorphisms
 In Mathematically Structured Functional Programming, Proceedings, Electronic Workshops in Computing. British Computer Society
, 2006
"... The design of programs as the composition of smaller ones is a wide spread approach to programming. In functional programming, this approach raises the necessity of creating a good amount of intermediate data structures with the only aim of passing data from one function to another. Using program fu ..."
Abstract

Cited by 2 (1 self)
 Add to MetaCart
The design of programs as the composition of smaller ones is a wide spread approach to programming. In functional programming, this approach raises the necessity of creating a good amount of intermediate data structures with the only aim of passing data from one function to another. Using program fusion techniques, it is possible to eliminate many of those intermediate data structures by an appropriate combination of the codes of the involved functions. In the standard case, no mention to the eliminated data structure remains in the code obtained from fusion. However, there are situations in which parts of that data structure becomes an internal value manipulated by the fused program. This happens, for example, when primitive recursive functions (socalled paramorphisms) are involved. We show, for example, that the result of fusing a primitive recursive function p with another function f may give as result a function that contains calls to f. Moreover, we show that in some cases the result of fusion may be less efficient than the original composition. We also investigate a general recursive version of paramorphism. This study is strongly motivated by the development of a fusion tool for Haskell programs called HFUSION.
Pointfree programming with hylomorphisms
 In Workshop on DatatypeGeneric Programming
, 2004
"... • Pointless a Haskell library for pointfree programming with recursion patterns: – Categorical combinators + Hylomorphisms; – Types as fixed points of functors; ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
• Pointless a Haskell library for pointfree programming with recursion patterns: – Categorical combinators + Hylomorphisms; – Types as fixed points of functors;
Another Iteration on Darlington's "A Synthesis of Several Sorting Algorithms"
, 1994
"... this paper was presented at California State University, Northridge. This work was partially supported by a grant from the Office of Naval Research. References ..."
Abstract
 Add to MetaCart
this paper was presented at California State University, Northridge. This work was partially supported by a grant from the Office of Naval Research. References
Adjoint Folds and Unfolds Or: Scything Through the Thicket of Morphisms
"... Abstract. Folds and unfolds are at the heart of the algebra of programming. They allow the cognoscenti to derive and manipulate programs rigorously and effectively. Fundamental laws such as fusion codify basic optimisation principles. However, most, if not all, programs require some tweaking to be g ..."
Abstract
 Add to MetaCart
Abstract. Folds and unfolds are at the heart of the algebra of programming. They allow the cognoscenti to derive and manipulate programs rigorously and effectively. Fundamental laws such as fusion codify basic optimisation principles. However, most, if not all, programs require some tweaking to be given the form of an (un) fold, and thus make them amenable to formal manipulation. In this paper, we remedy the situation by introducing adjoint folds and unfolds. We demonstrate that most programs are already of the required form and thus are directly amenable to manipulation. Central to the development is the categorical notion of an adjunction, which links adjoint (un) folds to standard (un) folds. We discuss a number of adjunctions and show that they are directly relevant to programming.