Using circular programs to deforest in accumulating parameters

  • Authors:
  • Janis Voigtländer

  • Affiliations:
  • Dresden University of Technology, Dresden, Germany

  • Venue:
  • ASIA-PEPM '02 Proceedings of the ASIAN symposium on Partial evaluation and semantics-based program manipulation
  • Year:
  • 2002

Quantified Score

Hi-index 0.00

Visualization

Abstract

Functional languages allow a modular programming style by function composition, which however can lead to inefficient runtime behavior due to production and consumption of intermediate results.We present a new mechanizable transformation technique for removing intermediate data structures in the composition of two functions from a class of recursive functions with accumulating parameters, for which classical deforestation techniques fail.In order to avoid multiple traversals of the input data structure, the composition algorithm produces circular programs that make essential use of lazy evaluation and local recursion.The resulting programs are simplified using a post-processing phase presented in the paper.