Author:
KATSUMATA SHIN-YA,NISHIMURA SUSUMU
Abstract
AbstractThis paper develops a new framework for fusion that is designed for eliminating the intermediate data structures involved in the composition of functions that have one accumulating parameter. The new fusion framework comprises two steps:algebraic fusionand its subsequentimprovementprocess. The key idea in our development is to regard functions with an accumulating parameter as functions that operate over the monoid ofdata contexts. Algebraic fusion composes each such function with a monoid homomorphism that is derived from the definition of the consumer function to obtain a higher-order function that computes over the monoid of endofunctions. The transformation result may be further refined by an improvement process, which replaces the operation over the monoid of endofunctions (i.e., function closures) with another monoid operation over a monoid structure other than function closures.Using our framework, one can formulate a particular solution to the fusion problem by devising appropriate monoids and monoid homomorphisms. This provides a unified exposition of a variety of fusion methods that have been developed so far in different formalisms. Furthermore, the cleaner formulation makes it possible to argue about some delicate issues on a firm mathematical basis. We demonstrate that algebraic fusion and improvement in the world of complete pointed partial orders (CPOs) and continuous functions can correctly fuse functions that operate on partial and infinite data structures. We also show that subtle differences in termination behaviours of transformed programmes caused by certain different fusion methods can be cleanly explained by corresponding improvement processes that have different underlying monoid structures.
Publisher
Cambridge University Press (CUP)
Reference31 articles.
1. Formal Efficiency Analysis for Tree Transducer Composition
2. Safe fusion of functional expressions II: Further improvements
3. Attribute coupled grammars;Ganzinger;Proceedings of the ACM SIGPLAN '84 Symposium on Compiler Construction.,1984
Cited by
4 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. A short cut to parallelization theorems;ACM SIGPLAN Notices;2013-11-12
2. A short cut to parallelization theorems;Proceedings of the 18th ACM SIGPLAN international conference on Functional programming;2013-09-25
3. A shortcut fusion approach to accumulations;Science of Computer Programming;2013-08
4. Manipulating accumulative functions by swapping call-time and return-time computations;Journal of Functional Programming;2012-05