Results 21  30
of
97
Inductive Data Types for Predicate Transformers
 Information Processing Letters
, 1995
"... Introduction Modern functional programming languages [5, 6] and specification formalisms [3] are built around the notion of inductive data types and homomorphisms on these data types. Such homomorphisms, which correspond to the familiar fold or reduce operators in functional programming, are calle ..."
Abstract

Cited by 9 (1 self)
 Add to MetaCart
(Show Context)
Introduction Modern functional programming languages [5, 6] and specification formalisms [3] are built around the notion of inductive data types and homomorphisms on these data types. Such homomorphisms, which correspond to the familiar fold or reduce operators in functional programming, are called catamorphisms. In this note, it is shown how catamorphisms can be generalised from functions to relations, and from relations to predicate transformers. The first step of this generalisation (from functions to relations) was already achieved in a slightly different setting by Backhouse et al. [2]; the generalisation to predicate transformers is new. In practical terms, the main result presented here says that a calculus based on predicate transformers (like the refinement calculus studied by Back, Morgan and others [1, 14]) can be enriched with program constructors for iterating over inductive data types. The refineme
Computing Downwards Accumulations on Trees Quickly
, 1995
"... Downwards passes on binary trees are essentially functions which pass information down a tree, from the root towards the leaves. Under certain conditions, a downwards pass is both `efficient' (computable in a functional style in parallel time proportional to the depth of the tree) and `manipula ..."
Abstract

Cited by 9 (3 self)
 Add to MetaCart
(Show Context)
Downwards passes on binary trees are essentially functions which pass information down a tree, from the root towards the leaves. Under certain conditions, a downwards pass is both `efficient' (computable in a functional style in parallel time proportional to the depth of the tree) and `manipulable' (enjoying a number of distributivity properties useful in program construction); we call a downwards pass satisfying these conditions a downwards accumulation. In this paper, we show that these conditions do in fact yield a stronger conclusion: the accumulation can be computed in parallel time proportional to the logarithm of the depth of the tree, on a Crew Pram machine.
(Relational) Programming Laws in the Boom Hierarchy of Types
 Mathematics of Program Construction
, 1992
"... . In this paper we demonstrate that the basic rules and calculational techniques used in two extensively documented program derivation methods can be expressed, and, indeed, can be generalised within a relational theory of datatypes. The two methods to which we refer are the socalled "BirdMee ..."
Abstract

Cited by 9 (1 self)
 Add to MetaCart
(Show Context)
. In this paper we demonstrate that the basic rules and calculational techniques used in two extensively documented program derivation methods can be expressed, and, indeed, can be generalised within a relational theory of datatypes. The two methods to which we refer are the socalled "BirdMeertens formalism" (see [22]) and the "DijkstraFeijen calculus" (see [15]). The current paper forms an abridged, though representative, version of a complete account of the algebraic properties of the Boom hierarchy of types [19, 18]. Missing is an account of extensionality and the socalled crossproduct. 1 Introduction The "BirdMeertens formalism" (to be more precise, our own conception of it) is a calculus of total functions based on a small number of primitives and a hierarchy of types including trees and lists. The theory was set out in an inspiring paper by Meertens [22] and has been further refined and applied in a number of papers by Bird and Meertens [8, 9, 11, 12, 13]. Its beauty deriv...
A Relational Approach To Optimization Problems
, 1996
"... The main contribution of this thesis is a study of the dynamic programming and greedy strategies for solving combinatorial optimization problems. The study is carried out in the context of a calculus of relations, and generalises previous work by using a loop operator in the imperative programming s ..."
Abstract

Cited by 7 (0 self)
 Add to MetaCart
The main contribution of this thesis is a study of the dynamic programming and greedy strategies for solving combinatorial optimization problems. The study is carried out in the context of a calculus of relations, and generalises previous work by using a loop operator in the imperative programming style for generating feasible solutions, rather than the fold and unfold operators of the functional programming style. The relationship between fold operators and loop operators is explored, and it is shown how to convert from the former to the latter. This fresh approach provides additional insights into the relationship between dynamic programming and greedy algorithms, and helps to unify previously distinct approaches to solving combinatorial optimization problems. Some of the solutions discovered are new and solve problems which had previously proved difficult. The material is illustrated with a selection of problems and solutions that is a mixture of old and new. Another contribution is the invention of a new calculus, called the graph calculus, which is a useful tool for reasoning in the relational calculus and other nonrelational calculi. The graph
The Many Disguises of Accumulation
, 1991
"... Several descriptions of basically one transformation technique, viz. accumulation, are compared. Their basis, viz. the associativity and the existence of a neutral element inherent in a monoid, is identified. Keywords transformational programming, factorial, fast reverse, accumulation, continuation ..."
Abstract

Cited by 7 (0 self)
 Add to MetaCart
Several descriptions of basically one transformation technique, viz. accumulation, are compared. Their basis, viz. the associativity and the existence of a neutral element inherent in a monoid, is identified. Keywords transformational programming, factorial, fast reverse, accumulation, continuations, lambda abstraction, generalisation, tail recursion, implementation of lists. This research has been sponsored by the Netherlands Organisation for Scientific Research (NWO), under grant NF 63/62518 (the STOP  Specification and Transformation Of Programs  project). 1 Introduction One of the first program transformations that appeared in the literature was the accumulation transformation. The transformation is now classic, although not everyone may know it under exactly this name. In this note, I try to relate several descriptions of this program transformation technique. In a purely algebraic view, it is the exploitation of the properties of a monoid. In literature, it can be fou...
The Zip Calculus
 In Fifth International Conference on Mathematics of Program Construction (MPC 2000
, 2000
"... . Many have recognized the need for genericity in programming and program transformation. Genericity over data types has been achieved with polymorphism. Genericity over type constructors, often called polytypism, is an area of active research. This paper proposes that another kind of genericity is ..."
Abstract

Cited by 7 (0 self)
 Add to MetaCart
(Show Context)
. Many have recognized the need for genericity in programming and program transformation. Genericity over data types has been achieved with polymorphism. Genericity over type constructors, often called polytypism, is an area of active research. This paper proposes that another kind of genericity is needed: genericity over the length of tuples. Untyped languages allow for such genericity but typed languages do not (except for languages allowing dependent types). The contribution of this paper is to present the zip calculus, a typed lambda calculus that provides genericity over the length of tuples and yet does not require the full generality of dependent types. 1 Introduction The key to writing robust software is abstraction, but genericity is often needed to use abstraction: to write a generic sort routine, genericity over types is needed (i.e., polymorphism); to write a generic fold (or catamorphism, a function inductively dened over an inductive data structure), genericity over t...
Derivation of Efficient Data Parallel Programs
 In 17th Australasian Computer Science Conference
, 1993
"... This paper considers the expression and derivation of efficient data parallel programs for SIMD and MIMD machines. It is shown that efficient parallel programs must utilise both sequential and parallel computation; these are termed hybrid programs. The BirdMeertens formalism, a calculus of higher ..."
Abstract

Cited by 6 (0 self)
 Add to MetaCart
(Show Context)
This paper considers the expression and derivation of efficient data parallel programs for SIMD and MIMD machines. It is shown that efficient parallel programs must utilise both sequential and parallel computation; these are termed hybrid programs. The BirdMeertens formalism, a calculus of higher order functions, is used to derive and express programs. Our goal is to derive efficient parallel programs for a variety of machines by: starting with an abstract specification, deriving an abstract algorithm and successively refining this to more efficient and machine dependent algorithms incorporating greater implementation detail. Nested data structures are used to express hybrid algorithms. Using this technique efficient accumulate (scan/parallel prefix) algorithms are derived for SIMD and MIMD machines. 1 Introduction The main reason for parallel programming is to achieve high performance. Unfortunately designing and writing efficient parallel programs, especially for MIMD machines, i...
Deriving Tidy Drawings of Trees
, 1995
"... The treedrawing problem is to produce a `tidy' mapping of elements of a tree to points in the plane. In this paper, we derive an efficient algorithm for producing tidy drawings of trees. The specification, the starting point for the derivations, consists of a collection of intuitively appealin ..."
Abstract

Cited by 6 (4 self)
 Add to MetaCart
(Show Context)
The treedrawing problem is to produce a `tidy' mapping of elements of a tree to points in the plane. In this paper, we derive an efficient algorithm for producing tidy drawings of trees. The specification, the starting point for the derivations, consists of a collection of intuitively appealing criteria satisfied by tidy drawings. The derivation shows constructively that these criteria completely determine the drawing. Indeed, the criteria completely determine a simple but inefficient algorithm for drawing a tree, which can be transformed into an efficient algorithm using just standard techniques and a small number of inventive steps. The algorithm consists of an upwards accumulation followed by a downwards accumulation on the tree, and is further evidence of the utility of these two higherorder tree operations.
An InitialAlgebra Approach to Directed Acyclic Graphs
, 1995
"... The initialalgebra approach to modelling datatypes consists of giving constructors for building larger objects of that type from smaller ones, and laws identifying different ways of constructing the same object. The recursive decomposition of objects of the datatype leads directly to a recursive ..."
Abstract

Cited by 6 (0 self)
 Add to MetaCart
The initialalgebra approach to modelling datatypes consists of giving constructors for building larger objects of that type from smaller ones, and laws identifying different ways of constructing the same object. The recursive decomposition of objects of the datatype leads directly to a recursive pattern of computation on those objects, which is very helpful for both functional and parallel programming. We show how to model a particular kind of directed acyclic graph using this initialalgebra approach.
Back to Basics: Deriving Representations Changers Without Relations
, 1994
"... A representation changer is a function that can be specified in a particular way in terms of two other functions. Examples of representation changers include binary addition and multiplication, base conversion, and compilers. There has been much recent work in using a relational language, namely ..."
Abstract

Cited by 6 (0 self)
 Add to MetaCart
A representation changer is a function that can be specified in a particular way in terms of two other functions. Examples of representation changers include binary addition and multiplication, base conversion, and compilers. There has been much recent work in using a relational language, namely Jones and Sheerans' Ruby, to derive representation changers from their specifications using equational reasoning. In this paper