Abstract
The full call strings method is the most general, simplest, and most precise method of performing context sensitive interprocedural data flow analysis. It remembers contexts using call strings. For full precision, all call strings up to a prescribed length must be constructed. Two limitations of this method are (a) it cannot be used for frameworks with infinite lattices, and (b) the prescribed length is quadratic in the size of the lattice resulting in an impractically large number of call strings. These limitations have resulted in a proliferation of ad hoc methods which compromise on generality, precision, or simplicity.
We propose a variant of the classical full call strings method which reduces the number of call strings, and hence the analysis time, by orders of magnitude as corroborated by our empirical measurements. It reduces the worst case call string length from quadratic in the size of the lattice to linear. Further, unlike the classical method, this worst case length need not be reached. Our approach retains the precision, generality, and simplicity of call strings method without imposing any additional constraints. It can accommodate demand-driven approximations and hence can be used for frameworks with infinite lattices.
Chapter PDF
Similar content being viewed by others
Keywords
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.
References
Aho, A.V., Lam, M.S., Sethi, R., Ullman, J.D.: Compilers: Principles, Techniques, and Tools, 2nd edn. Addison-Wesley Longman Publishing Co., Inc. (2006)
Alt, M., Martin, F.: Generation of efficient interprocedural analyzers with PAG. In: Static Analysis Symposium, pp. 33–50 (September 1995)
Amiranoff, P., Cohen, A., Feautrier, P.: Beyond iteration vectors: Instancewise relational abstract domains. In: Static Analysis Symposium, pp. 161–180 (2006)
Burke, M., Carini, P., Choi, J., Hind, M.: Flow-insensitive interprocedural alias analysis in the pressence of pointers. In: Pingali, K.K., Gelernter, D., Padua, D.A., Banerjee, U., Nicolau, A. (eds.) LCPC 1994. LNCS, vol. 892, Springer, Heidelberg (1995)
Emami, M., Ghiya, R., Hendren, L.J.: Context-sensitive interprocedural points-to analysis in the presence of function pointers. In: Proc. of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 242–256 (1994)
Esparza, J., Knoop, J.: An automata-theoretic approach to interprocedural data-flow analysis. In: Foundations of Software Science and Computation Structure, pp. 14–30 (1999)
Fahndrich, M., Rehof, J., Das, M.: Scalable context-sensitive flow analysis using instantiation constraints. In: Proc. of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 253–263 (2000)
Gulwani, S., Tiwari, A.: Computing procedure summaries for interprocedural analysis. In: De Nicola, R. (ed.) ESOP 2007. LNCS, vol. 4421, pp. 253–267. Springer, Heidelberg (2007)
Hardekopf, B., Lin, C.: The ant and the grasshopper: fast and accurate pointer analysis for millions of lines of code. In: Proc. of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 290–299 (2007)
Horwitz, S., Reps, T., Sagiv, M.: Demand interprocedural dataflow analysis. In: 3rd ACM Symposium on Foundations of Software Engineering, pp. 104–115 (1995)
Kanade, A., Khedker, U.P., Sanyal, A.: Heterogeneous fixed points with application to points-to analysis. In: Proc. of the Asian Symposium on Programming Languages and Systems, pp. 298–314 (2005)
Karkare, B., Khedker, U.P.: An improved bound for call-strings based interprocedural analysis of bit vector frameworks. ACM Trans. Program. Lang. Syst. 29(6), 38 (2007)
Lattner, C., Lenharth, A., Adve, V.: Making context-sensitive points-to analysis with heap cloning practical for the real world. In: Proc. of the ACM SIGPLAN Conference on Programming Language Design and Implementation (June 2007)
Lhoták, O., Hendren, L.J.: Context-sensitive points-to analysis: is it worth it? In: Mycroft, A., Zeller, A. (eds.) CC 2006. LNCS, vol. 3923, pp. 47–64. Springer, Heidelberg (2006)
Liang, D., Harrold, M.J.: Efficient points-to analysis for whole-program analysis. SIGSOFT Software Engineering Notes 24(6), 199–215 (1999)
Milanova, A.: Light context-sensitive points-to analysis for java. In: Proc. of ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering (June 2007)
Müller-Olm, M., Seidl, H.: Precise interprocedural analysis through linear algebra. In: Proc. of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, New York, NY, USA, pp. 330–341 (2004)
Murphy, B.R., Lam, M.S.: Program analysis with partial transfer functions. In: Proc. of the 2000 ACM SIGPLAN Workshop on Partial Evaluation and Semantics-based Program Manipulation, pp. 94–103 (2000)
Reps, T., Horwitz, S., Sagiv, M.: Precise interprocedural dataflow analysis via graph reachability. In: Proc. of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 49–61 (1995)
Reps, T., Schwoon, S., Jha, S., Melski, D.: Weighted pushdown systems and their application to interprocedural dataflow analysis. Science of Computer Programming 58(1-2), 206–263 (2005)
Sagiv, M., Reps, T., Horwitz, S.: Precise interprocedural dataflow analysis with applications to constant propagation. Theoretical Computer Science 167(1–2), 131–170 (1996)
Sharir, M., Pnueli, A.: Two approaches to interprocedural data flow analysis. In: Muchnick, S.S., Jones, N.D. (eds.) Program Flow Analysis: Theory and Applications, Prentice-Hall Inc., Englewood Cliffs (1981)
Whaley, J., Lam, M.S.: Cloning-based context-sensitive pointer alias analysis using binary decision diagrams. In: Proc. of the ACM SIGPLAN Conference on Programming language design and implementation (June 2004)
Wilson, R.P., Lam, M.S.: Efficient context-sensitive pointer analysis for C programs. In: Proc. of the ACM SIGPLAN Conference on Programming Language Design and Implementation (1995)
Zhu, J.: Towards scalable flow and context sensitive pointer analysis. In: Proc. of the 42nd Annual Conference on Design Automation, pp. 831–836 (2005)
Zhu, J., Calman, S.: Symbolic pointer analysis revisited. In: Proc. of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 145–157 (2004)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2008 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Khedker, U.P., Karkare, B. (2008). Efficiency, Precision, Simplicity, and Generality in Interprocedural Data Flow Analysis: Resurrecting the Classical Call Strings Method. In: Hendren, L. (eds) Compiler Construction. CC 2008. Lecture Notes in Computer Science, vol 4959. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-78791-4_15
Download citation
DOI: https://doi.org/10.1007/978-3-540-78791-4_15
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-78790-7
Online ISBN: 978-3-540-78791-4
eBook Packages: Computer ScienceComputer Science (R0)