Skip to main content

Exact Flow Analysis by Higher-Order Model Checking

  • Conference paper
Book cover Functional and Logic Programming (FLOPS 2012)

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

Included in the following conference series:

Abstract

We propose a novel control flow analysis for higher-order functional programs, based on a reduction to higher-order model checking. The distinguished features of our control flow analysis are that, unlike most of the control flow analyses like k-CFA, it is exact for simply-typed (λ)-calculus with recursion and finite base types, and that, unlike Mossin’s exact flow analysis, it is indeed runnable in practice, at least for small programs. Furthermore, under certain (arguably strong) assumptions, our control flow analysis runs in time cubic in the size of a program. We formalize the reduction of control flow analysis to higher-order model checking, prove the correctness, and report preliminary experiments.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Blume, M., Acar, U.A., Chae, W.: Exception Handlers as Extensible Cases. In: Ramalingam, G. (ed.) APLAS 2008. LNCS, vol. 5356, pp. 273–289. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  2. Danvy, O., Filinski, A.: Representing control: A study of the CPS transformation. Mathematical Structures in Computer Science 2(4), 361–391 (1992)

    Article  MathSciNet  MATH  Google Scholar 

  3. Earl, C., Might, M., Horn, D.V.: Pushdown control-flow analysis of higher-order programs. CoRR abs/1007.4268 (2010)

    Google Scholar 

  4. Fähndrich, M., Rehof, J.: Type-based flow analysis and context-free language reachability. Mathematical Structures in Computer Science 18(5), 823–894 (2008)

    Article  MathSciNet  MATH  Google Scholar 

  5. Hague, M., Murawski, A., Ong, C.-H.L., Serre, O.: Collapsible pushdown automata and recursion schemes. In: Proceedings of 23rd Annual IEEE Symposium on Logic in Computer Science, pp. 452–461. IEEE Computer Society (2008)

    Google Scholar 

  6. Heintze, N., McAllester, D.: Linear-time subtransitive control flow analysis. In: Proceedings of ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 261–272 (1997)

    Google Scholar 

  7. Kobayashi, N.: Model-checking higher-order functions. In: Proceedings of PPDP 2009, pp. 25–36. ACM Press (2009)

    Google Scholar 

  8. Kobayashi, N.: TRecS: A type-based model checker for recursion schemes (2009), http://www.kb.ecei.tohoku.ac.jp/~koba/trecs/

  9. Kobayashi, N.: Types and higher-order recursion schemes for verification of higher-order programs. In: Proceedings of POPL, pp. 416–428 (2009)

    Google Scholar 

  10. Kobayashi, N.: Model checking higher-order programs. Submitted for publication. A revised and extended version of [9] and [7] (2010), http://www.kb.ecei.tohoku.ac.jp/~koba/papers/hmc.pdf

  11. Kobayashi, N.: A Practical Linear Time Algorithm for Trivial Automata Model Checking of Higher-Order Recursion Schemes. In: Hofmann, M. (ed.) FOSSACS 2011. LNCS, vol. 6604, pp. 260–274. Springer, Heidelberg (2011)

    Chapter  Google Scholar 

  12. Kobayashi, N.: Exact flow analysis by higher-order model checking. In: Schrijvers, T., Thiemann, P. (eds.) FLOPS 2012. LNCS, vol. 7294, pp. 275–289. Springer, Heidelberg (2012)

    Google Scholar 

  13. Kobayashi, N., Ong, C.-H.L.: Complexity of Model Checking Recursion Schemes for Fragments of the Modal Mu-Calculus. In: Albers, S., Marchetti-Spaccamela, A., Matias, Y., Nikoletseas, S., Thomas, W. (eds.) ICALP 2009. LNCS, vol. 5556, pp. 223–234. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  14. Kobayashi, N., Sato, R., Unno, H.: Predicate abstraction and CEGAR for higher-order model checking. In: Proceedings of PLDI (2011)

    Google Scholar 

  15. Kobayashi, N., Tabuchi, N., Unno, H.: Higher-order multi-parameter tree transducers and recursion schemes for program verification. In: Proceedings of POPL, pp. 495–508 (2010)

    Google Scholar 

  16. Lester, M.M., Neatherway, R.P., Ong, C.-H.L., Ramsay, S.J.: THORS hammer (2011), http://mjolnir.cs.ox.ac.uk/thors

  17. Meyer, A.R., Wand, M.: Continuation Semantics in Typed Lambda-calculi (Summary). In: Parikh, R. (ed.) Logic of Programs 1985. LNCS, vol. 193, pp. 219–224. Springer, Heidelberg (1985)

    Chapter  Google Scholar 

  18. Mossin, C.: Exact flow analysis. Mathematical Structures in Computer Science 13(1), 125–156 (2003)

    Article  MathSciNet  MATH  Google Scholar 

  19. Ong, C.-H.L.: On model-checking trees generated by higher-order recursion schemes. In: LICS 2006, pp. 81–90. IEEE Computer Society Press (2006)

    Google Scholar 

  20. Ong, C.-H.L., Tzevelekos, N.: Functional reachability. In: Proceedings of LICS, pp. 286–295. IEEE Computer Society (2009)

    Google Scholar 

  21. Plotkin, G.D.: Call-by-name, call-by-value and the lambda-calculus. Theoretical Computer Science 1(2), 125–159 (1975)

    Article  MathSciNet  MATH  Google Scholar 

  22. Prabhu, T., Ramalingam, S., Might, M., Hall, M.W.: EigenCFA: accelerating flow analysis with gpus. In: Proceedings of POPL, pp. 511–522 (2011)

    Google Scholar 

  23. Shivers, O.: Control-Flow Analysis of Higher-Order Languages. Ph.D. thesis, Carnegie-Mellon University (May 1991)

    Google Scholar 

  24. Shivers, O.: Higher-order control-flow analysis in retrospect: Lessons learned, lessons abandoned. In: ACM SIGPLAN Notices - Best of PLDI 1979-1999, pp. 257–269 (2003)

    Google Scholar 

  25. Vardoulakis, D., Shivers, O.: CFA2: a context-free approach to control-flow analysis. Logical Methods in Computer Science 7(2) (2011)

    Google Scholar 

  26. Vardoulakis, D., Shivers, O.: Pushdown flow analysis of first-class control. In: Proceedings of ICFP, pp. 69–80. ACM Press (2011)

    Google Scholar 

  27. Wright, A.K., Jagannathan, S.: Polymorphic splitting: An effective polyvariant flow analysis. TOPLAS 20(1), 166–207 (1998)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Tobita, Y., Tsukada, T., Kobayashi, N. (2012). Exact Flow Analysis by Higher-Order Model Checking. In: Schrijvers, T., Thiemann, P. (eds) Functional and Logic Programming. FLOPS 2012. Lecture Notes in Computer Science, vol 7294. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-29822-6_22

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-29822-6_22

  • Publisher Name: Springer, Berlin, Heidelberg

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

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

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics