
Test-Adequacy Assessment Using Control Flow
loop. The remaining subscripted nodes indicate edges along which
the values of y are propagated. An explanation follows.
Variable y is defined at node 6 when subpath < 1, 2, 3, 6
1
> is
traversed. This value of y is used in the decision at node 3 when <
6
1
, 2, 3
1
, 4
1
> is traversed. Note that edge (3, 4) is now covered as
there is a def–clear path < 2, 3 > from node 6 to edge (3, 4).
Next, path < 6
2
, 2, 3
2
, 6
2
, 7 > is traversed where y is defined once
again at node 6. This definition of y propagates to edge (3,6) via the
def–clear path < 2, 3
2
, 6
2
>. The control now moves to node 7 and
the program execution terminates ...