Induction Variable - Induction Variable Substitution

Induction Variable Substitution

Induction variable substitution is a compiler transformation to recognize variables which can be expressed as functions of the indices of enclosing loops and replace them with induction variables with the expressions involving loop indices.

This transformation makes the relationship between the variables and loop indices explicit, which helps other compiler analysis, such as dependence analysis.

Example.

Input code:

int c, i; c = 10; for (i=0; i<10; i++) { c = c + 5; // c is incremented by 5 for each loop iteration }

Output code

int c, i; c = 10; for (i=0; i<10; i++) { c = 10 + 5*i; // c is explicitly expressed as a function of loop index }

Read more about this topic:  Induction Variable

Famous quotes containing the words induction, variable and/or substitution:

    One might get the impression that I recommend a new methodology which replaces induction by counterinduction and uses a multiplicity of theories, metaphysical views, fairy tales, instead of the customary pair theory/observation. This impression would certainly be mistaken. My intention is not to replace one set of general rules by another such set: my intention is rather to convince the reader that all methodologies, even the most obvious ones, have their limits.
    Paul Feyerabend (1924–1994)

    There is not so variable a thing in nature as a lady’s head-dress.
    Joseph Addison (1672–1719)

    To play is nothing but the imitative substitution of a pleasurable, superfluous and voluntary action for a serious, necessary, imperative and difficult one. At the cradle of play as well as of artistic activity there stood leisure, tedium entailed by increased spiritual mobility, a horror vacui, the need of letting forms no longer imprisoned move freely, of filling empty time with sequences of notes, empty space with sequences of form.
    Max J. Friedländer (1867–1958)