Results 1  10
of
28
Generic programming: An introduction
 3rd International Summer School on Advanced Functional Programming
, 1999
"... ..."
(Show Context)
Datatypegeneric programming
 Spring School on DatatypeGeneric Programming, volume 4719 of Lecture Notes in Computer Science
"... Abstract. Generic programming aims to increase the flexibility of programming languages, by expanding the possibilities for parametrization — ideally, without also expanding the possibilities for uncaught errors. The term means different things to different people: parametric polymorphism, data abst ..."
Abstract

Cited by 47 (13 self)
 Add to MetaCart
Abstract. Generic programming aims to increase the flexibility of programming languages, by expanding the possibilities for parametrization — ideally, without also expanding the possibilities for uncaught errors. The term means different things to different people: parametric polymorphism, data abstraction, metaprogramming, and so on. We use it to mean polytypism, that is, parametrization by the shape of data structures rather than their contents. To avoid confusion with other uses, we have coined the qualified term datatypegeneric programming for this purpose. In these lecture notes, we expand on the definition of datatypegeneric programming, and present some examples of datatypegeneric programs. We also explore the connection with design patterns in objectoriented programming; in particular, we argue that certain design patterns are just higherorder datatypegeneric programs. 1
Elements of a Relational Theory of Datatypes
 Formal Program Development, volume 755 of Lecture Notes in Computer Science
, 1993
"... The "Boom hierarchy" is a hierarchy of types that begins at the level of trees and includes lists, bags and sets. This hierarchy forms the basis for the calculus of total functions developed by Bird and Meertens, and which has become known as the "BirdMeertens formalism". This p ..."
Abstract

Cited by 37 (0 self)
 Add to MetaCart
The "Boom hierarchy" is a hierarchy of types that begins at the level of trees and includes lists, bags and sets. This hierarchy forms the basis for the calculus of total functions developed by Bird and Meertens, and which has become known as the "BirdMeertens formalism". This paper describes a hierarchy of types that logically precedes the Boom hierarchy. We show how the basic operators of the BirdMeertens formalism (map, reduce and filter) can be introduced in a logical sequence by beginning with a very simple structure and successively refining that structure. The context of this work is a relational theory of datatypes, rather than a calculus of total functions. Elements of the theory necessary to the later discussion are summarised at the beginning of the paper. 1 Introduction This paper reports on an experiment into the design of a programming algebra. The algebra is an algebra of datatypes oriented towards the calculation of polymorphic functions and relations. Its design d...
Transposing relations: from Maybe functions to hash tables
 In MPC’04, volume 3125 of LNCS
, 2004
"... Abstract. Functional transposition is a technique for converting relations into functions aimed at developing the relational algebra via the algebra of functions. This paper attempts to develop a basis for generic transposition. Two instances of this construction are considered, one applicable to an ..."
Abstract

Cited by 16 (12 self)
 Add to MetaCart
Abstract. Functional transposition is a technique for converting relations into functions aimed at developing the relational algebra via the algebra of functions. This paper attempts to develop a basis for generic transposition. Two instances of this construction are considered, one applicable to any relation and the other applicable to simple relations only. Our illustration of the usefulness of the generic transpose takes advantage of the free theorem of a polymorphic function. We show how to derive laws of relational combinators as free theorems of their transposes. Finally, we relate the topic of functional transposition with the hashing technique for efficient data representation. 1
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 ..."
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 13 (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
Transforming Data by Calculation
 IN GTTSE’07, VOLUME 5235 OF LNCS
, 2008
"... This paper addresses the foundations of datamodel transformation. A catalog of data mappings is presented which includes abstraction and representation relations and associated constraints. These are justified in an algebraic style via the pointfreetransform, a technique whereby predicates are lif ..."
Abstract

Cited by 7 (3 self)
 Add to MetaCart
(Show Context)
This paper addresses the foundations of datamodel transformation. A catalog of data mappings is presented which includes abstraction and representation relations and associated constraints. These are justified in an algebraic style via the pointfreetransform, a technique whereby predicates are lifted to binary relation terms (of the algebra of programming) in a twolevel style encompassing both data and operations. This approach to data calculation, which also includes transformation of recursive data models into “flat ” database schemes, is offered as alternative to standard database design from abstract models. The calculus is also used to establish a link between the proposed transformational style and bidirectional lenses developed in the context of the classical viewupdate problem.
Demonic Operators and Monotype Factors
, 1993
"... This paper tackles the problem of constructing a compact, pointfree proof of the associativity of demonic composition of binary relations and its distributivity through demonic choice. In order to achieve this goal a definition of demonic composition is proposed in which angelic composition is r ..."
Abstract

Cited by 6 (1 self)
 Add to MetaCart
This paper tackles the problem of constructing a compact, pointfree proof of the associativity of demonic composition of binary relations and its distributivity through demonic choice. In order to achieve this goal a definition of demonic composition is proposed in which angelic composition is restricted by means of a socalled "monotype factor". Monotype factors are characterised by a Galois connection similar to the Galois connection between composition and factorisation of binary relations. The identification of such a connection is argued to be highly conducive to the desired compactness of calculation. Nothing delights a mathematician more than to discover that two things, previously regarded as entirely distinct, are mathematicaly identical. W. W. Sawyer La math'ematique est l'art de donner le meme nom `a des choses diff'erentes. [J.] H. Poincar'e The term "Galois connexion" was coined by Oystein Ore [20] almost fifty years ago in order to describe a particularly si...
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...
Pointwise Relational Programming
 In Algebraic Methodology and Software Technology, volume 1816 of LNCS
, 2000
"... The pointfree relational calculus has been very successful as a language for discussing general programming principles. However, when it comes to specific applications, the calculus can be rather awkward to use: some things are more clearly and simply expressed using variables. The combination of v ..."
Abstract

Cited by 6 (0 self)
 Add to MetaCart
(Show Context)
The pointfree relational calculus has been very successful as a language for discussing general programming principles. However, when it comes to specific applications, the calculus can be rather awkward to use: some things are more clearly and simply expressed using variables. The combination of variables and relational combinators such as converse and choice yields a kind of nondeterministic functional programming language. We give a semantics for such a language, and illustrate with an example application.