Results 1  10
of
21
Shortcut Fusion for Accumulating Parameters Ziplike Functions
, 2002
"... We present an alternative approach to shortcut fusion based on the function unfoldr. Despite its simplicity the technique can remove intermediate lists in examples which are known to be difficult. We show that it can remove all lists from definitions involving ziplike functions and functions using ..."
Abstract

Cited by 42 (0 self)
 Add to MetaCart
We present an alternative approach to shortcut fusion based on the function unfoldr. Despite its simplicity the technique can remove intermediate lists in examples which are known to be difficult. We show that it can remove all lists from definitions involving ziplike functions and functions using accumulating parameters.
Using Circular Programs to Deforest in Accumulating Parameters
, 2002
"... Functional languages allow a modular programming style by function composition, which however can lead to inefficient runtime behavior due to production and consumption of intermediate results. We present a new mechanizable transformation technique for removing intermediate data structures in the co ..."
Abstract

Cited by 15 (4 self)
 Add to MetaCart
Functional languages allow a modular programming style by function composition, which however can lead to inefficient runtime behavior due to production and consumption of intermediate results. We present a new mechanizable transformation technique for removing intermediate data structures in the composition of two functions from a class of recursive functions with accumulating parameters, for which classical deforestation techniques fail. In order to avoid multiple traversals of the input data structure, the composition algorithm produces circular programs that make essential use of lazy evaluation and local recursion. The resulting programs are simplified using a postprocessing phase presented in the paper.
Conditions for Efficiency Improvement by Tree Transducer Composition
 13th International Conference on Rewriting Techniques and Applications
, 2002
"... We study the question of efficiency improvement or deterioration for a semanticpreserving program transformation technique based on macro tree transducer composition. By annotating functional programs to reflect the internal property “computation time ” explicitly in the computed output, and by man ..."
Abstract

Cited by 7 (4 self)
 Add to MetaCart
We study the question of efficiency improvement or deterioration for a semanticpreserving program transformation technique based on macro tree transducer composition. By annotating functional programs to reflect the internal property “computation time ” explicitly in the computed output, and by manipulating such annotations, we formally prove syntactic conditions under which the composed program is guaranteed to be more efficient than the original program, with respect to callbyneed reduction to normal form. The developed criteria can be checked automatically, and thus are suitable for integration into an optimizing functional compiler.
Formal Efficiency Analysis for Tree Transducer Composition
, 2004
"... We study the question of efficiency improvement or deterioration for a semanticspreserving program transformation technique for (lazy) functional languages, based on composition of restricted macro tree transducers. By annotating programs to reflect the intensional property ``computation time' ..."
Abstract

Cited by 7 (1 self)
 Add to MetaCart
We study the question of efficiency improvement or deterioration for a semanticspreserving program transformation technique for (lazy) functional languages, based on composition of restricted macro tree transducers. By annotating programs to reflect the intensional property ``computation time'' explicitly in the computed output and by manipulating such annotations, we formally prove syntactic conditions under which the composed program is guaranteed to be not less efficient than the original program with respect to the number of callbyname reduction steps required to reach normal form. Under additional conditions the guarantee also holds for callbyneed semantics. The criteria developed can be checked automatically and efficiently, and thus are suitable for integration into an optimizing compiler.
Tree Transducer Composition as Deforestation Method for Functional Programs
, 2001
"... We demonstrate that composition techniques for tree transducers are suitable to eliminate intermediate results in functional programs. We consider two composition techniques, which view special functional programs as (restricted) macro tree transducers: The first uses composition techniques for macr ..."
Abstract

Cited by 6 (2 self)
 Add to MetaCart
We demonstrate that composition techniques for tree transducers are suitable to eliminate intermediate results in functional programs. We consider two composition techniques, which view special functional programs as (restricted) macro tree transducers: The first uses composition techniques for macro tree transducers directly. The second is indirect in that it (i) translates macro tree transducers into attributed tree transducers, (ii) uses a composition technique for attributed tree transducers, and (iii) translates the composition result back into a macro tree transducer. We informally compare these techniques with the deforestation technique of Wadler. In particular we show that the composition techniques eliminate intermediate results for certain kinds of function definitions, for which classical deforestation fails.
Syntactic Composition of TopDown Tree Transducers is Short Cut Fusion
, 2001
"... We compare two deforestation techniques: short cut fusion formalized in category theory and the syntactic composition of tree transducers. The former strongly depends on types and uses the parametricity property or free theorem whereas the latter makes no use of types at all and allows more general ..."
Abstract

Cited by 5 (1 self)
 Add to MetaCart
We compare two deforestation techniques: short cut fusion formalized in category theory and the syntactic composition of tree transducers. The former strongly depends on types and uses the parametricity property or free theorem whereas the latter makes no use of types at all and allows more general compositions. We introduce the notion of a categorical transducer which is a generalization of a catamorphism and show a respective fusion result which is a generalization of the `acid rain theorem'. We prove the following main theorems: (i) The class of all categorical transducers builds a category where composition is fusion. (ii) The semantics of categorical transducers is a functor. (iii) The subclass of topdown categorical transducers is a subcategory. (iv) Syntactic composition of topdown tree transducers is equivalent to the fusion of topdown categorical transducers.
Deaccumulation — Improving Provability
 Asian Computing Science Conference
, 2003
"... Several induction theorem provers were developed to verify functional programs mechanically. Unfortunately, automated verification usually fails for functions with accumulating arguments. In particular, this holds for tailrecursive functions that correspond to imperative programs, but also for prog ..."
Abstract

Cited by 3 (1 self)
 Add to MetaCart
Several induction theorem provers were developed to verify functional programs mechanically. Unfortunately, automated verification usually fails for functions with accumulating arguments. In particular, this holds for tailrecursive functions that correspond to imperative programs, but also for programs with nested recursion. Based on results from the theory of tree transducers, we develop an automatic transformation technique. It transforms accumulative functional programs into nonaccumulative ones, which are much better suited for automated verification by induction theorem provers. Hence, in contrast to classical program transformations aiming at improving the e#ciency, the goal of our deaccumulation technique is to improve the provability.
Deforesting in Accumulating Parameters via TypeDirected Transformations
 In: Asian Workshop on Programming Languages and Systems
, 2002
"... Classical deforestation methods fail to compose functions with accumulating parameters, which are function arguments to which intermediate result accumulates. This paper proposes a new deforestation method which solves this problem. The method is comprised of a few transformation steps, each of whic ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
Classical deforestation methods fail to compose functions with accumulating parameters, which are function arguments to which intermediate result accumulates. This paper proposes a new deforestation method which solves this problem. The method is comprised of a few transformation steps, each of which is guided by type information. Though our solution draws its fundamental idea from a deforestation method that has been developed for attribute grammars, it is not merely a recast of an existing technique to another formalism. The new method provides a typebased account for the existing attribute grammar deforestation process. Further, it can deforest a class of functions that the attribute grammar deforestation cannot. These advantages are demonstrated by a few examples. It is also shown that the new method is as powerful as another method that has been developed for macro tree transducer composition.
Deaccumulation Techniques for Improving Provability ∗
"... Several induction theorem provers were developed to verify functional programs mechanically. Unfortunately, automatic verification often fails for functions with accumulating arguments. Using concepts from the theory of tree transducers and extending on earlier work, the paper develops automatic tra ..."
Abstract

Cited by 2 (2 self)
 Add to MetaCart
Several induction theorem provers were developed to verify functional programs mechanically. Unfortunately, automatic verification often fails for functions with accumulating arguments. Using concepts from the theory of tree transducers and extending on earlier work, the paper develops automatic transformations from accumulative functional programs into nonaccumulative ones, which are much better suited for mechanized verification. The overall goal is to reduce the need for generalizing induction hypotheses in (semi)automatic provers. Via the correspondence between imperative programs and tailrecursive functions, the presented approach can also help to reduce the need for inventing loop invariants in the verification of imperative programs. 1
PolynomialTime Inverse Computation for Accumulative Functions with Multiple Data Traversals
"... Inverse computation has many applications such as serialization/deserialization, providing support for undo, and testcase generation for software testing. In this paper, we propose an inverse computation method that always terminates for a class of functions known as parameterlinear macro tree tra ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
Inverse computation has many applications such as serialization/deserialization, providing support for undo, and testcase generation for software testing. In this paper, we propose an inverse computation method that always terminates for a class of functions known as parameterlinear macro tree transducers, which involve multiple data traversals and the use of accumulations. The key to our method is the observation that a function in the class can be regarded as a nonaccumulative contextgenerating transformation without multiple data traversals. Accordingly, we demonstrate that it is easy to achieve terminating inverse computation for the class by contextwise memoization of the inverse computation results. We also show that when we use a tree automaton to express the inverse computation results, the inverse computation runs in time polynomial to the size of the original output and the textual program size.