Partial Evaluation in an Optimizing

  • Prolog Compiler
  • Published 2002


Specialization of program and meta-programs written in high-level languages has been an active area of research for some time. Specialization contributes to improvement in program performance. We begin with a hypothesis that partial evaluation provides a framework for several traditional back-end optimizations. The present work proposes a new compiler back-end optimization technique based on specialization of low-level RISC-Like machine code. Partial evaluation is used to specialize the low-level code. Berkeley Abstract Machine (BAM) code generated during compilation of Prolog is used as the candidate low-level language to test the hypothesis. A partial evaluator of BAM code was designed and implemented to demonstrate the proposed optimization technique and to study its design issues. The major contributions of the present work are as follows: It demonstrates a new low-level compiler back-end optimization technique. This technique provides a framework for several conventional optimizations apart fiom providing opportunity for machine-specific optimizations. It presents a study of various imes and solutions to several problems encountered during design and implementation of a tow-level language partial evaluator that is designed to be a back-end phase in a real-world Prolog compiler. We a h present an implementation-independent den* tational semantics of BAM code a low-led language. This provides a vehicle for showing the correctness of instruction transformations, We beIieve this work to provide the first concrete step towards usage of partial evaluation on low-ievei code as a compiler back-end optimization technique in realworld compiIefs-

Cite this paper

@inproceedings{Compiler2002PartialEI, title={Partial Evaluation in an Optimizing}, author={Prolog Compiler}, year={2002} }