Hostname: page-component-586b7cd67f-vdxz6 Total loading time: 0 Render date: 2024-11-24T13:46:06.801Z Has data issue: false hasContentIssue false

Precise complexity guarantees for pointer analysis via Datalog with extensions*

Published online by Cambridge University Press:  14 October 2016

K. TUNCAY TEKLE
Affiliation:
Computer Science Department, Stony Brook University, Stony Brook, NY, USA (e-mail: [email protected], [email protected])
YANHONG A. LIU
Affiliation:
Computer Science Department, Stony Brook University, Stony Brook, NY, USA (e-mail: [email protected], [email protected])

Abstract

Pointer analysis is a fundamental static program analysis for computing the set of objects that an expression can refer to. Decades of research has gone into developing methods of varying precision and efficiency for pointer analysis for programs that use different language features, but determining precisely how efficient a particular method is has been a challenge in itself.

For programs that use different language features, we consider methods for pointer analysis using Datalog and extensions to Datalog. When the rules are in Datalog, we present the calculation of precise time complexities from the rules using a new algorithm for decomposing rules for obtaining the best complexities. When extensions such as function symbols and universal quantification are used, we describe algorithms for efficiently implementing the extensions and the complexities of the algorithms.

Type
Regular Papers
Copyright
Copyright © Cambridge University Press 2016 

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Footnotes

*

This work was supported in part by NSF under grants CCF-1414078, IIS-1447549, CCF-1248184, CCF-0964196, and ONR under grant N000141512208.

References

Andersen, L. O. 1994. Program analysis and specialization for the c programming language. Ph.D. thesis, DIKU, University of Copenhagen, Copenhagen, Denmark.Google Scholar
Avots, D., Dalton, M., Livshits, V. B. and Lam, M. S. 2005. Improving software security with a C pointer analysis. In Prof. of the 27th Intl. Conf. on Software Engineering, 332–341.Google Scholar
Ceri, S., Gottlob, G. and Tanca, L. 1990. Logic Programming and Databases. Springer.Google Scholar
Diwan, A., McKinley, K. S. and Moss, J. E. B. 1998. Type-based alias analysis. In Proc. of the ACM SIGPLAN Conf. on Programming Language Design and Implementation, 106–117.Google Scholar
Ghiya, R. and Hendren, L. J. 1998. Putting pointer analysis to work. In Proc. of the 25th ACM SIGPLAN-SIGACT Symp. on Principles of Programming Languages, 121–133.Google Scholar
Ghiya, R., Lavery, D. M. and Sehr, D. C. 2001. On the importance of points-to analysis and other memory disambiguation methods for C programs. In Proc. of the 2001 ACM SIGPLAN Conf. on Programming Language Design and Implementation, 47–58.Google Scholar
Gorbovitski, M., Liu, Y. A., Stoller, S. D., Rothamel, T. and Tekle, T. 2010. Alias analysis for optimization of dynamic languages. In Proceedings of the 6th Symposium on Dynamic Languages. ACM Press, 2742.CrossRefGoogle Scholar
Goyal, D. 2005. Transformational derivation of an improved alias analysis algorithm. Higher-Order and Symbolic Computation 18, 1–2, 1549.Google Scholar
Hardekopf, B. and Lin, C. 2007. The ant and the grasshopper: Fast and accurate pointer analysis for millions of lines of code. In Proc. of the ACM SIGPLAN 2007 Conf. on Programming Language Design and Implementation, 290–299.Google Scholar
Heintze, N. and Tardieu, O. 2001. Ultra-fast aliasing analysis using CLA: A million lines of C code in a second. In Proc. of the 2001 ACM SIGPLAN Conf. on Programming Language Design and Implementation, 254–263.Google Scholar
Hind, M. 2001. Pointer analysis: Haven't we solved this problem yet? In Proc. of the 2001 ACM SIGPLAN-SIGSOFT Workshop on Program Analysis For Software Tools and Engineering, 54–61.Google Scholar
Hind, M., Burke, M. G., Carini, P. R. and Choi, J. 1999. Interprocedural pointer alias analysis. ACM Trans. Program. Lang. Syst. 21, 4, 848894.Google Scholar
Hind, M. and Pioli, A. 2000. Which pointer analysis should I use? In Proc. of the 2000 ACM SIGSOFT Intl. Symp. on Software Testing and Analysis, 113–123.Google Scholar
Landi, W. 1992. Undecidability of static analysis. ACM Letters on Programming Languages and Systems 1, 4, 323337.Google Scholar
Liu, Y. A. and Stoller, S. D. 2009. From Datalog rules to efficient programs with time and space guarantees. ACM Trans. Program. Lang. Syst. 31, 6 (Aug.), 21:121:38.Google Scholar
Liu, Y. A., Stoller, S. D., Lin, B. and Gorbovitski, M. 2012. From clarity to efficiency for distributed algorithms. In Proc. of the 27th ACM SIGPLAN Conf. on Object-Oriented Programming, Systems, Languages and Applications, 395–410.Google Scholar
Milanova, A., Rountev, A. and Ryder, B. G. 2005. Parameterized object sensitivity for points-to analysis for java. ACM Trans. Softw. Eng. Methodol. 14, 1, 141.Google Scholar
Pearce, D. J., Kelly, P. H. J. and Hankin, C. 2007. Efficient field-sensitive pointer analysis of C. ACM Trans. Program. Lang. Syst. 30, 1.Google Scholar
Ramalingam, G. 1994. The undecidability of aliasing. ACM Trans. Program. Lang. Syst. 16, 5, 14671471.Google Scholar
Sagiv, S., Reps, T. W. and Wilhelm, R. 1998. Solving shape-analysis problems in languages with destructive updating. ACM Trans. Program. Lang. Syst. 20, 1, 150.Google Scholar
Saha, D. and Ramakrishnan, C. R. 2005. Incremental and demand-driven points-to analysis using logic programming. In Proc. of the 7th Intl. ACM SIGPLAN Conf. on Principles and Practice of Declarative Programming, 117–128.Google Scholar
Schreye, D. D. and Decorte, S. 1994. Termination of logic programs: The never-ending story. The Journal of Logic Programming 19/20, 199260.CrossRefGoogle Scholar
Selinger, P. G., Astrahan, M. M., Chamberlin, D. D., Lorie, R. A. and Price, T. G. 1979. Access path selection in a relational database management system. In Proc. of the 1979 ACM SIGMOD Intl. Conf. on Management of Data, 23–34.Google Scholar
Shapiro, M. and Horwitz, S. 1997. The effects of the precision of pointer analysis. In Proc. of the 4th Intl. Symp. on Static Analysis, 16–34.Google Scholar
Sharir, M. and Pnueli, A. 1981. Two approaches to interprocedural data flow analysis. In Program Flow Analysis: Theory and Applications. Prentice-Hall, Chapter 7, 189–233.Google Scholar
Shivers, O. G. 1991. Control-flow analysis of higher-order languages of taming lambda. Ph.D. thesis, Carnegie Mellon University, Pittsburgh, PA, USA.Google Scholar
Smaragdakis, Y. and Balatsouras, G. 2015. Pointer analysis. Foundations and Trends in Programming Languages 2, 1, 169.CrossRefGoogle Scholar
Smaragdakis, Y., Bravenboer, M. and Lhoták, O. 2011. Pick your contexts well: Understanding object-sensitivity. In Proc. of the 38th Symp. on Principles of Programming Languages, 17–30.Google Scholar
Sridharan, M. and Fink, S. J. 2009. The complexity of Andersen's analysis in practice. In Proc. of the 16th Intl. Symp. on Static Analysis, 205–221.Google Scholar
Steensgaard, B. 1996. Points-to analysis in almost linear time. In Conf. Record of the 23rd ACM SIGPLAN-SIGACT Symp. on Principles of Programming Languages, 32–41.Google Scholar
Steinbrunn, M., Moerkotte, G. and Kemper, A. 1997. Heuristic and randomized optimization for the join ordering problem. The VLDB Journal 6, 3, 191208.Google Scholar
Tekle, K. T. and Liu, Y. A. 2010. Precise complexity analysis for efficient Datalog queries. In Proc. of the 12th Intl. ACM SIGPLAN Conf. on Principles and Practice of Declarative Programming, 35–44.Google Scholar
Tekle, K. T. and Liu, Y. A. 2011. More efficient Datalog queries: Subsumptive tabling beats magic sets. In Proc. of the 2011 ACM SIGMOD Intl. Conf. on Management of Data, 661–672.Google Scholar
Tekle, K. T. and Liu, Y. A. 2016. Precise Complexity Guarantees for Pointer Analysis via Datalog with Extensions. ArXiv e-prints.Google Scholar
Wilson, R. P. and Lam, M. S. 1995. Efficient context-sensitive pointer analysis for C programs. In Proc. of the ACM SIGPLAN'95 Conf. on Programming Language Design and Implementation, 1–12.Google Scholar
Zheng, X. and Rugina, R. 2008. Demand-driven alias analysis for C. In Proc. of the 35th ACM SIGPLAN-SIGACT Symp. on Principles of Programming Languages, 197–208.Google Scholar