MORE INFORMATION ON Error_detect.f
This program demonstrates how a set of domain test points for a short sample program
actually detects specific examples of different types of programming errors. If we
focus on a specific domain affected by each error, a careful analysis of its
effect on the domain will permit identification those domain test points which detect the error.
This example reads two values, I and J, and produces a single output value M. The input
space is thus two-dimensional. Three simple IF constructs constitute this program,
the first two of which are inequalities and the last of which is an equality. If we
use an input space diagram, appropriate shifts in equality borders constructed from the
three predicates will result.
The first is an error in the inequality predicate in the second IF statement (K>=I+1) where it is assumed
that the correct predicate should be (K>=I+2). This corresponds to an inequality border shift. The effect
of an error in an equality predicate may also be shown in a diagram. It is assumed that the correct predicat
should be (I=5-J) rather than the (I=5) predicate which occurs in the given program. An accurate diagram
would better illustrate the usefulness of this method in detecting errors.
Click here for the
source code