Results 1 - 10
of
51
De Bruijn notation as a nested datatype
- Journal of Functional Programming
, 1999
"... “I have no data yet. It is a capital mistake to theorise before one has data.” ..."
Abstract
-
Cited by 62 (2 self)
- Add to MetaCart
“I have no data yet. It is a capital mistake to theorise before one has data.”
Playing by the rules: rewriting as a practical optimisation technique in GHC
"... We describe a facility for improving optimization of Haskell programs using rewrite rules. Library authors can use rules to express domain-specific optimizations that the compiler cannot discover for itself. The compiler can also generate rules internally to propagate information obtained from aut ..."
Abstract
-
Cited by 46 (6 self)
- Add to MetaCart
We describe a facility for improving optimization of Haskell programs using rewrite rules. Library authors can use rules to express domain-specific optimizations that the compiler cannot discover for itself. The compiler can also generate rules internally to propagate information obtained from automated analyses. The rewrite mechanism is fully implemented in the released Glasgow Haskell Compiler. Our system is very simple, but can be effective in optimizing real programs. We describe two practical applications involving short-cut deforestation, for lists and for rose trees, and document substantial performance improvements on a range of programs. 1 Introduction Optimising compilers perform program transformations that improve the efficiency of the program. However, a compiler can only use relatively shallow reasoning to guarantee the correctness of its optimisations. In contrast, the programmer has much deeper information about the program and its intended behaviour. For example, a programmer may know that
Designing and Implementing Combinator Languages
- Third Summer School on Advanced Functional Programming, volume 1608 of LNCS
, 1999
"... this paper we will assume the availablity of a set of parsing combinators, that enables us to coinstruct such a mapping almost without e#ort. ..."
Abstract
-
Cited by 31 (7 self)
- Add to MetaCart
this paper we will assume the availablity of a set of parsing combinators, that enables us to coinstruct such a mapping almost without e#ort.
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 domain-specific language Sawzall. To this end, we reverse-engineer the seminal papers on MapReduce a ..."
Abstract
-
Cited by 29 (1 self)
- Add to MetaCart
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 domain-specific language Sawzall. To this end, we reverse-engineer 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.
Manufacturing Datatypes
, 1999
"... This paper describes a general framework for designing purely functional datatypes that automatically satisfy given size or structural constraints. Using the framework we develop implementations of different matrix types (eg square matrices) and implementations of several tree types (eg Braun trees, ..."
Abstract
-
Cited by 22 (3 self)
- Add to MetaCart
This paper describes a general framework for designing purely functional datatypes that automatically satisfy given size or structural constraints. Using the framework we develop implementations of different matrix types (eg square matrices) and implementations of several tree types (eg Braun trees, 2-3 trees). Consider, for instance, representing square n \Theta n matrices. The usual representation using lists of lists fails to meet the structural constraints: there is no way to ensure that the outer list and the inner lists have the same length. The main idea of our approach is to solve in a first step a related, but simpler problem, namely to generate the multiset of all square numbers. In order to describe this multiset we employ recursion equations involving finite multisets, multiset union, addition and multiplication lifted to multisets. In a second step we mechanically derive datatype definitions from these recursion equations which enforce the `squareness' constraint. The tra...
Polytypic Programming With Ease
, 1999
"... A functional polytypic program is one that is parameterised by datatype. Since polytypic functions are defined by induction on types rather than by induction on values they typically operate on a higher level of abstraction than their monotypic counterparts. However, polytypic programming is not nec ..."
Abstract
-
Cited by 13 (5 self)
- Add to MetaCart
A functional polytypic program is one that is parameterised by datatype. Since polytypic functions are defined by induction on types rather than by induction on values they typically operate on a higher level of abstraction than their monotypic counterparts. However, polytypic programming is not necessarily more complicated than conventional programming. We show that a polytypic function is uniquely defined by its action on constant functors, projection functors, sums, and products. This information is sufficient to specialize a polytypic function to arbitrary polymorphic datatypes, including mutually recursive datatypes and nested datatypes. The key idea is to use infinite trees as index sets for polytypic functions and to interpret datatypes as algebraic trees. This approach appears both to be simpler, more general, and more efficient than previous ones which are based on the initial algebra semantics of datatypes. Polytypic functions enjoy polytypic properties. We show that well-kno...
One Step up the Abstraction Ladder: Combining Algebras - From Functional Pieces to a Whole
, 1999
"... ion Ladder: Combining Algebras - From Functional Pieces to a Whole Andrew U. Frank Department of Geoinformation Technical University Vienna Gusshausstr. 27-29, A-1040 Vienna, Austria frank@geoinfo,tuwien.ac.at Abstract. A fundamental scientific question today is how to construct complex syste ..."
Abstract
-
Cited by 13 (2 self)
- Add to MetaCart
ion Ladder: Combining Algebras - From Functional Pieces to a Whole Andrew U. Frank Department of Geoinformation Technical University Vienna Gusshausstr. 27-29, A-1040 Vienna, Austria frank@geoinfo,tuwien.ac.at Abstract. A fundamental scientific question today is how to construct complex systems from simple parts. Science today seems mostly to analyze limited pieces of the puzzle; the combination of these pieces to form a whole is left for later or others. The lack of efficient methods to deal with the combination problem is likely the main reason. How to combine individual results is a dominant question in cognitive science or geography, where phenomena are studied from individuals and at different scales, but the results cannot be brought together. This paper proposes to use parameterized algebras much the same way that we use functional abstraction (procedures in programming languages) to create abstract building blocks which can be combined later. Algebras group oper...
Principles of Inverse Computation and the Universal Resolving Algorithm
- IN THE ESSENCE OF COMPUTATION: COMPLEXITY, ANALYSIS, TRANSFORMATION
, 2002
"... We survey fundamental concept in inverse programming and present the Universal Resolving Algorithm (URA), an algorithm for inverse computation in a first-order, functional programming language. We discusst he principles behind the algorithm, including a three-step approach based on the notion of a p ..."
Abstract
-
Cited by 12 (2 self)
- Add to MetaCart
We survey fundamental concept in inverse programming and present the Universal Resolving Algorithm (URA), an algorithm for inverse computation in a first-order, functional programming language. We discusst he principles behind the algorithm, including a three-step approach based on the notion of a perfect process tree, and demonstrate our implementation with several examples. We explaint he idea of a semantics modifier for inverse computation which allows us to perform inverse computation in other programming languages via interpreters.
Fusion of Recursive Programs with Computational Effects
- Theor. Comp. Sci
, 2000
"... Fusion laws permit to eliminate various of the intermediate data structures that are created in function compositions. The fusion laws associated with the traditional recursive operators on datatypes cannot in general be used to transform recursive programs with effects. Motivated by this fact, t ..."
Abstract
-
Cited by 10 (2 self)
- Add to MetaCart
Fusion laws permit to eliminate various of the intermediate data structures that are created in function compositions. The fusion laws associated with the traditional recursive operators on datatypes cannot in general be used to transform recursive programs with effects. Motivated by this fact, this paper addresses the definition of two recursive operators on datatypes that capture functional programs with effects. Effects are assumed to be modeled by monads. The main goal is thus the derivation of fusion laws for the new operators. One of the new operators is called monadic unfold. It captures programs (with effects) that generate a data structure in a standard way. The other operator is called monadic hylomorphism, and corresponds to programs formed by the composition of a monadic unfold followed by a function defined by structural induction on the data structure that the monadic unfold generates. 1 Introduction A common approach to program design in functional programmin...

