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.
This work was supported in part by EPSRC under grants GR/R65169/01 and GR/S79572/01.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
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)
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)
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)
Das, M., et al.: Estimating the Impact of Scalable Pointer Analysis on Optimization. In: Intl. Static Analysis Symp., July, pp. 260-278 (2001)
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)
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)
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)
Hall, M., et al.: Maximizing Multiprocessor Performance with the SUIF Compiler. IEEE Computer 29(12), 84–89 (1996)
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)
Hwang, Y.-S., et al.: Probabilistic Points-to Analysis. In: Intl. Wksp on Languages and Compilers for Parallel Computing, August, pp. 290-305 (2001)
Landi, W.: Undecidability of Static Analysis. ACM Letters on Programming Languages and Systems 1(4), 323–337 (1992)
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)
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)
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)
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)
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)
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)
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)
Ramalingam, G.: Data Flow Frequency Analysis. In: Conf. on Programming Language Design and Implementation, May, pp. 267-277 (1996)
Rugina, R., Rinard, M.: Span: A shape and Pointer Analysis Package. Technical report, M.I.T. LCSTM-581 (June 1998)
Rugina, R., Rinard, M.: Pointer Analysis for Multithreaded Programs. In: Conf. on Programming Language Design and Implementation, May, pp. 77-90 (1999)
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)
Standard Performance Evaluation Corporation. www.spec.org/cpu2000
Steensgaard, B.: Points-to Analysis in Almost Linear Time. In: Symp. on Principles of Programming Languages, January, pp. 32-41 (1996)
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)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2007 Springer Berlin Heidelberg
About this paper
Cite this paper
Ribeiro, C.G., Cintra, M. (2007). Quantifying Uncertainty in Points-To Relations. In: Almási, G., Caşcaval, C., Wu, P. (eds) Languages and Compilers for Parallel Computing. LCPC 2006. Lecture Notes in Computer Science, vol 4382. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-72521-3_15
Download citation
DOI: https://doi.org/10.1007/978-3-540-72521-3_15
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-72520-6
Online ISBN: 978-3-540-72521-3
eBook Packages: Computer ScienceComputer Science (R0)