EXERCISES
criteria such that none of the tests reveals the error in function
NJT$POE
7.22 Some program faults might escape detection using mutation as
well as any path-oriented testing strategy. Dick Hamlet provides a
simple example of one such error. Hamlet’s program is
reproduced below:
SFBM IBNMFU'VODUJPO Y SFBM\
JG Y Y −Y
SFUVSOTRSY ← This should be SFUVSO(sqrt(Y)*2)
^
The error is in the use of function sqr, read as square, instead of
the function sqrt, read as square root. Note that there is a simple
mutation that exists in this program, that of sqrt being mutated by
the programmer to sqr. However, let us assume that there is no
such mutation operator in the mutation tool that you are using.
(Of course, in principle, there is ...