Advertisement

Faster Alias Set Analysis Using Summaries

  • Nomair A. Naeem
  • Ondřej Lhoták
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6601)

Abstract

Alias sets are an increasingly used abstraction in situations which require flow-sensitive tracking of objects through different points in time and the ability to perform strong updates on individual objects. The interprocedural and flow-sensitive nature of these analyses often make them difficult to scale. In this paper, we use two types of method summaries (callee and caller) to improve the performance of an interprocedural flow- and context-sensitive alias set analysis. We present callee method summaries and algorithms to compute them. The computed summaries contain sufficient escape and return value information to selectively replace flow-sensitive analysis of methods without affecting analysis precision. When efficiency is a bigger concern, we also use caller method summaries which provide conservative initial assumptions for pointer and aliasing relations at the start of a method. Using caller summaries in conjunction with callee summaries enables the alias set analysis to flow-sensitively analyze only methods containing points of interest thereby reducing running time. We present results from empirically evaluating the use of these summaries for the alias set analysis. Additionally, we also discuss precision results from a realistic client analysis for verifying temporal safety properties. The results show that although caller summaries theoretically reduce precision, empirically they do not. Furthermore, on average, using callee and caller summaries reduces the running time of the alias set analysis by 27% and 96%, respectively.

Keywords

Transfer Function Concrete Object Program Point Method Summary Longe Point 
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.
    Aldrich, J., Chambers, C., Sirer, E.G., Eggers, S.J.: Static analyses for eliminating unnecessary synchronization from Java programs. In: Cortesi, A., Filé, G. (eds.) SAS 1999. LNCS, vol. 1694, pp. 19–38. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  2. 2.
    Allan, C., Avgustinov, P., Christensen, A.S., Hendren, L., Kuzins, S., Lhoták, O., de Moor, O., Sereni, D., Sittampalam, G., Tibble, J.: Adding trace matching with free variables to AspectJ. In: OOPSLA 2005, pp. 345–364 (2005)Google Scholar
  3. 3.
    Blanchet, B.: Escape analysis for object-oriented languages: application to Java. In: OOPSLA 1999, pp. 20–34 (1999)Google Scholar
  4. 4.
    Chatterjee, R., Ryder, B.G., Landi, W.A.: Relevant context inference. In: POPL 1999, pp. 133–146 (1999)Google Scholar
  5. 5.
    Cheng, B.-C., Hwu, W.-M.W.: Modular interprocedural pointer analysis using access paths: design, implementation, and evaluation. In: PLDI 2000, pp. 57–69 (2000)Google Scholar
  6. 6.
    Cherem, S., Rugina, R.: Compile-time deallocation of individual objects. In: ISMM 2006, pp. 138–149 (2006)Google Scholar
  7. 7.
    Cherem, S., Rugina, R.: A practical escape and effect analysis for building lightweight method summaries. In: Adsul, B., Vetta, A. (eds.) CC 2007. LNCS, vol. 4420, pp. 172–186. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  8. 8.
    Choi, J.-D., Gupta, M., Serrano, M., Sreedhar, V.C., Midkiff, S.: Escape analysis for Java. In: OOPSLA 1999, pp. 1–19 (1999)Google Scholar
  9. 9.
    Dufour, B.: Objective quantification of program behaviour using dynamic metrics. Master’s thesis, McGill University (June 2004)Google Scholar
  10. 10.
    Fink, S.J., Yahav, E., Dor, N., Ramalingam, G., Geay, E.: Effective typestate verification in the presence of aliasing. ACM Trans. Softw. Eng. Methodol. 17(2), 1–34 (2008)CrossRefGoogle Scholar
  11. 11.
    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)CrossRefGoogle Scholar
  12. 12.
    Hind, M.: Pointer analysis: haven’t we solved this problem yet? In: PASTE 2001, pp. 54–61 (2001)Google Scholar
  13. 13.
    Horwitz, S., Reps, T., Sagiv, M.: Demand interprocedural dataflow analysis. In: SIGSOFT FSE 1995, pp. 104–115 (1995)Google Scholar
  14. 14.
    Kildall, G.A.: A unified approach to global program optimization. In: POPL 1973, pp. 194–206 (1973)Google Scholar
  15. 15.
    Lhoták, O.: Comparing call graphs. In: PASTE 2007, pp. 37–42 (2007)Google Scholar
  16. 16.
    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
  17. 17.
    Ma, K.-K., Foster, J.S.: Inferring aliasing and encapsulation properties for Java. In: OOPSLA 2007, pp. 423–440 (2007)Google Scholar
  18. 18.
    Naeem, N.A., Lhoták, O.: Typestate-like analysis of multiple interacting objects. In: OOPSLA 2008, pp. 347–366 (2008)Google Scholar
  19. 19.
    Naeem, N.A., Lhoták, O.: Efficient alias set analysis using SSA form. In: ISMM 2009, pp. 79–88 (2009)Google Scholar
  20. 20.
    Naeem, N.A., Lhoták, O., Rodriguez, J.: Practical extensions to the IFDS algorithm. In: Gupta, R. (ed.) CC 2010. LNCS, vol. 6011, pp. 124–144. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  21. 21.
    Orlovich, M., Rugina, R.: Memory leak analysis by contradiction. In: Yi, K. (ed.) SAS 2006. LNCS, vol. 4134, pp. 405–424. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  22. 22.
    Reps, T., Horwitz, S., Sagiv, M.: Precise interprocedural dataflow analysis via graph reachability. In: POPL 1995, pp. 49–61 (1995)Google Scholar
  23. 23.
    Rinetzky, N., Sagiv, M., Yahav, E.: Interprocedural shape analysis for cutpoint-free programs. In: Hankin, C., Siveroni, I. (eds.) SAS 2005. LNCS, vol. 3672, pp. 284–302. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  24. 24.
    Ryder, B.G.: Dimensions of precision in reference analysis of object-oriented programming languages. In: Hedin, G. (ed.) CC 2003. LNCS, vol. 2622, pp. 126–137. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  25. 25.
    Sagiv, M., Reps, T., Horwitz, S.: Precise interprocedural dataflow analysis with applications to constant propagation. Theoretical Computer Science 167(1-2), 131–170 (1996)MathSciNetCrossRefzbMATHGoogle Scholar
  26. 26.
    Sagiv, M., Reps, T., Wilhelm, R.: Solving shape-analysis problems in languages with destructive updating. ACM Trans. Program. Lang. Syst. 20(1), 1–50 (1998)CrossRefGoogle Scholar
  27. 27.
    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, ch. 7, pp. 189–233. Prentice-Hall, Englewood Cliffs (1981)Google Scholar
  28. 28.
    Shoham, S., Yahav, E., Fink, S., Pistoia, M.: Static specification mining using automata-based abstractions. In: ISSTA 2007, pp. 174–184 (2007)Google Scholar
  29. 29.
    Vallée-Rai, R., Gagnon, E., Hendren, L.J., Lam, P., Pominville, P., Sundaresan, V.: Optimizing Java bytecode using the soot framework: Is it feasible? In: Watt, D.A. (ed.) CC 2000. LNCS, vol. 1781, pp. 18–34. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  30. 30.
    Whaley, J., Rinard, M.: Compositional pointer and escape analysis for Java programs. In: OOPSLA 1999, pp. 187–206 (1999)Google Scholar
  31. 31.
    Yang, H., Lee, O., Berdine, J., Calcagno, C., Cook, B., Distefano, D., O’Hearn, P.W.: Scalable shape analysis for systems code. In: Gupta, A., Malik, S. (eds.) CAV 2008. LNCS, vol. 5123, pp. 385–398. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  32. 32.
    Yorsh, G., Yahav, E., Chandra, S.: Generating precise and concise procedure summaries. In: POPL 2008, pp. 221–234 (2008)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Nomair A. Naeem
    • 1
  • Ondřej Lhoták
    • 1
  1. 1.University of WaterlooCanada

Personalised recommendations