Skip to main content

Terminyzer: An Automatic Non-termination Analyzer for Large Logic Programs

  • Conference paper
Practical Aspects of Declarative Languages (PADL 2013)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 7752))

Included in the following conference series:

Abstract

There have been many studies on termination analysis of logic programs but little has been done to analyze their non-termination, an even more important task, in our opinion. Non-termination analysis examines program execution history when non-termination is suspected and attempts to inform the programmer about possible ways to fix the problem. This paper attempts to fill in the void. We study the problem of non-termination in tabled logic engines with subgoal abstraction, such as XSB, and propose a suite of algorithms, called non-Termination Analyzer, Terminyzer, for automatic detection of non-termination and explaining it to the user. Terminyzer includes several non-termination analysis approaches of different computational complexity. These approaches are all based on analyzing forest logging traces and supply sequences of tabled calls that are likely causes of non-terminating cycles. It also provides the sequences of functors that are applied repeatedly to generate infinitely many answers and thus helps programmers debug large programs by focusing on much smaller subsets of rules.

Terminyzer is included in both XSB and \({\cal F}\) lora -2, and all examples used in this paper are available online.

This work is part of the SILK (Semantic Inference on Large Knowledge) project sponsored by Vulcan, Inc. The authors were also partially supported by the NSF grant 0964196. The basic idea behind Terminyzer was also mentioned in [6].

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 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 49.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. Bruynooghe, M., Codish, M., Gallagher, J.P., Genaim, S., Vanhoof, W.: Termination analysis of logic programs through combination of type-based norms. ACM Trans. Program. Lang. Syst. 29 (April 2007)

    Google Scholar 

  2. Chen, W., Kifer, M., Warren, D.S.: HiLog: A foundation for higher-order logic programming. J. Log. Program. 15(3), 187–230 (1993)

    Article  MathSciNet  MATH  Google Scholar 

  3. Costa, V.S., Damas, L., Rocha, R.: The YAP prolog system. CoRR abs/1102.3896 (2011)

    Google Scholar 

  4. Decorte, S., De Schreye, D., Leuschel, M., Martens, B., Sagonas, K.: Termination analysis for tabled logic programming. In: Fuchs, N.E. (ed.) LOPSTR 1997. LNCS, vol. 1463, pp. 111–127. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  5. Hermenegildo, M.V., Bueno, F., Carro, M., López-García, P., Mera, E., Morales, J.F., Puebla, G.: An overview of ciao and its design philosophy. TPLP 12(1-2), 219–252 (2012)

    MATH  Google Scholar 

  6. Liang, S.: Non-termination analysis and cost-based query optimization of logic programs. In: Krötzsch, M., Straccia, U. (eds.) RR 2012. LNCS, vol. 7497, pp. 284–290. Springer, Heidelberg (2012)

    Chapter  Google Scholar 

  7. Liang, S., Kifer, M.: Terminyzer: An automatic non-termination analyzer for large logic programs. In: Technical Report (2012)

    Google Scholar 

  8. Lindenstrauss, N., Sagiv, Y., Serebrenik, A.: Proving termination for logic programs by the query-mapping pairs approach. In: Bruynooghe, M., Lau, K.-K. (eds.) Program Development in Computational Logic. LNCS, vol. 3049, pp. 453–498. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  9. Neumerkel, U., Mesnard, F.: Localizing and explaining reasons for non-terminating logic programs with failure-slices. In: Nadathur, G. (ed.) PPDP 1999. LNCS, vol. 1702, pp. 328–342. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  10. Nguyen, M.T., De Schreye, D.: Polytool: proving termination automatically based on polynomial interpretations. In: Puebla, G. (ed.) LOPSTR 2006. LNCS, vol. 4407, pp. 210–218. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  11. Nguyen, M.T., Giesl, J., Schneider-Kamp, P., De Schreye, D.: Termination analysis of logic programs based on dependency graphs. In: King, A. (ed.) LOPSTR 2007. LNCS, vol. 4915, pp. 8–22. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  12. Payet, E., Mesnard, F.: Nontermination inference of logic programs. ACM Trans. Program. Lang. Syst. 28, 256–289 (2006)

    Article  Google Scholar 

  13. Schneider-kamp, P., Giesl, J., Ströder, T., Serebrenik, A., Thiemann, R.: Automated termination analysis for logic programs with cut*. Theory Pract. Log. Program. 10, 365–381 (2010)

    Article  MathSciNet  MATH  Google Scholar 

  14. Schreye, D.D., Decorte, S.: Termination of logic programs: The never-ending story. J. Log. Program. 19/20, 199–260 (1994)

    Article  Google Scholar 

  15. Sipser, M.: Introduction to the Theory of Computation. Thomson Publishing (1996)

    Google Scholar 

  16. Swift, T., Warren, D.S., Sagonas, K., Freire, J., Rao, P., Cui, B., Johnson, E., de Castro, L., Marques, R.F., Saha, D., Dawson, S., Kifer, M.: The XSB system, version 3.3.x.: Programmer’s manual (2012), http://xsb.sourceforge.net

  17. Swift, T., Warren, D.S.: Xsb: Extending prolog with tabled logic programming. CoRR abs/1012.5123 (2010)

    Google Scholar 

  18. Verbaeten, S., Schreye, D.D., Sagonas, K.: Termination proofs for logic programs with tabling. ACM Trans. Comput. Logic 2(1), 57–92 (2001)

    Article  Google Scholar 

  19. Voets, D., De Schreye, D.: Non-termination analysis of logic programs using types. In: Alpuente, M. (ed.) LOPSTR 2010. LNCS, vol. 6564, pp. 133–148. Springer, Heidelberg (2011)

    Chapter  Google Scholar 

  20. Voets, D., De Schreye, D.: A new approach to non-termination analysis of logic programs. In: Hill, P.M., Warren, D.S. (eds.) ICLP 2009. LNCS, vol. 5649, pp. 220–234. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  21. Zhou, N.F.: The language features and architecture of b-prolog. TPLP 12(1-2), 189–218 (2012)

    MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Liang, S., Kifer, M. (2013). Terminyzer: An Automatic Non-termination Analyzer for Large Logic Programs. In: Sagonas, K. (eds) Practical Aspects of Declarative Languages. PADL 2013. Lecture Notes in Computer Science, vol 7752. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-45284-0_12

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-45284-0_12

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-45283-3

  • Online ISBN: 978-3-642-45284-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics