Program slicing has been used as an assistance in many aspects of software
development. Essentially, any areas in software devolvement and engineering, in
which it is advantageous to extract part of the program, based on the criteria of
our interest, is potential applications of program slicing.
In the early years, the idea of program slicing was first applied on debugging[1].
That is, if a bug occurs due to the incorrect value of a variable, then this
technique can be used to find all statements that are affecting the incorrect
output in the selected statement.
Bug detection leads to bug correction. An experienced software engineer knows
that fixing a bug may cause further bugs. There is a testing method that is used
to seek for uncover regression bugs, called ’regression testing’. After fix has been
made, the system attempts to identify and retest those parts of the program that
are affected by the changed statement[5].
In some stages of software development, a program needs to be maintained. The
maintenance phase starts with program comprehension, which it is widely
believed that occupies huge portions of the total costs. This is particularly true,
where a legacy program is concerned. In this case, amorphous slicing combined
with conditioned slicing can be used to capture cases of interest allowing the
program to be broken up into segments, each of which are relevant to a
particular form of computation.[4] The slicing with respect to the condition,
would aid programmers to gain an understanding of how the program
works, and thus, result in productive improvement. Moreover, the idea
of ’reverse engineering’ can be carried out by setting the isolation the
desired functionalities, using conditioned slicing techniques. So that, the
decomposition slices, extracted from the legacy code, can be re-used in further
development
Software measurement is another use of this technique in practice. The
cohesiveness of a program indicates how well the program within a module work
together to provide a specific piece of functionality. A modern development on
the cohesion is the idea of encapsulation in the art of object-oriented
programming[4]. Therefore, some tools, like Understand C++ Tool, are
developed to calculate a cohesion metrics of a program using slicing technique[6].