Results 1  10
of
334
PolyP  a polytypic programming language extension
 POPL '97: The 24th ACM SIGPLANSIGACT Symposium on Principles of Programming Languages
, 1997
"... Many functions have to be written over and over again for different datatypes, either because datatypes change during the development of programs, or because functions with similar functionality are needed on different datatypes. Examples of such functions are pretty printers, debuggers, equality fu ..."
Abstract

Cited by 187 (32 self)
 Add to MetaCart
(Show Context)
Many functions have to be written over and over again for different datatypes, either because datatypes change during the development of programs, or because functions with similar functionality are needed on different datatypes. Examples of such functions are pretty printers, debuggers, equality functions, unifiers, pattern matchers, rewriting functions, etc. Such functions are called polytypic functions. A polytypic function is a function that is defined by induction on the structure of userdefined datatypes. This paper extends a functional language (a subset of Haskell) with a construct for writing polytypic functions. The extended language type checks definitions of polytypic functions, and infers the types of all other expressions using an extension of Jones ' theories of qualified types and higherorder polymorphism. The semantics of the programs in the extended language is obtained by adding type arguments to functions in a dictionary passing style. Programs in the extended language are translated to Haskell. 1
Alias Types for Recursive Data Structures
, 2000
"... Linear type systems permit programmers to deallocate or explicitly recycle memory, but they are severly restricted by the fact that they admit no aliasing. This paper describes a pseudolinear type system that allows a degree of aliasing and memory reuse as well as the ability to define complex recu ..."
Abstract

Cited by 146 (13 self)
 Add to MetaCart
(Show Context)
Linear type systems permit programmers to deallocate or explicitly recycle memory, but they are severly restricted by the fact that they admit no aliasing. This paper describes a pseudolinear type system that allows a degree of aliasing and memory reuse as well as the ability to define complex recursive data structures. Our type system can encode conventional linear data structures such as linear lists and trees as well as more sophisticated data structures including cyclic and doublylinked lists and trees. In the latter cases, our type system is expressive enough to represent pointer aliasing and yet safely permit destructive operations such as object deallocation. We demonstrate the flexibility of our type system by encoding two common compiler optimizations: destinationpassing style and DeutschSchorrWaite or "linkreversal" traversal algorithms.
A Fold for All Seasons
 IN PROC. CONFERENCE ON FUNCTIONAL PROGRAMMING LANGUAGES AND COMPUTER ARCHITECTURE
, 1993
"... Generic control operators, such as fold, can be generated from algebraic type definitions. The class of types to which these techniques are applicable is generalized to all algebraic types definable in languages such as Miranda and ML, i.e. mutually recursive sumsofproducts with tuples and functio ..."
Abstract

Cited by 117 (15 self)
 Add to MetaCart
Generic control operators, such as fold, can be generated from algebraic type definitions. The class of types to which these techniques are applicable is generalized to all algebraic types definable in languages such as Miranda and ML, i.e. mutually recursive sumsofproducts with tuples and function types. Several other useful generic operators, also applicable to every type in this class, also are described. A normalization algorithm which automatically calculates improvements to programs expressed in a language based upon folds is described. It reduces programs, expressed using fold as the exclusive control operator, to a canonical form. Based upon a generic promotion theorem, the algorithm is facilitated by the explicit structure of fold programs rather than using an analysis phase to search for implicit structure. Canonical programs are minimal in the sense that they contain the fewest number of fold operations. Because of this property, the normalization algorithm has important ...
Shortcut Deforestation in Calculational Form
 In Proc. Conference on Functional Programming Languages and Computer Architecture
, 1995
"... In functional programming, intermediate data structures are often used to "glue" together small programs. Deforestation is a program transformation to remove these intermediate data structures automatically. We present a simple algorithm for deforestation based on two fusion rules for hylo ..."
Abstract

Cited by 106 (3 self)
 Add to MetaCart
(Show Context)
In functional programming, intermediate data structures are often used to "glue" together small programs. Deforestation is a program transformation to remove these intermediate data structures automatically. We present a simple algorithm for deforestation based on two fusion rules for hylomorphism, an expressive recursion pattern. A generic notation for hylomorphisms is introduced, where natural transformations are explicitly factored out, and it is used to represent programs. Our method successfully eliminates intermediate data structures of any algebraic type from a much larger class of compositional functional programs than previous techniques. 1 Introduction In functional programming, programs are often constructed by "gluing" together small components, using intermediate data structures to convey information between them. Such data are constructed in one component and later consumed in another component, but never appear in the result of the whole program. The compositional styl...
Bananas in Space: Extending Fold and Unfold to Exponential Types
, 1995
"... Fold and unfold are general purpose functionals for processing and constructing lists. By using the categorical approach of modelling recursive datatypes as fixed points of functors, these functionals and their algebraic properties were generalised from lists to polynomial (sumofproduct) datatypes ..."
Abstract

Cited by 98 (6 self)
 Add to MetaCart
(Show Context)
Fold and unfold are general purpose functionals for processing and constructing lists. By using the categorical approach of modelling recursive datatypes as fixed points of functors, these functionals and their algebraic properties were generalised from lists to polynomial (sumofproduct) datatypes. However, the restriction to polynomial datatypes is a serious limitation: it precludes the use of exponentials (functionspaces) , whereas it is central to functional programming that functions are firstclass values, and so exponentials should be able to be used freely in datatype definitions. In this paper we explain how Freyd's work on modelling recursive datatypes as fixed points of difunctors shows how to generalise fold and unfold from polynomial datatypes to those involving exponentials. Knowledge of category theory is not required; we use Gofer throughout as our metalanguage, making extensive use of constructor classes. 1 Introduction During the 1980s, Bird and Meertens [6, 22] d...
Polytypic programming
, 2000
"... ... PolyP extends a functional language (a subset of Haskell) with a construct for defining polytypic functions by induction on the structure of userdefined datatypes. Programs in the extended language are translated to Haskell. PolyLib contains powerful structured recursion operators like catamorp ..."
Abstract

Cited by 95 (11 self)
 Add to MetaCart
(Show Context)
... PolyP extends a functional language (a subset of Haskell) with a construct for defining polytypic functions by induction on the structure of userdefined datatypes. Programs in the extended language are translated to Haskell. PolyLib contains powerful structured recursion operators like catamorphisms, maps and traversals, as well as polytypic versions of a number of standard functions from functional programming: sum, length, zip, (==), (6), etc. Both the specification of the library and a PolyP implementation are presented.
Functional Programming with Overloading and HigherOrder Polymorphism
, 1995
"... The Hindley/Milner type system has been widely adopted as a basis for statically typed functional languages. One of the main reasons for this is that it provides an elegant compromise between flexibility, allowing a single value to be used in different ways, and practicality, freeing the progr ..."
Abstract

Cited by 82 (4 self)
 Add to MetaCart
The Hindley/Milner type system has been widely adopted as a basis for statically typed functional languages. One of the main reasons for this is that it provides an elegant compromise between flexibility, allowing a single value to be used in different ways, and practicality, freeing the programmer from the need to supply explicit type information. Focusing on practical applications rather than implementation or theoretical details, these notes examine a range of extensions that provide more flexible type systems while retaining many of the properties that have made the original Hindley/Milner system so popular. The topics discussed, some old, but most quite recent, include higherorder polymorphism and type and constructor class overloading. Particular emphasis is placed on the use of these features to promote modularity and reusability.
Google’s MapReduce Programming Model — Revisited
"... Google’s MapReduce programming model serves for processing large data sets in a massively parallel manner. We deliver the first rigorous description of the model including its advancement as Google’s domainspecific language Sawzall. To this end, we reverseengineer the seminal papers on MapReduce a ..."
Abstract

Cited by 76 (1 self)
 Add to MetaCart
(Show Context)
Google’s MapReduce programming model serves for processing large data sets in a massively parallel manner. We deliver the first rigorous description of the model including its advancement as Google’s domainspecific language Sawzall. To this end, we reverseengineer the seminal papers on MapReduce and Sawzall, and we capture our findings as an executable specification. We also identify and resolve some obscurities in the informal presentation given in the seminal papers. We use typed functional programming (specifically Haskell) as a tool for design recovery and executable specification. Our development comprises three components: (i) the basic program skeleton that underlies MapReduce computations; (ii) the opportunities for parallelism in executing MapReduce computations; (iii) the fundamental characteristics of Sawzall’s aggregators as an advancement of the MapReduce approach. Our development does not formalize the more implementational aspects of an actual, distributed execution of MapReduce computations.
TypeIndexed Data Types
 SCIENCE OF COMPUTER PROGRAMMING
, 2004
"... A polytypic function is a function that can be instantiated on many data types to obtain data type specific functionality. Examples of polytypic functions are the functions that can be derived in Haskell, such as show , read , and ` '. More advanced examples are functions for digital searching, ..."
Abstract

Cited by 61 (23 self)
 Add to MetaCart
A polytypic function is a function that can be instantiated on many data types to obtain data type specific functionality. Examples of polytypic functions are the functions that can be derived in Haskell, such as show , read , and ` '. More advanced examples are functions for digital searching, pattern matching, unification, rewriting, and structure editing. For each of these problems, we not only have to define polytypic functionality, but also a typeindexed data type: a data type that is constructed in a generic way from an argument data type. For example, in the case of digital searching we have to define a search tree type by induction on the structure of the type of search keys. This paper shows how to define typeindexed data types, discusses several examples of typeindexed data types, and shows how to specialize typeindexed data types. The approach has been implemented in Generic Haskell, a generic programming extension of the functional language Haskell.