skip to main content
research-article
Public Access

Control-flow analysis of dynamic languages via pointer analysis

Published: 21 October 2015 Publication History

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.
[2]
A. W. Appel. Compiling with Continuations. Cambridge University Press, New York, NY, USA, 2007.
[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.
[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.
[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.
[6]
F. Henglein. Simple closure analysis. Technical report, Department of Computer Science, University of Copenhagen (DIKU), Mar. 1992.
[7]
O. Lhotak, Y. Smaragdakis, and M. Sridharan. Pointer analysis (dagstuhl seminar 13162). Dagstuhl Reports, 3(4):91–113, 2013.
[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.
[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.
[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.
[11]
J. Palsberg. Closure analysis in constraint form. ACM Transactions on Programming Languages and Systems, 17(1):47– 62, Jan. 1995.
[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.
[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.
[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.
[15]
D. Vardoulakis and O. Shivers. CFA2: a Context-Free Approach to Control-Flow Analysis. In European Symposium on Programming, pages 570–589, 2010.
[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.

Cited By

View all

Index Terms

  1. Control-flow analysis of dynamic languages via pointer analysis

    Recommendations

    Comments

    Information & Contributors

    Information

    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
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 21 October 2015
    Published in SIGPLAN Volume 51, Issue 2

    Check for updates

    Author Tags

    1. high-order languages
    2. pointer analysis
    3. program analysis

    Qualifiers

    • Research-article

    Funding Sources

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)99
    • Downloads (Last 6 weeks)8
    Reflects downloads up to 06 Jan 2025

    Other Metrics

    Citations

    Cited By

    View all

    View Options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Login options

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media