Effective Slicing : A Generalization of Full and Relevant Slicing ∗

A program slice, P′, is the part of a program, P, that may affect the value of a set of variables, V , at a program point, p. Informally, P′ is well-behaved if it calculates the same values for V at p as P. A well-behaved slice exhibits good behavior. A static slice must be well-behaved for every input while a dynamic slice must be well-behaved for just one input. A union slice is the union of several dynamic slices calculated with respect to different inputs but the same V and some occurrence(s) of p in the program’s execution history. A realizable slice is a union slice calculated with respect to all initial states. A realizable slice is, in general, not computable. Well-behaved union slices allow reasoning about program behavior on sets of inputs, but existing union slicing algorithms may yield ill-behaved slices, i.e., for some input among those used to construct the dynamic slices, the union slice will calculate incorrect values for V . We find that bad behavior of union slices is an artifact of the particular dynamic slicing algorithm, full slicing, used to calculate the individual slices. Full slicing is the name given to the originally proposed version of dynamic slicing, to distinguish this version from other variants of dynamic slicing that have arisen since. In contrast, the unions of relevant slices do yield well-behaved slices. We propose a generalization of full and relevant slices, effective slices, that can be used to calculate unions of dynamic slices that are more precise than the unions of relevant slices, but still well-behaved. We extend the generalization to scant slices. We show that the nodes in the set differences between unions of different kinds of slices have certain properties useful in debugging.

[1]  Mark Harman,et al.  Building executable union slices using conditioned slicing , 2004, Proceedings. 12th IEEE International Workshop on Program Comprehension, 2004..

[2]  Robert J. Hall Automatic extraction of executable program subsets by simultaneous dynamic program slicing , 2004, Automated Software Engineering.

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

[4]  Xiaojin Zhu,et al.  Statistical Debugging Using Latent Topic Models , 2007, ECML.

[5]  Xiangyu Zhang,et al.  Precise dynamic slicing algorithms , 2003, 25th International Conference on Software Engineering, 2003. Proceedings..

[6]  Xiangyu Zhang,et al.  Pruning dynamic slices with confidence , 2006, PLDI '06.

[7]  Tibor Gyimóthy,et al.  An efficient relevant slicing method for debugging , 1999, ESEC/FSE-7.

[8]  Sumit Kumar,et al.  Better Slicing of Programs with Jumps and Switches , 2002, FASE.

[9]  Mark Harman,et al.  A formalisation of the relationship between forms of program slicing , 2006, Sci. Comput. Program..

[10]  Tibor Gyimóthy,et al.  Verifying the Concept of Union Slices on Java Programs , 2007, 11th European Conference on Software Maintenance and Reengineering (CSMR'07).

[11]  Mark Harman,et al.  Amorphous program slicing , 2003, J. Syst. Softw..

[12]  Xiangyu Zhang,et al.  Experimental evaluation of using dynamic slices for fault location , 2005, AADEBUG'05.

[13]  Joseph Robert Horgan,et al.  Incremental regression testing , 1993, 1993 Conference on Software Maintenance.

[14]  T. Y. Chen,et al.  Dynamic program dicing , 1993, 1993 Conference on Software Maintenance.

[15]  Mark Harman,et al.  Unions of slices are not slices , 2003, Seventh European Conference onSoftware Maintenance and Reengineering, 2003. Proceedings..

[16]  Mark Harman,et al.  Theory and algorithms for slicing unstructured programs , 2006, Inf. Softw. Technol..

[17]  Mark Harman,et al.  Formalizing executable dynamic and forward slicing , 2004, Source Code Analysis and Manipulation, Fourth IEEE International Workshop on.