[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
article

Thin slicing

Published: 10 June 2007 Publication History

Abstract

Program slicing systematically identifies parts of a program relevant to a seed statement. Unfortunately, slices of modern programs often grow too large for human consumption. We argue that unwieldy slices arise primarily from an overly broad definition of relevance, rather than from analysis imprecision. While a traditional slice includes all statements that may affect a point of interest, not all such statements appear equally relevant to a human.
As an improved method of finding relevant statements, we propose thin slicing. A thin slice consists only of producer statements for the seed, i.e., those statements that help compute and copy avalue to the seed. Statements that explain why producers affect the seed are excluded. For example, for a seed that reads a value from a container object, a thin slice includes statements that store the value into the container, but excludes statements that manipulate pointers to the container itself. Thin slices can also be hierarchically expanded to include statements explaining how producers affect the seed, yielding a traditional slice in the limit.
We evaluated thin slicing for a set of debugging and program understanding tasks. The evaluation showed that thin slices usually included the desired statements for the tasks (e.g., the buggy statement for a debugging task). Furthermore, in simulated use of a slicing tool, thin slices revealed desired statements after inspecting 3.3 times fewer statements than traditional slicing for our debugging tasks and 9.4 times fewer statements for our program understanding tasks. Finally, our thin slicing algorithm scales well to relatively large Java benchmarks, suggesting that thin slicing represents an attractive option for practical tools.

References

[1]
Codesurfer. http://www.grammatech.com/products/codesurfer/.
[2]
T.J. Watson Libraries for Analysis. http://wala.sourceforge.net.
[3]
M. Allen and S. Horwitz. Slicing Java programs that throw and catch exceptions. In PEPM '03: Proceedings of the 2003 ACM SIGPLAN workshop on Partial evaluation and semantics-based program manipulation, pages 44--54, New York, NY, USA, 2003. ACM Press.
[4]
L. O. Andersen. Program Analysis and Specialization for the C Programming Language. PhD thesis, University of Copenhagen, DIKU, 1994.
[5]
D. C. Atkinson andW. G. Griswold. Effective whole-program analysis in the presence of pointers. In Foundations of Software Engineering, pages 46--55, 1998.
[6]
M. Das, S. Lerner, and M. Seigle. ESP: path-sensitive program verification in polynomial time. In Conference on Programming Language Design and Implementation (PLDI), 2002.
[7]
H. Do, S. Elbaum, and G. Rothermel. Supporting controlled experimentation with testing techniques: An infrastructure and its potential impact. Empirical Software Engineering, 10(4), October 2005.
[8]
S. Fink, E. Yahav, N. Dor, G. Ramalingam, and E. Geay. Effective typestate verification in the presence of aliasing. In International symposium on Software testing and analysis (ISSTA), 2006.
[9]
C. Hammer and G. Snelting. An improved slicer for Java. In Proceedings of the ACM-SIGPLAN-SIGSOFT workshop on Program analysis for software tools and engineering, pages 17--22, 2004.
[10]
S. Horwitz, P. Pfeiffer, and T. Reps. Dependence analysis for pointer variables. In Conference on Programming Language Design and Implementation (PLDI), 1989.
[11]
S. Horwitz, T. Reps, and D. Binkley. Interprocedural slicing using dependence graphs. In Conference on Programming Language Design and Implementation (PLDI), 1988.
[12]
J. Krinke. Advanced Slicing of Sequential and Concurrent Programs. PhD thesis, University of Passau, 2003.
[13]
L. Larsen and M. J. Harrold. Slicing object-oriented software. In International Conference on Software Engineering (ICSE), 1996.
[14]
D. Liang and M. J. Harrold. Slicing objects using system dependence graphs. In ICSM, pages 358--367, 1998.
[15]
R. Manevich, M. Sridharan, S. Adams, M. Das, and Z. Yang. PSE: explaining program failures via postmortem static analysis. In SIGSOFT '04/FSE-12: Proceedings of the 12th ACM SIGSOFT twelfth international symposium on Foundations of software engineering, pages 63-- 72, New York, NY, USA, 2004. ACM Press.
[16]
A. Milanova, A. Rountev, and B. G. Ryder. Parameterized object sensitivity for points-to analysis for java. ACM Trans. Softw. Eng. Methodol., 14(1):1--41, 2005.
[17]
M. Mock, D. C. Atkinson, C. Chambers, and S. J. Eggers. Improving program slicing with dynamic points-to data. SIGSOFT Softw. Eng. Notes, 27(6):71--80, 2002.
[18]
A. Orso, S. Sinha, and M. J. Harrold. Classifying data dependences in the presence of pointers for program comprehension, testing, and debugging. ACM Transactions on Software Engineering and Methodology (TOSEM), 13(2):199--239, 2004.
[19]
M. Renieris and S. P. Reiss. Fault localization with nearest neighbor queries. In IEEE International Conference on Automated Software Engineering (ASE), 2003.
[20]
T. Reps. Program analysis via graph reachability. Information and Software Technology, 40(11--12):701--726, November/December 1998.
[21]
T. Reps, S. Horwitz, and M. Sagiv. Precise interprocedural dataflow analysis via graph reachability. In ACM Symposium on Principles of Programming Languages (POPL), 1995.
[22]
T. Reps, S. Horwitz, M. Sagiv, and G. Rosay. Speeding up slicing. In ACM SIGSOFT Symposium on the Foundations of Software Engineering (FSE), New Orleans, LA, December 1994.
[23]
A. Rountev, A. Milanova, and B. G. Ryder. Points-to analysis for Java using annotated constraints. In Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), Tampa Bay, Florida, October 2001.
[24]
B. G. Ryder, W. A. Landi, P. A. Stocks, S. Zhang, and R. Altucher. A schema for interprocedural modification side-effect analysis with pointer aliasing. ACM Trans. Program. Lang. Syst., 23(2):105--186, 2001.
[25]
M. Sridharan and R. Bodfk. Refinement-based context-sensitive points-to analysis for Java. In Conference on Programming Language Design and Implementation (PLDI), 2006.
[26]
T. Teitelbaum. Personal communication regarding CodeSurfer. 2007.
[27]
F. Tip. A survey of program slicing techniques. Journal of programming languages, 3:121--189, 1995.
[28]
M. D. Weiser. Program slices: formal, psychological, and practical investigations of an automatic program abstraction method. PhD thesis, University of Michigan, Ann Arbor, 1979.
[29]
A. Zeller. Isolating cause--effect chains from computer programs. SIGSOFT Softw. Eng. Notes, 27(6):1--10, 2002.
[30]
X. Zhang, N. Gupta, and R. Gupta. Pruning dynamic slices with confidence. In Conference on Programming Language Design and Implementation (PLDI), 2006.
[31]
X. Zhang, N. Gupta, and R. Gupta. A study of effectiveness of dynamic slicing in locating real faults. Empirical Software Engineering, 2006. To appear.
[32]
X. Zhang, R. Gupta, and Y. Zhang. Efficient forward computation of dynamic slices using reduced ordered binary decision diagrams. In International Conference on Software Engineering (ICSE), 2004.
[33]
X. Zhang, S. Tallam, and R. Gupta. Dynamic slicing long running programs through execution fast forwarding. In ACM SIGSOFT Symposium on Foundations of Software Engineering, 2006.
[34]
A. X. Zheng, M. I. Jordan, B. Liblit, M. Naik, and A. Aiken. Statistical debugging: Simultaneous identification of multiple bugs. In Proceedings of the 23rd International Conference on Machine Learning, 2006.

Cited By

View all
  • (2025)The expression dependence graphJournal of Logical and Algebraic Methods in Programming10.1016/j.jlamp.2024.101016142(101016)Online publication date: Jan-2025
  • (2023)Slicing Shared-Memory Concurrent Programs The Threaded System Dependence Graph Revisited2023 IEEE International Conference on Software Maintenance and Evolution (ICSME)10.1109/ICSME58846.2023.00019(73-83)Online publication date: 1-Oct-2023
  • (2023)Software runtime monitoring with adaptive sampling rate to collect representative samples of execution tracesJournal of Systems and Software10.1016/j.jss.2023.111708202:COnline publication date: 1-Aug-2023
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM SIGPLAN Notices
ACM SIGPLAN Notices  Volume 42, Issue 6
Proceedings of the 2007 PLDI conference
June 2007
491 pages
ISSN:0362-1340
EISSN:1558-1160
DOI:10.1145/1273442
Issue’s Table of Contents
  • cover image ACM Conferences
    PLDI '07: Proceedings of the 28th ACM SIGPLAN Conference on Programming Language Design and Implementation
    June 2007
    508 pages
    ISBN:9781595936332
    DOI:10.1145/1250734
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 10 June 2007
Published in SIGPLAN Volume 42, Issue 6

Check for updates

Author Tags

  1. debugging
  2. program understanding
  3. slicing

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)90
  • Downloads (Last 6 weeks)11
Reflects downloads up to 31 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2025)The expression dependence graphJournal of Logical and Algebraic Methods in Programming10.1016/j.jlamp.2024.101016142(101016)Online publication date: Jan-2025
  • (2023)Slicing Shared-Memory Concurrent Programs The Threaded System Dependence Graph Revisited2023 IEEE International Conference on Software Maintenance and Evolution (ICSME)10.1109/ICSME58846.2023.00019(73-83)Online publication date: 1-Oct-2023
  • (2023)Software runtime monitoring with adaptive sampling rate to collect representative samples of execution tracesJournal of Systems and Software10.1016/j.jss.2023.111708202:COnline publication date: 1-Aug-2023
  • (2022)An Investigation into Effective Fault LocalizationIntelligent Technologies: Concepts, Applications, and Future Directions10.1007/978-981-19-1021-0_4(83-112)Online publication date: 22-May-2022
  • (2022)Field-Sensitive Program SlicingSoftware Engineering and Formal Methods10.1007/978-3-031-17108-6_5(74-90)Online publication date: 26-Sep-2022
  • (2021)Making pointer analysis more precise by unleashing the power of selective context sensitivityProceedings of the ACM on Programming Languages10.1145/34855245:OOPSLA(1-27)Online publication date: 15-Oct-2021
  • (2021)A Practical Approach for Dynamic Taint Tracking with Control-flow RelationshipsACM Transactions on Software Engineering and Methodology10.1145/348546431:2(1-43)Online publication date: 24-Dec-2021
  • (2021)Explaining Regressions via Alignment Slicing and MendingIEEE Transactions on Software Engineering10.1109/TSE.2019.294956847:11(2421-2437)Online publication date: 1-Nov-2021
  • (2021)Combi-FL: Neural network and SBFL based fault localization using mutation analysisJournal of Computer Languages10.1016/j.cola.2021.10106466(101064)Online publication date: Oct-2021
  • (2021)MSFL: A Model for Fault Localization Using Mutation-Spectra TechniqueLean and Agile Software Development10.1007/978-3-030-67084-9_10(156-173)Online publication date: 6-Jan-2021
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media