Skip to main content

Advertisement

SpringerLink
  • Log in
Book cover

European Symposium on Programming

ESOP 2010: Programming Languages and Systems pp 570–589Cite as

  1. Home
  2. Programming Languages and Systems
  3. Conference paper
CFA2: A Context-Free Approach to Control-Flow Analysis

CFA2: A Context-Free Approach to Control-Flow Analysis

  • Dimitrios Vardoulakis17 &
  • Olin Shivers17 
  • Conference paper
  • 1024 Accesses

  • 34 Citations

Part of the Lecture Notes in Computer Science book series (LNTCS,volume 6012)

Abstract

In a functional language, the dominant control-flow mechanism is function call and return. Most higher-order flow analyses, including k-CFA, do not handle call and return well: they remember only a bounded number of pending calls because they approximate programs with control-flow graphs. Call/return mismatch introduces precision-degrading spurious control-flow paths and increases the analysis time.

We describe CFA2, the first flow analysis with precise call/return matching in the presence of higher-order functions and tail calls. We formulate CFA2 as an abstract interpretation of programs in continuation passing style and describe a sound and complete summarization algorithm for our abstract semantics. A preliminary evaluation shows that CFA2 gives more accurate data-flow information than 0CFA and 1CFA.

Keywords

  • Abstract Interpretation
  • Call Site
  • Abstract Semantic
  • Path Edge
  • Local Semantic

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.

Download conference paper PDF

References

  1. Shivers, O.: Control-Flow Analysis of Higher-Order Languages. PhD thesis, Carnegie-Mellon University (1991)

    Google Scholar 

  2. Sharir, M., Pnueli, A.: Two Approaches to Interprocedural Data Flow Analysis. In: Program Flow Analysis, Theory and Application. Prentice Hall, Englewood Cliffs (1981)

    Google Scholar 

  3. Reps, T.W., Horwitz, S., Sagiv, S.: Precise Interprocedural Dataflow Analysis via Graph Reachability. In: Principles of Programming Languages, pp. 49–61 (1995)

    Google Scholar 

  4. Chaudhuri, S.: Subcubic Algorithms for Recursive State Machines. In: Principles of Programming Languages, pp. 159–169 (2008)

    Google Scholar 

  5. Alur, R., Benedikt, M., Etessami, K., Godefroid, P., Reps, T.W., Yannakakis, M.: Analysis of Recursive State Machines. Transactions on Programming Languages and Systems 27(4), 786–818 (2005)

    CrossRef  Google Scholar 

  6. Schwoon, S.: Model-Checking Pushdown Systems. PhD thesis, Technische Universität München (2002)

    Google Scholar 

  7. Rehof, J., Fähndrich, M.: Type-Based Flow Analysis: From Polymorphic Subtyping to CFL-Reachability. In: Principles of Programming Languages, pp. 54–66 (2001)

    Google Scholar 

  8. Might, M., Shivers, O.: Improving Flow Analyses via ΓCFA: Abstract Garbage Collection and Counting. In: International Conference on Functional Programming, pp. 13–25 (2006)

    Google Scholar 

  9. Wright, A., Jagannathan, S.: Polymorphic Splitting: An Effective Polyvariant Flow Analysis. Trans. on Programming Languages and Systems 20(1), 166–207 (1998)

    CrossRef  Google Scholar 

  10. Van Horn, D., Mairson, H.G.: Deciding k-CFA is complete for EXPTIME. In: International Conference on Functional Programming, pp. 275–282 (2008)

    Google Scholar 

  11. Clinger, W.D., Hansen, L.T.: Lambda, the Ultimate Label or a Simple Optimizing Compiler for Scheme. In: LISP and Functional Programming, pp. 128–139 (1994)

    Google Scholar 

  12. Might, M.: Environment Analysis of Higher-Order Languages. PhD thesis, Georgia Institute of Technology (2007)

    Google Scholar 

  13. Steele, G.L.: Rabbit: A Compiler for Scheme. Master’s thesis, MIT (1978)

    Google Scholar 

  14. Kranz, D.: ORBIT: An Optimizing Compiler for Scheme. PhD thesis, Yale University (1988)

    Google Scholar 

  15. Sabry, A., Felleisen, M.: Reasoning About Programs in Continuation-Passing Style. In: LISP and Functional Programming, pp. 288–298 (1992)

    Google Scholar 

  16. Shivers, O.: Higher-Order Control-Flow Analysis in Retrospect: Lessons Learned, Lessons Abandoned. In: Best of PLDI, pp. 257–269 (2004)

    Google Scholar 

  17. Vardoulakis, D., Shivers, O.: CFA2: a Context-Free Approach to Control-Flow Analysis. Technical Report NU-CCIS-10-01, Northeastern University (2010)

    Google Scholar 

  18. Yannakakis, M.: Graph-Theoretic Methods in Database Theory. In: Principles of Database Systems, pp. 230–242 (1990)

    Google Scholar 

  19. Melski, D., Reps, T.: Interconvertibility of a Class of Set Constraints and Context-Free-Language Reachability. Theoretical Comp. Sci. 248(1-2), 29–98 (2000)

    CrossRef  MATH  MathSciNet  Google Scholar 

  20. Heintze, N.: Set-based program analysis. PhD thesis, Carnegie-Mellon Univ. (1992)

    Google Scholar 

  21. Sridharan, M., Bodík, R.: Refinement-based context-sensitive points-to analysis for java. In: Programming Language Design and Implementation, pp. 387–400 (2006)

    Google Scholar 

  22. Hind, M.: Pointer analysis: haven’t we solved this problem yet? In: Program Analysis For Software Tools and Engineering, pp. 54–61 (2001)

    Google Scholar 

  23. Debray, S.K., Proebsting, T.A.: Interprocedural Control Flow Analysis of First-Order Programs with Tail-Call Optimization. Transactions on Programming Languages and Systems 19(4), 568–585 (1997)

    CrossRef  Google Scholar 

  24. Midtgaard, J., Jensen, T.: Control-flow analysis of function calls and returns by abstract interpretation. In: International Conference on Functional Programming, pp. 287–298 (2009)

    Google Scholar 

  25. Kobayashi, N.: Types and higher-order recursion schemes for verification of higher-order programs. In: Principles of Programming Languages, pp. 416–428 (2009)

    Google Scholar 

  26. Agesen, O.: The Cartesian Product Algorithm: Simple and Precise Type Inference of Parametric Polymorphism. In: European Conference on Object-Oriented Programming, pp. 2–26 (1995)

    Google Scholar 

Download references

Author information

Authors and Affiliations

  1. Northeastern University,  

    Dimitrios Vardoulakis & Olin Shivers

Authors
  1. Dimitrios Vardoulakis
    View author publications

    You can also search for this author in PubMed Google Scholar

  2. Olin Shivers
    View author publications

    You can also search for this author in PubMed Google Scholar

Editor information

Editors and Affiliations

  1. Roger Needham Building, Microsoft Research, 7 J.J. Thomson Ave., CB3 0FB, Cambridge, UK

    Andrew D. Gordon

Rights and permissions

Reprints and Permissions

Copyright information

© 2010 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Vardoulakis, D., Shivers, O. (2010). CFA2: A Context-Free Approach to Control-Flow Analysis. In: Gordon, A.D. (eds) Programming Languages and Systems. ESOP 2010. Lecture Notes in Computer Science, vol 6012. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-11957-6_30

Download citation

  • .RIS
  • .ENW
  • .BIB
  • DOI: https://doi.org/10.1007/978-3-642-11957-6_30

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-11956-9

  • Online ISBN: 978-3-642-11957-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Share this paper

Anyone you share the following link with will be able to read this content:

Sorry, a shareable link is not currently available for this article.

Provided by the Springer Nature SharedIt content-sharing initiative

Over 10 million scientific documents at your fingertips

Switch Edition
  • Academic Edition
  • Corporate Edition
  • Home
  • Impressum
  • Legal information
  • Privacy statement
  • California Privacy Statement
  • How we use cookies
  • Manage cookies/Do not sell my data
  • Accessibility
  • FAQ
  • Contact us
  • Affiliate program

Not logged in - 34.239.173.144

Not affiliated

Springer Nature

© 2023 Springer Nature Switzerland AG. Part of Springer Nature.