Slicing vs Dicing
A statement i: it is the set of all
statements that could (potentially, under static analysis) affect the value of
X at statement i - where the influence of faulty statement could result from an
improper computational use or predicate use of some other variables at prior
statements
If X is incorrect at statement i, it
follows that the bug must be in the program slice for X with respect to i
A program dice is a part of slice in
which all statements which are known to be correct, have been removed
In other words, a dice is obtained form
a slice by incorporating information obtained through testing or experiment
(example: debugging)
The debugger first limits its scope to
those prior statements that could have caused the faulty value at statement i
(the slice), and then eliminates (from further consideration) those statements
that testing has shown to be correct
Debugging can be modeled as an iterative
procedure in which slices are further refined by dicing, where the dicing
information is obtained from ad hoc test aimed primarily at eliminating possibilities
Debugging ends when the dice has been
reduced to one faulty statement
Dynamic slicing is a refinement of
static slicing in which only statements on achievable paths to the statement in
question are included
Post a Comment
Post a Comment