Multiple Intermediate Structure Deforestation by Shortcut Fusion

Shortcut fusion is a well-known optimization technique for functional programs. Its aim is to transform multi-pass algorithms into single pass ones, achieving deforestation of the intermediate structures that multi-pass algorithms need to construct. Shortcut fusion has already been extended in several ways. It can be applied to monadic programs, maintaining the global effects, and also to obtain circular and higher-order programs. The techniques proposed so far, however, only consider programs defined as the composition of a single producer with a single consumer. In this paper, we analyse shortcut fusion laws to deal with programs consisting of an arbitrary number of function compositions.

[1]  Akihiko Takano,et al.  Shortcut deforestation in calculational form , 1995, FPCA '95.

[2]  Thomas Johnsson,et al.  Attribute grammars as a functional programming paradigm , 1987, FPCA.

[3]  Joyce L. Vedral,et al.  Functional Programming Languages and Computer Architecture , 1989, Lecture Notes in Computer Science.

[4]  João Paulo Fernandes,et al.  Shortcut fusion rules for the derivation of circular and higher-order programs , 2011, High. Order Symb. Comput..

[5]  Andrzej Skowron,et al.  The Power of the Lambda Abstraction Strategy for Program Derivation , 1989, J. Inf. Process. Cybern..

[6]  Alberto Pardo,et al.  Shortcut Fusion of Monadic Programs , 2008, J. Univers. Comput. Sci..

[7]  Simon L. Peyton Jones,et al.  A short cut to deforestation , 1993, FPCA '93.

[8]  Janis Voigtländer Semantics and Pragmatics of New Shortcut Fusion Rules , 2008, FLOPS.

[9]  João Saraiva,et al.  Strictification of circular programs , 2011, PEPM '11.

[10]  João Saraiva,et al.  Tools and libraries to model and manipulate circular programs , 2007, PEPM '07.

[11]  Masato Takeichi,et al.  A calculational fusion system HYLO , 1997, Algorithmic Languages and Calculi.

[12]  S. Doaitse Swierstra,et al.  First-class Attribute Grammars , 2000, Informatica.

[13]  Richard S. Bird,et al.  Algebra of programming , 1997, Prentice Hall International series in computer science.

[14]  Richard S. Bird Using circular programs to eliminate multiple traversals of data , 2004, Acta Informatica.

[15]  Philip Wadler,et al.  Theorems for free! , 1989, FPCA.

[16]  John Launchbury,et al.  Warm fusion: deriving build-catas from recursive definitions , 1995, FPCA '95.

[17]  Patricia Johann,et al.  Short Cut Fusion for Effects , 2008, Trends in Functional Programming.

[18]  Patricia Johann,et al.  Free theorems in the presence of seq , 2004, POPL.

[19]  João Paulo Sousa Ferreira Fernandes Design, implementation and calculation of circular programs , 2009 .

[20]  S. Doaitse Swierstra,et al.  Linear, bounded, functional pretty-printing , 2009, J. Funct. Program..