Results 21  30
of
38
PolyLib  a library of polytypic functions
 In Workshop on Generic Programming (WGP'98), Marstrand
, 1998
"... This paper describes the polytypic functions in PolyLib, motivates their presence in the library, and gives a rationale for their design. Thus we hope to share our experience with other researchers in the field. We will assume the reader has some familiarity with the field of polytypic programming. ..."
Abstract

Cited by 4 (0 self)
 Add to MetaCart
This paper describes the polytypic functions in PolyLib, motivates their presence in the library, and gives a rationale for their design. Thus we hope to share our experience with other researchers in the field. We will assume the reader has some familiarity with the field of polytypic programming. Of course, a library is an important part of a programming language. Languages like Java, Delphi, Perl and Haskell are popular partly because of their useful and extensive libraries. For a polytypic programming language it is even more important to have a clear and welldesigned library: writing polytypic programs is difficult, and we do not expect many programmers to write polytypic programs. On the other hand, many programmers use polytypic programs such as parser generators, equality functions, etc. This is a first attempt to describe the library of PolyP; we expect that both the form and content of this description will change over time. One of the goals of this paper is to obtain feedback on the library design from other researchers working within the field. At the moment the library only contains the basic
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...
Short Cut Fusion of Recursive Programs with Computational Effects
 SYMPOSIUM ON TRENDS IN FUNCTIONAL PROGRAMMING 2008 (TFP'08)
, 2008
"... Fusion is the process of improving the efficiency of modularly constructed programs by transforming them into monolithic equivalents. This paper defines a generalization of the standardbuild combinator which expresses uniform production of functorial contexts containing data of inductive types. It a ..."
Abstract

Cited by 3 (1 self)
 Add to MetaCart
Fusion is the process of improving the efficiency of modularly constructed programs by transforming them into monolithic equivalents. This paper defines a generalization of the standardbuild combinator which expresses uniform production of functorial contexts containing data of inductive types. It also proves correct a fusion rule which generalizes thefold/build andfold/buildp rules from the literature, and eliminates intermediate data structures of inductive types without disturbing the contexts in which they are situated. An important special case arises when this context is monadic. When it is, a second rule for fusing combinations of producers and consumers via monad operations, rather than via composition, is also available. We give examples illustrating both rules, and consider their coalgebraic duals as well.
Deriving animations from recursive definitions
 In Draft Proceedings of the 14th International Workshop on the Implementation of Functional Languages (IFL’02
, 2002
"... Abstract. This paper describes a generic method to derive an animation from a recursive definition, with the objective of debugging and understanding this definition by expliciting its control structure. This method is based on a well known algorithm of factorizing a recursive function into the comp ..."
Abstract

Cited by 2 (1 self)
 Add to MetaCart
Abstract. This paper describes a generic method to derive an animation from a recursive definition, with the objective of debugging and understanding this definition by expliciting its control structure. This method is based on a well known algorithm of factorizing a recursive function into the composition of the producer and the consumer of its call tree. We developed a systematic method to transform both the resulting functions in order to draw the tree step by step. The theory of data types as fixed points of functors, generic recursion patterns, and monads, are fundamental to our work and are briefly presented. Using polytypic implementations of monadic recursion patterns and an application to manipulate and generate graph layouts we developed a prototype that, given a recursive function written in a subset of Haskell, returns a function whose execution yields the desired animation. 1
Jones.Scrap your boilerplate: a practical design pattern for generic programming.In Types
 In Languages Design And Implementation
, 2003
"... CWI is a founding member of ERCIM, the European Research Consortium for Informatics and Mathematics. CWI's research has a themeoriented structure and is grouped into four clusters. Listed below are the names of the clusters and in parentheses their acronyms. ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
CWI is a founding member of ERCIM, the European Research Consortium for Informatics and Mathematics. CWI's research has a themeoriented structure and is grouped into four clusters. Listed below are the names of the clusters and in parentheses their acronyms.
Strategy Application, Observability, and the Choice Combinator. Sandia
"... In many strategic systems, the choice combinator provides a powerful mechanism for controlling the application of rules and strategies to terms. The ability of the choice combinator to exercise control over rewriting is based on the premise that the success and failure of strategy application can be ..."
Abstract

Cited by 1 (1 self)
 Add to MetaCart
In many strategic systems, the choice combinator provides a powerful mechanism for controlling the application of rules and strategies to terms. The ability of the choice combinator to exercise control over rewriting is based on the premise that the success and failure of strategy application can be observed. In this paper we present a higherorder strategic framework with the ability to dynamically construct strategies containing the choice combinator. To this framework, a combinator called hide is introduced that prevents the successful application of a strategy from being observed by the choice combinator. We then explore the impact of this new combinator on a realworld problem involving a restricted implementation of the Java Virtual Machine.
Outofcore Functional Programming with Typebased Primitives
 In Proceedings of the 2nd International Workshop on Practical Aspects of Declarative Languages
, 2000
"... . We formulate and experiment with typebased primitives (such as fold and unfold operations) for outofcore processing of functional data structures. We follow the view that recursive data types are fixed points of polynomial type constructors. This view leads to a clear separation of the sema ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
. We formulate and experiment with typebased primitives (such as fold and unfold operations) for outofcore processing of functional data structures. We follow the view that recursive data types are fixed points of polynomial type constructors. This view leads to a clear separation of the semantics and the implementations of recursive data types. We provide monadic implementations of the typebased primitives so that the intermediate data structures used for the executions of the primitives can be placed in outofcore storage. The parametric module facility of Objective Caml is further used to package the outofcore implementations. The resulting outofcore user code retains the same program structure of the incore user code and can be as elegant. 1 Motivation In programming languages supporting automatic memory management, a program need not explicitly request storage for data during the execution. The runtime system allocates space for new data, and reclaims space ...
Functors, Types and Shapes
 Chalmers University of Technology
, 1998
"... r goals of generic programming. However, in pointing out minor differences, let us not forget the overwhelming unity of purpose that brings us together. FML supports a kind of functors F; G, as well as of types ø and type schema oe. The full type system is given by F; G ::= U j C j \Pi m i j F hG ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
r goals of generic programming. However, in pointing out minor differences, let us not forget the overwhelming unity of purpose that brings us together. FML supports a kind of functors F; G, as well as of types ø and type schema oe. The full type system is given by F; G ::= U j C j \Pi m i j F hGi n j ¯ m F ø ::= X j F (ø) j ø 1 ! ø 2 oe ::= ø j 8U : m:oe j 8X : T:oe : Each functor F has an arity m (written F : m), which indicates the number of type arguments it takes. The functors include variables U and constants<F29.8
Reductivity
, 1995
"... ing from these examples we propose the following definition: Definition 17 The relation R is said to be Fwellfounded if and only if, for all relations S , the equation 19 X:: X = S ffl F:X ffl R has a unique solution. 2 By design, R is wellfounded (in the conventional sense) if and only ..."
Abstract
 Add to MetaCart
ing from these examples we propose the following definition: Definition 17 The relation R is said to be Fwellfounded if and only if, for all relations S , the equation 19 X:: X = S ffl F:X ffl R has a unique solution. 2 By design, R is wellfounded (in the conventional sense) if and only if it is idwellfounded, where id is the identity relator. Moreover, the converse of any initial F algebra is Fwellfounded. A stronger statement can be made: Theorem 18 Suppose R is an F coalgebra that is a bijection between F:R? and R? . Then the following are all equivalent: (a) R is Fwellfounded, (b) R is F reductive, (c) R[ is an initial F algebra. 2 (The equivalence between (b) and (c) has already been observed.) One of the fundamental properties of reductivity is that it implies wellfoundedness. This is theorem 7 of [3]. The converse is not true. Let R be a nonempty, wellfounded relation (for example the relation succ[ on natural numbers) . Then it is easy to show th...
Towards Merging Recursion and Comonads
, 2000
"... Comonads are mathematical structures that account naturally for effects that derive from the context in which a program is executed. This paper reports ongoing work on the interaction between recursion and comonads. Two applications are shown that naturally lead to versions of a comonadic fold op ..."
Abstract
 Add to MetaCart
Comonads are mathematical structures that account naturally for effects that derive from the context in which a program is executed. This paper reports ongoing work on the interaction between recursion and comonads. Two applications are shown that naturally lead to versions of a comonadic fold operator on the product comonad. Both versions capture functions that require extra arguments for their computation and are related with the notion of strong datatype. 1 Introduction One of the main features of recursive operators derivable from datatype definitions is that they impose a structure upon programs which can be exploited for program transformation. Recursive operators structure functional programs according to the data structures they traverse or generate and come equipped with a battery of algebraic laws, also derivable from type definitions, which are used in program calculations [24, 11, 5, 15]. Some of these laws, the socalled fusion laws, are particularly interesting in p...