@MISC{On_partialevaluation, author = {For Articles On}, title = {Partial Evaluation}, year = {} }
Share
OpenURL
Abstract
95> is repeatedly used with the x parameter set to s. Since its value is fixed, x is called a static parameter, while y, which may vary, is called a dynamic parameter. A simple example: Consider the following C function that squares the sum of its two arguments. int squaresum (int x, int y) -- return (x*x + 2*x*y + y*y); Specializing this function with x set to 3 yields the following residual function: int squaresum3u (int y) -- return (9 + 6*y + y*y); This specialized function is obtained by retaining the unknown parameter y, propagating the constant 3 in the body of square sum, and by evaluating the expressions x*x and 2*x that do not depend on y. Partial evaluators employ techniques found in optimizing compilers such as constant propagation