Results 1  10
of
13
Nested datatypes
 In MPC’98, volume 1422 of LNCS
, 1998
"... Abstract. A nested datatype, also known as a nonregular datatype, is a parametrised datatype whose declaration involves different instances of the accompanying type parameters. Nested datatypes have been mostly ignored in functional programming until recently, but they are turning out to be both th ..."
Abstract

Cited by 79 (5 self)
 Add to MetaCart
Abstract. A nested datatype, also known as a nonregular datatype, is a parametrised datatype whose declaration involves different instances of the accompanying type parameters. Nested datatypes have been mostly ignored in functional programming until recently, but they are turning out to be both theoretically important and useful in practice. The aim of this paper is to suggest a functorial semantics for such datatypes, with an associated calculational theory that mirrors and extends the standard theory for regular datatypes. Though elegant and generic, the proposed approach appears more limited than one would like, and some of the limitations are discussed. 1
Generalised Folds for Nested Datatypes
 Formal Aspects of Computing
, 1999
"... Nested datatypes generalise regular datatypes in much the same way that contextfree languages generalise regular ones. Although the categorical semantics of nested types turns out to be similar to the regular case, the fold functions are more limited because they can only describe natural transform ..."
Abstract

Cited by 34 (1 self)
 Add to MetaCart
Nested datatypes generalise regular datatypes in much the same way that contextfree languages generalise regular ones. Although the categorical semantics of nested types turns out to be similar to the regular case, the fold functions are more limited because they can only describe natural transformations. Practical considerations therefore dictate the introduction of a generalised fold function in which this limitation can be overcome. In the paper we show how to construct generalised folds systematically for each nested datatype, and show that they possess a uniqueness property analogous to that of ordinary folds. As a consequence, generalised folds satisfy fusion properties similar to those developed for regular datatypes. Such properties form the core of an effective calculational theory of inductive datatypes.
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 15 (11 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
Structural Polymorphism
 Informal Proceedings Workshop on Generic Programming, WGP'98, Marstrand
, 1998
"... This paper describes structural polymorphism, a new form of type polymorphism appropriate to functional languages featuring userdefined algebraic data types (e.g., Standard ML, Haskell and Miranda 1 ). The approach extends the familiar notion of parametric polymorphism by allowing the definition of ..."
Abstract

Cited by 6 (0 self)
 Add to MetaCart
This paper describes structural polymorphism, a new form of type polymorphism appropriate to functional languages featuring userdefined algebraic data types (e.g., Standard ML, Haskell and Miranda 1 ). The approach extends the familiar notion of parametric polymorphism by allowing the definition of functions which are generic with respect to data structures as well as to individual types. For example, structural polymorphism accommodates generalizations of the usual length and map functions which may be applied not only to lists, but also to trees, binary trees or similar algebraic structures. Under traditional polymorphic type systems, these functions may be defined for arbitrary component types, but must be (laboriously) redefined for every distinct data structure. In this sense, our approach also extends the spirit of parametric polymorphism, in that it provides the programmer relief from the burden of unnecessary repetitive effort. The mechanism we will use to realize this form of polymorphism is inspired by a feature familiar to functional programmers, namely the pattern abstraction. Pattern abstractions generalize the usual lambda abstraction (x.e) in that they are comprised of multiple pattern/expression clauses, rather than just a single boundvariable/expression pair. By analogy with pattern abstractions, we generalize polymorphic type abstractions (Òå.e) to typepattern abstractions, which are comprised of multiple typepattern/expression pairs. The types given to typepattern abstractions are universally quantified, just as for traditional type abstractions, but the universal quantifiers are now justified by a recursive analysis of the forms of all possible type instantiations, rather than by parametric independence with respect to a type variable. (x:+.e) ...
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 5 (5 self)
 Add to MetaCart
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
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 5 (3 self)
 Add to MetaCart
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.
Beyond Fun: Order and Membership in Polytypic Imperative Programming
 Mathematics of Program Construction, volume 1422 of Springer LNCS
, 1997
"... . We argue that the category of transformers of monotonic predicates on posets is superior to the category of transformers on powersets, as the basis for a calculus of higher order imperative programming. We show by an example polytypic program derivation that such transformers (and the underlyi ..."
Abstract

Cited by 4 (3 self)
 Add to MetaCart
. We argue that the category of transformers of monotonic predicates on posets is superior to the category of transformers on powersets, as the basis for a calculus of higher order imperative programming. We show by an example polytypic program derivation that such transformers (and the underlying categories of ordercompatible relations and monotonic functions) model a calculus quite similar to the more familiar calculus of functional programs and relations. The derived program uses as a data type an exponent of transformers; unlike functionspace, this transformerspace is adequate for semantics of higher order imperative programs. 1 Introduction Programs are arrows of a category whose objects are data types  but what category? what objects? what arrows? The primordial, if fanciful, answer is Fun, the category of "all" sets and functions (often called Set). If we choose a few objects as primitives, say integers and booleans, we get a rich collection of types by applicat...
Pointfree factorization of operation refinement
 In FM’06, volume 4085 of LNCS
, 2006
"... Abstract. The standard operation refinement ordering is a kind of “meet of opposites”: nondeterminism reduction suggests “smaller ” behaviour while increase of definition suggests “larger ” behaviour. Groves ’ factorization of this ordering into two simpler relations, one per refinement concern, ma ..."
Abstract

Cited by 4 (4 self)
 Add to MetaCart
Abstract. The standard operation refinement ordering is a kind of “meet of opposites”: nondeterminism reduction suggests “smaller ” behaviour while increase of definition suggests “larger ” behaviour. Groves ’ factorization of this ordering into two simpler relations, one per refinement concern, makes it more mathematically tractable but is far from fully exploited in the literature. We present a pointfree theory for this factorization which is more agile and calculational than the standard settheoretic approach. In particular, we show that factorization leads to a simple proof of structural refinement for arbitrary parametric types and exploit factor instantiation across different subclasses of (relational) operation. The prospect of generalizing the factorization to coalgebraic refinement is discussed.
Monads, Shapely Functors and Traversals
, 1999
"... This paper demonstrates the potential for combining the polytypic and monadic programming styles, by introducing a new kind of combinator, called a traversal. The natural setting for dening traversals is the class of shapely data types. This result reinforces the view that shapely data types form a ..."
Abstract

Cited by 4 (0 self)
 Add to MetaCart
This paper demonstrates the potential for combining the polytypic and monadic programming styles, by introducing a new kind of combinator, called a traversal. The natural setting for dening traversals is the class of shapely data types. This result reinforces the view that shapely data types form a natural domain for polytypism: they include most of the data types of interest, while to exceed them would sacrice a very smooth interaction between polytypic and monadic programming. Keywords: functional/monadic/polytypic programming, shape theory. 1 Introduction Monadic programming has proved itself extremely useful as a means of encapsulating state and other computational eects in a functional programming setting (see e.g. [12,14]). Recently, interactions between monads and data structures have been studied as a further way for structuring programs. Initially focusing on lists, the studies have been extended to the class of regular datatypes (see e.g. [4,11,1]), with the aim to embo...
First steps in pointfree functional dependency theory. Manuscript in preparation, available from http://www.di.uminho.pt/˜jno
, 2005
"... Abstract. When software designers refer to the relational calculus, what they usually mean is the settheoretic kernel of relational database design “à la Codd” and not the calculus of binary relations which was initiated by De Morgan in the 1860s an eventually became the core of the algebra of prog ..."
Abstract

Cited by 3 (1 self)
 Add to MetaCart
Abstract. When software designers refer to the relational calculus, what they usually mean is the settheoretic kernel of relational database design “à la Codd” and not the calculus of binary relations which was initiated by De Morgan in the 1860s an eventually became the core of the algebra of programming. Contrary to the intuition that a binary relation is just a particular case of ary relation, this paper shows the effectiveness of the former in “explaining ” and reasoning about the latter. The theory of functional dependencies, which is central to such database design techniques, is addressed in a pointfree style instead of reasoning in the standard settheoretic model “à la Codd”. It turns out that the theory becomes more general and considerably simpler. Elegant expressions replace lengthy formulæ and easytofollow calculations replace pointwise proofs with lots of “¡¢¡£ ¡ ” notation, case analyses and natural language explanations for “obvious ” steps. 1