skip to main content
research-article
Public Access

Accelerating program analyses by cross-program training

Published:19 October 2016Publication History
Skip Abstract Section

Abstract

Practical programs share large modules of code. However, many program analyses are ineffective at reusing analysis results for shared code across programs. We present POLYMER, an analysis optimizer to address this problem. POLYMER runs the analysis offline on a corpus of training programs and learns analysis facts over shared code. It prunes the learnt facts to eliminate intermediate computations and then reuses these pruned facts to accelerate the analysis of other programs that share code with the training corpus. We have implemented POLYMER to accelerate analyses specified in Datalog, and apply it to optimize two analyses for Java programs: a call-graph analysis that is flow- and context-insensitive, and a points-to analysis that is flow- and context-sensitive. We evaluate the resulting analyses on ten programs from the DaCapo suite that share the JDK library. POLYMER achieves average speedups of 2.6× for the call- graph analysis and 5.2× for the points-to analysis.

References

  1. K. Ali and O. Lhoták. Application-only call graph construction. In ECOOP, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. K. Ali and O. Lhoták. Averroes: Whole-program analysis without the whole program. In ECOOP, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. N. Allen, B. Scholz, and P. Krishnan. Staged points-to analysis for large code bases. In CC, 2015.Google ScholarGoogle ScholarCross RefCross Ref
  4. T. Ball and S. Rajamani. Bebop: a path-sensitive interprocedural dataflow engine. In PASTE, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. E. Bodden. Inter-procedural data-flow analysis with IFDS/IDE and Soot. In SOAP, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. M. Bravenboer and Y. Smaragdakis. Strictly declarative specification of sophisticated points-to analyses. In OOPSLA, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. C. Calcagno, D. Distefano, P. O’Hearn, and H. Yang. Compositional shape analysis by means of bi-abduction. In POPL, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. R. Chatterjee, B. G. Ryder, and W. Landi. Relevant context inference. In POPL, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. P. Cousot and R. Cousot. Static determination of dynamic properties of recursive procedures. In E. Neuhold, editor, IFIP Conference on Formal Description of Programming Concepts. North-Holland, 1977.Google ScholarGoogle Scholar
  10. P. Cousot and R. Cousot. Modular static program analysis. In International Conference on Compiler Construction (CC’02), 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. I. Dillig, T. Dillig, A. Aiken, and M. Sagiv. Precise and compact modular procedure summaries for heap manipulating programs. In PLDI, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. J. Dolby, S. Fink, and M. Sridharan. T. J. Watson Libraries for Analysis. http://wala.sourceforge. net/, 2006.Google ScholarGoogle Scholar
  13. P. Godefroid, A. V. Nori, S. K. Rajamani, and S. Tetali. Compositional may-must program analysis: unleashing the power of alternation. In POPL, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. B. S. Gulavani, S. Chakraborty, G. Ramalingam, and A. V. Nori. Bottom-up shape analysis using LISF. ACM Trans. Program. Lang. Syst., 33(5), 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. G. Kastrinis and Y. Smaragdakis. Hybrid context sensitivity for points-to analysis. In PLDI, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. R. Mangal, M. Naik, and H. Yang. A correspondence between two approaches to interprocedural analysis in the presence of join. In ESOP, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. B. R. Murphy and M. S. Lam. Program analysis with partial transfer functions. In PEPM, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. M. Naik. Chord: A versatile program analysis platform for Java bytecode. http://jchord.googlecode. com, 2006.Google ScholarGoogle Scholar
  19. H. Oh, H. Yang, and K. Yi. Learning a strategy for adapting a program analysis via Bayesian optimisation. In OOPSLA, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. T. Reps, S. Horwitz, and M. Sagiv. Precise interprocedural dataflow analysis via graph reachability. In POPL, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. N. Rinetzky, J. Bauer, T. W. Reps, S. Sagiv, and R. Wilhelm. A semantics for procedure local heaps and its abstractions. In POPL, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. A. Rountev, M. Sharp, and G. Xu. IDE dataflow analysis in the presence of large object-oriented libraries. In Compiler Construction, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. M. Sharir and A. Pnueli. Two approaches to interprocedural data flow analysis. In Program Flow Analysis: Theory and Applications. Prentice-Hall, 1981.Google ScholarGoogle Scholar
  24. Y. Smaragdakis and M. Bravenboer. Using datalog for fast and easy program analysis. In Datalog 2.0 Workshop, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Y. Smaragdakis, G. Balatsouras, and G. Kastrinis. Setbased pre-processing for points-to analysis. In OOPSLA, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Y. Smaragdakis, M. Bravenboer, and O. Lhoták. Pick your contexts well: Understanding object-sensitivity. In POPL, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. J. Whaley and M. S. Lam. Cloning-based contextsensitive pointer alias analysis using binary decision diagrams. In PLDI, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. J. Whaley and M. C. Rinard. Compositional pointer and escape analysis for Java programs. In OOPSLA, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. J. Whaley, D. Avots, M. Carbin, and M. Lam. Using datalog with binary decision diagrams for program analysis. In APLAS, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. R. P. Wilson and M. S. Lam. Efficient context-sensitive pointer analysis for C programs. In PLDI, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. D. Yan, G. Xu, and A. Rounte. Rethinking soot for summary-based whole-program analysis. In SOAP, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. G. Yorsh, E. Yahav, and S. Chandra. Generating precise and concise procedure summaries. In POPL, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. X. Zhang, R. Mangal, M. Naik, and H. Yang. Hybrid top-down and bottom-up interprocedural analysis. In PLDI, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Accelerating program analyses by cross-program training

            Recommendations

            Comments

            Login options

            Check if you have access through your login credentials or your institution to get full access on this article.

            Sign in

            Full Access

            • Published in

              cover image ACM SIGPLAN Notices
              ACM SIGPLAN Notices  Volume 51, Issue 10
              OOPSLA '16
              October 2016
              915 pages
              ISSN:0362-1340
              EISSN:1558-1160
              DOI:10.1145/3022671
              Issue’s Table of Contents
              • cover image ACM Conferences
                OOPSLA 2016: Proceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications
                October 2016
                915 pages
                ISBN:9781450344449
                DOI:10.1145/2983990

              Copyright © 2016 ACM

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 19 October 2016

              Check for updates

              Qualifiers

              • research-article

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader
            About Cookies On This Site

            We use cookies to ensure that we give you the best experience on our website.

            Learn more

            Got it!