Software Quality

Assignment #2

1: (10 points) Give an example where it would not be possible to achieve 100% All-Edges and All-Nodes coverage during unit testing.

2: (10 points) The situation in problem 1 above rarely occurs. Explain why it may not be possible to achieve 100% data flow coverage for many of the data flow criteria. Give an example that illustrates your explanation.

3: (15 points) Explain why it is not possible to analytically evaluate the fault detection capabilities of the different coverage test data selection criteria for an arbitrary program. Explain how the subsumption relationship among the coverage criteria is related to fault detection.

4: (10 points) Coverage criteria are often used for unit testing. Give 2 reasons why they may not be effective for integration testing.

5: (15 points) Give an example where (syntactic) control dependence over-approximates semantic dependence. Give an example where (syntactic) data dependence over-approximates semantic dependence.

6: (10 points) What does it mean when we say an analysis technique is conservative? Give an example using dependence analysis.

8: (15 points) For the code fragment below, assume that the first statement should be 2*B + C instead of 2*B - C. Using the Relay model, list the different transfer routes that need to be considered. For each transfer route, show the constraints that must be solved and then give test data that would cause the fault to be revealed, if such test data exist.

1: input A,B,C 
2: A:=2*B - C 
3: D:=A*B 
4: B:=A*D 
5: Output B

9: (15 points) Does boundary interior testing (1 and 2 iterations of the loops) cover the All-Uses relationships that exist between nodes in a loop? If not, present a control flow graph that provides a counter example and explain. If so, give an informal proof.