Skip to main content

On the Inference of Natural Level Mappings

  • Chapter
Program Development in Computational Logic

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

Abstract

Reasoning about termination is a key issue in logic program development. One classic technique for proving termination is to construct a well-founded order on goals that decreases between successive goals in a derivation. In practise, this is achieved with the aid of a level mapping that maps atoms to natural numbers. This paper examines why it can be difficult to base termination proofs on natural level mappings that directly relate to the recursive structure of the program. The notions of bounded-recurrency and bounded-acceptability are introduced to alleviate these problems. These concepts are equivalent to the classic notions of recurrency and acceptability respectively, yet provide practical criteria for constructing termination proofs in terms of natural level mappings for definite logic programs. Moreover, the construction is entirely modular in that termination conditions are derived in a bottom-up fashion by considering, in turn, each the strongly connected components of the program.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.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., Bezem, M.: Acyclic Programs. New Generation Computing 9(3/4), 335–364 (1991)

    Article  Google Scholar 

  2. Apt, K.R., Pedreschi, D.: Reasoning about Termination of Pure Prolog Programs. Information and Computation 106(1), 109–157 (1993)

    Article  MATH  MathSciNet  Google Scholar 

  3. Apt, K.R., Pedreschi, D.: Modular Termination Proofs for Logic and Pure Prolog programs. In: Levi, G. (ed.) Advances in Logic Programming Theory, pp. 183–229. Oxford University Press, Oxford (1994); Also available as technical report CS-R9316 from Centrum voor Wiskunde en Informatica, CWI, Amesterdam

    Google Scholar 

  4. Bezem, M.: Characterizing Termination of Logic Programs with Level Mappings. In: Lusk, E.L., Overbeek, R.A. (eds.) North American Conference on Logic Programming, pp. 69–80. MIT Press, Cambridge (1989)

    Google Scholar 

  5. Bezem, M.: Strong Termination of Logic Programs. The Journal of Logic Programming 15(1&2), 79–97 (1993)

    Article  MATH  MathSciNet  Google Scholar 

  6. Bossi, A., Cocco, N., Etalle, S., Rossi, S.: On Modular Termination Proofs of General Logic Programs. Theory and Practice of Logic Programming 2(3), 263–291 (2002)

    Article  MATH  MathSciNet  Google Scholar 

  7. Bronsard, F., Lakshman, T.K., Reddy, U.S.: A Framework of Directionality for Proving Termination of Logic Programs. In: Apt, K.R. (ed.) Joint International Conference and Symposium on Logic Programming, pp. 321–335. MIT Press, Cambridge (1992)

    Google Scholar 

  8. Bruynooghe, M.: A Practical Framework for the Abstract Interpretation of Logic Programs. The Journal of Logic Programming 10(1/2/3&4), 91–124 (1991)

    Article  MATH  MathSciNet  Google Scholar 

  9. 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 

  10. Bruynooghe, M., Leuchel, M., Sagonas, K.F.: A Polyvariant Binding-time Analysis for Off-line Partial Deduction. In: Hankin, C. (ed.) ESOP 1998. LNCS, vol. 1381, pp. 27–41. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  11. Cavedon, L.: Continuity, consistency, and completeness properties of logic programs. In: Levi, G., Martelli, M. (eds.) International Conference on Logic Programming, pp. 571–584. MIT Press, Cambridge (1989)

    Google Scholar 

  12. De Schreye, D., Verschaetse, K., Bruynooghe, M.: A Framework for Analysing the Termination of Definite Logic Programs with Respect to Call Patterns. In: International Conference on Fifth Generation Computer Systems, pp. 481–488. IOS Press, Amsterdam (1992)

    Google Scholar 

  13. Decorte, S., De Schreye, D.: Demand-driven and constraint-based automatic left-termination analysis of logic programs. In: Naish, L. (ed.) International Conference on Logic Programming, pp. 78–92. MIT Press, Cambridge (1997)

    Google Scholar 

  14. Decorte, S., De Schreye, D.: Termination analysis: Some practical properties of the Norm and Level Mapping Space. In: Jaffar, J. (ed.) Joint International Conference and Symposium on Logic Programming, pp. 235–249. MIT Press, Cambridge (1998)

    Google Scholar 

  15. Decorte, S., De Schreye, D., Fabris, M.: Automatic Inference of Norms: A Missing Link in Automatic Termination Analysis. In: Miller, D. (ed.) International Logic Programming Symposium, pp. 420–436. MIT Press, Cambridge (1993)

    Google Scholar 

  16. Decorte, S., De Schreye, D., Vandecasteele, H.: Constraint-based Termination Analysis of Logic Programs. ACM Transactions on Programming Languages and Systems 21(6), 1137–1195 (1999)

    Article  Google Scholar 

  17. Dembiński, P., Maluszyński, J.: And-Parallelism with Intelligent Backtracking for Annotated Logic Programs. In: Symposium on Logic Programming, pp. 29–38. IEEE Press, Los Alamitos (1985)

    Google Scholar 

  18. Etalle, S., Bossi, A., Cocco, N.: Termination of Well-Moded Programs. The Journal of Logic Programming 38(2), 243–257 (1999)

    Article  MATH  MathSciNet  Google Scholar 

  19. Genaim, S., Codish, M., Gallagher, J.P., 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 

  20. Lagoon, V., Mesnard, F., Stuckey, P.: Termination Analysis with Types is More Accurate. In: Palamidessi, C. (ed.) ICLP 2003. LNCS, vol. 2916, pp. 254–268. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  21. Lloyd, J.: Foundations of Logic Programming. Springer, Heidelberg (1987)

    MATH  Google Scholar 

  22. Martin, J.C.: Judgement Day: Terminating Logic Programs. PhD thesis, Department of Electronics and Computer Science, University of Southampton (2000)

    Google Scholar 

  23. Martin, J.C., 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 

  24. Martin, J.C., Leuschel, M.: Sonic Partial Deduction. In: Bjorner, D., Broy, M., Zamulin, A.V. (eds.) PSI 1999. LNCS, vol. 1755, pp. 101–112. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  25. Pedreschi, D., Ruggieri, S.: Verification of Logic Programs. The Journal of Logic Programming 39(1-3), 125–176 (1999)

    Article  MATH  MathSciNet  Google Scholar 

  26. Van Leeuwen, J. (ed.): Handbook of Theoretical Computer Science, vol. B. Elsevier, Amsterdam (1990)

    Google Scholar 

  27. 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 

  28. Verbaeten, S., De Schreye, D., Sagonas, K.F.: Termination Proofs for Logic Programs with Tabling. ACM Transactions on Computational Logic 2(1), 57–92 (2001)

    Article  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2004 Springer-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

Martin, J.C., King, A. (2004). On the Inference of Natural Level Mappings. In: Bruynooghe, M., Lau, KK. (eds) Program Development in Computational Logic. Lecture Notes in Computer Science, vol 3049. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-25951-0_13

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-25951-0_13

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-22152-4

  • Online ISBN: 978-3-540-25951-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics