Results 1 
5 of
5
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 6 (0 self)
 Add to MetaCart
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.
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
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
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.
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
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.
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.