Consider generalizing the problem of constant propagation


As defined in Exercise 20, prove or disprove that range analysis is a rapid data flow problem.

Exercise 20

Consider generalizing the problem of constant propagation to that of range analysis. For each variable, we wish to associate a minimum and maximum value, such that the actual value of the variable (at that site in the program) at runtime is guaranteed to fall between the two values. For example, consider

the following program.

After their assignment, variable has range 5 _ _ _5 and variable has range 3 _ _ _ 3. The effect of Step 14 gives the range 8 _ _ _ 8. The effect of Step 15 gives the range 2 _ _ _ 2. The assignment for therefore gets the range 2 _ _ _ 8.

(a) Sketch the data flow lattice for a single variable. Be specific about the values for or .

(b) Is this a forwards or backwards propagation problem?

(c) If the variable could have range r1 or r2, describe how to compute the meet of these two ranges.

Request for Solution File

Ask an Expert for Answer!!
Basic Statistics: Consider generalizing the problem of constant propagation
Reference No:- TGS01474344

Expected delivery within 24 Hours