Poly-controlled partial evaluation

  • Authors:
  • Germán Puebla;Claudio Ochoa

  • Affiliations:
  • Technical University of Madrid, Boadilla del Monte, Spain;Technical University of Madrid, Boadilla del Monte, Spain

  • Venue:
  • Proceedings of the 8th ACM SIGPLAN international conference on Principles and practice of declarative programming
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

Existing algorithms for on-line partial evaluation of logic programs, given an initial program and a description of run-time queries, deterministically produce a specialized program. In this work we propose a novel framework for partial evaluation of logic programs which is poly-controlled in that it can take into account repertoires of global control and local control rules instead of a single, predetermined combination. This approach is more flexible than existing ones since it allows assigning different global and local control rules to different call patterns, thus obtaining results that cannot be obtained using traditional partial evaluation. This modification transforms partial evaluation from a greedy algorithm into a search-based algorithm and, as a result, sets of candidate specialized programs can be achieved, instead of a single one. In order to make the algorithm fully automatic, it requires the use of self-tuning techniques which allow automatically measuring the quality of the different candidate specialized programs. Our approach is resource aware in that it uses fitness functions which consider multiple factors such as run-time and code size for the specialized programs. The framework has been implemented in the CiaoPP system, and tested on some benchmarks. The preliminary experimental results we present show that our proposal obtains better specializations than those achieved using traditional partial evaluation