skip to main content
10.1145/1291151.1291165acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
Article

Termination analysis and call graph construction for higher-order functional programs

Published:01 October 2007Publication History

ABSTRACT

The analysis and verification of higher-order programs raises the issue of control-flow analysis for higher-order languages. The problem of constructing an accurate call graph for a higher-order program has been the topic of extensive research, and numerous methods for flow analysis, varying in complexity and precision, have been suggested.

While termination analysis of higher-order programs has been studied, there has been little examination of the impact of call graph construction on the precision of termination checking. We examine the effect of various control-flow analysis techniques on a termination analysis for higher-order functional programs. We present a termination checking framework and instantiate this with three call graph constructions varying in precision and complexity, and illustrate by example the impact of the choice of call graph construction.

Our second aim is to use the resulting analyses to shed light on the relationship between control-flow analyses. We prove precise inclusions between the classes of programs recognised as terminating by the same termination criterion over different call graph analyses, giving one of the first characterisations of expressive power of flow analyses for higher-order programs.

References

  1. James Avery. Size-change termination and bound analysis. In Proceedings of FLOPS '06, volume 3945 of LNCS, pages 192--207. Springer, 2006. Google ScholarGoogle Scholar
  2. Josh Berdine, Byron Cook, Dino Distefano, and Peter W. O'Hearn. Automatic termination proofs for programs with shape-shifting heaps. In Proceedings of CAV '06, volume 4144 of LNCS, pages 386--400. Springer, 2006. Google ScholarGoogle Scholar
  3. Byron Cook, Andreas Podelski, and Andrey Rybalchenko. Termination proofs for systems code. In Proceedings of PLDI '06, pages 415--426. ACM Press, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Byron Cook, Andreas Podelski, and Andrey Rybalchenko. Terminator: Beyond safety. In Proceedings of CAV '06, volume 4144 of LNCS, pages 415--418. Springer, 2006. Google ScholarGoogle Scholar
  5. Patrick Cousot and Radhia Cousot. Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Proceedings of POPL '77, pages 238--252. ACM Press, 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Patrick Cousot and Radhia Cousot. Relational abstract interpretation of higher-order functional programs. In Actes JTASPEFL '91, volume 74 of Bigre, 1991.Google ScholarGoogle Scholar
  7. Patrick Cousot and Radhia Cousot. Higher-order abstract interpretation (and application to comportment analysis generalizing strictness, termination, projection and PER analysis of functional languages), invited paper. In Proceedings of the IEEE International Conference on Computer Languages (ICLL '94), pages 95--112. IEEE Computer Society Press, 1994.Google ScholarGoogle Scholar
  8. Carl Christian Frederiksen. A simple implementation of the size-change termination principle. Working paper (DIKU, D-442). Available online at http://www.diku.dk/topps/bibliography/2001.html, 2001.Google ScholarGoogle Scholar
  9. Jürgen Giesl, René Thiemann, Peter Schneider-Kamp, and Stephan Falke. Automated termination proofs with AProVE. In Proceedings of RTA '04, volume 3091 of LNCS, pages 210--220. Springer, 2004.Google ScholarGoogle Scholar
  10. Jürgen Giesl, René Thiemann, and Peter Schneider-Kamp. Proving and disproving termination of higher-order functions. In Proceedings of the 5th International Workshop on Frontiers of Combining Systems (FroCoS '05), volume 3717 of LNAI, pages 216--231. Springer, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Jürgen Giesl, Stephan Swiderski, Peter Schneider-Kamp, and René Thiemann. Automated termination analysis for haskell: From term rewriting to programming languages. In Proceedings of RTA '06, volume 4098 of LNCS, pages 297--312. Springer, 2006. Google ScholarGoogle Scholar
  12. Thomas Johnsson. Lambda lifting: Transforming programs to recursive equations. In Proceedings of FPCA '85, volume 201 of LNCS, pages 190--203. Springer, 1985. Google ScholarGoogle Scholar
  13. Neil D. Jones. Flow analysis of lazy higher-order functional programs. In Samson Abramsky and Chris Hankin, editors, Abstract Interpretation of Declarative Languages, pages 103--122. Ellis Horwood, 1987.Google ScholarGoogle Scholar
  14. Neil D. Jones and Nina Bohr. Termination analysis of the untyped λ-calculus. In Proceedings of RTA '04, volume 3091 of LNCS. Springer, 2004.Google ScholarGoogle Scholar
  15. Chin Soon Lee, Neil D. Jones, and Amir M. Ben-Amram. The size-change principle for program termination. In Proceedings of POPL '01, pages 81--92. ACM Press, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Naomi Lindenstrauss and Yehoshua Sagiv. Checking termination of queries to logic programs. Available online at http://www.cs.huji.ac.il/~naomil/, 1996.Google ScholarGoogle Scholar
  17. Naomi Lindenstrauss and Yehoshua Sagiv. Automatic termination analysis of logic programs. In Proceedings of ICLP '97, pages 63--77. MIT Press, 1997.Google ScholarGoogle Scholar
  18. Pasquale Malacaria and Chris Hankin. A new approach to control flow analysis. In Proceedings of CC '98, volume 1383 of LNCS, pages 95--108. Springer, 1998. Google ScholarGoogle Scholar
  19. Matthew Might and Olin Shivers. Improving flow analyses via Gamma-CFA: Abstract garbage collection and counting. In Proceedings of ICFP '06, pages 13--25, Portland, Oregon, September 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Robin Milner, Mads Tofte, Robert Harper, and David MacQueen. The Definition of Standard ML (Revised). MIT Press, May 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Jens Palsberg and Michael I. Schwartzbach. Safety analysis versus type inference. Information and Computation, 118(1):128--141, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Simon Peyton-Jones. The Implementation of Functional Programming Languages. Prentice-Hall, 1987. Out of print. Online version available at http://research.microsoft.com/users/simonpj/papers/slpj-book-1987/.Google ScholarGoogle Scholar
  23. Andreas Podelski and Andrey Rybalchenko. Transition predicate abstraction and fair termination. In Proceedings of POPL '05, pages 132--144. ACM Press, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Damien Sereni. Termination Analysis of Higher-Order Functional Programs. PhD thesis, Oxford University, 2006. Online version at http://metacomp.comlab.ox.ac.uk/Members/damien/publications/thesis.pdf.Google ScholarGoogle Scholar
  25. Damien Sereni and Neil D. Jones. Termination analysis of higher-order functional programs. In Proceedings of APLAS '05, volume 3780 of LNCS, pages 281--297. Springer, 2005. Google ScholarGoogle Scholar
  26. Olin Shivers. Control-flow analysis in Scheme. In Proceedings of PLDI '88, pages 164--174. ACM Press, June 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Olin Shivers. Control-Flow Analysis of Higher-Order Languages. PhD thesis, Carnegie Mellon University, May 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Termination analysis and call graph construction for higher-order functional programs

      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

      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!