Deriving structural hylomorphisms from recursive definitions

@inproceedings{Hu1996DerivingSH,
  title={Deriving structural hylomorphisms from recursive definitions},
  author={Zhenjiang Hu and H. Iwasaki and M. Takeichi},
  booktitle={ICFP '96},
  year={1996}
}
In functional programming, small programs are often glued together to construct a complex program. Program fusion is an optimizing process whereby these small programs are fused into a single one and intermediate data structures are removed. Recent work has made it clear that this process is especially successful if the recursive definitions are expressed in terms of hylomorphisms. In this paper, we propose an algorithm which can automatically turn all practical recursive definitions into… Expand
The Expression Lemma
TLDR
A coalgebraic model of OO programming with functional objects is assumed and the development may be helpful in deriving refactorings that turn sufficiently disciplined functional programs into OO programs of a designated shape and vice versa. Expand
Catamorphism-based program transformations for non-strict functional languages
TLDR
The warm fusion method is implemented in the Glasgow Haskell Compiler, which has allowed practical feedback, and the problem of removing mutually recursive sets of polynomial datatypes is analysed in detail. Expand
Warm Fusion for the Masses: Detailing Virtual Data Structure Elimination in Fully Recursive Language
TLDR
This paper treats warm fusion in the context of a fully polymorphic higher-order language, and so resolve an important outstanding issue raised in [LS95], and demonstrates that it can be automated to eliminate from programs intermediate data structures other than lists. Expand
How to Deforest in Accumulative Parameters
TLDR
This paper presents the symbolic composition, it outline its counterpart in terms of classical deforestation methods and a way to embed it in a functional framework is sketched. Expand
Recursion Patterns as Hylomorphisms
TLDR
This paper defines the accumulation recursion pattern introduced by Pardo using a hylomorphism, and uses this definition to derive the strictness conditions that characterize this operator in the presence of partiality. Expand
Program transformation in calculational form
TLDR
The program transformation in calculational form (or program calculation) can help to attain a modular compiler by implementing a compiler using many passes, each of which is a transformation for a particular optimization. Expand
Declarative Program Transformation: A Deforestation Case-Study
TLDR
The aim of deforestation transformations is to automatically transform a modular-specified program into an efficient-implementable one that gets rid of intermediate data structure constructions that occur when two functions are composed. Expand
Short Cut Fusion: Proved and Improved
TLDR
This paper uses Pitts' recent demonstration that contextual equivalence in such languages is relationally parametric to prove that programs in them which have undergone short cut fusion are contextually equivalent to their unfused counterparts. Expand
Type-inference based deforestation of functional programs
TLDR
A new method for deforestation is presented, which combines a known method, short cut deforestation, with a new analysis that is based on type inference, and a detailed proof of completeness and semantic correctness of the transformation is given. Expand
Stream fusion : practical shortcut fusion for coinductive sequence types
TLDR
This thesis makes a semi-formal argument that, subject to certain syntactic conditions on fusible functions, stream fusion on lists is strictly an improvement, as measured by the number of allocations of data constructors. Expand
...
1
2
3
4
5
...

References

SHOWING 1-10 OF 29 REFERENCES
Deriving structural hylomorphisms from recursive definitions
In functional programming, small programs are often glued together to construct a complex program. Program fusion is an optimizing process whereby these small programs are fused into a single one a...
Shortcut deforestation in calculational form
TLDR
This work presents a simple algorithm for deforestation based on two fusion rules for hylomorphismj an expressive recursion pattern, and a generic notation for hyLomorphisms is introduced, where natural transformations are explicitly factored out, and it is used to represent programs. Expand
Warm fusion: deriving build-catas from recursive definitions
TLDR
This paper shows how to transform recursive programs into this form automatically, thus enabling the fusion transformation to reapplied more easily than before, and challenges compiler writers to decide how many passes their compiler should perform. Expand
Safe fusion of functional expressions
TLDR
The deforestation technique is generalised to make it applicable to all first-order and higher-order functional programs, made possible by the adoption of a model for safe fusion which views each function as a producer and its parameters as consumers. Expand
Improving Programs Which Recurse over Multiple Inductive Structures
TLDR
A uniform mechanism for generic recursion schemes for programs which recurse over multiple inductive structures such as equality zip and the nth element of a list function is shown. Expand
Functional Programming with Bananas, Lenses, Envelopes and Barbed Wire
TLDR
A calculus for lazy functional programming based on recursion operators associated with data type definitions is developed and it is shown that all example functions in Bird and Wadler's Introduction to Functional Programming can be expressed using these operators. Expand
Making Recursions Manipulable by Constructing Medio-types
A catamorphism, generic version of our familiar foldr on lists, is quite a simple recursive scheme associated with data type de nitions. It plays a very important role in program calculation, sinceExpand
Data Structures and Program Transformation
  • G. Malcolm
  • Computer Science
  • Sci. Comput. Program.
  • 1990
TLDR
The construction of structure-preserving maps, “homomorphisms”, is described for an arbitrary data type, and a “promotion” theorem is derived for proving equalities of homomorphisms, which allows for concise, calculational proofs. Expand
A short cut to deforestation
TLDR
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. Expand
Deforestation: Transforming Programs to Eliminate Trees
  • P. Wadler
  • Computer Science
  • Theor. Comput. Sci.
  • 1990
TLDR
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. Expand
...
1
2
3
...