Experimental results from dynamic slicing of C programs

Program slicing is a program analysis technique that has been studied in the context of several different applications in the construction, optimization, maintenance, testing, and debugging of programs. 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). However, these algorithms have been studied only in the context of small abstract languages. Program slicing is bound to remain an academic exercise unless one can not only demonstrate the feasibility of building a slicer for nontrivial programs written in a real programming language, but also verify that a type of slice is sufficiently thin, on the average, for the application for which it is chosen. In this article, we present results from using SLICE, a dynamic program slicer for C programs, designed and implemented to experiment with several different kinds of program slices and to study them both qualitatively and quantitatively. Several application programs, ranging in size (i.e., number of lines of code) over two orders of magnitude, were sliced exhaustively to obtain average worst-case metrics for the size of program slices.

[1]  Karl J. Ottenstein,et al.  The program dependence graph in a software development environment , 1984, SDE 1.

[2]  David W. Binkley,et al.  Interprocedural slicing using dependence graphs , 1990, TOPL.

[3]  Barbara G. Ryder,et al.  Interprocedural modification side effect analysis with pointer aliasing , 1993, PLDI '93.

[4]  G. A. Venkatesh,et al.  The semantic approach to program slicing , 1991, PLDI '91.

[5]  Phil Pfeiffer,et al.  Dependence analysis for pointer variables , 1989, PLDI '89.

[6]  P. E. Livadas,et al.  Program dependence analysis , 1992, Proceedings Conference on Software Maintenance 1992.

[7]  Ken Kennedy,et al.  Fast interprocedual alias analysis , 1989, POPL '89.

[8]  J. Jiang,et al.  Program slicing for C-the problems in implementation , 1991, Proceedings. Conference on Software Maintenance 1991.

[9]  Joseph Robert Horgan,et al.  Dynamic program slicing , 1990, PLDI '90.

[10]  Michael D. Ernst Practical Fine-Grained Static Slicing of Optimized Code , 1994 .

[11]  Keith D. Cooper,et al.  Analyzing aliases of reference formal parameters , 1985, POPL.

[12]  Thomas W. Reps,et al.  Integrating non-intering versions of programs , 1988, POPL '88.

[13]  Hiralal Agrawal,et al.  Towards automatic debugging of computer programs , 1992 .

[14]  David W. Binkley,et al.  Program slicing , 2008, 2008 Frontiers of Software Maintenance.

[15]  James R. Larus,et al.  Optimally profiling and tracing programs , 1992, POPL '92.

[16]  William E. Weihl,et al.  Interprocedural data flow analysis in the presence of pointers, procedure variables, and label variables , 1980, POPL '80.

[17]  Janusz W. Laski,et al.  Dynamic Program Slicing , 1988, Inf. Process. Lett..