skip to main content
10.1145/288195.288217acmconferencesArticle/Chapter ViewAbstractPublication PagesfseConference Proceedingsconference-collections
Article
Free Access

Effective whole-program analysis in the presence of pointers

Authors Info & Claims
Published:01 November 1998Publication History

ABSTRACT

Understanding large software systems is difficult. Traditionally, automated tools are used to assist program understanding. However, the representations constructed by these tools often require prohibitive time and space. Demand-driven techniques can be used to reduce these requirements. However, the use of pointers in modern languages introduces additional problems that do not integrate well with these techniques. We present new techniques for effectively coping with pointers in large software systems written in the C programming language and use our techniques to implement a program slicing tool.First, we use a fast, flow-insensitive, points-to analysis before traditional data-flow analysis. Second, we allow the user to parameterize the points-to analysis so that the resulting program slices more closely match the actual program behavior. Such information cannot easily be obtained by the tool or might otherwise be deemed unsafe. Finally, we present data-flow equations for dealing with pointers to local variables in recursive programs. These equations allow the user to select an arbitrary amount of calling context in order to better trade performance for precision.To validate our techniques, we present empirical results using our program slicer on large programs. The results indicate that cost-effective analysis of large programs with pointers is feasible using our techniques.

References

  1. 1.A. V. Aho, R. Sethi, and J. D. Ullman. Compilers: Principles, Techniques, and Tools. Addison-Wesley, Reading, MA, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 2.D. C. Atkinson and W. G. Griswold. The design of wholeprogram analysis tools. In Proceedings of the 18th International Conference on So&are Engineering, pages 16-27, Berlin, Germany, March 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 3.E. Duesterwald and M. L. Soffa. Demand-driven computation of inter-procedural data flow. In Proceedings of the 22nd ACM Symposium on Principles of Programming Languages, pages 37-48, San Francisco, CA, January 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 4.M. Emami, R. Ghiya, and L. J. Hendren. Context-sensitive interprocedural points-to analysis in the presence of function pointers. In Proceedings of the ACM ' 94 SIGPLAN Conference on Programming Language Design and Implementation, pages 20-24, Orlando, FL, June 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. 5.J. I. Gobat and D. C. Atkinson. The FElt system: User's guide and reference manual. Computer Science Technical Report CS94-376, University of California, San Diego, Department of Computer Science 8s Engineering, 1994.Google ScholarGoogle Scholar
  6. 6.W. G. Griswold and D. C. Atkinson. Managing the design trade-offs for a program understanding and transformation tool. Journal of Systems and Sofnyare, 30(1-2):99-l 16, July- August 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 7.S. Horwitz, T. Reps, and M. Sagiv. Demand interproceduml dataflow analysis. In Proceedings of the 3rd ACM Symposium on Four&ions of Software Engineering, pages 104- 115, Washington, DC, October 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 8.B. W. Kemighan and D. M. Ritchie. The C Programming Language. Prentice Hall, Englewood Cliffs, NJ, 2nd edition, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 9.J. Knoop and B. Steffen. The interprocedural coincidence theorem. In Proceedings of the 4th Intemational Conference on Compiler Construction, pages 125-140, Paderbom, Germany, October 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 10.W. A. Landi, B. G. Ryder, and S. Zhang. Interprocedural modification side effect analysis with pointer aliasing. In Proceedings of the ACM SIGPLAN ' 93 Conference on Programming Lunguage Design and Implementation, pages 56-67, Albuquerque, NM, June 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. 11.M. M. Lehman and L. A. Belady, editors. Program Evolution: Processes of Sofrware Change. Academic Press, Orlando, FL, 1985. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. 12.G. N. Naumovich, L. A. Clarke, and L. J. Osterweil. Verification of communication protocols using data flow analysis. In Proceedings of the 4th ACM Symposium on Four&ions of Softwure Engineering, pages 93-105, San Francisco, CA, November 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. 13.D. L. Parnas. On the criteria to be used in decomposing systems into modules. Communications of the ACM, X(12):1053-1058, December 1972. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. 14.E. Ruf. Context-insensitive alias analysis reconsidered. In Proceedings of the ACM SIGPLAN ' 95 Conference on Programming Lunguage Design and Implementation, pages 13- 22, La Jolla, CA, June 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. 15.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, January 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. 16.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 l-14, Paris, France, January 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. 17.B. Steensgaard. Points-to analysis by type inference of programs with structures and unions. In Proceedings of the 6th Intemational Conference on Compiler Construction, pages 136-150, Linkoping, Sweden, April 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. 18.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, January 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. 19.B. Stroustrup. The C++ Programming Language. Addison- Wesley, Reading, MA, 2nd edition, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 20.M. Weiser. Program slicing. IEEE Transactions on Software Engineering, SE-10(4):352-357, July 1984.Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Effective whole-program analysis in the presence of pointers

        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 '98/FSE-6: Proceedings of the 6th ACM SIGSOFT international symposium on Foundations of software engineering
          November 1998
          248 pages
          ISBN:1581131089
          DOI:10.1145/288195

          Copyright © 1998 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: 1 November 1998

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • Article

          Acceptance Rates

          Overall Acceptance Rate17of128submissions,13%

          Upcoming Conference

          FSE '24

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader