PARTIAL EVALUATION

  

Copyright © Philip M. Parker, INSEAD. Terms of Use.

PARTIAL EVALUATION

Specialty Definition: PARTIAL EVALUATION

DomainDefinition

Computing

Partial evaluation (Or "specialisation") An optimisation technique where the compiler evaluates some subexpressions at compile-time. For example, pow x 0 = 1 pow x n = if even n then pxn2 * pxn2 else x * pow x (n-1) where pxn2 = pow x (n/2) f x = pow x 5 Since n is known we can specialise pow in its second argument and unfold the recursive calls: pow5 x = x * x4 where x4 = x2 * x2 x2 = x * x f x = pow5 x pow5 is known as the residual. We could now also unfold pow5 giving: f x = x * x4 where x4 = x2 * x2 x2 = x * x It is important that the partial evaluation algorithm should terminate. This is not guaranteed in the presence of recursive function definitions. For example, if partial evaluation were applied to the right hand side of the second clause for pow above, it would never terminate because the value of n is not known. Partial evaluation might change the termination properties of the program if, for example, the expression (x * 0) was reduced to 0 it would terminate even if x (and thus x * 0) did not. It may be necessary to reorder an expression to partially evaluate it, e.g. f x y = (x + y) + 1 g z = f 3 z If we rewrite f: f x y = (x + 1) + y then the expression x+1 becomes a constant for the function g and we can say g z = f 3 z = (3 + 1) + z = 4 + z Partial evaluation of built-in functions applied to constant arguments is known as constant folding. See also full laziness. (1999-05-25). Source: The Free On-line Dictionary of Computing.

Source: compiled by the editor from various references; see credits.

Top     

Specialty Definition: Partial evaluation

(From Wikipedia, the free Encyclopedia)

Partial Evaluation is a program optimization by spezialication technique.

A computer program is seen as a mapping prog: {Istatic, Idynamic} ==> O of input data into output data. Istatic is the part of the input data known at compile time.

The partial evaluator transforms {prog, Istatic} into prog* i.e. precomputes all static input at compile time. prog* is called the residual program.

prog: {Istatic, Idynamic}

> O becomes prog*: Idynamic

> O which in general runs more efficiently.

See also C++ Template metaprogramming

Source: adapted by the editor from Wikipedia, the free encyclopedia under a copyleft GNU Free Documentation License (GFDL) from the article "Partial evaluation."

Top     

Crosswords: PARTIAL EVALUATION

Specialty definitions using "PARTIAL EVALUATION": binding-time analysisconstant foldinghigher-order macrooptimising compilerRecursive Functional Algorithmic Language. (references)

Top     

Anagrams: PARTIAL EVALUATION

Scrabble® Enable2K-Verified Anagrams

Words within the letters "a-a-a-a-e-i-i-l-l-n-o-p-r-t-t-u-v"

-5 letters: alliteration, interpluvial, levitational, reputational, ultraviolent, vituperation.

Source: compiled by the editor from various references; see credits.

SCRABBLE® is a registered trademark. All intellectual property rights in and to the game are owned in the U.S.A and Canada by Hasbro Inc., and throughout the rest of the world by J.W. Spear & Sons Limited of Maidenhead, Berkshire, England, a subsidiary of Mattel Inc. Mattel and Spear are not affiliated with Hasbro.

Top     

Alternative Orthography: PARTIAL EVALUATION


Hexadecimal (or equivalents, 770AD-1900s) (references)

50 41 52 54 49 41 4C      45 56 41 4C 55 41 54 49 4F 4E

Leonardo da Vinci (1452-1519; backwards) (references)

    

Binary Code (1918-1938, probably earlier) (references)

01010000 01000001 01010010 01010100 01001001 01000001 01001100 00100000 01000101 01010110 01000001 01001100 01010101 01000001 01010100 01001001 01001111 01001110

HTML Code (1990) (references)

&#80 &#65 &#82 &#84 &#73 &#65 &#76 &#32 &#69 &#86 &#65 &#76 &#85 &#65 &#84 &#73 &#79 &#78

ISO 10646 (1991-1993) (references)

0050 0041 0052 0054 0049 0041 004C      0045 0056 0041 004C 0055 0041 0054 0049 004F 004E

Encryption (beginner's substitution cypher): (references)

50355254433546239563546553554434948

Top     



INDEX

1. Crosswords
2. Anagrams
3. Orthography
4. Bibliography


  

Copyright © Philip M. Parker, INSEAD. Terms of Use.