Universität Paderborn - Home Universität Paderborn
Die Universität der Informationsgesellschaft

Compilation Methods SS 2013 - Assignment 3

Kastens, Pfahler, 17.05.2013

Exercise 1 (Data Flow Analysis: Reaching definitions)

Use the following table to specify the data flow equations for the reaching definitions problem applied to the above CFG:

Compute a solution iteratively; enter the results of iterations into the following table:

Exercise 2 (Live variables)

a)
Recall the problem specification (slide C2.23).
b)
Specify the set of equations by filling out the following table

c)
Compute a solution iteratively using the following form:

d)
Plausibility Check: Why are {a, b, d} live at OUT(B5)?

Exercise 3 (Constant Propagation)

Constant propagation tries to determine constant values for variables x at program positions p (see C2.24).

a)
Specify the DFA problem, cf. C2.20, by
  1. giving a problem description
  2. classifying whether forward or backward
  3. defining the meet operation
  4. specifying the analysis information
  5. defining how any block B transforms the analysis information by fB
b)
How does constant propagation differ from the other typical DFA problems on slide C2.24?
c)

This flow graph has been used for constant propagation DFA. The values Out(B) are shown. Reconstruct the values In(B) and the assignment statements missing in the basic blocks.

Exercise 4 (HOMEWORK/Lab: Program Analysis Web Service)

Use the Online Service PAG/WWW (please see "Compilation Methods" home page for the URL) to analyze the constant propagation example provided there.

Which differences do you recognize between the PAG constant propagation DFA and your problem specification in Exercise 3a)?

Generiert mit Camelot | Probleme mit Camelot? | Geändert am: 13.06.2017