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 (19241994)
“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)
“Virtue is the adherence in action to the nature of things, and the nature of things makes it prevalent. It consists in a perpetual substitution of being for seeming, and with sublime propriety God is described as saying, I A.”
—Ralph Waldo Emerson (18031882)