## An Extension Of The Acid Rain Theorem (1996)

Venue: | In T Ida, A Ohori, and M Takeichi, eds, Proceedings 2nd Fuji Int Workshop on Functional and Logic Programming, Shonan Village |

Citations: | 4 - 2 self |

### BibTeX

@INPROCEEDINGS{Hu96anextension,

author = {Zhenjiang Hu and Hideya Iwasaki and Masato Takeichi},

title = {An Extension Of The Acid Rain Theorem},

booktitle = {In T Ida, A Ohori, and M Takeichi, eds, Proceedings 2nd Fuji Int Workshop on Functional and Logic Programming, Shonan Village},

year = {1996},

pages = {1--4},

publisher = {World Scienti}

}

### OpenURL

### Abstract

Program fusion (or deforestation) is a well-known transformation whereby compositions of several pieces of code are fused into a single one, resulting in an efficient functional program without intermediate data structures. Recent work has made it clear that fusion transformation is especially successful if recursions are expressed in terms of hylomorphisms . The point of this success is that fusion transformation proceeds merely based on a simple but effective rule called Acid Rain Theorem [10]. However, there remains a problem. The Acid Rain Theorem can only handle hylomorphisms inducting over a single data structure. For hylomorphisms, like zip, which induct over multiple data structures, it will leave some of the data structures remained which should be removed. In this paper, we extend the Acid Rain Theorem so that it can deal with such hylomorphisms, enabling more intermediate data structures to be eliminated. 1. Introduction Functional programming constructs a complex program ...

### Citations

425 | Deforestation: Transforming programs to eliminate trees - Wadler - 1988 |

339 | Theorems for free
- Wadler
- 1989
(Show Context)
Citation Context ...nd data destructor for type B. We define a polymorphic function 1 for merging two structures into one: 1 : 8X;Y: (F 1 X 2 F 2 Y ) ! F (X 2 Y ) where F 1 ; F 2 and F are functors. One natural property =-=[12]-=- with this polymorphic function is that for any f and g we have 1 ffi (F 1 f 2 F 2 g) = F (f 2 g) ffi 1 : Associated with 1, we define a lifted operator b (fs1 g) (x; y) = (f x) 1 (g y): It soon follo... |

310 | Functional programming with bananas, lenses, envelopes and barbed wire
- Meijer, Fokkinga, et al.
- 1991
(Show Context)
Citation Context ...d works and make concluding remarks in Section 5 and Section 6, respectively. 2. Preliminary Before addressing how to generalize the Acid Rain Theorem, we review previous works on program calculation =-=[8, 3, 10]-=-. Rather than being involved in a precise discussion in terms of category theory, we shall impose emphasis on the results which will be used later and the notational conventions to which we hope that ... |

201 | A short cut to deforestation
- Gill, Launchbury, et al.
- 1993
(Show Context)
Citation Context ... a well-known transformation whereby compositions of several pieces of code are fused into a single one, resulting in an efficient functional program without intermediate data structures. Recent work =-=[4, 9, 7, 10]-=- has made it clear that fusion transformation is especially successful if recursions are expressed in terms of hylomorphisms . The point of this success is that fusion transformation can be done merel... |

115 | A fold for all seasons
- Sheard, Fegaras
- 1993
(Show Context)
Citation Context ... a well-known transformation whereby compositions of several pieces of code are fused into a single one, resulting in an efficient functional program without intermediate data structures. Recent work =-=[4, 9, 7, 10]-=- has made it clear that fusion transformation is especially successful if recursions are expressed in terms of hylomorphisms . The point of this success is that fusion transformation can be done merel... |

99 |
and Order in Algorithmics
- Law
- 1992
(Show Context)
Citation Context ...d works and make concluding remarks in Section 5 and Section 6, respectively. 2. Preliminary Before addressing how to generalize the Acid Rain Theorem, we review previous works on program calculation =-=[8, 3, 10]-=-. Rather than being involved in a precise discussion in terms of category theory, we shall impose emphasis on the results which will be used later and the notational conventions to which we hope that ... |

93 | Shortcut deforestation in calculational form
- Takano, Meijer
- 1995
(Show Context)
Citation Context ...uccessful if recursions are expressed in terms of hylomorphisms . The point of this success is that fusion transformation proceeds merely based on a simple but effective rule called Acid Rain Theorem =-=[10]-=-. However, there remains a problem. The Acid Rain Theorem can only handle hylomorphisms inducting over a single data structure. For hylomorphisms, like zip, which induct over multiple data structures,... |

75 | Warm fusion: Deriving build-cata’s from recursive definitions
- Launchbury, Sheard
- 1995
(Show Context)
Citation Context ...lication proceeds as a simple substitution. To this end, the consumption and the production of data structures are standardized in a specific way. However the Acid Rain Theorem has its limitation. In =-=[4, 7]-=-, it was pointed out that one of the most serious problems with the Acid Rain Theorem is that it cannot be effectively applied to recursions inducting over multiple data structures such as zip and tak... |

61 |
Safe fusion of functional expressions
- CHIN
- 1992
(Show Context)
Citation Context ...the list [1; 4; 1 1 1 ; n 2 ] to sum. Unfortunately, all these intermediate lists need to be produced, traversed, and discarded, degrading execution time dreadfully. Program fusion (or deforestation) =-=[11, 1]-=- is a well-known transformation whereby compositions of several pieces of code are fused into a single one, resulting in an efficient functional program without intermediate data structures. Recent wo... |

49 | Deriving structural hylomorphisms from recursive definitions
- Hu, Iwasaki, et al.
- 1996
(Show Context)
Citation Context ...amples are given showing the promise of our work. ffl Compared with the previous work on the manipulation of recursions over multiple data structures as discussed in [2] and more generally studied in =-=[5, 6]-=-, our newly proposed approach is more practical in that the fusion transformation can be done by a simple substitution without need for deriving a new function satisfying a certain equation (i.e., fus... |

26 | Improving programs which recurse over multiple inductive structures
- Fegaras, Sheard, et al.
- 1994
(Show Context)
Citation Context ...ures in a shortcut way. Several examples are given showing the promise of our work. ffl Compared with the previous work on the manipulation of recursions over multiple data structures as discussed in =-=[2]-=- and more generally studied in [5, 6], our newly proposed approach is more practical in that the fusion transformation can be done by a simple substitution without need for deriving a new function sat... |

2 | Making recursions manipulable by constructing medio-types
- Hu, Iwasaki, et al.
- 1995
(Show Context)
Citation Context ...amples are given showing the promise of our work. ffl Compared with the previous work on the manipulation of recursions over multiple data structures as discussed in [2] and more generally studied in =-=[5, 6]-=-, our newly proposed approach is more practical in that the fusion transformation can be done by a simple substitution without need for deriving a new function satisfying a certain equation (i.e., fus... |