Results 1 - 10
of
14
A Short Cut to Deforestation
, 1993
"... Lists are often used as "glue" to connect separate parts of a program together. We propose an automatic technique for improving the efficiency of such programs, by removing many of these intermediate lists, based on a single, simple, local transformation. We have implemented the method in the Glasgo ..."
Abstract
-
Cited by 173 (11 self)
- Add to MetaCart
Lists are often used as "glue" to connect separate parts of a program together. We propose an automatic technique for improving the efficiency of such programs, by removing many of these intermediate lists, based on a single, simple, local transformation. We have implemented the method in the Glasgow Haskell compiler.
Improvement in a Lazy Context: An Operational Theory for Call-By-Need
- Proc. POPL'99, ACM
, 1999
"... Machine The semantics presented in this section is essentially Sestoft's \mark 1" abstract machine for laziness [Sestoft 1997]. In that paper, he proves his abstract machine 6 A. K. Moran and D. Sands h fx = Mg; x; S i ! h ; M; #x : S i (Lookup) h ; V; #x : S i ! h fx = V g; V; S i (Update) h ; ..."
Abstract
-
Cited by 31 (7 self)
- Add to MetaCart
Machine The semantics presented in this section is essentially Sestoft's \mark 1" abstract machine for laziness [Sestoft 1997]. In that paper, he proves his abstract machine 6 A. K. Moran and D. Sands h fx = Mg; x; S i ! h ; M; #x : S i (Lookup) h ; V; #x : S i ! h fx = V g; V; S i (Update) h ; M x; S i ! h ; M; x : S i (Unwind) h ; x:M; y : S i ! h ; M [ y = x ]; S i (Subst) h ; case M of alts ; S i ! h ; M; alts : S i (Case) h ; c j ~y; fc i ~x i N i g : S i ! h ; N j [ ~y = ~x j ]; S i (Branch) h ; let f~x = ~ Mg in N; S i ! h f~x = ~ Mg; N; S i ~x dom(;S) (Letrec) Fig. 1. The abstract machine semantics for call-by-need. semantics sound and complete with respect to Launchbury's natural semantics, and we will not repeat those proofs here. Transitions are over congurations consisting of a heap, containing bindings, the expression currently being evaluated, and a stack. The heap is a partial function from variables to terms, and denoted in an identical manner to a coll...
Concatenate, Reverse and Map Vanish For Free
, 2002
"... We introduce a new transformation method to eliminate intermediate data structures occurring in functional programs due to repeated list concatenations and other data manipulations (additionally exemplified with list reversal and mapping of functions over lists). The general idea is to uniformly abs ..."
Abstract
-
Cited by 23 (9 self)
- Add to MetaCart
We introduce a new transformation method to eliminate intermediate data structures occurring in functional programs due to repeated list concatenations and other data manipulations (additionally exemplified with list reversal and mapping of functions over lists). The general idea is to uniformly abstract from data constructors and manipulating operations by means of rank-2 polymorphic combinators that exploit algebraic properties of these operations to provide an optimized implementation. The correctness of transformations is proved by using the free theorems derivable from parametric polymorphic types.
Deforestation for Higher-Order Functional Programs
, 1995
"... Functional programming languages are an ideal medium for program optimisations based on source-to-source transformation techniques. Referential transparency affords opportunities for a wide range of correctness-preserving transformations leading to potent optimisation strategies. This thesis builds ..."
Abstract
-
Cited by 17 (0 self)
- Add to MetaCart
Functional programming languages are an ideal medium for program optimisations based on source-to-source transformation techniques. Referential transparency affords opportunities for a wide range of correctness-preserving transformations leading to potent optimisation strategies. This thesis builds on deforestation, a program transformation technique due to Wadler that removes intermediate data structures from first-order functional programs. Our contribution is to reformulate deforestation for higher-order functional programming languages, and to show that the resulting algorithm terminates given certain syntactic and typing constraints on the input. These constraints are entirely reasonable, indeed it is possible to translate any typed program into the required syntactic form. We show how this translation can be performed automatically and optimally. The higher-order deforestation algorithm is transparent. That is, it is possible to determine by examination of the source program w...
On Deforesting Parameters of Accumulating Maps
- In Logic Based Program Synthesis and Transformation, 11th International Workshop, LOPSTR 2001, volume 2372 of LNCS
, 2002
"... Deforestation is a well-known program transformation technique which eliminates intermediate data structures that are passed between functions. One of its weaknesses is the inability to deforest programs using accumulating parameters. ..."
Abstract
-
Cited by 5 (0 self)
- Add to MetaCart
Deforestation is a well-known program transformation technique which eliminates intermediate data structures that are passed between functions. One of its weaknesses is the inability to deforest programs using accumulating parameters.
Solid Modelling in Haskell
- In Workshops in Computing: Functional Programming
, 1990
"... We investigate the suitability of the functional model of programming as applied to the solid modelling field of 3D rendering, with particular reference to expressiveness and efficiency. We find that functional languages with a good implementation can be more efficient than other languages in certai ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
We investigate the suitability of the functional model of programming as applied to the solid modelling field of 3D rendering, with particular reference to expressiveness and efficiency. We find that functional languages with a good implementation can be more efficient than other languages in certain aspects in the rendering process. Furthermore, recent developments in functional languages allow difficult concepts to be expressed simply within programs, and allow easier expression of the models we wish to render. 1 Introduction A currently popular area of computing research is functional languages. These are inspired by mathematical notation, and the work of the mathematicians Haskell B. Curry and Alonzo Church. These languages claim to be mathematically pure, which helps program manipulation and proofs. At the same time, a graphics technique known generally as Constructive Solid Geometry is gaining favour, especially now it has been enlivened with new raytracing and texture-mapping m...
Improving Functional Logic Programs by Difference-Lists
, 2000
"... . Modern multi-paradigm declarative languages integrate features from functional, logic, and concurrent programming. In this work, we consider the adaptation of the logic programming transformation based on the introduction of difference-lists to an integrated setting. Unfortunately, the use of ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
. Modern multi-paradigm declarative languages integrate features from functional, logic, and concurrent programming. In this work, we consider the adaptation of the logic programming transformation based on the introduction of difference-lists to an integrated setting. Unfortunately, the use of difference-lists is impractical due to the absence of non-strict equality in lazy (call-by-name) languages. Despite all, we have developed a novel, stepwise transformation which achieves a similar effect over functional logic programs. We also show a simple and practical approach to incorporate the optimization into a real compiler. Finally, we have conducted a number of experiments which show the practicality of our proposal. Keywords: functional logic programming, program transformation, compiler optimization 1 Introduction In recent years, several proposals have been made to amalgamate functional and logic programming languages. These languages combine features from functional pr...
A List-Processing Optimizer for Curry
, 2000
"... This report describes a prototype implementation of the list-processing optimizations described in [1]. Our system implements source-to-source transformations for improving eciency in listprocessing Curry programs. Curry is a universal programming language aiming at the amalgamation of the most impo ..."
Abstract
-
Cited by 1 (1 self)
- Add to MetaCart
This report describes a prototype implementation of the list-processing optimizations described in [1]. Our system implements source-to-source transformations for improving eciency in listprocessing Curry programs. Curry is a universal programming language aiming at the amalgamation of the most important declarative programming paradigms, namely functional programming and logic programming. The language Curry combines in a seamless way features from functional programming (nested expressions, lazy evaluation, higher-order functions), logic programming (logical variables, partial date structures, built-in search), and concurrent programming (concurrent evaluation of constraints with synchronization on logical variables) {see [10] for a detailed description{
Draft Proceedings of the Workshop on Declarative Programming in the Context of Object-Oriented Languages (DP-COOL’03)
, 2003
"... Syntax sugar for FC++: lambda, infix, monads, and more.............. 15 ..."
A Difference-List Transformation for Functional Logic Languages
, 2000
"... Modern multi-paradigm declarative languages integrate features from functional, logic, and concurrent programming. In this work, we consider the adaptation of the logic programming transformation based on the introduction of difference-lists to an integrated setting. Unfortunately, the use of differ ..."
Abstract
- Add to MetaCart
Modern multi-paradigm declarative languages integrate features from functional, logic, and concurrent programming. In this work, we consider the adaptation of the logic programming transformation based on the introduction of difference-lists to an integrated setting. Unfortunately, the use of difference-lists is impractical due to the absence of non-strict equality in lazy (call-by-name) languages. Despite all, we have developed a novel, stepwise transformation which achieves a similar effect over functional logic programs. We also show a simple and practical approach to incorporate the optimization into a real compiler. Finally, we have conducted a number of experiments which show the practicality of our proposal.

