Partial evaluation

  • Authors:
  • Olivier Danvy;John Hatcliff

  • Affiliations:
  • -;-

  • Venue:
  • Encyclopedia of Computer Science
  • Year:
  • 2003

Quantified Score

Hi-index 0.00

Visualization

Abstract

Partial evaluation is an automated program transformation technique for specializing programs. Given a source program P〈x,y〉 with the input parameters x and y, and a value s for x, a partial evaluator PE specializes P with respect to s, yielding the residual program Ps〈Y〉. To this end, PE precomputes all the parts of P that depend only upon the value of x, thus "partially evaluating" P, i.e., evaluating (executing) only the parts of P that do not depend on the value of y. The specialization process ensures the compatibility between source and residual programs: for any data item d in y's domain, running Ps, on the remaining input 〈d〉 computes the same output as running P on the complete input 〈s, d〉.