Binary Reachability Analysis of Higher Order Functional Programs

  • Ruslán Ledesma-Garza
  • Andrey Rybalchenko
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7460)


A number of recent approaches for proving program termination rely on transition invariants - a termination argument that can be constructed incrementally using abstract interpretation. These approaches use binary reachability analysis to check if a candidate transition invariant holds for a given program. For imperative programs, its efficient implementation can be obtained by a reduction to reachability analysis, for which practical tools are available. In this paper, we show how a binary reachability analysis can be put to work for proving termination of higher order functional programs.


Evaluation Tree Abstract Interpretation Program Transformation Reachability Analysis Call Graph 
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.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Ball, T., Rajamani, S.K.: The SLAM project: debugging system software via static analysis. In: POPL (2002)Google Scholar
  2. 2.
    Berdine, J., Cook, B., Distefano, D., O’Hearn, P.W.: Automatic Termination Proofs for Programs with Shape-Shifting Heaps. In: Ball, T., Jones, R.B. (eds.) CAV 2006. LNCS, vol. 4144, pp. 386–400. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  3. 3.
    Chawdhary, A., Cook, B., Gulwani, S., Sagiv, M., Yang, H.: Ranking Abstractions. In: Drossopoulou, S. (ed.) ESOP 2008. LNCS, vol. 4960, pp. 148–162. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  4. 4.
    Cook, B., Podelski, A., Rybalchenko, A.: Termination proofs for systems code. In: PLDI (2006)Google Scholar
  5. 5.
    Cook, B., Podelski, A., Rybalchenko, A.: Proving program termination. Commun. ACM 54(5) (2011)Google Scholar
  6. 6.
    Cousot, P., Cousot, R.: Invited talk: Higher order abstract interpretation (and application to comportment analysis generalizing strictness, termination, projection, and per analysis. In: ICCL (1994)Google Scholar
  7. 7.
    Cousot, P., Cousot, R.: An abstract interpretation framework for termination. In: POPL (2012)Google Scholar
  8. 8.
    Earl, C., Might, M., Horn, D.V.: Pushdown control-flow analysis of higher-order programs: Precise, polyvariant and polynomial-time. In: Scheme (2010)Google Scholar
  9. 9.
    Giesl, J., Raffelsieper, M., Schneider-Kamp, P., Swiderski, S., Thiemann, R.: Automated termination proofs for haskell by term rewriting. ACM Trans. Program. Lang. Syst. 33 (2011)Google Scholar
  10. 10.
    Heizmann, M., Jones, N.D., Podelski, A.: Size-Change Termination and Transition Invariants. In: Cousot, R., Martel, M. (eds.) SAS 2010. LNCS, vol. 6337, pp. 22–50. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  11. 11.
    Henzinger, T.A., Jhala, R., Majumdar, R., Sutre, G.: Lazy abstraction. In: POPL (2002)Google Scholar
  12. 12.
    Ivančić, F., Yang, Z., Ganai, M.K., Gupta, A., Shlyakhter, I., Ashar, P.: F-Soft: Software Verification Platform. In: Etessami, K., Rajamani, S.K. (eds.) CAV 2005. LNCS, vol. 3576, pp. 301–306. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  13. 13.
    Jhala, R., Majumdar, R.: Counterexample refinement for functional programs (2009),
  14. 14.
    Jhala, R., Majumdar, R., Rybalchenko, A.: HMC: Verifying Functional Programs Using Abstract Interpreters. In: Gopalakrishnan, G., Qadeer, S. (eds.) CAV 2011. LNCS, vol. 6806, pp. 470–485. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  15. 15.
    Jones, N.D., Bohr, N.: Termination Analysis of the Untyped ?-Calculus. In: van Oostrom, V. (ed.) RTA 2004. LNCS, vol. 3091, pp. 1–23. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  16. 16.
    Kawaguchi, M., Rondon, P.M., Jhala, R.: Type-based data structure verification. In: PLDI (2009)Google Scholar
  17. 17.
    Kawaguchi, M., Rondon, P.M., Jhala, R.: Dsolve: Safety Verification via Liquid Types. In: Touili, T., Cook, B., Jackson, P. (eds.) CAV 2010. LNCS, vol. 6174, pp. 123–126. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  18. 18.
    Kobayashi, N., Sato, R., Unno, H.: Predicate abstraction and CEGAR for higher-order model checking. In: PLDI (2011)Google Scholar
  19. 19.
    Kroening, D., Sharygina, N., Tsitovich, A., Wintersteiger, C.M.: Termination Analysis with Compositional Transition Invariants. In: Touili, T., Cook, B., Jackson, P. (eds.) CAV 2010. LNCS, vol. 6174, pp. 89–103. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  20. 20.
    Lee, C.S., Jones, N.D., Ben-Amram, A.M.: The size-change principle for program termination. In: POPL (2001)Google Scholar
  21. 21.
    Leroy, X.: Polymorphic typing of an algorithmic language. Research report 1778, INRIA (1992)Google Scholar
  22. 22.
    McMillan, K.L.: Lazy Abstraction with Interpolants. In: Ball, T., Jones, R.B. (eds.) CAV 2006. LNCS, vol. 4144, pp. 123–136. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  23. 23.
    Might, M., Shivers, O.: Exploiting reachability and cardinality in higher-order flow analysis. J. Funct. Program. 18(5-6) (2008)Google Scholar
  24. 24.
    Otto, C., Brockschmidt, M., von Essen, C., Giesl, J.: Automated termination analysis of java bytecode by term rewriting. In: RTA (2010)Google Scholar
  25. 25.
    Podelski, A., Rybalchenko, A.: Transition invariants. In: LICS (2004)Google Scholar
  26. 26.
    Pouillard, N.: Camlp4 (retrieved on July 11, 2011)Google Scholar
  27. 27.
    Prabhu, T., Ramalingam, S., Might, M., Hall, M.W.: Eigencfa: accelerating flow analysis with GPUs. In: POPL (2011)Google Scholar
  28. 28.
    Sereni, D.: Termination Analysis of Higher-Order Functional Programs. PhD thesis, University of Oxford (2006)Google Scholar
  29. 29.
    Sereni, D.: Termination analysis and call graph construction for higher-order functional programs. In: ICFP (2007)Google Scholar
  30. 30.
    Sereni, D., Jones, N.D.: Termination Analysis of Higher-Order Functional Programs. In: Yi, K. (ed.) APLAS 2005. LNCS, vol. 3780, pp. 281–297. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  31. 31.
    Shivers, O.: Control-flow analysis in scheme. In: PLDI (1988)Google Scholar
  32. 32.
    Spoto, F., Mesnard, F., Payet, É.: A termination analyzer for java bytecode based on path-length. ACM Trans. Program. Lang. Syst. 32(3) (2010)Google Scholar
  33. 33.
    Terauchi, T.: Dependent types from counterexamples. In: POPL (2010)Google Scholar
  34. 34.
    Voigtländer, J.: Free theorems involving type constructor classes: functional pearl. In: ICFP (2009)Google Scholar
  35. 35.
    Wadler, P.: Monads for functional programming. In: Advanced Functional Programming, pp. 24–52 (1995)Google Scholar
  36. 36.
    Xu, D.N.: Static Contract Checking for Haskell. PhD thesis. University of Cambridge (August 2008)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Ruslán Ledesma-Garza
    • 1
  • Andrey Rybalchenko
    • 1
  1. 1.Technische Universität MünchenGermany

Personalised recommendations