## Inductive Data Types for Predicate Transformers (1995)

Venue: | Information Processing Letters |

Citations: | 9 - 1 self |

### BibTeX

@ARTICLE{Moor95inductivedata,

author = {Oege De Moor},

title = {Inductive Data Types for Predicate Transformers},

journal = {Information Processing Letters},

year = {1995},

volume = {43},

pages = {113--117}

}

### Years of Citing Articles

### OpenURL

### Abstract

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

### Citations

1309 | Monads for Functional Programming
- Wadler
- 1995
(Show Context)
Citation Context ..., 1995 Keywords: programming calculi, refinement calculus, predicate transformers, data types, catamorphisms 0 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... |

147 |
A calculus of refinements for program derivations
- Back
- 1988
(Show Context)
Citation Context ...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 refinement calculus did already allow a notion of inductive data types, but until now it lacked the program con... |

105 |
Data structures and program transformation
- Malcolm
- 1990
(Show Context)
Citation Context ...ainted with the categorical treatment of data types as algebras for an endofunctor. A readily accessible introduction to this subject, with many applications to program derivation, is Malcolm's paper =-=[12]-=-. It is also useful if the reader has some familiarity with the connection between relations and predicate transformers; see e.g. [9]. 0 0.0 Notation Composition is written in diagrammatic order, and ... |

96 |
Algorithmics: Towards programming as a mathematical activity
- Meertens
- 1986
(Show Context)
Citation Context ...ion formalism where all specifications are total, deterministic mappings from input to output. An example of such a specification formalism is the calculus of functions developed by Bird and Meertens =-=[3, 13]-=-. 1.1 Relations Let A and B be sets. A relation from A to B is a subset of the cartesian product A \Theta B. Relations are denoted by upper case identifiers: R; S; T . In the sequel, we shall use the ... |

55 |
The weakest prespecification
- Hoare, He
- 1986
(Show Context)
Citation Context ...by the equivalence: (T ; S ` R) j (T ` R=S) ; for R : A!B, S : C!B and T : A!C. This characterisation is the starting point of a paper by Hoare and He, who have named (=) the weakest prespecification =-=[10]-=-. The above equivalence explains that terminology: R=S is the weakest specification of a program T such that (T ; S) implements R. The pointwise definition of the weakest prespecification is a(R=S)c j... |

52 |
A fixpoint theorem for complete categories
- Lambek
- 1968
(Show Context)
Citation Context ... equivalence (1),sfunction gs; :([R]) = F::([R]) ; :(F ? :3 A ; R) j fsinitial F --algebra in Fun g :([R]) = ([:(F ? :3 A ; R)]) j fsisomorphism g ([R]) =s\Gamma1 :([:(F ? :3 A ; R)]) Lemma 3 (Lambek =-=[11]-=-) Let D be a category, and let F : D ! D be a functor with initial algebras. Thensis an isomorphism. Lemma 4 (Backhouse et al. [2]) Let F : Fun ! Fun be a relator with initial algebras. Then for all R... |

48 |
Strong Categorical Datatypes I
- Cockett, Spencer
- 1991
(Show Context)
Citation Context ...ansformers Oege de Moor September 14, 1995 Keywords: programming calculi, refinement calculus, predicate transformers, data types, catamorphisms 0 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 operato... |

29 |
der Woude. Relational catamorphisms
- Backhouse, Bruin, et al.
- 1991
(Show Context)
Citation Context ...o 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 ... |

22 | About Charity
- Cockett, Fukushima
- 1992
(Show Context)
Citation Context ...ansformers Oege de Moor September 14, 1995 Keywords: programming calculi, refinement calculus, predicate transformers, data types, catamorphisms 0 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 operato... |

20 | O.: An algebraic construction of predicate transformers
- Gardiner, Martin, et al.
- 1994
(Show Context)
Citation Context ...n because the order is different. The category Tran is a model of a specification formalism like the refinement calculus [1, 14], where specifications are given as pairs of pre-- and post--conditions =-=[8]-=-. Note, however, that we do not restrict ourselves to a single universe of states: we allow heterogeneous predicate transformers of type A!B with A 6= B. Most expositions of the refinement calculus on... |

15 |
Programming from Specifications, 2nd edition
- Morgan
- 1998
(Show Context)
Citation Context ...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 refinement calculus did already allow a notion of inductive data types, but until now it lacked the program con... |

13 |
A 2-categorical approach to geometric morphisms
- Carboni, Kelly, et al.
- 1991
(Show Context)
Citation Context ...sible. Say that a functor F : Fun ! Fun is a relator if the following implication holds in Rel: h ffi ; k = f ; g ffi ) (F:h) ffi ; F:k = F:f ; (F:g) ffi : Theorem 0 (see e.g. Carboni, Kelly and Wood =-=[4]-=-) Let F : Fun ! Fun be a functor. There exists at most one monotonic functor Rel !Rel that agrees with F on functions, say F ? . This unique functor F ? exists if and only if F is a relator. Furthermo... |

2 |
Modalities of Nondeterminacy. In Beauty is Our Business: A Birthday Salute to Edsger W. Dijkstra
- Hesselink
- 1990
(Show Context)
Citation Context ... with many applications to program derivation, is Malcolm's paper [12]. It is also useful if the reader has some familiarity with the connection between relations and predicate transformers; see e.g. =-=[9]-=-. 0 0.0 Notation Composition is written in diagrammatic order, and is denoted by a semi--colon. As usual, id B stands for the identity arrow on B, and so one might write, for example, OE ; id B ; / = ... |