Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1250734.1250748acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
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)DCAFixer: An Automatic Tool for Bug Detection and Repair for Database Java Client ApplicationsIEEE Transactions on Dependable and Secure Computing10.1109/TDSC.2024.339666722:1(327-342)Online publication date: Jan-2025
  • (2024)Comparing semantic graph representations of source code: The case of automatic feedback on programming assignmentsComputer Science and Information Systems10.2298/CSIS230615004P21:1(117-142)Online publication date: 2024
  • (2024)Slicer4D: A Slicing-based Debugger for JavaProceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering10.1145/3691620.3695363(2407-2410)Online publication date: 27-Oct-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

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
  • 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
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]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 10 June 2007

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. debugging
  2. program understanding
  3. slicing

Qualifiers

  • Article

Conference

PLDI '07
Sponsor:

Acceptance Rates

Overall Acceptance Rate 406 of 2,067 submissions, 20%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)89
  • Downloads (Last 6 weeks)8
Reflects downloads up to 01 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2025)DCAFixer: An Automatic Tool for Bug Detection and Repair for Database Java Client ApplicationsIEEE Transactions on Dependable and Secure Computing10.1109/TDSC.2024.339666722:1(327-342)Online publication date: Jan-2025
  • (2024)Comparing semantic graph representations of source code: The case of automatic feedback on programming assignmentsComputer Science and Information Systems10.2298/CSIS230615004P21:1(117-142)Online publication date: 2024
  • (2024)Slicer4D: A Slicing-based Debugger for JavaProceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering10.1145/3691620.3695363(2407-2410)Online publication date: 27-Oct-2024
  • (2024)Boosting the Performance of Alias-Aware IFDS Analysis with CFL-Based Environment TransformersProceedings of the ACM on Programming Languages10.1145/36898048:OOPSLA2(2633-2661)Online publication date: 8-Oct-2024
  • (2024)Better Not Together: Staged Solving for Context-Free Language ReachabilityProceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3650212.3680346(1112-1123)Online publication date: 11-Sep-2024
  • (2024)Fast Graph Simplification for Path-Sensitive Typestate Analysis through Tempo-Spatial Multi-Point SlicingProceedings of the ACM on Software Engineering10.1145/36437491:FSE(494-516)Online publication date: 12-Jul-2024
  • (2024) Octopus: Scaling Value-Flow Analysis via Parallel Collection of Realizable Path ConditionsACM Transactions on Software Engineering and Methodology10.1145/363274333:3(1-33)Online publication date: 24-Jan-2024
  • (2024)Reorder Pointer Flow in Sound Concurrency Bug PredictionProceedings of the IEEE/ACM 46th International Conference on Software Engineering10.1145/3597503.3623300(1-13)Online publication date: 20-May-2024
  • (2024)Pearl: A Multi-Derivation Approach to Efficient CFL-Reachability SolvingIEEE Transactions on Software Engineering10.1109/TSE.2024.343768450:9(2379-2397)Online publication date: Sep-2024
  • (2024)TIM: Enabling Large-Scale White-Box Testing on In-App Deep Learning ModelsIEEE Transactions on Information Forensics and Security10.1109/TIFS.2024.345576119(8188-8203)Online publication date: 2024
  • 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

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media