Dynamic slicing with soot

Slicing is a powerful technique that can help a developer to understand how the interaction of different parts of a program causes a specific outcome. Dynamic slicing uses runtime information to compute a precise slice for a given execution. However, dynamic slicing is not possible without a static analysis of the underlying code to reveal dependencies between the instructions that have been recorded. In this paper, we present a new algorithm for computing dynamic slices. We describe how the optimization framework Soot was used to compute specialized intraprocedural dependency graphs that better reflect the programmer's view of a program than previous approaches. Combining these dependency graphs with recorded execution traces allowed us to create debuggable dynamic slices. For this, a mapping of the debugger's model of the execution to the static code model of Soot was needed, and could be found with only few ambiguities. This results in the ability to produce a dynamic slice that can not only be visualized, but explored interactively and adjusted to better answer specific questions.

[1]  Éric Tanter,et al.  Processing , 1988 .

[2]  Tao Wang,et al.  Dynamic slicing on Java bytecode traces , 2008, TOPL.

[3]  Mark Weiser,et al.  Programmers use slices when debugging , 1982, CACM.

[4]  Brad A. Myers,et al.  Debugging reinvented , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[5]  Janusz W. Laski,et al.  Dynamic slicing of computer programs , 1990, J. Syst. Softw..

[6]  A. De Lucia Program slicing: methods and applications , 2001, Proceedings First IEEE International Workshop on Source Code Analysis and Manipulation.

[7]  Bil Lewis,et al.  Debugging Backwards in Time , 2003, ArXiv.

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

[9]  Eugene H. Spafford,et al.  Debugging with dynamic slicing and backtracking , 1993, Softw. Pract. Exp..

[10]  Tibor Gyimóthy,et al.  Dynamic slicing of Java bytecode programs , 2005, Fifth IEEE International Workshop on Source Code Analysis and Manipulation (SCAM'05).

[11]  Laurie J. Hendren,et al.  *J: a tool for dynamic analysis of Java programs , 2003, OOPSLA '03.

[12]  Tommy Hoffner Evaluation and Comparison of Program Slicing Tools , 1995 .

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

[14]  Ondrej Lhoták,et al.  The Soot framework for Java program analysis: a retrospective , 2011 .

[15]  Oscar Nierstrasz,et al.  Practical Object-Oriented Back-in-Time Debugging , 2008, ECOOP.

[16]  Stuart I. Feldman,et al.  IGOR: a system for program debugging via reversible execution , 1988, PADD '88.

[17]  Mark Harman,et al.  Theoretical foundations of dynamic program slicing , 2006, Theor. Comput. Sci..