Results 1 
6 of
6
Inverting Functions as Folds
 Mathematics of Program Construction. Proceedings, LNCS 2386
, 2002
"... This paper describes a technique for constructing the inverse of a partial function as a relational hylomorphism. When the function is total, the inverse is expressed as a relational fold. If the inverse is required to satisfy additional properties, the nondeterminism in the relational fold can be ..."
Abstract

Cited by 7 (0 self)
 Add to MetaCart
(Show Context)
This paper describes a technique for constructing the inverse of a partial function as a relational hylomorphism. When the function is total, the inverse is expressed as a relational fold. If the inverse is required to satisfy additional properties, the nondeterminism in the relational fold can be eliminated by appeal to fusion. The technique is illustrated with three examples, all dealing with constructing trees satisfying certain constraints.
Theory and Applications of Inverting Functions as Folds
"... This paper is devoted to the proof, applications, and generalisation of a theorem, due to Bird and de Moor, that gave conditions under which a total function can be expressed as a relational fold. The theorem is illustrated with three problems, all dealing with constructing trees with various proper ..."
Abstract

Cited by 1 (1 self)
 Add to MetaCart
(Show Context)
This paper is devoted to the proof, applications, and generalisation of a theorem, due to Bird and de Moor, that gave conditions under which a total function can be expressed as a relational fold. The theorem is illustrated with three problems, all dealing with constructing trees with various properties. It is then generalised to give conditions under which the inverse of a partial function can be expressed as a relational hylomorphism. The proof makes use of Doornbos and Backhouse's theory on wellfoundedness and reductivity. Possible applications of the generalised theorem is then discussed.
Patterns and Lax Lambda Laws for Relational and Imperative Programming

"... Pointfree relation calculi have been fruitful in functional programming, but in specific applications pointwise expressions can be more convenient and comprehensible than pointfree ones. To integrate pointwise with pointfree, de Moor and Gibbons [AMAST 2000] give a relational semantics for lamb ..."
Abstract

Cited by 1 (1 self)
 Add to MetaCart
Pointfree relation calculi have been fruitful in functional programming, but in specific applications pointwise expressions can be more convenient and comprehensible than pointfree ones. To integrate pointwise with pointfree, de Moor and Gibbons [AMAST 2000] give a relational semantics for lambda terms with noninjective pattern matching. Alternative semantics has
On Building Trees with Minimum Height,
"... The algebraic style of reasoning about programs has been proposed and studied by computing scientists. We rephrase the old problem of building trees of minimum height as an optimisation problem and apply the greedy theorem to derive a linear time algorithm. To put the problem in the right form, we f ..."
Abstract
 Add to MetaCart
The algebraic style of reasoning about programs has been proposed and studied by computing scientists. We rephrase the old problem of building trees of minimum height as an optimisation problem and apply the greedy theorem to derive a linear time algorithm. To put the problem in the right form, we find it necessary to generalise from functions to relations and make use of the converse of a function theorem to write the inverse of a function as a fold.
An Ideal Model for Pointwise Relational Programming
, 2000
"... 1 Introduction Pointfree relation calculus and its categorical generalizations have been fruitful in development of calculi of functional programming, especially for formulation and proof of general principles such as theories of optimization problems and polytypic patterns of recursion on inductiv ..."
Abstract
 Add to MetaCart
(Show Context)
1 Introduction Pointfree relation calculus and its categorical generalizations have been fruitful in development of calculi of functional programming, especially for formulation and proof of general principles such as theories of optimization problems and polytypic patterns of recursion on inductive data types (e.g., see [25] and many citations therein). In such a programming calculus, the idea is to start with a relation R: B \Gamma! C that serves as a specification, and to construct a chain R ' R0 ' : : : ' f (1) of inclusions, leading to a function f expressed in the target programming language. A rich calculus can be based on inclusion of category Fun of total functions in the category Rel of binary relations, and these categories can be seen as a standard model for a practical axiomaticslaws useful for program transformationthat is largely applicable to more refined models such as CPOs [15].
Refactoring for Comprehension
"... Functional programming is well suited for equational reasoning on programs. In this paper, we are trying to use this capability for program comprehension purposes. Specifically, in a program understanding process, higherorder operators can work like abstract schemes in which we can fit formal speci ..."
Abstract
 Add to MetaCart
(Show Context)
Functional programming is well suited for equational reasoning on programs. In this paper, we are trying to use this capability for program comprehension purposes. Specifically, in a program understanding process, higherorder operators can work like abstract schemes in which we can fit formal specifications calculated from the source code. Such specifications are calculated by a transformational process which we call reverse program calculation that operates on both notations: pointwise and pointfree. Once a specification matches an abstract schema, a new refactoring phase leading to a clearer source code takes place. At the same time, an unambiguous behavioural understanding is reached because we give a mathematical description of the abstract schemes. To provide a more complete and realistic perspective of the approach, we use recursive operators that can handle side effects.