Complete the program dependence graphs for the program shown above and
a) Complete the
1. Add edges for data dependences in all graphs.
2. Combine the individual SDGs. In particular, you need to add call edges from the call sites to
the invoked method entry node, parameter-in edges from the actual parameters to the formal
parameter nodes, and parameter-out edges from the return value ($ret) to the node where the
result is used or from the fields of objects that constitute a side-effect.
3. Add Summary Edges that summarize the effect of parameters on the result. Any summary edge
symbolizes a parameter that has a directed path from its parameter edge to the return value of
the respective function invocation.
b) Determine the 2-phase (context-sensitive) slice of the second call to println(o.get()). Which nodes
are marked in the first phase, which in the second?
Step by step
Solved in 8 steps with 7 images