Empirical Software Engineering

, Volume 12, Issue 2, pp 143–160 | Cite as

A study of effectiveness of dynamic slicing in locating real faults

  • Xiangyu Zhang
  • Neelam Gupta
  • Rajiv Gupta


Dynamic slicing algorithms have been considered to aid in debugging for many years. However, as far as we know, no detailed studies on evaluating the benefits of using dynamic slicing for locating real faults present in programs have been carried out. In this paper we study the effectiveness of fault location using dynamic slicing for a set of real bugs reported in some widely used software programs. Our results show that of the 19 faults studied, 12 faults were captured by data slices, 7 required the use of full slices, and none of them required the use of relevant slices. Moreover, it was observed that dynamic slicing considerably reduced the subset of program statements that needed to be examined to locate faulty statements. Interestingly, we observed that all of the memory bugs in the faulty versions were captured by data slices. The dynamic slices that captured faulty code included 0.45 to 63.18% of statements that were executed at least once.


Dynamic program slicing Fault location Data slicing Full slicing Exploring slices 



This work is supported by grants from Microsoft, IBM, and NSF grants CNS-0614707, CCF-0541382, CCF-0324969, and EIA-0080123 to the University of Arizona. We would like to thank the reviewers for their suggestions that encouraged us to do even more thorough job of revising the original submission.


  1. Agrawal H, Horgan J (1990) Dynamic program slicing. ACM SIGPLAN conference on programming language design and implementation, pp 246–256Google Scholar
  2. Agrawal H, DeMillo R, Spafford E (1993a) Debugging with dynamic slicing and backtracking. Software Practice and Experience 23(6):589–616CrossRefGoogle Scholar
  3. Agrawal H, Horgan EW Jr, London SA (1993b) Incremental regression testing. IEEE conference on software maintenance, Montreal, Canada, pp 348–357Google Scholar
  4. Agrawal H, Horgan J, London S, Wong W (1995) Fault localization using execution slices and dataflow tests. 6th IEEE international symposium on software reliability engineering, 143–151Google Scholar
  5. Antoniol G, Fiutem R, Lutteri G, Tonella P, Zanfei, S, Merlo E (1997, October) Program understanding and maintenance with the CANTO environment. International conference on software maintenance, pp 72–, Bari, ItalyGoogle Scholar
  6. Ball T, Eick SG (1994, October) Visualizing program slices. IEEE Symposium on Visual Languages, pp 288–295, St. Louis, MissouriGoogle Scholar
  7. Beszedes A, Gergely T, Szabo ZM, Csirik J, Gyimothy T (2001, March) Dynamic slicing method for maintenance of large C programs. 5th European conference on software maintenance and reengineering, pp 105–113Google Scholar
  8. Cleve H, Andreas Zeller (2005) Locating causes of program failures. 27th international conference on software engineering, pp 342–351Google Scholar
  9. Gyimothy T, Beszedes A, Forgacs I (1999) An efficient relevant slicing method for debugging. 7th European software engineering conference and 7th ACM SIGSOFT international symposium on foundations of software engineering. Toulouse, France, pp 303–321Google Scholar
  10. Hildebrandt R, Zeller A (2000) Simplifying failure-inducing input. International symposium on software testing and analysis, pp 135–145Google Scholar
  11. Hutchins M, Foster H, Goradia T, Ostrand T (1994) Experiments on the effectiveness of dataflow- and controlflow-based test adequacy criteria. 16th international conference on software engineering, pp 191–200Google Scholar
  12. Jones JA (2004) Fault localization using visualization of test information. 26th international conference on software engineering, pp 54–56Google Scholar
  13. Kamkar M (1993) Interprocedural dynamic slicing with applications to debugging and testing. Ph.D. thesis, Linkoping UniversityGoogle Scholar
  14. Korel B, Laski J (1988) Dynamic program slicing. Inf Process Lett 29(3):155–163zbMATHCrossRefGoogle Scholar
  15. Korel B, Rilling J (1997) Application of dynamic slicing in program debugging. 3rd international workshop on automatic debugging. Linkoping, Sweden, pp 43–58Google Scholar
  16. Krinke J (2004) Visualization of program dependence and slices. International conference on software maintenance, pp 168–177Google Scholar
  17. Lin-Nielsen J BuDDy, A binary decision diagram package. Department of Information Technology, Technical University of Denmark,
  18. Pan H, Spafford EH (1992) Heuristics for automatic localization of software faults. Technical Report SERC-TR-116-P, Purdue UniversityGoogle Scholar
  19. Renieris M, Reiss S (2003) Fault localization with nearest neighbor queries. IEEE international conference on automated software engineering, pp 30–39Google Scholar
  20. Weiser M (1982) Program slicing. IEEE Trans Softw Eng SE-10(4):352–357CrossRefGoogle Scholar
  21. Zeller A (2002) Isolating cause-effect chains from computer programs. 10th ACM SIGSOFT symposium on foundations of software engineering. Charleston, South Carolina, pp 1–10Google Scholar
  22. Zhang X, Gupta R (2004, June) Cost effective dynamic program slicing. ACM SIGPLAN conference on programming language design and implementation, pp 94–106Google Scholar
  23. Zhang X, Gupta R, Zhang Y (2003, May) Precise dynamic slicing algorithms. IEEE/ACM international conference on software engineering, Portland, Oregon, pp 319–329Google Scholar
  24. Zhang X, Gupta R, Zhang Y (2004) Effective forward computation of dynamic slices using reduced ordered binary decision diagrams. IEEE international conference on software engineering. Edinburgh, UK, pp 502–511Google Scholar
  25. Zhang X, He H, Gupta N, Gupta R (2005, September) Experimental evaluation of using dynamic slices for fault location. SIGSOFT-SIGPLAN sixth international symposium on automated and analysis-driven debugging. Moterey, California, pp 33–42Google Scholar
  26. Zhou P, Liu W, Fei L, Lu S, Qin F, Zhou Y, Midkiff SP, Torrellas J (2004) AccMon: automatically detecting memory-related bugs via program counter-based invariants. 37th annual international symposium on microarchitecture, pp 269–280Google Scholar

Copyright information

© Springer Science + Business Media, LLC 2006

Authors and Affiliations

  1. 1.Department of Computer ScienceThe University of ArizonaTucsonUSA

Personalised recommendations