Book ChapterDOI
Relating Accumulative and Non-accumulative Functional Programs
Armin Kühnemann,Robert Glück,Kazuhiko Kakehi +2 more
- pp 154-168
Reads0
Chats0
TLDR
An (automatic) transformation algorithm is given for the problem to transform functional programs into programs, which use accumulating parameters instead and a class of functional programs, namely restricted 2- modular tree transducers, is identified, to which it can be applied.Abstract:
We study the problem to transform functional programs, which intensively use append functions (like inefficient list reversal), into programs, which use accumulating parameters instead (like efficient list reversal). We give an (automatic) transformation algorithm for our problem and identify a class of functional programs, namely restricted 2- modular tree transducers, to which it can be applied. Moreover, since we get macro tree transducers as transformation result and since we also give the inverse transformation algorithm, we have a new characterization for the class of functions induced by macro tree transducers.read more
Citations
More filters
Proceedings ArticleDOI
Concatenate, reverse and map vanish for free
TL;DR: A new transformation method is introduced to eliminate intermediate data structures occurring in functional programs due to repeated list concatenations and other data manipulations by means of rank-2 polymorphic combinators that exploit algebraic properties of these operations to provide an optimized implementation.
Journal ArticleDOI
Deaccumulation techniques for improving provability
TL;DR: Using concepts from the theory of tree transducers and extending on earlier work, automatic transformations from accumulative functional programs into non-accumulative ones are developed, which are much better suited for mechanized verification.
Book ChapterDOI
FliPpr: a prettier invertible printing system
Kazutaka Matsuda,Meng Wang +1 more
TL;DR: This paper proposes FliPpr, which is a program transformation system that uses program inversion to produce a CFG parser from a pretty-printer, and has the advantages of fine-grained control over pretty-printing, and easy reuse of existing efficient pretty- Printer and parser implementations.
Proceedings ArticleDOI
Polynomial-time inverse computation for accumulative functions with multiple data traversals
TL;DR: Inverse computation has many applications such as serialization/deserialization, providing support for undo, and test-case generation for software testing as mentioned in this paper, and it has been shown that it is easy to achieve terminating inverse computation for the class by context-wise memoization of the inverse computation results.
Journal ArticleDOI
A Short Cut to Optimal Sequences
TL;DR: A method of deriving efficient algorithms from naive enumerate-and-choose-style programs, based on shortcut fusion, which is a program transformation for eliminating intermediate data structures passed between functions, and a set of auxiliary transformations.
References
More filters
Journal ArticleDOI
Semantics of context-free languages
TL;DR: The implications of this process when some of the attributes of a string are “synthesized”, i.e., defined solely in terms of attributes of thedescendants of the corresponding nonterminal symbol, while other attributes are ‘inherited’, are examined.
Journal ArticleDOI
A Transformation System for Developing Recursive Programs
Rod M. Burstall,John Darlington +1 more
TL;DR: A system of rules for transforming programs, with the programs in the form of recursion equations, are described, with an initially very simple, lucid, and hopefully correct program transformed into a more efficient one by altering the recursion structure.
Journal ArticleDOI
Deforestation: transforming programs to eliminate trees
TL;DR: The algorithm applies to any term containing only functions with definitions in a given syntactic form, and is suitable for incorporation in an optimizing compiler.
Proceedings ArticleDOI
A short cut to deforestation
TL;DR: This work proposes an automatic technique for improving theiency of programs, by removing many of these intermediate lists, based on a single, simple, local transformation.
Journal ArticleDOI
The concept of a supercompiler
TL;DR: It is argued that the language Refal serves the needs of supercompilation best, and it is described and compared with the usual approach to program transformation as a stepwise application of a number of equivalence rules.