Advertisement

Completeness Analysis for Incomplete Object-Oriented Programs

  • Jingling Xue
  • Phung Hua Nguyen
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3443)

Abstract

We introduce a new approach, called completeness analysis, to computing points-to sets for incomplete Java programs such as library modules or applications in the presence of dynamic class loading. One distinctive feature of this work is that the access and modification properties of fields are taken into account. By combining with a whole-program points-to analysis, completeness analysis yields not only the required points-to sets but also determines which points-to sets and call sites are complete (when the pointed-to objects and target methods are statically resolvable) or not. Such a compositional approach yields more precise points-to sets than those computed by the points-to analysis alone. In addition, our technique also determines (for the first time) which objects may be incompletely detectable, i.e., may be missing in some statically computed points-to sets. We provide experimental evidence to demonstrate that better analysis precision in benchmarks is obtained when the field access and modification properties are exploited. In particular, we are able to find significantly more complete and mono call sites in an incomplete program, which is useful in devirtualisation and inlining. Our analysis is simple since it is flow- and context-insensitive and achieves these improvements at reasonably small analysis costs.

Keywords

Completeness Analysis Call Graph Target Method Library Module Call Site 
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

  1. 1.
    Andersen, L.O.: Program Analysis and Specialization for the C Programming Language. PhD thesis, DIKU, University of Copenhagen (May 1994)Google Scholar
  2. 2.
    Blanchet, B.: Escape analysis: Correctness proof, implementation and experimental results. In: 25th Annual ACM Symposium on Principles of Programming Languages, pp. 25–37 (January 1998)Google Scholar
  3. 3.
    Chatterjee, R., Ryder, B.G.: Data-flow-based testing of object-oriented libraries. Technical Report 433, Rutgers University (2001)Google Scholar
  4. 4.
    Choi, J.-D., Gupta, M., Serrano, M.J., Sreedhar, V.C., Midkiff, S.P.: Escape analysis for Java. In: 14th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages and Applications, pp. 1–19 (November 1999)Google Scholar
  5. 5.
    Dean, J., Grove, D., Chambers, C.: Optimization of object-oriented programs using static class hierarchy analysis. In: Olthoff, W. (ed.) ECOOP 1995. LNCS, vol. 952, pp. 77–101. Springer, Heidelberg (1995)Google Scholar
  6. 6.
    Ghemawat, S., Randall, K.H., Scales, D.J.: Field analysis: Getting useful and low-cost interprocedural information. In: ACM SIGPLAN 2000 Conference on Programming Language Design and Implementation (June 2000)Google Scholar
  7. 7.
    Harrold, M.J., Rothermel, G.: Separate computation of alias information for reuse. IEEE Transaction on Software Engineering 22(7), 442–460 (1996)CrossRefGoogle Scholar
  8. 8.
    Hirzel, M., Diwan, A., Hind, M.: Pointer analysis in the presence of dynamic class loading. In: 18th European Conference on Object-Oriented Programming (June 2004)Google Scholar
  9. 9.
    Lhoták, O., Hendren, L.: Scaling Java points-to analysis using Spark. In: Hedin, G. (ed.) CC 2003. LNCS, vol. 2622, pp. 153–169. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  10. 10.
    Pechtchanski, I., Sarkar, V.: Dynamic optimistic interprocedural analysis: a framework and an application. In: 16th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages and Applications (October 2001)Google Scholar
  11. 11.
    Porat, S., Biberstein, M., Koved, L., Mendelson, B.: Automatic detection of immutable fields in Java. In: Proceedings of CASCON 2000 (2000)Google Scholar
  12. 12.
    Qian, F., Hendren, L.: Towards dynamic interprocedural analysis in JVMs. In: 3rd ACM SIGPLAN Symposium on Virtual Machine Research and Technology (May 2004)Google Scholar
  13. 13.
    Rountev, A., Milanova, A., Ryder, B.G.: Points-to analysis for Java based on annotated constraints. Technical Report DCS-TR-424, Rutgers University (November 2000)Google Scholar
  14. 14.
    Rountev, A., Milanova, A., Ryder, B.G.: Fragment class analysis for testing of polymorphism in java software. In: 25th International Conference on Software Engineering (May 2003)Google Scholar
  15. 15.
    Rountev, A., Ryder, B.G.: Practical points-to analysis for programs built with libraries. Technical Report 410, Rutgers University (February 2000)Google Scholar
  16. 16.
    Sreedhar, V.C., Burke, M., Choi, J.-D.: A framework for interprocedural optimization in the presence of dynamic class loading. In: ACM SIGPLAN 2000 Conference on Programming Language Design and Implementation, pp. 196–207 (June 2000)Google Scholar
  17. 17.
    Streckenbach, M., Snelting, G.: Points-to for Java: A general framework and an empirical comparison. Technical report, University Passau (November 2000)Google Scholar
  18. 18.
    Sun Microsystems. Java 2 software development kit version 1.2.2 (July 1999)Google Scholar
  19. 19.
    Vallée-Rai, R., Hendren, L., Sundaresan, V., Lam, P., Gagnon, E., Co, P.: Soot: a java optimization framework (1999), http://www.sable.mcgill.ca/soot
  20. 20.
    Vivien, F., Rinard, M.C.: Incrementalized pointer and escape analysis. In: ACM SIGPLAN 2001 Conference on Programming Language Design and Implementation, pp. 35–46 (June 2001)Google Scholar
  21. 21.
    Whaley, J., Rinard, M.: Compositional pointer and escape analysis for Java programs. In: 14th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages and Applications, pp. 187–206 (November 1999)Google Scholar
  22. 22.
    Zaks, A., Feldman, V., Aizikowitz, N.: Sealed calls in Java packages. In: 15th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages and Applications (October 2000)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Jingling Xue
    • 1
  • Phung Hua Nguyen
    • 1
  1. 1.Programming Languages and Compilers Group, School of Computer Science and EngineeringUniversity of New South WalesSydneyAustralia

Personalised recommendations