skip to main content
10.1145/587051.587062acmconferencesArticle/Chapter ViewAbstractPublication PagesfseConference Proceedingsconference-collections
Article

Improving program slicing with dynamic points-to data

Published:18 November 2002Publication History

ABSTRACT

Program slicing is a potentially useful analysis for aiding program understanding. However, slices of even small programs are often too large to be generally useful. Imprecise pointer analyses have been suggested as one cause of this problem. In this paper, we use dynamic points-to data, which represents optimal or optimistic pointer information, to obtain a bound on the best case slice size improvement that can be achieved with improved pointer precision. Our experiments show that slice size can be reduced significantly for programs that make frequent use of calls through function pointers because for them the dynamic pointer data results in a considerably smaller call graph, which leads to fewer data dependences. Programs without or with only few calls through function pointers, however, show only insignificant improvement. We identified Amdahl's law as the reason for this behavior: C programs appear to have a large fraction of direct data dependences so that reducing spurious dependences via pointers is only of limited benefit. Consequently, to make slicing useful in general for such programs, improvements beyond better pointer analyses will be necessary. On the other hand, since we show that collecting dynamic function pointer information can be performed with little overhead (average slowdown of 10% for our benchmarks), dynamic pointer information may be a practical approach to making slicing of programs with frequent function pointer use more successful in reality.

References

  1. G. M. Amdahl. Validity of the single processor approach to achieving large scale computing capabilities. In Proceedings of the AFIPS 1967 Joint Computer Conference, pages 483--485, Atlantic City, NJ, Apr. 1967.Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. L. O. Andersen. Program Analysis and Specialization for the C Programming Language. Ph.D. dissertation, University of Copenhagen, Department of Computer Science, May 1994.Google ScholarGoogle Scholar
  3. D. C. Atkinson. The Design and Implementation of Practical and Task-Oriented Whole-Program Analysis Tools. Ph.D. dissertation, University of California, San Diego, Department of Computer Science & Engineering, Apr. 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. D. C. Atkinson and W. G. Griswold. The design of whole-program analysis tools. In Proceedings of the 18th International Conference on Software Engineering, pages 16--27, Berlin, Germany, Mar. 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. D. C. Atkinson and W. G. Griswold. Effective whole-program analysis in the presence of pointers. In Proceedings of the 6th ACM International Symposium on the Foundations of Software Engineering, pages 46--55, Lake Buena Vista, FL, Nov. 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. D. C. Atkinson and W. G. Griswold. Implementation techniques for efficient data-flow analysis of large programs. In Proceedings of the 2001 International Conference on Software Maintenance, pages 52--61, Florence, Italy, Nov. 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. L. Beltracchi, J. R. Lyle, and D. R. Wallace. Using a program slicing CASE tool for evaluating high integrity software systems. In Proceedings of the 1996 American Nuclear Society International Topical Meeting on Nuclear Plant Instrumentation, Control, and Human-Machine Interface Technologies, pages 1033--1039, University Park, PA, May 1996.Google ScholarGoogle Scholar
  8. L. Bent, D. C. Atkinson, and W. G. Griswold. A comparative study of two whole programs slicers for C. Computer Science Technical Report CS2001-0668, University of California, San Diego, Department of Computer Science & Engineering, Apr. 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. M. Das. Unification-based pointer analysis with directional assignments. In Proceedings of the 2000 ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 35--46, Vancouver, BC, June 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. M. A. Francel and S. Rugaber. The value of slicing while debugging. In Proceedings of the 7th International Workshop on Program Comprehension, pages 151--169, Pittsburgh, PA, May 2001.Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. K. B. Gallagher and J. R. Lyle. Using program slicing in software maintenance. IEEE Trans. Softw. Eng., 17(8):751--761, Aug. 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. R. Ghiya, D. Lavery, and D. Sehr. On the importance of points-to analysis and other memory disambiguation methods for C programs. In Proceedings of the 2001 ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 47--58, Snowbird, UT, June 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. GrammaTech, Inc. Codesurfer user guide and reference manual.Google ScholarGoogle Scholar
  14. M. J. Harrold and N. Ci. Reuse-driven interprocedural slicing. In Proceedings of the 20th International Conference on Software Engineering, pages 74--83, Kyoto, Japan, Apr. 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. S. Horwitz, T. Reps, and D. Binkley. Interprocedural slicing using dependence graphs. ACM Trans. Prog. Lang. Syst., 12(1):26--60, Jan. 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. S. Horwitz, T. Reps, and M. Sagiv. Demand interprocedural dataflow analysis. In Proceedings of the 3rd ACM Symposium on the Foundations of Software Engineering, pages 104--115, Washington, DC, Oct. 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. D. Liang and M. J. Harrold. Efficient points-to analysis for whole-program analysis. In Proceeedings of the 7th European Software Engineering Conference and ACM Symposium on the Foundations of Software Engineering, pages 199--215, Toulouse, France, Sept. 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. D. Liang and M. J. Harrold. Reuse-driven interprocedural slicing in the presence of pointers and recursion. In Proceedings of the 1999 International Conference on Software Maintenance, pages 421--432, Oxford, England, Aug. 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. D. Liang and M. J. Harrold. Light-weight context recovery for efficient and accurate program analyses. In Proceedings of the 2000 International Conference on Software Engineering, pages 366--375, Limerick, Ireland, June 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. M. Mock, D. C. Atkinson, C. Chambers, and S. J. Eggers. Gathering dynamic points-data and its incorporation in a program slicing tool for C programs. School of Engineering Technical Report COEN-2002-03-16, Santa Clara University, Department of Computer Engineering, Mar. 2002.Google ScholarGoogle Scholar
  21. M. Mock, M. Berryman, C. Chambers, and S. J. Eggers. Calpa: A tool for automating dynamic compilation. In Proceedings of the 2nd Workshop on Feedback-Directed Optimization, pages 100--109, Haifa, Israel, Nov. 1999.Google ScholarGoogle Scholar
  22. M. Mock, C. Chambers, and S. J. Eggers. Calpa: A tool for automating selective dynamic compilation. In Proceedings of the 33rd Annual Symposium on Microarchitecture, pages 291--302, Monterey, CA, Dec. 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. M. Mock, M. Das, C. Chambers, and S. J. Eggers. Dynamic points-to sets: A comparison with static analyses and potential applications in program understanding and optimization. In Proceedings of the 2001 ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering, pages 66--72, Snowbird, UT, June 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. H. D. Pande, W. A. Landi, and B. G. Ryder. Interprocedural def-use associations for C systems with single level pointers. IEEE Trans. Softw. Eng., 20(5):385--403, May 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. A. Rountev and S. Chandra. Off-line variable substitution for scaling points-to analyis. In Proceedings of the 2000 ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 47--56, Vancouver, BC, June 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. B. G. Ryder, W. Landi, P. Stocks, S. Zhang, and R. Altucher. A schema for interprocedural side effect analysis with pointer aliasing. ACM Trans. Prog. Lang. Syst., 23(2):105--186, Mar. 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. M. Shapiro and S. Horwitz. The effects of the precision of pointer analysis. In Proceedings of the 4th International Symposium on Static Analysis, pages 16--34, Paris, France, Jan. 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. M. Shapiro and S. Horwitz. Fast and accurate flow-insensitive points-to analysis. In Proceedings of the 24th ACM Symposium on Principles of Programming Languages, pages 1--14, Paris, France, Jan. 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. O. Shivers. Control-Flow Analysis of Higher-Order Languages. Ph.D. dissertation, Carnegie Mellon University, School of Computer Science, May 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. B. Steensgaard. Points-to analysis in almost linear time. In Proceedings of the 23rd ACM Symposium on Principles of Programming Languages, pages 32--41, St. Petersburg Beach, FL, Jan. 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. F. Tip. A survey of program slicing techniques. J. Prog. Lang., 3(3):121--189, Sept. 1995.Google ScholarGoogle Scholar
  32. F. Tip and T. B. Dinesh. A slicing-based approach for locating type errors. ACM Trans. Softw. Eng. Meth., 10(1):5--55, Jan. 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. M. Weiser. Program slicing. IEEE Trans. Softw. Eng., SE-10(4):352--357, July 1984.Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. R. P. Wilson and M. S. Lam. Efficient context-sensitive pointer analysis for C programs. In Proceedings of the ACM SIGPLAN '95 Conference on Programming Language Design and Implementation, pages 1--12, La Jolla, CA, June 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Improving program slicing with dynamic points-to data

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in
        • Published in

          cover image ACM Conferences
          SIGSOFT '02/FSE-10: Proceedings of the 10th ACM SIGSOFT symposium on Foundations of software engineering
          November 2002
          184 pages
          ISBN:1581135149
          DOI:10.1145/587051

          Copyright © 2002 ACM

          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: 18 November 2002

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • Article

          Acceptance Rates

          SIGSOFT '02/FSE-10 Paper Acceptance Rate17of128submissions,13%Overall Acceptance Rate17of128submissions,13%

          Upcoming Conference

          FSE '24

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader