Results 1  10
of
13
Generic programming: An introduction
 3rd International Summer School on Advanced Functional Programming
, 1999
"... ..."
When Do Datatypes Commute?
 Category Theory and Computer Science, 7th International Conference, volume 1290 of LNCS
, 1997
"... Polytypic programs are programs that are parameterised by type constructors (like List), unlike polymorphic programs which are parameterised by types (like Int). In this paper we formulate precisely the polytypic programming problem of "commuting " two datatypes. The precise formulation involves ..."
Abstract

Cited by 15 (3 self)
 Add to MetaCart
Polytypic programs are programs that are parameterised by type constructors (like List), unlike polymorphic programs which are parameterised by types (like Int). In this paper we formulate precisely the polytypic programming problem of "commuting " two datatypes. The precise formulation involves a novel notion of higher order polymorphism. We demonstrate via a number of examples the relevance and interest of the problem, and we show that all "regular datatypes" (the sort of datatypes that one can define in a functional programming language) do indeed commute according to our specification. The framework we use is the theory of allegories, a combination of category theory with the pointfree relation calculus. 1 Polytypism The ability to abstract is vital to success in computer programming. At the macro level of requirements engineering the successful designer is the one able to abstract from the particular wishes of a few clients a general purpose product that can capture a l...
Universal regular path queries
 HigherOrder and Symbolic Computation
, 2003
"... Given are a directed edgelabelled graph G with a distinguished node n0, and a regular expression P which may contain variables. We wish to compute all substitutions φ (of symbols for variables), together with all nodes n such that all paths n0 → n are in φ(P). We derive an algorithm for this proble ..."
Abstract

Cited by 12 (1 self)
 Add to MetaCart
Given are a directed edgelabelled graph G with a distinguished node n0, and a regular expression P which may contain variables. We wish to compute all substitutions φ (of symbols for variables), together with all nodes n such that all paths n0 → n are in φ(P). We derive an algorithm for this problem using relational algebra, and show how it may be implemented in Prolog. The motivation for the problem derives from a declarative framework for specifying compiler optimisations. 1 Bob Paige and IFIP WG 2.1 Bob Paige was a longstanding member of IFIP Working Group 2.1 on Algorithmic Languages and Calculi. In recent years, the main aim of this group has been to investigate the derivation of algorithms from specifications by program transformation. Already in the mideighties, Bob was way ahead of the pack: instead of applying transformational techniques to wellworn examples, he was applying his theories of program transformation to new problems, and discovering new algorithms [16, 48, 52]. The secret of his success lay partly in his insistence on the study of general algorithm design strategies (in particular
Categorical Fixed Point Calculus
, 1995
"... A number of latticetheoretic fixed point rules are generalised to category theory and applied to the construction of isomorphisms between list structures. 1 Introduction Category theoreticians view a preordered set as a particular sort of category in which there is at most one arrow between any pa ..."
Abstract

Cited by 6 (0 self)
 Add to MetaCart
A number of latticetheoretic fixed point rules are generalised to category theory and applied to the construction of isomorphisms between list structures. 1 Introduction Category theoreticians view a preordered set as a particular sort of category in which there is at most one arrow between any pair of objects. According to this view, several concepts of lattice theory are instances of concepts of category theory as shown in table 1. An alternative viewpoint, advocated by Lambek [9], is that lattice theory is a valuable source of inspiration for novel results in category theory. Indeed, it is our view that for the purposes of advancing programming methodology category theory may profitably be regarded as "coherently constructive lattice theory 1 ". That is to say, arrows between objects of a category may be seen as "witnesses" to a preordering between the objects. Category theory is thus "constructive" because it is a theory about how to construct such witnesses rather than a theor...
Mathematics of Recursive Program Construction
, 2001
"... A discipline for the design of recursive programs is presented. The core concept ..."
Abstract

Cited by 5 (1 self)
 Add to MetaCart
A discipline for the design of recursive programs is presented. The core concept
Inductive Datatypes with Laws and Subtyping – A Relational Model
 Faculty of Mathematics and Computing
"... ..."
Constructive Lattice Theory
, 1993
"... A notion of simulation of one datatype by another is defined as a constructive preorder. A calculus of datatype simulation is then developed by formulating constructive versions of leastfixedpoint theorems in lattice theory. The calculus is applied to the construction of several isomorphisms betwe ..."
Abstract

Cited by 3 (2 self)
 Add to MetaCart
A notion of simulation of one datatype by another is defined as a constructive preorder. A calculus of datatype simulation is then developed by formulating constructive versions of leastfixedpoint theorems in lattice theory. The calculus is applied to the construction of several isomorphisms between classes of datatypes. In particular constructive adaptations of theorems in lattice theory about closure operators are shown to yield simulations and isomorphisms between monad structures, and constructive adaptations of theorems in regular algebra are shown to yield isomorphisms between list structures. A question to which any respectable theory of datatypes should provide immediate answers is when two datatypes are isomorphic, i.e. entirely equivalent modulo implementation details. A subsidiary question is when one datatype simulates another. This second question is of interest in its own right but is also important to answering the first question since isomorphism is frequently reduce...
A Calculational Approach to Mathematical Induction
, 1994
"... Several concise formulations of mathematical induction are presented and proven equivalent. The formulations are expressed in variablefree relation algebra and thus are in terms of relations only, without mentioning the related objects. It is shown that the induction principle in this form, when co ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
Several concise formulations of mathematical induction are presented and proven equivalent. The formulations are expressed in variablefree relation algebra and thus are in terms of relations only, without mentioning the related objects. It is shown that the induction principle in this form, when combined with the explicit use of Galois connections, lends itself very well for use in calculational proofs. Two nontrivial examples are presented. The first is a proof of a Newman's lemma. The second is a calculation of a condition under which the union of two wellfounded relations is wellfounded. In both cases the calculations lead to generalisations of the known results. In the case of the latter example, one lemma generalises three different conditions.
Relational Programming, Program Inversion and the Derivation of Parsing Algorithms
, 1993
"... The spec calculus is a programming algebra that supports and even encourages the derivation of relational programs in a clear and calculational style. After a brief introduction of the spec calculus two particular uses are investigated. First, the notion of program inversion is introduced. This noti ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
The spec calculus is a programming algebra that supports and even encourages the derivation of relational programs in a clear and calculational style. After a brief introduction of the spec calculus two particular uses are investigated. First, the notion of program inversion is introduced. This notion from imperative programming allows one to construct from a given program R that satisfies fPg R fQg a program R 1 that satis es fQg R 1 fPg . It is shown that, as may be expected, a relational framework allows easy definition of and calculation with inverses of arbitrary programs. Several examples are discussed and used to introduce different methods to calculate implementable inverses. The second topic is the derivation of precedence parsing algorithms. A simple algorithm for the calculation of the inorder traversal of a tree is transformed in two steps into an algorithm for precedence parsing. The first transformation is the use of program inversion to obtain an algorithm that constru...
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.