Advertisement

Quantifying Uncertainty in Points-To Relations

  • Constantino G. Ribeiro
  • Marcelo Cintra
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4382)

Abstract

For programs that make extensive use of pointers, pointer analysis is often critical for the effectiveness of optimizing compilers and tools for reasoning about program behavior and correctness. Static pointer analysis has been extensively studied and several algorithms have been proposed, but these only provide approximate solutions. As such inaccuracy may hinder further optimizations, it is important to understand how short these algorithms come of providing accurate information about the points-to relations.

This paper attempts to quantify the amount of uncertainty of the points-to relations that remains after a state-of-the-art context- and flow-sensitive pointer analysis algorithm is applied to a collection of programs from two well-known benchmark suites: SPEC integer and MediaBench. This remaining static uncertainty is then compared to the run-time behavior. Unlike previous work that compared run-time behavior against less accurate context- and flow-insensitive algorithms, the goal of this work is to quantify the amount of uncertainty that is intrinsic to the applications and that defeat even the most accurate static analyses.

Experimental results show that often the static pointer analysis is very accurate, but for some benchmarks a significant fraction, up to 25%, of their accesses via pointer de-references cannot be statically fully disambiguated. We find that some 27% of these de-references turn out to access a single memory location at run time, but many do access several different memory locations. We find that the main reasons for this are the use of pointer arithmetic and the fact that some control paths are not taken. The latter is an example of a source of uncertainty that is intrinsic to the application.

Keywords

Pointer Analysis Memory Location Static Access Pointer Arithmetic Program Point 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Altucher, R.Z., Landi, W.: An Extended Form of Must Alias Analysis for Dynamic Allocation. In: Symp. on Principles of Programming Languages, January, pp. 74-84 (1995)Google Scholar
  2. 2.
    Chen, P.-S., et al.: Compiler Support for Speculative Multithreading Architecture with Probabilistic Points-to Analysis. In: Symp. on Principles and Practice of Parallel Programming, June, pp. 25-36 (2003)Google Scholar
  3. 3.
    Cheng, B., Hwu, W.-M.: Modular Interprocedural Pointer Analysis using Access Paths: Design, Implementation, and Evaluation. In: Conf. on Programming Language Design and Implementation, June, pp. 57-69 (2000)Google Scholar
  4. 4.
    Das, M., et al.: Estimating the Impact of Scalable Pointer Analysis on Optimization. In: Intl. Static Analysis Symp., July, pp. 260-278 (2001)Google Scholar
  5. 5.
    Emami, M., Ghiya, R., Hendren, L.J.: Context-Sensitive Interprocedural Points-to Analysis in the Presence of Function Pointers. In: Conf. on Programming Language Design and Implementation, June, pp. 242-256 (1994)Google Scholar
  6. 6.
    Ghiya, R., Hendren, L.J.: Is it a Tree, a DAG, or a Cyclic Graph? A Shape Analysis for Heap-Directed Pointers in C. In: Symp. on Principles of Programming Languages, January, pp. 1-15 (1996)Google Scholar
  7. 7.
    Ghiya, R., Lavery, D., Sehr, D.: On the Importance of Points-To Analysis and Other Memory Disambiguation Methods for C Programs. In: Conf. on Programming Language Design and Implementation, June, pp. 47-58 (2001)Google Scholar
  8. 8.
    Hall, M., et al.: Maximizing Multiprocessor Performance with the SUIF Compiler. IEEE Computer 29(12), 84–89 (1996)Google Scholar
  9. 9.
    Hind, M.: Pointer Analysis: Haven’t We Solved This Problem Yet? In: Wksp. on Program Analysis for Software Tools and Engineering, June pp. 54-61 (2001)Google Scholar
  10. 10.
    Hwang, Y.-S., et al.: Probabilistic Points-to Analysis. In: Intl. Wksp on Languages and Compilers for Parallel Computing, August, pp. 290-305 (2001)Google Scholar
  11. 11.
    Landi, W.: Undecidability of Static Analysis. ACM Letters on Programming Languages and Systems 1(4), 323–337 (1992)CrossRefGoogle Scholar
  12. 12.
    Lee, C., Potkonjak, M., Mangione-Smith, W.H.: MediaBench: A Tool for Evaluating and Synthesizing Multimedia and Communications Systems. In: Intl. Symp. on Microarchitecture, December, pp. 330-335 (1997)Google Scholar
  13. 13.
    Liang, D., Pennings, M., Harrold, M.J.: Evaluating the Precision of Static Reference Analysis Using Profiling. In: Intl. Symp. on Software Testing and Analysis, July, pp. 22-32 (2002)Google Scholar
  14. 14.
    Lin, J., et al.: A Compiler Framework for Speculative Analysis and Optimizations. In: Conf. on Programming Language Design and Implementation, June, pp. 289-299 (2003)Google Scholar
  15. 15.
    Mock, M., et al.: Dynamic Points-to Sets: A Comparison with Static Analyses and Potential Applications in Program Understanding and Optimization. In: Wksp. on Program Analysis for Software Tools and Engineering, June, pp. 66-72 (2001)Google Scholar
  16. 16.
    Mock, M., et al.: Improving Program Slicing with Dynamic Points-to Data. In: Intl. Symp. on Foundations of Software Engineering, November, pp. 71-80 (2002)Google Scholar
  17. 17.
    Nystrom, E.M., Kim, H.-S., Hwu, W.-M.: Importance of Heap Specialization in Pointer Analysis. In: Wksp. on Program Analysis for Software Tools and Engineering, June, pp. 43-48 (2004)Google Scholar
  18. 18.
    Nystrom, E.M., Kim, H.-S., Hwu, W.-M.: Bottom-Up and Top-Down Context-Sensitive Summary-Based Pointer Analysis. In: Intl. Static Analysis Symp., August, pp. 165-180 (2004)Google Scholar
  19. 19.
    Ramalingam, G.: Data Flow Frequency Analysis. In: Conf. on Programming Language Design and Implementation, May, pp. 267-277 (1996)Google Scholar
  20. 20.
    Rugina, R., Rinard, M.: Span: A shape and Pointer Analysis Package. Technical report, M.I.T. LCSTM-581 (June 1998)Google Scholar
  21. 21.
    Rugina, R., Rinard, M.: Pointer Analysis for Multithreaded Programs. In: Conf. on Programming Language Design and Implementation, May, pp. 77-90 (1999)Google Scholar
  22. 22.
    Sagiv, M., Reps, T., Wilhelm, R.: Parametric Shape Analysis via 3-valued Logic. In: Symp. on Principles of Programming Languages, January, pp. 105-118 (1999)Google Scholar
  23. 23.
    Standard Performance Evaluation Corporation. www.spec.org/cpu2000
  24. 24.
    Steensgaard, B.: Points-to Analysis in Almost Linear Time. In: Symp. on Principles of Programming Languages, January, pp. 32-41 (1996)Google Scholar
  25. 25.
    Wilson, R.P., Lam, M.S.: Efficient Context-Sensitive Pointer Analysis for C Programs. In: Conf. on Programming Language Design and Implementation, June, pp. 1-12 (1995)Google Scholar

Copyright information

© Springer Berlin Heidelberg 2007

Authors and Affiliations

  • Constantino G. Ribeiro
    • 1
  • Marcelo Cintra
    • 1
  1. 1.School of Informatics, University of Edinburgh 

Personalised recommendations