Fast narrowing-driven partial evaluation for inductively sequential programs

  • Authors:
  • J. Guadalupe Ramos;Josep Silva;Germán Vidal

  • Affiliations:
  • I.T. La Piedad, La Piedad, Mich., México;Tech. University of Valencia, Valencia, Spain;Tech. University of Valencia, Valencia, Spain

  • Venue:
  • Proceedings of the tenth ACM SIGPLAN international conference on Functional programming
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

Abstract

Narrowing-driven partial evaluation is a powerful technique for the specialization of (first-order) functional and functional logic programs. However, although it gives good results on small programs, it does not scale up well to realistic problems (e.g., interpreter specialization). In this work, we introduce a faster partial evaluation scheme by ensuring the termination of the process offline. For this purpose, we first characterize a class of programs which are quasi-terminating, i.e., the computations performed with needed narrowing—the symbolic computation mechanism of narrowing-driven partial evaluation—only contain finitely many different terms (and, thus, partial evaluation terminates). Since this class is quite restrictive, we also introduce an annotation algorithm for a broader class of programs so that they behave like quasi-terminating programs w.r.t. an extension of needed narrowing. Preliminary experiments are encouraging and demonstrate the usefulness of our approach.