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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Apt, K.R.: From Logic Programming to Prolog. Prentice-Hall, Englewood Cliffs (1997)
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)
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)
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)
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)
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)
Bruynooghe, M., Vanhoof, W., Codish, M.: Pos(T): Analyzing dependencies in typed logic programs. In: PSI 2001. LNCS, vol. 2244, pp. 406–420 (2001)
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)
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)
Fages, F., Coquery, E.: Typing constraint logic programs. Theory and Practice of Logic Programming 1(6), 751–777 (2001)
Gallagher, J., de Waal, A.: Fast and precise regular approximations of logic programs. In: ICLP, pp. 599–613. MIT Press, Cambridge (1994)
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)
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)
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)
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)
Hill, P., Lloyd, J.: The Gödel Language. MIT Press, Cambridge (1994)
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)
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
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)
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)
Milner, R.: A theory of type polymorphism in programming. Journal of Computer and System Sciences 17, 348–375 (1978)
Mycroft, A., O’Keefe, R.A.: A Polymorphic Type System for Prolog. Artificial Intelligence 23, 295–307 (1984)
Okasaki, C.: Purely Functional Data Structures. Cambridge University Press, Cambridge (1998)
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)
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)
Vanhoof, W., Bruynooghe, M.: When size does matter. In: Pettorossi, A. (ed.) LOPSTR 2001. LNCS, vol. 2372, pp. 129–147. Springer, Heidelberg (2002)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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