Practical virtual method call resolution for Java
- 1 October 2000
- proceedings article
- Published by Association for Computing Machinery (ACM)
- Vol. 35 (10) , 264-280
- https://doi.org/10.1145/353171.353189
Abstract
This paper addresses the problem of resolving virtual method and interface calls in Java bytecode. The main focus is on a new practical technique that can be used to analyze large applications. Our fundamental design goal was to develop a technique that can be solved with only one iteration, and thus scales linearly with the size of the program, while at the same time providing more accurate results than two popular existing linear techniques, class hierarchy analysis and rapid type analysis.We present two variations of our new technique, variable-type analysis and a coarser-grain version called declared-type analysis. Both of these analyses are inexpensive, easy to implement, and our experimental results show that they scale linearly in the size of the program.We have implemented our new analyses using the Soot frame-work, and we report on empirical results for seven benchmarks. We have used our techniques to build accurate call graphs for complete applications (including libraries) and we show that compared to a conservative call graph built using class hierarchy analysis, our new variable-type analysis can remove a significant number of nodes (methods) and call edges. Further, our results show that we can improve upon the compression obtained using rapid type analysis.We also provide dynamic measurements of monomorphic call sites, focusing on the benchmark code excluding libraries. We demonstrate that when considering only the benchmark code, both rapid type analysis and our new declared-type analysis do not add much precision over class hierarchy analysis. However, our finer-grained variable-type analysis does resolve significantly more call sites, particularly for programs with more complex uses of objectsKeywords
This publication has 23 references indexed in Scilit:
- Scalable propagation-based call graph construction algorithmsPublished by Association for Computing Machinery (ACM) ,2000
- Optimizing Java Bytecode Using the Soot Framework: Is It Feasible?Published by Springer Nature ,2000
- Practical experience with an application extractor for JavaPublished by Association for Computing Machinery (ACM) ,1999
- Simple and effective analysis of statically-typed object-oriented programsPublished by Association for Computing Machinery (ACM) ,1996
- Precise concrete type inference for object-oriented languagesACM SIGPLAN Notices, 1994
- Optimizing dynamically-dispatched calls with run-time type feedbackPublished by Association for Computing Machinery (ACM) ,1994
- Constraint-based type inference and parametric polymorphismPublished by Springer Nature ,1994
- Constructing call multigraphs using dependence graphsPublished by Association for Computing Machinery (ACM) ,1993
- Efficient call graph analysisACM Letters on Programming Languages and Systems, 1992
- Efficient implementation of the smalltalk-80 systemPublished by Association for Computing Machinery (ACM) ,1984