Advertisement

A Relational Static Semantics for Call Graph Construction

  • Xilong Zhuo
  • Chenyi ZhangEmail author
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11852)

Abstract

The problem of resolving virtual method and interface calls in object-oriented languages has been a long standing challenge to the program analysis community. The complexities are due to various reasons, such as increased levels of class inheritance and polymorphism in large programs. In this paper, we propose a new approach called type flow analysis that represent propagation of type information between program variables by a group of relations without the help of a heap abstraction. We prove that regarding the precision on reachability of class information to a variable, our method produces results equivalent to that one can derive from a points-to analysis. Moreover, in practice, our method consumes lower time and space usage, as supported by the experiment result.

Notes

Acknowledgment

We thank Bernhard Scholz for his guidance in our experiment regarding JVM configurations. We also thank anonymous reviewers of ICFEM 2019 for their helpful suggestions to improve the quality of the paper. However due to limited time left before the camera ready deadline we are unable to finish all suggested improvements.

References

  1. 1.
    Soot. https://sable.github.io/soot/. Accessed 10 June 2019
  2. 2.
    SPECjvm2008. https://www.spec.org/jvm2008/. Accessed 18 June 2019
  3. 3.
    Andersen, L.O.: Program analysis and specialization for the C programming language. Ph.D. thesis, DIKU, University of Copenhagen, May 1994Google Scholar
  4. 4.
    Bacon, D.F., Sweeney, P.F.: Fast static analysis of C++ virtual function calls. In: Proceedings of the 11th ACM SIGPLAN Conference on Object-oriented Programming, Systems, Languages, and Applications, OOPSLA 1996, pp. 324–341 (1996)Google Scholar
  5. 5.
    Blackburn, S.M., et al.: The DaCapo benchmarks: Java benchmarking development and analysis. In: Proceedings of the 21st Annual ACM SIGPLAN Conference on Object-oriented Programming Systems, Languages, and Applications, OOPSLA 2006, pp. 169–190 (2006)Google Scholar
  6. 6.
    Boyapati, C., Salcianu, A., W. Beebee, J., Rinard, M.: Ownership types for safe region-based memory management in real-time Java. In: Proceedings of the ACM SIGPLAN 2003 Conference on Programming Language Design and Implementation, PLDI 2003, pp. 324–337 (2003)Google Scholar
  7. 7.
    Chin, W., Craciun, F., Qin, S., Rinard, M.: Region inference for an object-oriented language. In: Proceedings of the ACM SIGPLAN 2004 Conference on Programming Language Design and Implementation, PLDI 2004, pp. 243–254 (2004)Google Scholar
  8. 8.
    Dean, J., Grove, D., Chambers, C.: Optimization of object-oriented programs using static class hierarchy analysis. In: Tokoro, M., Pareschi, R. (eds.) ECOOP 1995. LNCS, vol. 952, pp. 77–101. Springer, Heidelberg (1995).  https://doi.org/10.1007/3-540-49538-X_5CrossRefGoogle Scholar
  9. 9.
    Fernández, M.F.: Simple and effective link-time optimization of Modula-3 programs. In: Proceedings of the ACM SIGPLAN 1995 Conference on Programming Language Design and Implementation, PLDI 1995, pp. 103–115 (1995)Google Scholar
  10. 10.
    Grove, D., DeFouw, G., Dean, J., Chambers, C.: Call graph construction in object-oriented languages. In: Proceedings of the 12th ACM SIGPLAN Conference on Object-oriented Programming, Systems, Languages, and Applications, OOPSLA 1997, pp. 108–124 (1997)Google Scholar
  11. 11.
    Igarashi, A., Pierce, B.C., Wadler, P.: Featherweight Java: a minimal core calculus for Java and GJ. ACM Trans. Program. Lang. Syst. 23(3), 396–450 (2001)CrossRefGoogle Scholar
  12. 12.
    Kanellakis, P.C., Smolka, S.A.: CCS expressions, finite state processes, and three problems of equivalence. Inf. Comput. 86, 43–68 (1990)MathSciNetCrossRefGoogle Scholar
  13. 13.
    Kastrinis, G., Smaragdakis, Y.: Hybrid context-sensitivity for points-to analysis. In: Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2013, pp. 423–434 (2013)Google Scholar
  14. 14.
    Lhoták, O., Hendren, L.: Scaling Java points-to analysis using spark. In: Proceedings of the 12th International Conference on Compiler Construction, CC 2003, pp. 153–169 (2003)Google Scholar
  15. 15.
    Lu, Y., Shang, L., Xie, X., Xue, J.: An incremental points-to analysis with CFL-reachability. In: Proceedings of the 22nd International Conference on Compiler Construction, CC 2013, pp. 61–81 (2013)Google Scholar
  16. 16.
    Milanova, A., Rountev, A., Ryder, B.G.: Parameterized object sensitivity for points-to analysis for Java. ACM Trans. Softw. Eng. Methodol. 14(1), 1–41 (2005)CrossRefGoogle Scholar
  17. 17.
    Paige, R., Tarjan, R.E.: Three partition refinement algorithms. SIAM J. Comput. 16, 973–989 (1987)MathSciNetCrossRefGoogle Scholar
  18. 18.
    Reif, M., Eichberg, M., Hermann, B., Lerch, J., Mezini, M.: Call graph construction for Java libraries. In: Proceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering, FSE 2016, pp. 474–486 (2016)Google Scholar
  19. 19.
    Reps, T.: Program analysis via graph reachability. In: Proceedings of the 1997 International Symposium on Logic Programming, ILPS 1997, pp. 5–19 (1997)Google Scholar
  20. 20.
    Shivers, O.G.: Control-flow analysis of higher-order languages or taming lambda. Ph.D. thesis (1991)Google Scholar
  21. 21.
    Smaragdakis, Y., Bravenboer, M., Lhoták, O.: Pick your contexts well: understanding object-sensitivity. In: Proceedings of the 38th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2011, pp. 17–30 (2011)Google Scholar
  22. 22.
    Sridharan, M., Bodík, R.: Refinement-based context-sensitive points-to analysis for Java. In: Proceedings of the 27th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2006, pp. 387–400 (2006)Google Scholar
  23. 23.
    Sundaresan, V., et al.: Practical virtual method call resolution for Java. In: Proceedings of the 15th ACM SIGPLAN Conference on Object-oriented Programming, Systems, Languages, and Applications, OOPSLA 2000, pp. 264–280. (2000)Google Scholar
  24. 24.
    Tarjan, R.E.: Depth-first search and linear graph algorithms. SIAM J. Comput. 1, 146–160 (1972)MathSciNetCrossRefGoogle Scholar
  25. 25.
    Tan, T., Li, Y., Xue, J.: Making k-object-sensitive pointer analysis more precise with still k-limiting. In: Rival, X. (ed.) SAS 2016. LNCS, vol. 9837, pp. 489–510. Springer, Heidelberg (2016).  https://doi.org/10.1007/978-3-662-53413-7_24CrossRefGoogle Scholar
  26. 26.
    Tip, F., Palsberg, J.: Scalable propagation-based call graph construction algorithms. In: Proceedings of the 15th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications. OOPSLA 2000, pp. 281–293 (2000)Google Scholar

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  1. 1.College of Information Science and TechnologyJinan UniversityGuangzhouChina

Personalised recommendations