
EXERCISES
q
1
q
3
q
2
q
4
q
5
tr
6
: a/0
tr
2
: a/0
tr
3
: a/0
tr
10
: a/1
tr
4
: b/1
tr
8
: b/1
tr
1
: b/1
tr
7
: b/1 tr
9
: b/1
tr
5
: a/1
Z:=b.x
b.x:=Z
a.y:=Z
Z:=a.y
Fig. 3.33 FSM of Figure 3.13 augmented with definition and use of local variable
Z
.
Z in M. (b) Derive tests, that is input sequences, which will
traverse all data-flow paths derived in (a). (c) Consider a test set T
derived for M using the W-method. Does exercising M against all
elements of T exercise all data-flow paths derived in (a)? (Note:
Chapter 6 provides details of data-flow-based assessment of test
adequacy and enhancement of tests.)
3.28 Let T be a set of test inputs that forms an n-switch set cover for a
minimal n-distinguisha ...