Results 11  20
of
90
Polytypic Data Conversion Programs
 Science of Computer Programming
, 2001
"... Several generic programs for converting values from regular datatypes to some other format, together with their corresponding inverses, are constructed. Among the formats considered are shape plus contents, compact bit streams and pretty printed strings. The different data conversion programs are co ..."
Abstract

Cited by 25 (9 self)
 Add to MetaCart
Several generic programs for converting values from regular datatypes to some other format, together with their corresponding inverses, are constructed. Among the formats considered are shape plus contents, compact bit streams and pretty printed strings. The different data conversion programs are constructed using John Hughes' arrow combinators along with a proof that printing (from a regular datatype to another format) followed by parsing (from that format back to the regular datatype) is the identity. The printers and parsers are described in PolyP, a polytypic extension of the functional language Haskell.
Polytypic compact printing and parsing
 In Doaitse Swierstra, editor, ESOP’99, volume 1576 of LNCS
, 1999
"... Abstract. A generic compact printer and a corresponding parser are constructed. These programs transform values of any regular datatype to and from a bit stream. The algorithms are constructed along with a proof that printing followed by parsing is the identity. Since the binary representation is ve ..."
Abstract

Cited by 23 (8 self)
 Add to MetaCart
(Show Context)
Abstract. A generic compact printer and a corresponding parser are constructed. These programs transform values of any regular datatype to and from a bit stream. The algorithms are constructed along with a proof that printing followed by parsing is the identity. Since the binary representation is very compact, the printer can be used for compressing data possibly supplemented with some standard algorithm for compressing bit streams. The compact printer and the parser are described in the polytypic Haskell extension PolyP. 1
Towards a calculus of statebased software components
 Journal of Universal Computer Science
, 2003
"... Abstract: This paper introduces a calculus of statebased software components modelled as concrete coalgebras for some Set endofunctors, with specified initial conditions. The calculus is parametrized by a notion of behaviour, introduced as a strong (usually commutative) monad. The proposed componen ..."
Abstract

Cited by 21 (9 self)
 Add to MetaCart
Abstract: This paper introduces a calculus of statebased software components modelled as concrete coalgebras for some Set endofunctors, with specified initial conditions. The calculus is parametrized by a notion of behaviour, introduced as a strong (usually commutative) monad. The proposed component model and calculus are illustrated through the characterisation of a particular class of components, classified as separable, which includes the ones arising in the socalled model oriented approach to systems’ design.
A framework for polytypic programming on terms, with an application to rewriting
 Workshop on Generic Programming
, 2000
"... Given any value of a datatype (an algebra of terms), and rules to rewrite values of that datatype, we want a function that rewrites the value to normal form if the value is normalizable. This paper develops a polytypic rewriting function that uses the parallel innermost rewriting strategy. It improv ..."
Abstract

Cited by 17 (10 self)
 Add to MetaCart
Given any value of a datatype (an algebra of terms), and rules to rewrite values of that datatype, we want a function that rewrites the value to normal form if the value is normalizable. This paper develops a polytypic rewriting function that uses the parallel innermost rewriting strategy. It improves upon our earlier work on polytypic rewriting in two fundamental ways. Firstly, the rewriting function uses a term interface that hides the polytypic part from the rest of the program. The term interface is a framework for polytypic programming on terms. This implies that the rewriting function is independent of the particular implementation of polytypism. We give several functions and laws on terms, which simplify calculating with programs. Secondly, the rewriting function is developed together with a correctness proof. We just present the result of the correctness proof, the proof itself is published elsewhere.
The Generic Approximation Lemma
 Information Processing Letters
, 2001
"... The approximation lemma is a simplification of the wellknown take lemma, and is used to prove properties of programs that produce lists of values. We show how the approximation lemma, unlike the take lemma, can naturally be generalised from lists to a large class of datatypes, and present a gen ..."
Abstract

Cited by 17 (3 self)
 Add to MetaCart
(Show Context)
The approximation lemma is a simplification of the wellknown take lemma, and is used to prove properties of programs that produce lists of values. We show how the approximation lemma, unlike the take lemma, can naturally be generalised from lists to a large class of datatypes, and present a generic approximation lemma that is parametric in the datatype to which it applies. As a useful byproduct, we find that generalising the approximation lemma in this way also simplifies its proof. Keywords: Programming calculi; Functional Programming 1 Introduction The standard proof method for programs that consume lists of values is structural induction. However, this method is not applicable to the dual case of programs that produce lists of values, because in general such programs do not have a list argument over which to perform induction. Proof methods that are applicable to such programs have recently been surveyed in [6], and include fixpoint induction [4], the take lemma [3], coin...
Design Patterns as HigherOrder DatatypeGeneric Programs
, 2006
"... Design patterns are reusable abstractions in objectoriented software. However, using current mainstream programming languages, these elements can only be expressed extralinguistically: as prose, pictures, and prototypes. We believe that this is not inherent in the patterns themselves, but evidence ..."
Abstract

Cited by 16 (7 self)
 Add to MetaCart
Design patterns are reusable abstractions in objectoriented software. However, using current mainstream programming languages, these elements can only be expressed extralinguistically: as prose, pictures, and prototypes. We believe that this is not inherent in the patterns themselves, but evidence of a lack of expressivity in the languages of today. We expect that, in the languages of the future, the code parts of design patterns will be expressible as reusable library components. Indeed, we claim that the languages of tomorrow will suffice; the future is not far away. All that is needed, in addition to commonlyavailable features, are higherorder and datatypegeneric constructs; these features are already or nearly available now. We argue the case by presenting higherorder datatypegeneric programs capturing ORIGAMI, a small suite of patterns for recursive data structures.
Scripting XML with Generic Haskell
 Utrecht University
, 2003
"... A generic program is written once and works on values of many data types. Generic Haskell is a recent extension of the functional programming language Haskell that supports generic programming. This paper discusses how Generic Haskell can be used to implement XML tools whose behaviour depends on ..."
Abstract

Cited by 15 (9 self)
 Add to MetaCart
(Show Context)
A generic program is written once and works on values of many data types. Generic Haskell is a recent extension of the functional programming language Haskell that supports generic programming. This paper discusses how Generic Haskell can be used to implement XML tools whose behaviour depends on the DTD or Schema of the input XML document. Example tools include XML editors, databases, and compressors. Generic Haskell is ideally suited for implementing XML tools: .
Fusion of recursive programs with computational effects
 Theoretical Computer Science
"... ..."
(Show Context)
Memo Functions, Polytypically!
 Proceedings of the 2nd Workshop on Generic Programming, Ponte de
, 2000
"... . This paper presents a polytypic implementation of memo functions that are based on digital search trees. A memo function can be seen as the composition of a tabulation function that creates a memo table and a lookup function that queries the table. We show that tabulation can be derived from ..."
Abstract

Cited by 14 (4 self)
 Add to MetaCart
(Show Context)
. This paper presents a polytypic implementation of memo functions that are based on digital search trees. A memo function can be seen as the composition of a tabulation function that creates a memo table and a lookup function that queries the table. We show that tabulation can be derived from lookup by inverse function construction. The type of memo tables is dened by induction on the structure of argument types and is parametric with respect to the result type of memo functions. A memo table for a xed argument type is then a functor and lookup and tabulation are natural isomorphisms. We provide simple polytypic proofs of these properties. 1 Introduction A memo function [11] is like an ordinary function except that it caches previously computed values. If it is applied a second time to a particular argument, it immediately returns the cached result, rather than recomputing it. For storing arguments and results a memo function internally employs an index structure, the ...