Content deleted Content added
Mike Rosoft (talk | contribs) m Reverted edits by 82.45.250.56 (talk) to last revision by 144.92.16.161 (HG) |
|||
Line 40:
An example to clarify the difference between static and dynamic slicing. Consider a small piece of a program unit, in which there is an iteration block containing an if-else block. There are a few statements in both the <code>if</code> and <code>else</code> blocks that have an effect on a variable. In the case of static slicing, since the whole program unit is looked at irrespective of a particular execution of the program, the affected statements in both blocks would be included in the slice. But, in the case of dynamic slicing we consider a particular execution of the program, wherein the <code>if</code> block gets executed and the affected statements in the <code>else</code> block do not get executed. So, in this particular execution case, the dynamic slice would contain only the statements in the <code>if</code> block.
==See also==
|