
Test-Adequacy Assessment Using Control Flow
Example 6.29: First we compute the definitions and uses for each
block in Figure 6.4 and associate them with the corresponding nodes
and edges of the CFG. The def and use sets for the five blocks in this
program are given below. Note that the infeasible block 4 does not
affect the computation of these sets.
Node (or Block) def c-use p-use
1{x, y, z}{} {x, y}
2{z}{x}{y}
3{z}{z}{}
4{z}{x}{}
5{}{z}{}
Using the def and use sets derived above, and the flow graph in
Figure 6.4, we draw the data-flow graph of Program P6.4 in Figure
6.6. Comparing the data-flow graph with the CFG in Figure 6.4, we
note that nodes are represented ...