The Theory of Composite Faults
Fault masking happens when the effect of one fault serves to mask that of another fault for particular test inputs. The coupling effect is relied upon by testing practitioners to ensure that fault masking is rare. It states that complex faults are coupled to simple faults in such a way that a test data set that detects all simple faults in a program will detect a high percentage of the complex faults..
While this effect has been empirically evaluated, our theoretical understanding of the coupling effect is as yet incomplete. Wah proposed a theory of the coupling effect on finite bijective (or near bijective) functions with the same domain and co-domain, and assuming uniform distribution for candidate functions. This model however, was criticized as being too simple to model real systems, as it did not account for differing domain and co-domain in real programs, or for syntactic neighborhood. We propose a new theory of fault coupling for general functions (with certain constraints). We show that there are two kinds of fault interactions, of which only the weak interaction can be modeled by the theory of the coupling effect. The strong interaction can produce faults that are semantically different from the original faults. These faults should hence be considered as independent atomic faults. Our analysis show that the theory holds even when the effect of syntactical neighborhood of the program is considered. We analyze numerous real-world programs with real faults to validate our hypothesis.
Updates:
- Updates to Impact of Syntax.
Let us call the original input , , and the changed value . Similarly, let , , , and . Given two inputs , and for a function , we call , and semantically close if their execution paths in f follow equivalent profiles, e.g taking the same branches and conditionals. We call and semantically far in terms of f if their execution profiles are different.
Consider the possibility of masking the output of by ( in Figure 3)). We already know that was detected. That is, we know that was sufficiently different from , that it propagated through to be caught by a test case. Say was semantically far from , and the difference (i.e, the skipped part) contained the fault . In that case, the fault would not have been executed, and since , it will always be detected.
On the other hand, say was semantically close to in terms of and the fault was executed. There are again three possibilities. The first is that had no impact, in which case the analysis is the same as before. The second is that caused a change in the output. It is possible that the execution of could be problematic enough to always cause an error, in which case we have (error), and detection. Thus masking requires to be equal to .
Even if we assume that the function is close syntactically to , and that this implies semantic closeness of functions and , we expect the value to be near , and not .
- Coupling Effect
For coupling effect, we use the definition from Richard A. DeMillo. βThe coupling effect asserts that test data that is sensitive enough to kill simple mutants also causes the vast majority of k-ary mutants to die.β where 1-ary mutant is a mutant with a single fault.