Advertisement

Probabilistic Points-to Analysis for Java

  • Qiang Sun
  • Jianjun Zhao
  • Yuting Chen
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6601)

Abstract

Probabilistic points-to analysis is an analysis technique for defining the probabilities on the points-to relations in programs. It provides the compiler with some optimization chances such as speculative dead store elimination, speculative redundancy elimination, and speculative code scheduling. Although several static probabilistic points-to analysis techniques have been developed for C language, they cannot be applied directly to Java because they do not handle the classes, objects, inheritances and invocations of virtual methods. In this paper, we propose a context-insensitive and flow-sensitive probabilistic points-to analysis for Java (JPPA) for statically predicting the probability of points-to relations at all program points (i.e., points before or after statements) of a Java program. JPPA first constructs an interprocedural control flow graph (ICFG) for a Java program, whose edges are labeled with the probabilities calculated by an algorithm based on a static branch prediction approach, and then calculates the probabilistic points-to relations of the program based upon the ICFG. We have also developed a tool called Lukewarm to support JPPA and conducted an experiment to compare JPPA with a traditional context-insensitive and flow-sensitive points-to analysis approach. The experimental results show that JPPA is a precise and effective probabilistic points-to analysis technique for Java.

Keywords

points-to analysis probability Java 

References

  1. 1.
    Das, M., Liblit, B., Fähndrich, M., Rehof, J.: Estimating the impact of scalable pointer analysis on optimization. In: Proceedings of the 8th International Static Analysis Symposium, pp. 260–278 (2001)Google Scholar
  2. 2.
    Hind, M., Pioli, A.: Which pointer analysis should I use? In: Proceedings of the 2000 ACM SIGSOFT International Symposium on Software Testing and Analysis, pp. 113–123 (2000)Google Scholar
  3. 3.
    Chatterjee, R., Ryder, B.G., Landi, W.A.: Complexity of points-to analysis of Java in the presence of exceptions. IEEE Transactions on Software Engineering 27(6), 481–512 (2001)CrossRefGoogle Scholar
  4. 4.
    Milanova, A., Rountev, A., Ryder, B.G.: Parameterized object sensitivity for points-to analysis for Java. ACM Transactions on Software Engineering and Methodology 14, 1–41 (2002)CrossRefGoogle Scholar
  5. 5.
    Whaley, J., Lam, M.S.: Cloning-based context-sensitive pointer alias analysis using binary decision diagrams. In: Proceedings of the ACM SIGPLAN 2004 Conference on Programming Language Design and Implementation, pp. 131–144 (2004)Google Scholar
  6. 6.
    Choi, J.D., Burke, M., Carini, P.: Efficient flow-sensitive interprocedural computation of pointer-induced aliases and side effects. In: Proceedings of the 20th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 232–245 (1993)Google Scholar
  7. 7.
    Hardekopf, B., Lin, C.: Semi-sparse flow-sensitive pointer analysis. In: Proceedings of the 36th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 226–238 (2009)Google Scholar
  8. 8.
    Chen, P.S., Hwang, Y.S., Ju, R.D.C., Lee, J.K.: Interprocedural probabilistic pointer analysis. IEEE Transactions on Parallel and Distributed Systems 15(10), 893–907 (2004)CrossRefGoogle Scholar
  9. 9.
    Oancea, C.E., Mycroft, A., Harris, T.: A lightweight in-place implementation for software thread-level speculation. In: Proceedings of the 21st Annual ACM Symposium on Parallel Algorithms and Architectures, pp. 223–232 (2009)Google Scholar
  10. 10.
    Scholz, B., Horspool, R.N., Knoop, J.: Optimizing for space and time usage with speculative partial redundancy elimination. In: Proceedings of the 2004 ACM SIGPLAN/SIGBED Conference on Languages, Compilers, and Tools for Embedded Systems, pp. 221–230 (2004)Google Scholar
  11. 11.
    Dai, X., Zhai, A., chung Hsu, W., chung Yew, P.: A general compiler framework for speculative optimizations using data speculative code motion. In: Proceedings of the 2005 International Symposium on Code Generation and Optimization, pp. 280–290 (2005)Google Scholar
  12. 12.
    Dean, J., Grove, D., Chambers, C.: Optimization of object-oriented programs using static class hierarchy analysis. In: Proceedings of the 9th European Conference on Object-Oriented Programming, pp. 77–101 (1995)Google Scholar
  13. 13.
    Bacon, D.F., Sweeney, P.F.: Fast static analysis of C++ virtual function calls. In: Proceedings of the 1996 ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications, pp. 324–341 (1996)Google Scholar
  14. 14.
    Sundaresan, V., Hendren, L., Razafimahefa, C., Vallée-Rai, R., Lam, P., Gagnon, E., Godin, C.: Practical virtual method call resolution for Java. In: Proceedings of the 2000 ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications, pp. 264–280 (2000)Google Scholar
  15. 15.
    Ramalingam, G.: Data flow frequency analysis. In: Proceedings of the 1996 Conference on Programming Language Design and Implementation, pp. 267–277 (1996)Google Scholar
  16. 16.
    Wu, Y., Larus, J.R.: Static branch frequency and program profile analysis. In: Proceedings of the 27th Annual International Symposium on Microarchitecture, pp. 1–11 (1994)Google Scholar
  17. 17.
    Vallée-Rai, R., Hendren, L.J.: Jimple: simplifying Java bytecode for analyses and transformations. Sable technical report, McGill (1998)Google Scholar
  18. 18.
    Vallée-Rai, R.: The Jimple framework. Sable technical report, McGill (1998)Google Scholar
  19. 19.
  20. 20.
    Hind, M., Burke, M., Carini, P., deok Choi, J.: Interprocedural pointer alias analysis. ACM Transactions on Programming Languages and Systems 21(4), 848–894 (1999)CrossRefGoogle Scholar
  21. 21.
    Do, H., Elbaum, S., Rothermel, G.: Infrastructure support for controlled experimentation with software testing and regression testing techniques. Empirical Software Engineering: An International Journal 10, 405–435 (2004)CrossRefGoogle Scholar
  22. 22.
    Ashes Suite Collection, http://www.sable.mcgill.ca/software
  23. 23.
    Blackburn, S.M., Garner, R., Hoffman, C., Khan, A.M., McKinley, K.S., Bentzur, R., Diwan, A., Feinberg, D., Frampton, D., Guyer, S.Z., Hirzel, M., Hosking, A., Jump, M., Lee, H., Moss, J.E.B., Phansalkar, A., Stefanović, D., VanDrunen, T., von Dincklage, D., Wiedermann, B.: The DaCapo benchmarks: Java benchmarking development and analysis. In: Proceedings of the 21st Annual ACM SIGPLAN Conference on Object-Oriented Programing, Systems, Languages, and Applications, pp. 169–190 (2006)Google Scholar
  24. 24.
    Hind, M.: Pointer analysis: haven’t we solved this problem yet? In: Proceedings of the 2001 ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering, pp. 54–61 (2001)Google Scholar
  25. 25.
    Emami, M., Ghiya, R., Hendren, L.J.: Context-sensitive interprocedural points-to analysis in the presence of function pointers. In: Proceedings of the ACM SIGPLAN 1994 Conference on Programming Language Design and Implementation, pp. 242–256 (1994)Google Scholar
  26. 26.
    Landi, W., Ryder, B.G., Zhang, S.: Interprocedural modification side effect analysis with pointer aliasing. In: Proceedings of the ACM SIGPLAN 1993 Conference on Programming Language Design and Implementation, pp. 56–67 (1993)Google Scholar
  27. 27.
    Whaley, J., Rinard, M.: Compositional pointer and escape analysis for Java programs. In: Proceedings of the 14th Annual ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications, pp. 187–206 (1999)Google Scholar
  28. 28.
    Wilson, R., Lam, M.S.: Efficient context-sensitive pointer analysis for C programs. In: Proceedings of the ACM SIGPLAN 1995 Conference on Programming Language Design and Implementation, pp. 1–12 (1995)Google Scholar
  29. 29.
    Yu, H., Xue, J., Huo, W., Feng, X., Zhang, Z.: Level by level: making flow- and context-sensitive pointer analysis scalable for millions of lines of code. In: Proceedings of the 8th International Symposium on Code Generation and Optimization, pp. 218–229 (2010)Google Scholar
  30. 30.
    Steensgaard, B.: Points-to analysis in almost linear time. In: Proceedings of the 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 32–41 (1996)Google Scholar
  31. 31.
    Andersen, L.: Program analysis and specialization for the C programming language. DIKU report 94-19, University of Copenhagen (1994)Google Scholar
  32. 32.
    Foster, J.S., Fähndrich, M., Aiken, A.: Polymorphic versus monomorphic flow-insensitive points-to analysis for C. In: SAS 2000. LNCS, vol. 1824, pp. 175–199. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  33. 33.
    Lhoták, O., Hendren, L.: 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)CrossRefGoogle Scholar
  34. 34.
    Silva, J.D., Steffan, J.G.: A probabilistic pointer analysis for speculative optimizations. In: Proceedings of the 12th International Conference on Architectural Support for Programming Languages and Operating Systems, pp. 416–425 (2006)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Qiang Sun
    • 1
  • Jianjun Zhao
    • 1
    • 2
  • Yuting Chen
    • 2
  1. 1.Department of Computer Science and EngineeringShanghai Jiao Tong UniversityShanghaiChina
  2. 2.School of SoftwareShanghai Jiao Tong UniversityShanghaiChina

Personalised recommendations