A simple optimizer for FP-like languages

  • Authors:
  • N. Islam;T. J. Myers;P. Broome

  • Affiliations:
  • Department of Computer and Information Sciences, University of Delaware, Newark, Delaware;Department of Computer and Information Sciences, University of Delaware, Newark, Delaware;Department of Computer and Information Sciences, University of Delaware, Newark, Delaware

  • Venue:
  • FPCA '81 Proceedings of the 1981 conference on Functional programming languages and computer architecture
  • Year:
  • 1981

Quantified Score

Hi-index 0.00

Visualization

Abstract

Functional languages provide a framework in which combining existing programs to produce new ones is particularly simple and elegant. However, the penalty usually paid for such simplicity and elegance is poor execution efficiency, especially if the program under consideration is a combination of programs that are more general than required for the problem. We describe extensions and implementation techniques with which such combinations can be transformed into more specialized and generally faster programs. Our system is based on delaying explicit application for as long as possible by treating applications as compositions of suitable functions. The usual reduction rules then become a subset of the set of “optimization rules” which form the basis of our optimizer. These rules are similar to the identities of the algebra of programs given by Backus, but operate in a common framework in which composition plays a role similar to that of application in the reduction rules.