Results 1  10
of
29
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 57 (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 43 (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...
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 19 (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
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 18 (13 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
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 16 (7 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.
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...
Extended Static Checking by Calculation using the Pointfree Transform
 Proc. LerNet ALFA Summer School Conf
, 2008
"... Abstract. The pointfree transform offers to the predicate calculus what the Laplace transform offers to the differential/integral calculus: the possibility of changing the underlying mathematical space so as to enable agile algebraic calculation. This paper addresses the foundations of the transfo ..."
Abstract

Cited by 14 (6 self)
 Add to MetaCart
(Show Context)
Abstract. The pointfree transform offers to the predicate calculus what the Laplace transform offers to the differential/integral calculus: the possibility of changing the underlying mathematical space so as to enable agile algebraic calculation. This paper addresses the foundations of the transform and its application to a calculational approach to extended static checking (ESC) in the context of abstract modeling. In particular, a calculus is given whose rules help in breaking the complexity of the proof obligations involved in static checking arguments. The close connection between such calculus and that of weakest preconditions makes it possible to use the latter in ESC proof obligation discharge, where pointfree notation is again used, this time to calculate with invariant properties to be maintained. A connection with the “everything is a relation ” lemma of Alloy is established, showing how close to each other the pointfree and Alloy notations are. The main advantage of this connection is that of complementing penandpaper pointfree models.
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 8 (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...
Strategic term rewriting and its application to a VDMSL to SQL conversion
 In Proceedings of the Formal Methods Symposium (FM’05
, 2005
"... Abstract. We constructed a tool, called VooDooM, which converts datatypes in VDMSL into SQL relational data models. The conversion involves transformation of algebraic types to maps and products, and pointer introduction. The conversion is specified as a theory of refinement by calculation. The imp ..."
Abstract

Cited by 7 (7 self)
 Add to MetaCart
(Show Context)
Abstract. We constructed a tool, called VooDooM, which converts datatypes in VDMSL into SQL relational data models. The conversion involves transformation of algebraic types to maps and products, and pointer introduction. The conversion is specified as a theory of refinement by calculation. The implementation technology is strategic term rewriting in Haskell, as supported by the Strafunski bundle. Due to these choices of theory and technology, the road from theory to practise is straightforward. Keywords: Strategic term rewriting, program calculation, VDM, SQL. 1