Results 1 
5 of
5
Tupling Calculation Eliminates Multiple Data Traversals
 In ACM SIGPLAN International Conference on Functional Programming
, 1997
"... Tupling is a wellknown transformation tactic to obtain new efficient recursive functions by grouping some recursive functions into a tuple. It may be applied to eliminate multiple traversals over the common data structure. The major difficulty in tupling transformation is to find what functions are ..."
Abstract

Cited by 33 (18 self)
 Add to MetaCart
Tupling is a wellknown transformation tactic to obtain new efficient recursive functions by grouping some recursive functions into a tuple. It may be applied to eliminate multiple traversals over the common data structure. The major difficulty in tupling transformation is to find what functions are to be tupled and how to transform the tupled function into an efficient one. Previous approaches to tupling transformation are essentially based on fold/unfold transformation. Though general, they suffer from the high cost of keeping track of function calls to avoid infinite unfolding, which prevents them from being used in a compiler. To remedy this situation, we propose a new method to expose recursive structures in recursive definitions and show how this structural information can be explored for calculating out efficient programs by means of tupling. Our new tupling calculation algorithm can eliminate most of multiple data traversals and is easy to be implemented. 1 Introduction Tupli...
A Transformation Method for DynamicSized Tabulation
, 1995
"... Tupling is a transformation tactic to obtain new functions, without redundant calls and/or multiple traversals of common inputs. It achieves this feat by allowing each set (tuple) of function calls to be computed recursively from its previous set. In previous works by Chin and Khoo [8, 9], a safe (t ..."
Abstract

Cited by 9 (3 self)
 Add to MetaCart
Tupling is a transformation tactic to obtain new functions, without redundant calls and/or multiple traversals of common inputs. It achieves this feat by allowing each set (tuple) of function calls to be computed recursively from its previous set. In previous works by Chin and Khoo [8, 9], a safe (terminating) fold/unfold transformation algorithm was developed for some classes of functions which are guaranteed to be successfully tupled. However, these classes of functions currently use staticsized tables for eliminating the redundant calls. As shown by Richard Bird in [3], there are also other classes of programs whose redundant calls could only be eliminated by using dynamicsized tabulation. This paper proposes a new solution to dynamicsized tabulation by an extension to the tupling tactic. Our extension uses lambda abstractions which can be viewed as either dynamicsized tables or applications of the higherorder generalisation technique to facilitate tupling. Significant speedups could be obtained after the transformed programs were vectorised, as confirmed by experiment.
The Many Disguises of Accumulation
, 1991
"... Several descriptions of basically one transformation technique, viz. accumulation, are compared. Their basis, viz. the associativity and the existence of a neutral element inherent in a monoid, is identified. Keywords transformational programming, factorial, fast reverse, accumulation, continuation ..."
Abstract

Cited by 7 (0 self)
 Add to MetaCart
Several descriptions of basically one transformation technique, viz. accumulation, are compared. Their basis, viz. the associativity and the existence of a neutral element inherent in a monoid, is identified. Keywords transformational programming, factorial, fast reverse, accumulation, continuations, lambda abstraction, generalisation, tail recursion, implementation of lists. This research has been sponsored by the Netherlands Organisation for Scientific Research (NWO), under grant NF 63/62518 (the STOP  Specification and Transformation Of Programs  project). 1 Introduction One of the first program transformations that appeared in the literature was the accumulation transformation. The transformation is now classic, although not everyone may know it under exactly this name. In this note, I try to relate several descriptions of this program transformation technique. In a purely algebraic view, it is the exploitation of the properties of a monoid. In literature, it can be fou...
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 wellknown 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 wellknown 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.
IOS Press There and Back Again
"... Abstract. We present a programming pattern where a recursive function defined over a data structure traverses another data structure at return time. The idea is that the recursive calls get us ‘there’ by traversing the first data structure and the returns get us ‘back again ’ while traversing the se ..."
Abstract
 Add to MetaCart
Abstract. We present a programming pattern where a recursive function defined over a data structure traverses another data structure at return time. The idea is that the recursive calls get us ‘there’ by traversing the first data structure and the returns get us ‘back again ’ while traversing the second data structure. We name this programming pattern of traversing a data structure at call time and another data structure at return time “There And Back Again ” (TABA). The TABA pattern directly applies to computing symbolic convolutions and to multiplying polynomials. It also blends well with other programming patterns such as dynamic programming and traversing a list at double speed. We illustrate TABA and dynamic programming with Catalan numbers. We illustrate TABA and traversing a list at double speed with palindromes and we obtain a novel solution to this traditional exercise. Finally, through a variety of tree traversals, we show how to apply TABA to other data structures than lists. A TABAbased function written in direct style makes full use of an ALGOLlike control stack and needs no heap allocation. Conversely, in a TABAbased function written in continuationpassing style and recursively defined over a data structure (traversed at call time), the continuation acts as an iterator over a second data structure (traversed at return time). In general, the TABA pattern saves one from accumulating intermediate data structures at call time.