Automated Termination Analysis for Haskell: From Term Rewriting to Programming Languages

  • Jürgen Giesl
  • Stephan Swiderski
  • Peter Schneider-Kamp
  • René Thiemann
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4098)

Abstract

There are many powerful techniques for automated termination analysis of term rewriting. However, up to now they have hardly been used for real programming languages. We present a new approach which permits the application of existing techniques from term rewriting in order to prove termination of programs in the functional language Haskell. In particular, we show how termination techniques for ordinary rewriting can be used to handle those features of Haskell which are missing in term rewriting (e.g., lazy evaluation, polymorphic types, and higher-order functions). We implemented our results in the termination prover AProVE and successfully evaluated them on existing Haskell-libraries.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Abel, A.: Termination checking with types. RAIRO - Theoretical Informatics and Applications 38(4), 277–319 (2004)MATHCrossRefMathSciNetGoogle Scholar
  2. 2.
    Arts, T., Giesl, J.: Termination of term rewriting using dependency pairs. Theoretical Computer Science 236, 133–178 (2000)MATHCrossRefMathSciNetGoogle Scholar
  3. 3.
    Barthe, G., Frade, M.J., Giménez, E., Pinto, L., Uustalu, T.: Type-based termination of recursive definitions. Math. Structures in Comp. Sc. 14(1), 1–45 (2004)CrossRefGoogle Scholar
  4. 4.
    Fissore, O., Gnaedig, I., Kirchner, H.: Outermost ground termination. In: Proc. WRLA 2002, ENTCS, vol. 71 (2002)Google Scholar
  5. 5.
    Giesl, J.: Termination analysis for functional programs using term orderings. In: Mycroft, A. (ed.) SAS 1995. LNCS, vol. 983, pp. 154–171. Springer, Heidelberg (1995)Google Scholar
  6. 6.
    Giesl, J., Middeldorp, A.: Transformation techniques for context-sensitive rewrite systems. Journal of Functional Programming 14(4), 379–427 (2004)MATHCrossRefMathSciNetGoogle Scholar
  7. 7.
    Giesl, J., Thiemann, R., Schneider-Kamp, P.: The dependency pair framework: Combining techniques for automated termination proofs. In: Baader, F., Voronkov, A. (eds.) LPAR 2004. LNCS (LNAI), vol. 3452, pp. 301–331. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  8. 8.
    Giesl, J., Thiemann, R., Schneider-Kamp, P.: Proving and disproving termination of higher-order functions. In: Gramlich, B. (ed.) FroCos 2005. LNCS (LNAI), vol. 3717, pp. 216–231. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  9. 9.
    Giesl, J., Schneider-Kamp, P., Thiemann, R.: AProVE 1.2: Automatic termination proofs in the DP framework. In: Furbach, U., Shankar, N. (eds.) IJCAR 2006. LNCS (LNAI), vol. 4130, pp. 281–286. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  10. 10.
    Lee, C.S., Jones, N.D., Ben-Amram, A.M.: The size-change principle for program termination. In: Proc. POPL 2001, pp. 81–92. ACM Press, New York (2001)Google Scholar
  11. 11.
    Panitz, S.E., Schmidt-Schauss, M.: TEA: Automatically proving termination of programs in a non-strict higher-order functional language. In: Van Hentenryck, P. (ed.) SAS 1997. LNCS, vol. 1302, pp. 345–360. Springer, Heidelberg (1997)CrossRefGoogle Scholar
  12. 12.
    Peyton Jones, S. (ed.): Haskell 98 Languages and Libraries: The revised report. Cambridge University Press, Cambridge (2003)Google Scholar
  13. 13.
    Schneider-Kamp, P., Giesl, J., Serebrenik, A., Thiemann, R.: Automated termination analysis for logic programs by term rewriting. In: Puebla, G. (ed.) LOPSTR 2006. LNCS, vol. 4407, pp. 177–193. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  14. 14.
    Swiderski, S.: Terminierungsanalyse von Haskellprogrammen. Diploma Thesis, RWTH Aachen (2005), see: http://aprove.informatik.rwth-aachen.de/eval/Haskell/
  15. 15.
    Telford, A., Turner, D.: Ensuring termination in ESFP. Journal of Universal Computer Science 6(4), 474–488 (2000)MATHMathSciNetGoogle Scholar
  16. 16.
    Walther, C.: On proving the termination of algorithms by machine. Artificial Intelligence 71(1), 101–157 (1994)MATHCrossRefMathSciNetGoogle Scholar
  17. 17.
    Xi, H.: Dependent types for program termination verification. Higher-Order and Symbolic Computation 15(1), 91–131 (2002)MATHCrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Jürgen Giesl
    • 1
  • Stephan Swiderski
    • 1
  • Peter Schneider-Kamp
    • 1
  • René Thiemann
    • 1
  1. 1.RWTH AachenLuFG Informatik 2AachenGermany

Personalised recommendations