Skip to main content

Exploiting Pointer and Location Equivalence to Optimize Pointer Analysis

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 4634))

Abstract

Pointer information is a prerequisite for most program analyses, and inclusion-based, i.e. Andersen-style, pointer analysis is widely used to compute such information. However, current inclusion-based analyses can have prohibitive costs in time and space, especially for programs with millions of lines of code. We present a suite of offline optimizations that exploit pointer and location equivalence to shrink the input to the subsequent pointer analysis without affecting precision, dramatically reducing both analysis time and memory consumption. Using a suite of six open-source C programs ranging in size from 169K to 2.17M LOC, we demonstrate that our techniques on average improve analysis time by 1.3–2.7× and reduce memory consumption by 3.2–6.9× over the best current techniques.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Andersen, L.O.: Program Analysis and Specialization for the C Programming anguage. PhD thesis, DIKU, University of Copenhagen (May 1994)

    Google Scholar 

  2. Berndl, M., Lhotak, O., Qian, F., Hendren, L., Umanee, N.: Points-to analysis using BDDs. In: PLDI. Programming Language Design and Implementation, pp. 103–114 (2003)

    Google Scholar 

  3. Briggs, P., Cooper, K.D., Taylor Simpson, L.: Value numbering. Software Practice and Experience 27(6), 701–724 (1997)

    Article  Google Scholar 

  4. Das, M.: Unification-based pointer analysis with directional assignments. In: PLDI. Programming Language Design and Implementation, pp. 35–46 (2000)

    Google Scholar 

  5. Faehndrich, M., Foster, J.S., Su, Z., Aiken, A.: Partial online cycle elimination in inclusion constraint graphs. In: PLDI. Programming Language Design and Implementation, pp. 85–96 (1998)

    Google Scholar 

  6. Hardekopf, B., Lin, C.: The Ant and the Grasshopper: Fast and accurate pointer analysis for millions of lines of code. In: PLDI. Programming Language Design and Implementation (2007)

    Google Scholar 

  7. Heintze, N., Tardieu, O.: Ultra-fast aliasing analysis using CLA: A million lines of C code in a second. In: PLDI. Programming Language Design and Implementation, pp. 24–34 (2001)

    Google Scholar 

  8. Liang, D., Harrold, M.J.: Equivalence analysis and its application in improving the efficiency of program slicing. ACM Trans. Softw. Eng. Methodol. 11(3), 347–383 (2002)

    Article  Google Scholar 

  9. Necula, G.C., McPeak, S., Rahul, S.P., Weimer, W.: CIL: Intermediate language and tools for analysis and transformation of C programs. In: Computational Complexity, pp. 213–228 (2002)

    Google Scholar 

  10. Pearce, D., Kelly, P., Hankin, C.: Efficient field-sensitive pointer analysis for C. In: PASTE. ACM workshop on Program Analysis for Software Tools and Engineering, pp. 37–42. ACM Press, New York (2004)

    Chapter  Google Scholar 

  11. Pearce, D.J., Kelly, P.H.J., Hankin, C.: Online cycle detection and difference propagation for pointer analysis. In: SCAM. 3rd International IEEE Workshop on Source Code Analysis and Manipulation, pp. 3–12. IEEE Computer Society Press, Los Alamitos (2003)

    Google Scholar 

  12. Rountev, A., Chandra, S.: Off-line variable substitution for scaling points-to analysis. In: PLDI. Programming Language Design and Implementation, pp. 47–56 (2000)

    Google Scholar 

  13. Shapiro, M., Horwitz, S.: Fast and accurate flow-insensitive points-to analysis. In: POPL. ACM Symposium on Principles of Programming Languages, pp. 1–14. ACM Press, New York (1997)

    Chapter  Google Scholar 

  14. Steensgaard, B.: Points-to analysis in almost linear time. In: POPL. ACM Symposium on Principles of Programming Languages, pp. 32–41. ACM Press, New York (1996)

    Google Scholar 

  15. Tarjan, R.: Depth-first search and linear graph algorithms. SIAM J. Comput. 1(2), 146–160 (1972)

    Article  MATH  MathSciNet  Google Scholar 

  16. Whaley, J., Lam, M.S.: Cloning-based context-sensitive pointer alias analysis. In: PLDI. Programming Language Design and Implementation, pp. 131–144 (2004)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Hanne Riis Nielson Gilberto Filé

Rights and permissions

Reprints and permissions

Copyright information

© 2007 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Hardekopf, B., Lin, C. (2007). Exploiting Pointer and Location Equivalence to Optimize Pointer Analysis. In: Nielson, H.R., Filé, G. (eds) Static Analysis. SAS 2007. Lecture Notes in Computer Science, vol 4634. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-74061-2_17

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-74061-2_17

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-74060-5

  • Online ISBN: 978-3-540-74061-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics