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:

    They relieve and recommend each other, and the sanity of society is a balance of a thousand insanities. She punishes abstractionists, and will only forgive an induction which is rare and casual.
    Ralph Waldo Emerson (1803–1882)

    Walked forth to ease my pain
    Along the shore of silver streaming Thames,
    Whose rutty bank, the which his river hems,
    Was painted all with variable flowers,
    Edmund Spenser (1552?–1599)

    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)