skip to main content
article

Error checking with client-driven pointer analysis

Published: 01 October 2005 Publication History

Abstract

This paper presents a new client-driven pointer analysis algorithm that automatically adjusts its precision in response to the needs of client analyses. Using five significant error detection problems as clients, we evaluate our algorithm on 18 real C programs. We compare the accuracy and performance of our algorithm against several commonly used fixed-precision algorithms. We find that the client-driven approach effectively balances cost and precision, often producing results as accurate as fixed-precision algorithms that are many times more costly. Our algorithm works because many client problems only need a small amount of extra precision applied to selected portions of each input program.

References

[1]
{1} L. Andersen, Program analysis and specialization for the C programming language, Ph.D. Thesis, University of Copenhagen, DIKU, DIKU Report 94/19, 1994.]]
[2]
{2} T. Ball, S.K. Rajamani, Automatically validating temporal safety properties of interfaces, in: International SPIN Workshop on Model Checking of Software, May 2001.]]
[3]
{3} D. Brylow, J. Palsberg, Deadline analysis of interrupt-driven software, in: ACM SIGSOFT Symposium on the Foundations of Software Engineering, September 2003, pp. 198-207.]]
[4]
{4} D.R. Chase, M. Wegman, F.K. Zadeck, Analysis of pointers and structures, ACM SIGPLAN Notices 25 (6) (1990) 296-310.]]
[5]
{5} J.-D. Choi, M. Burke, P. Carini, Efficient flow-sensitive interprocedural computation of pointer-induced aliases and side effects, in: ACM (Ed.), Twentieth Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, 1993, pp. 232-245.]]
[6]
{6} R. Cytron, J. Ferrante, B.K. Rosen, M.K. Wegman, F.K. Zadeck, An efficient method of computing static single assignment form, in: 16th Annual ACM Symposium on Principles of Programming Languages, 1989, pp. 25-35.]]
[7]
{7} M. Das, S. Lerner, M. Seigle, ESP: path-sensitive program verification in polynomial time, in: ACM SIGPLAN Conference on Programming Language Design and Implementation, vol. 37 (5) 2002, pp. 57-68.]]
[8]
{8} A. Diwan, K.S. McKinley, J.E.B. Moss, Using types to analyze and optimize object-oriented programs, ACM Transactions on Programming Languages and Systems 23 (2001).]]
[9]
{9} M. Emami, R. Ghiya, L.J. Hendren, Context-sensitive interprocedural points-to analysis in the presence of function pointers, in: Proceedings of the ACM SIGPLAN'94 Conference on Programming Language Design and Implementation, 20-24 June 1994, Orlando, FL, pp. 242-256.]]
[10]
{10} J.S. Foster, M. Fahndrich, A. Aiken, Polymorphic versus monomorphic flow-insensitive points-to analysis for C, in: Static Analysis Symposium, 2000, pp. 175-198.]]
[11]
{11} J.S. Foster, T. Terauchi, A. Aiken, Flow-sensitive type qualifiers, in: Proceedings of the ACM SIGPLAN 2002 Conference on Programming Language Design and Implementation, ACM SIGPLAN Notices 37 (5) (2002) 1-12.]]
[12]
{12} R. Ghiya, L.J. Hendren, Connection analysis: A practical interprocedural heap analysis for C, International Journal of Parallel Programming 24 (6) (1996) 547-578.]]
[13]
{13} S.Z. Guyer, E. Berger, C. Lin, Detecting errors with configurable whole-program dataflow analysis, Technical Report TR 02-04, Dept. of Computer Sciences, University of Texas at Austin, February 2002.]]
[14]
{14} S.Z. Guyer, C. Lin, An annotation language for optimizing software libraries, in: Second Conference on Domain Specific Languages, October 1999, pp. 39-52.]]
[15]
{15} S.Z. Guyer, C. Lin, Optimizing the use of high performance software libraries, in: Languages and Compilers for Parallel Computing, August 2000, pp. 221-238.]]
[16]
{16} S.Z. Guyer, C. Lin, Client-driven pointer analysis, in: 10th Annual International Static Analysis Symposium, June 2003, pp. 214-236.]]
[17]
{17} N. Heintze, O. Tardieu, Demand-driven pointer analysis, in: ACM SIGPLAN Conference on Programming Language Design and Implementation, 2001, pp. 24-34.]]
[18]
{18} M. Hind, Pointer analysis: Haven't we solved this problem yet?, in: Proceedings of the 2001 ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engeneering, PASTE-01, 2001, pp. 54-61.]]
[19]
{19} M. Hind, A. Pioli, Evaluating the effectiveness of pointer alias analyses, Science of Computer Programming 39 (1) (2001) 31-55.]]
[20]
{20} S. Horwitz, T. Reps, M. Sagiv, Demand interprocedural dataflow analysis, in: Proceedings of SIGSOFT'95 Third ACM SIGSOFT Symposium on the Foundations of Software Engineering, October 1995, pp. 104-115.]]
[21]
{21} G.A. Kildall, A unified approach to global program optimization, in: Conference Record of the ACM Symposium on Principles of Programming Languages, 1973, pp. 194-206.]]
[22]
{22} W. Landi, B.G. Ryder, A safe approximation algorithm for interprocedural pointer aliasing, in: Proceedings of the ACM SIGPLAN'96 Programming Language Design and Implementation of Programming Languages, June 1992.]]
[23]
{23} O. Lhotak, L. Hendren, Jedd: A BDD-based relational extension of java, in: SIGPLAN Conference on Programming Language Design and Implementation, June 2004, pp. 158-169.]]
[24]
{24} V.B. Livshits, M.S. Lam, Tracking pointers with path and context sensitivity for bug detection in C programs, in: ACM SIGSOFT Symposium on the Foundations of Software Engineering, September 2003, pp. 317-326.]]
[25]
{25} J. Plevyak, A.A. Chien, Precise concrete type inference for object-oriented languages, ACM SIGPLAN Notices 29 (10) (1994) 324-340.]]
[26]
{26} E. Ruf, Context-insensitive alias analysis reconsidered, in: SIGPLAN Conference on Programming Language Design and Implementation, 1995, pp. 13-22.]]
[27]
{27} U. Shankar, K. Talwar, J.S. Foster, D. Wagner, Detecting format string vulnerabilities with type qualifiers, in: Proceedings of the 10th USENIX Security Symposium, 2001.]]
[28]
{28} M. Shapiro, S. Horwitz, The effects of the precision of pointer analysis, in: Lecture Notes in Computer Science, vol. 1302, 1997.]]
[29]
{29} B. Steensgaard, Points-to analysis in almost linear time, in: Proceedings of the ACM SIGPLAN'96 Symposium on Principles of Programming Languages, 1996, pp. 32-41.]]
[30]
{30} P. Stocks, B.G. Ryder, W. Landi, S. Zhang, Comparing flow and context sensitivity on the modification-side-effects problem, in: International Symposium on Software Testing and Analysis, 1998, pp. 21-31.]]
[31]
{31} E. Stoltz, M. Wolfe, M.P. Gerlek, Constant propagation: a fresh, demand-driven look, in: Proceedings of the 1994 ACM Symposium on Applied Computing, ACM Press, 1994, pp. 400-404.]]
[32]
{32} R. Strom, S. Yemini, Typestate: A programming language concept for enhancing software reliabiity, IEEE Transactions on Software Engineering 12 (1) (1986) 157-171.]]
[33]
{33} L. Wall, T. Christiansen, J. Orwant, Programming Perl, 3rd edition, O'Reilly, 2000.]]
[34]
{34} J. Whaley, M.S. Lam, Cloning-based context-sensitive pointer alias analysis using binary decision diagrams, in: SIGPLAN Conference on Programming Language Design and Implementation, June 2004, pp. 131-144.]]
[35]
{35} R.P. Wilson, M.S. Lam, Efficient context-sensitive pointer analysis for C programs, in: Proceedings of the ACM SIGPLAN'95 Conference on Programming Language Design and Implementation, 1995, pp. 1-12.]]
[36]
{36} S. Zhang, B.G. Ryder, W.A. Landi, Experiments with combined analysis for pointer aliasing, ACM SIGPLAN Notices 33 (7) (1998) 11-18.]]

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Science of Computer Programming
Science of Computer Programming  Volume 58, Issue 1-2
Special issue: Static analysis symposium (SAS 2003)
October 2005
289 pages

Publisher

Elsevier North-Holland, Inc.

United States

Publication History

Published: 01 October 2005

Author Tags

  1. adaptive analysis
  2. context-sensitive
  3. error checking
  4. error detection
  5. flow-sensitive
  6. pointer analysis

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 06 Nov 2024

Other Metrics

Citations

Cited By

View all

View Options

View options

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media