Program slicing is a source-to-source transformation that has applications in construction, analysis, testing and debugging of programs. A program slice contains the portion of a program that captures some subset of the program behavior. Algorithms are available for constructing slices for a particular execution of a program (dynamic slices) as well as to approximate a subset of the behavior over all possible executions of a program (static slices). As the behavior of a program is determined by the semantics of the language, it is reasonable to expect a semantic justification for the practice of program slicing, Program slices have been used in several applications but there is no single notion of a slice that is useful for all applications. This paper identifies and categorizes different notions of a program slice available in the literature as well as several new notions. The various notions are formalized in a denotational framework. Extending the work by Cartwright and Felleisen [2] on the semantics of program dependence, a semantic justification is provided for the process of program slicing using program dependence graphs.
[1]
Mark David Weiser,et al.
Program slices: formal, psychological, and practical investigations of an automatic program abstraction method
,
1979
.
[2]
Matthias Felleisen,et al.
The semantics of program dependence
,
1989,
PLDI '89.
[3]
Joseph Robert Horgan,et al.
Dynamic program slicing
,
1990,
PLDI '90.
[4]
Wuu Yang,et al.
The Semantics of Program Slicing
,
1988
.
[5]
Thomas W. Reps,et al.
Integrating noninterfering versions of programs
,
1989,
TOPL.
[6]
David W. Binkley,et al.
Interprocedural slicing using dependence graphs
,
1990,
TOPL.
[7]
Thomas W. Reps,et al.
Integrating non-intering versions of programs
,
1988,
POPL '88.
[8]
Karl J. Ottenstein,et al.
The program dependence graph in a software development environment
,
1984,
SDE 1.