skip to main content
research-article
Public Access

Control-flow analysis of dynamic languages via pointer analysis

Published:21 October 2015Publication History
Skip Abstract Section

Abstract

We demonstrate how to map a control-flow analysis for a higher-order language (dynamic languages are typically higher-order) into a pointer analysis for a first-order language, such as C. This allows us to use existing pointer analysis tools to perform a control-flow analysis, exploiting their technical advancements and the engineering effort that went into developing them. We compare the results of two recent parallel pointer analysis tools with a parallel control-flow analysis tool. While it has been known that a control-flow analysis of higher-order languages and a pointer analysis of first-order languages are very similar, we demonstrate that these two analyses are actually more similar than previously thought. We present the first mapping between a high-order control-flow analysis and a pointer analysis.

References

  1. L. O. Andersen. Program Analysis and Specialization for the C Programming Language. PhD thesis, DIKU, University of Copenhagen, May 1994.Google ScholarGoogle Scholar
  2. A. W. Appel. Compiling with Continuations. Cambridge University Press, New York, NY, USA, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. J. M. Ashley and R. K. Dybvig. A practical and flexible flow analysis for Higher-Order languages. ACM Transactions on Programming Languages and Systems, 20(4):845–868, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. C. Earl, I. Sergey, M. Might, and D. Van Horn. Introspective pushdown analysis of higher-order programs. In Proceedings of the 17th ACM SIGPLAN International Conference on Functional Programming, ICFP ’12, pages 177–188, New York, NY, USA, 2012. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. A. Guha, C. Saftoiu, and S. Krishnamurthi. The essence of JavaScript. In T. D’Hondt, editor, ECOOP 2010 Object-Oriented Programming, volume 6183 of Lecture Notes in Computer Science, pages 126–150. Springer Berlin Heidelberg, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. F. Henglein. Simple closure analysis. Technical report, Department of Computer Science, University of Copenhagen (DIKU), Mar. 1992.Google ScholarGoogle Scholar
  7. O. Lhotak, Y. Smaragdakis, and M. Sridharan. Pointer analysis (dagstuhl seminar 13162). Dagstuhl Reports, 3(4):91–113, 2013.Google ScholarGoogle Scholar
  8. M. Méndez-Lojo, A. Mathew, and K. Pingali. Parallel inclusion-based points-to analysis. In Proceedings of the ACM International Conference on Object Oriented Programming Systems Languages and Applications, OOPSLA ’10, pages 428–443, New York, NY, USA, 2010. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. M. Méndez-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 ples and Practice of Parallel Programming, PPoPP ’12, pages 107–116, New York, NY, USA, 2012. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. M. Might, Y. Smaragdakis, and D. Van Horn. Resolving and exploiting the k-CFA paradox: Illuminating functional vs. Object-Oriented program analysis. In Proceedings of the 31st Conference on Programming Language Design and Implementation (PLDI 2006), pages 305–315, Toronto, Canada, June 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. J. Palsberg. Closure analysis in constraint form. ACM Transactions on Programming Languages and Systems, 17(1):47– 62, Jan. 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. J. G. Politz, A. Martinez, M. Milano, S. Warren, D. Patterson, J. Li, A. Chitipothu, and S. Krishnamurthi. Python: The full monty. In Proceedings of the 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages & Applications, OOPSLA ’’13, pages 217– 232, New York, NY, USA, 2013. ACM. ISBN 978-1-4503- 2374-1. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. T. Prabhu, S. Ramalingam, M. Might, and M. Hall. EigenCFA: Accelerating flow analysis with GPUs. In Proceedings of the 38th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’11, pages 511–522, New York, NY, USA, 2011. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. B. Steensgaard. Points-to analysis in almost linear time. In Proceedings of the 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’96, pages 32–41, New York, NY, USA, 1996. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. D. Vardoulakis and O. Shivers. CFA2: a Context-Free Approach to Control-Flow Analysis. In European Symposium on Programming, pages 570–589, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. S. H. Yong, S. Horwitz, and T. Reps. Pointer analysis for programs with structures and casting. In Proceedings of the ACM SIGPLAN 1999 Conference on Programming Language Design and Implementation, PLDI ’99, pages 91–103, New York, NY, USA, 1999. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Control-flow analysis of dynamic languages via pointer 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

    • Published in

      cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 51, Issue 2
      DLS '15
      Feburary 2016
      176 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/2936313
      • Editor:
      • Andy Gill
      Issue’s Table of Contents
      • cover image ACM Conferences
        DLS 2015: Proceedings of the 11th Symposium on Dynamic Languages
        October 2015
        176 pages
        ISBN:9781450336901
        DOI:10.1145/2816707

      Copyright © 2015 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 21 October 2015

      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!