On Deforesting Parameters of Accumulating Maps

  • Authors:
  • Kazuhiko Kakehi;Robert Glück;Yoshihiko Futamura

  • Affiliations:
  • -;-;-

  • Venue:
  • LOPSTR '01 Selected papers from the 11th International Workshop on Logic Based Program Synthesis and Transformation
  • Year:
  • 2001

Quantified Score

Hi-index 0.00

Visualization

Abstract

Deforestation is a well-known program transformation technique which eliminates intermediate data structures that are passed between functions. One of its weaknesses is the inability to deforest programs using accumulating parameters.We show how intermediate lists built by a selected class of functional programs, namely 'accumulating maps', can be deforested using a single composition rule. For this we introduce a new function dmap, a symmetric extension of the familiar function map. While the associated composition rule cannot capture all deforestation problems, it can handle accumulator fusion of functions defined in terms of dmap in a surprisingly simple way. The rule for accumulator fusion presented here can also be viewed as a restricted composition scheme for attribute grammars, which in turn may help us to bridge the gap between the attribute and functional world.