Skip to main content

Termination Analysis with Types Is More Accurate

  • Conference paper
Logic Programming (ICLP 2003)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2916))

Included in the following conference series:

Abstract

In this paper we show how we can use size and groundness analyses lifted to regular and (polymorphic) Hindley/Milner typed programs to determine more accurate termination of (type correct) programs. Type information for programs may be either inferred automatically or declared by the programmer. The analysis of the typed logic programs is able to completely reuse a framework for termination analysis of untyped logic programs by using abstract compilation of the type abstraction. We show that our typed termination analysis is uniformly more accurate than untyped termination analysis for regularly typed programs, and demonstrate how it is able to prove termination of programs which the untyped analysis can not.

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 99.00
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 129.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. Apt, K.R.: From Logic Programming to Prolog. Prentice-Hall, Englewood Cliffs (1997)

    Google Scholar 

  2. Armstrong, T., Marriott, K., Schachte, P., Søndergaard, H.: Two classes of Boolean functions for dependency analysis. Science of Computer Programming 31(1), 3–45 (1998)

    Article  MATH  MathSciNet  Google Scholar 

  3. Bagnara, R., Ricci, E., Zaffanella, E., Hill, P.M.: Possibly not closed convex polyhedra and the Parma Polyhedra Library. In: Hermenegildo, M.V., Puebla, G. (eds.) SAS 2002. LNCS, vol. 2477, pp. 213–229. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  4. Bossi, A., Cocco, N., Fabris, M.: Typed norms. In: Krieg-Brückner, B. (ed.) ESOP 1992. LNCS, vol. 582, pp. 73–92. Springer, Heidelberg (1992)

    Google Scholar 

  5. Bruynooghe, M., Codish, M., Genaim, S., Vanhoof, W.: Reuse of results in termination analysis of typed logic programs. In: Hermenegildo, M.V., Puebla, G. (eds.) SAS 2002. LNCS, vol. 2477, pp. 477–492. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  6. Bruynooghe, M., Codish, M., Genaim, S., Vanhoof, W.: A note on the reuse of results in termination analysis of typed logic programs. Forthcoming TR, Dpt. CS, K.U. Leuven (2003)

    Google Scholar 

  7. Bruynooghe, M., Vanhoof, W., Codish, M.: Pos(T): Analyzing dependencies in typed logic programs. In: PSI 2001. LNCS, vol. 2244, pp. 406–420 (2001)

    Google Scholar 

  8. Cousot, P., Cousot, R.: Abstract Interpretation: A Unified Lattice Model for Static Analysis of Programs by Construction or Approximation of Fixpoints. In: POPL, pp. 238–252 (1977)

    Google Scholar 

  9. Decorte, S., De Schreye, D., Fabris, M.: Exploiting the power of typed norms in automatic inference of interargument relations. TR 246, Dpt. CS, K.U. Leuven (1997)

    Google Scholar 

  10. Fages, F., Coquery, E.: Typing constraint logic programs. Theory and Practice of Logic Programming 1(6), 751–777 (2001)

    Article  MATH  MathSciNet  Google Scholar 

  11. Gallagher, J., de Waal, A.: Fast and precise regular approximations of logic programs. In: ICLP, pp. 599–613. MIT Press, Cambridge (1994)

    Google Scholar 

  12. Gallagher, J., Puebla, G.: Abstract interpretation over non-deterministic finite tree automata for set-based analysis of logic programs. In: Krishnamurthi, S., Ramakrishnan, C.R. (eds.) PADL 2002. LNCS, vol. 2257, pp. 243–261. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  13. García de la Banda, M., Demoen, B., Marriott, K., Stuckey, P.J.: To the Gates of HAL: A HAL tutorial. In: Hu, Z., Rodríguez-Artalejo, M. (eds.) FLOPS 2002. LNCS, vol. 2441, pp. 47–66. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  14. Genaim, S., Codish, M., Gallagher, J., Lagoon, V.: Combining norms to prove termination. In: Cortesi, A. (ed.) VMCAI 2002. LNCS, vol. 2294, pp. 126–138. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  15. Halbwachs, N.: Détermination Automatique de Relations Linéaires Vérifiées par les Variables d’un Programme. PhD thesis, USM de Grenoble, France (1979)

    Google Scholar 

  16. Hill, P., Lloyd, J.: The Gödel Language. MIT Press, Cambridge (1994)

    MATH  Google Scholar 

  17. Jaffar, J., Maher, M., Marriott, K., Stuckey, P.J.: The semantics of constraint logic programs. Journal of Logic Programming 37(1-3), 1–46 (1998)

    Article  MATH  MathSciNet  Google Scholar 

  18. Lagoon, V., Stuckey, P.J.: Polymorphic analysis of typed logic programs. TR, Dpt. CSSE, University of Melbourne, Australia (2003), www.cs.mu.oz.au/~pjs/papers/poly-tr.ps

  19. Martin, J., King, A., Soper, P.: Typed norms for typed logic programs. In: Gallagher, J.P. (ed.) LOPSTR 1996. LNCS, vol. 1207, pp. 224–238. Springer, Heidelberg (1997)

    Google Scholar 

  20. Mesnard, F., Neumerkel, U.: Applying static analysis techniques for inferring termination conditions of logic programs. In: Cousot, P. (ed.) SAS 2001. LNCS, vol. 2126, pp. 93–110. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  21. Milner, R.: A theory of type polymorphism in programming. Journal of Computer and System Sciences 17, 348–375 (1978)

    Article  MATH  MathSciNet  Google Scholar 

  22. Mycroft, A., O’Keefe, R.A.: A Polymorphic Type System for Prolog. Artificial Intelligence 23, 295–307 (1984)

    Article  MATH  MathSciNet  Google Scholar 

  23. Okasaki, C.: Purely Functional Data Structures. Cambridge University Press, Cambridge (1998)

    Book  Google Scholar 

  24. Somogyi, Z., Henderson, F., Conway, T.: The execution algorithm of Mercury, an efficient purely declarative logic programming language. Journal of Logic Programming 29(1-3), 17–64 (1996)

    Article  MATH  Google Scholar 

  25. Speirs, C., Somogyi, Z., Søndergaard, H.: Termination analysis for Mercury. In: Van Hentenryck, P. (ed.) SAS 1997. LNCS, vol. 1302, pp. 160–171. Springer, Heidelberg (1997)

    Chapter  Google Scholar 

  26. Vanhoof, W., Bruynooghe, M.: When size does matter. In: Pettorossi, A. (ed.) LOPSTR 2001. LNCS, vol. 2372, pp. 129–147. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2003 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Lagoon, V., Mesnard, F., Stuckey, P.J. (2003). Termination Analysis with Types Is More Accurate. In: Palamidessi, C. (eds) Logic Programming. ICLP 2003. Lecture Notes in Computer Science, vol 2916. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-24599-5_18

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-24599-5_18

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-20642-2

  • Online ISBN: 978-3-540-24599-5

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics