skip to main content
research-article

Push-pull constraint graph for efficient points-to analysis

Published:12 June 2014Publication History
Skip Abstract Section

Abstract

We present techniques for efficient computation of points-to information for C programs. Pointer analysis is an important phase in the compilation process. The computed points-to information and the alias information is useful for client analyses from varied domains such as bug finding, data-flow analysis, identifying security vulnerabilities, and parallelization, to name a few. Former research on pointer analysis has indicated that the main bottleneck towards scalability is manifested by the presence of complex constraints (load p = *q and store *p = q constraints) in the program. Complex constraints add edges to the constraint graph in an unpredictable manner and are responsible for initiating propagation of large amounts of points-to information across edges. We identify that the root cause to this issue is in the homogeneous structure in the constraint graph, due to which existing analyses treat loads and stores in a uniform manner. To address these issues, we present two techniques. First, we represent a constraint graph in a non-homogeneous manner, treat loads and stores in different ways, and employ a push-pull model for non-uniform propagation. Second, we propose lazy propagation which propagates information in the constraint graph only when necessary. We illustrate the effectiveness of our techniques using six large open-source programs and show that they improve the analysis time over a state-of-the-art BDD-based analysis by 33% and over Deep Propagation by 21%.

References

  1. L. O. Andersen. Program Analysis and Specialization for the C Programming Language. PhD thesis, DIKU, University of Copenhagen, May 1994. (DIKU report 94/19).Google ScholarGoogle Scholar
  2. M. Berndl, O. Lhotak, F. Qian, L. Hendren, and N. Umanee. Pointsto analysis using BDDs. In Proc. Conf. on Programming Language Design and Implementation (PLDI), pages 103--114, New York, NY, USA, 2003. ACM. ISBN 1--58113--662--5. . Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. M. Das. Unification-based pointer analysis with directional assignments. In PLDI, pages 35--46, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. M. Fahndrich, J. S. Foster, Z. Su, and A. Aiken. Partial online cycle elimination in inclusion constraint graphs. In Proc. Conf. on Programming Language Design and Implementation (PLDI), pages 85--96, New York, NY, USA, 1998. ACM. ISBN 0--89791--987--4. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. B. Hardekopf. Bdd based lazy cycle detection, http://www.cs.ucsb.edu/benh/research/downloads.html.Google ScholarGoogle Scholar
  6. B. Hardekopf and C. Lin. Exploiting pointer and location equivalence to optimize pointer analysis. In SAS, pages 265--280, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. B. Hardekopf and C. Lin. The ant and the grasshopper: fast and accurate pointer analysis for millions of lines of code. In PLDI, pages 290--299, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. B. Hardekopf and C. Lin. Flow-sensitive pointer analysis for millions of lines of code. In Proceedings of the 9th Annual IEEE/ACM International Symposium on Code Generation and Optimization, CGO'11, pages 289--298, Washington, DC, USA, 2011. IEEE Computer Society. ISBN 978--1--61284--356--8. URL http://dl.acm.org/citation.cfm?id=2190025.2190075. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. N. Heintze and O. Tardieu. Ultra-fast aliasing analysis using cla: a million lines of c code in a second. SIGPLAN Not., 36(5):254--263, 2001. ISSN 0362--1340. . Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. M. Hind and A. Pioli. Which pointer analysis should i use? In ISSTA, pages 113--123, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. V. Kahlon. Bootstrapping: a technique for scalable flow and contextsensitive pointer alias analysis. In Proc. Conf. on Programming Language Design and Implementation (PLDI), pages 249--259, New York, NY, USA, 2008. ACM. ISBN 978--1--59593--860--2. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. A. Kanamori and D. Weise. Worklist management strategies for dataflow analysis, MSR Technical Report, MSR-TR-94--12, 1994.Google ScholarGoogle Scholar
  13. C. Lattner and V. Adve. LLVM: A Compilation Framework for Lifelong Program Analysis & Transformation. In Proceedings of the 2004 International Symposium on Code Generation and Optimization (CGO'04), Palo Alto, California, Mar 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. C. Lattner, A. Lenharth, and V. Adve. Making context-sensitive pointsto analysis with heap cloning practical for the real world. In PLDI, pages 278--289, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. O. Lhoták and L. Hendren. Scaling Java points-to analysis using Spark. In G. Hedin, editor, Compiler Construction, 12th International Conference, volume 2622 of LNCS, pages 153--169, Warsaw, Poland, April 2003. Springer. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. M. Mendez-Lojo, M. Burtscher, and K. Pingali. A gpu implementation of inclusion-based points-to analysis. In Proceedings of the 17th ACM SIGPLAN symposium on Principles and Practice of Parallel Programming, PPoPP'12, pages 107--116, New York, NY, USA, 2012. ACM. ISBN 978--1--4503--1160--1. URL http://doi.acm.org/10.1145/2145816.2145831. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. R. Nasre. Exploiting the Structure of the Constraint Graph for Efficient Points-to Analysis. In Proceedings of the 2012 International Symposium on Memory Management, ISMM'12, pages 121--132, New York, NY, USA, 2012. ACM. ISBN 978--1--4503--1350--6. URL http://doi.acm.org/10.1145/2258996.2259013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. R. Nasre. Time- and space-efficient flow-sensitive pointsto analysis. ACM Trans. Archit. Code Optim., 10(4): 39:1--39:27, Dec. 2013. ISSN 1544--3566. URL http://doi.acm.org/10.1145/2541228.2555296. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. R. Nasre and R. Govindarajan. Points-to Analysis As a System of Linear Equations. In Proceedings of the 17th International Conference on Static Analysis, SAS'10, pages 422--438, Berlin, Heidelberg, 2010. Springer-Verlag. ISBN 3--642--15768--8, 978--3--642--15768--4. URL http://dl.acm.org/citation.cfm?id=1882094.1882120. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. R. Nasre and R. Govindarajan. Prioritizing constraint evaluation for efficient points-to analysis. In Proceedings of the 9th Annual IEEE/ACM International Symposium on Code Generation and Optimization, CGO '11, pages 267--276, Washington, DC, USA, 2011. IEEE Computer Society. ISBN 978--1--61284--356--8. URL http://dl.acm.org/citation.cfm?id=2190025.2190073. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. R. Nasre, K. Rajan, R. Govindarajan, and U. P. Khedker. Scalable Context-Sensitive Points-to Analysis Using Multi-dimensional Bloom Filters. In Proceedings of the 7th Asian Symposium on Programming Languages and Systems, APLAS '09, pages 47--62, Berlin, Heidelberg, 2009. Springer-Verlag. ISBN 978-3-642-10671-2. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. D. J. Pearce, P. H. J. Kelly, and C. Hankin. Online cycle detection and difference propagation: Applications to pointer analysis. Software Quality Control, 12(4):311--337, Dec. 2004. ISSN 0963-9314.URL http://dx.doi.org/10.1023/B:SQJO.0000039791.93071.a2. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. D. J. Pearce, P. H. J. Kelly, and C. Hankin. Online cycle detectionand difference propagation: Applications to pointer analysis. Software Quality Control, 12:311--337, December 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. F. Pereira. Wave propagation / deep propagation website, http://compilers.cs.ucla.edu/fernando/projects/pta/home/.Google ScholarGoogle Scholar
  25. F. M. Q. Pereira and D. Berlin. Wave propagation and deep propagation for pointer analysis. In CGO'09: Proceedings of the 2009 International Symposium on Code Generation and Optimization, pages 126--135, Washington, DC, USA, 2009. IEEE Computer Society. ISBN 978-0-7695-3576-0. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. A. Rountev and S. Chandra. Off-line variable substitution for scaling points-to analysis. In Proc. Conf. on Programming Language Design and Implementation (PLDI), pages 47--56, New York, NY, USA, 2000. ACM. ISBN 1-58113-199-2. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Y. Smaragdakis, G. Balatsouras, and G. Kastrinis. Set-based Preprocessing for Points-to Analysis. In Proceedings of the 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages & Applications, OOPSLA'13, pages 253--270, New York, NY, USA, 2013. ACM. ISBN 978-1-4503-2374-1. URL http://doi.acm.org/10.1145/2509136.2509524. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. B. Steensgaard. Points-to analysis in almost linear time. In POPL'96: Proceedings of the 23rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 32--41, New York, NY,USA, 1996. ACM. ISBN 0-89791-769-3. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. J. Whaley and M. S. Lam. An efficient inclusion-based points-to analysis for strictly-typed languages. In SAS, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. J. Whaley and M. S. Lam. Cloning-based context-sensitive pointer alias analysis using binary decision diagrams. In Proc. Conf. on Programming Language Design and Implementation (PLDI), pages 131--144, New York, NY, USA, 2004. ACM. ISBN 1-58113-807-5. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Push-pull constraint graph for efficient points-to analysis

    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

    • Article Metrics

      • Downloads (Last 12 months)9
      • Downloads (Last 6 weeks)1

      Other Metrics

    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!