ACM Home Page
Please provide us with feedback. Feedback
Efficient field-sensitive pointer analysis of C
Full text PdfPdf (925 KB)
Source
ACM Transactions on Programming Languages and Systems (TOPLAS) archive
Volume 30 ,  Issue 1  (November 2007) table of contents
Article No. 4  
Year of Publication: 2007
ISSN:0164-0925
Authors
David J. Pearce  Victoria University of Wellington, Wellington, New Zealand
Paul H.J. Kelly  Imperial College, London, United Kingdom
Chris Hankin  Imperial College, London, United Kingdom
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 16,   Downloads (12 Months): 216,   Citation Count: 3
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1290520.1290524
What is a DOI?

ABSTRACT

The subject of this article is flow- and context-insensitive pointer analysis. We present a novel approach for precisely modelling struct variables and indirect function calls. Our method emphasises efficiency and simplicity and is based on a simple language of set constraints. We obtain an O(v4) bound on the time needed to solve a set of constraints from this language, where v is the number of constraint variables. This gives, for the first time, some insight into the hardness of performing field-sensitive pointer analysis of C. Furthermore, we experimentally evaluate the time versus precision trade-off for our method by comparing against the field-insensitive equivalent. Our benchmark suite consists of 11 common C programs ranging in size from 15,000 to 200,000 lines of code. Our results indicate the field-sensitive analysis is more expensive to compute, but yields significantly better precision. In addition, our technique has been integrated into the latest release (version 4.1) of the GNU Compiler GCC. Finally, we identify several previously unknown issues with an alternative and less precise approach to modelling struct variables, known as field-based analysis.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
 
2
 
3
Aiken, A., and Wimmers, E. L. 1992. Solving systems of set constraints. In Proceedings of the IEEE Symposium on Logic in Computer Science (LICS). IEEE Computer Society Press, Los Alamitos, CA, 329--340.
4
 
5
 
6
Andersen, L. O. 1994. Program analysis and specialization for the C programming language. Ph.D. dissertation. DIKU, University of Copenhagen.
 
7
 
8
Berlin, D. 2005. Structure aliasing in GCC. In Proceedings of the GCC Developers Summit. 25--36.
9
 
10
Binkley, D. 1998. The application of program slicing to regression testing. Inf. Softw. Tech. 40, 11--12, 583--594.
 
11
12
13
 
14
Bourdoncle, F. 1993b. Efficient chaotic iteration strategies with widenings. In Proceedings of the Conference on Formal Methods in Programming and Their Applications. Lecture Notes in Computer Science, vol. 735. Springer-Verlag, New York, 128--141.
15
16
 
17
Chandra, S. and Reps, T. 1999b. Physical type checking for C. Technical Report BL0113590-990302-04, Lucent Technologies, Bell Laboratories.
18
19
20
21
 
22
23
24
 
25
Eichin, M. W. and Rochlis, J. A. 1989. With microscope and tweezers: An analysis of the internet virus of November 1988. In Proceedings of the IEEE Symposium on Research in Security and Privacy. IEEE Computer Society Press, Los Alamitos, CA, 326--343.
26
27
28
 
29
 
30
 
31
Flanagan, C. 1997. Effective static debugging via componential set-based analysis. Ph.D. dissertation. Rice University.
32
 
33
34
 
35
 
36
37
 
38
 
39
40
41
42
 
43
44
45
 
46
Henzinger, T. A., Jhala, R., Majumdar, R., and Sutre, G. 2003. Software verification with Blast. In Proceedings of the Workshop on Model Checking Software. Lecture Notes in Computer Science, vol. 2648. Springer-Verlag, New York, 235--239.
47
48
 
49
50
 
51
 
52
 
53
ISO90 1990. ISO/IEC. international standard ISO/IEC 9899, programming languages - C.
 
54
55
 
56
Jones, N. D. and Muchnick, S. S. 1981. Flow analysis and optimization of lisp-like structures. In Program Flow Analysis: Theory and Applications, S. S. Muchnick and N. D. Jones, Eds. Prentice-Hall, Englewood Cliff, 102--131.
 
57
Kodumal, J. and Aiken, A. 2005. Banshee: A scalable constraint-based analysis toolkit. In Proceedings of the Static Analysis Symposium, SAS. Lecture Notes in Computer Science, vol. 3672. Springer-Verlag, New York, 218--234.
 
58
59
 
60
Lhotak, O. and Hendren, L. J. 2003. Scaling Java points-to analysis using SPARK. In Proceedings of the Conference on Compiler Construction (CC). Lecture Notes in Computer Science, vol. 2622. Springer-Verlag, New York, 153--169.
61
62
63
64
65
66
 
67
 
68
 
69
Nystrom, E. M., Kim, H.-S., and Hwu, W.-M. W. 2004a. Bottom-up and top-down context-sensitive summary-based pointer analysis. In Proceedings of the Static Analysis Symposium (SAS). Lecture Notes in Computer Science, vol. 3148. Springer-Verlag, New York, 165--180.
70
 
71
72
 
73
Pearce, D. J. 2005. Some directed graph algorithms and their application to pointer analysis (online version available at http://www.mcs.vuw.ac.nz/djp). Ph.D. dissertation, Imperial College, London, United Kingdom.
 
74
Pearce, D. J. and Kelly, P. H. J. 2004. A dynamic algorithm for topologically sorting directed acyclic graphs. In Proceedings of the Workshop on Efficient and Experimental Algorithms (WEA). Lecture Notes in Computer Science, vol. 3059. Springer-Verlag, New York, 383--398.
75
 
76
Pearce, D. J., Kelly, P. H. J., and Hankin, C. 2003. Online cycle detection and difference propagation for pointer analysis. In Proceedings of the IEEE Workshop on Source Code Analysis and Manipulation (SCAM). IEEE Computer Society Press, Los Alamitos, CA, 3--12.
77
 
78
79
 
80
 
81
 
82
Reynolds, J. C. 1969. Automatic computation of data set definitions. In Proceedings of the Information Processing Congress (IFIP). Vol. 1. North-Holland, Amsterdam, The Netherlands, 456--461.
83
84
85
 
86
87
 
88
Shmueli, O. 1983. Dynamic cycle detection. Inf. Proc. Lett. 17, 4 (Nov.), 185--188.
89
90
91
92
 
93
SUIF2. The SUIF 2 research compiler Stanford University, Stanford, CA, http://suif.stanford.edu.
 
94
 
95
Tarjan, R. E. 1972. Depth-first search and linear graph algorithms. SIAM J. Comput. 1, 2, 146--160.
 
96
97
 
98
Wagner, D., Foster, J. S., Brewer, E. A., and Aiken, A. 2000. A first step towards automated detection of buffer overrun vulnerabilities. In Proceedings of the Network and Distributed System Security Symposium (NDSS). The Internet Society, 3--17.
 
99
100
 
101
102
 
103
104


Collaborative Colleagues:
David J. Pearce: colleagues
Paul H.J. Kelly: colleagues
Chris Hankin: colleagues