Skip to main content
Log in

SLT-Resolution for the Well-Founded Semantics

  • Published:
Journal of Automated Reasoning Aims and scope Submit manuscript

Abstract

Global SLS-resolution and SLG-resolution are two representative mechanisms for top-down evaluation of the well-founded semantics of general logic programs. Global SLS-resolution is linear for query evaluation but suffers from infinite loops and redundant computations. In contrast, SLG-resolution resolves infinite loops and redundant computations by means of tabling, but it is not linear. The principal disadvantage of a nonlinear approach is that it cannot be implemented by using a simple, efficient stack-based memory structure nor can it be easily extended to handle some strictly sequential operators such as cuts in Prolog. In this paper, we present a linear tabling method, called SLT-resolution, for top-down evaluation of the well-founded semantics. SLT-resolution is a substantial extension of SLDNF-resolution with tabling. Its main features are the following. First, it resolves infinite loops and redundant computations while preserving the linearity. Second, it is terminating and is sound and complete w.r.t. the well-founded semantics for programs with the bounded-term-size property with nonfloundering queries. Its time complexity is comparable with SLG-resolution and polynomial for function-free logic programs. Third, because of its linearity for query evaluation, SLT-resolution bridges the gap between the well-founded semantics and standard Prolog implementation techniques. It can be implemented by an extension to any existing Prolog abstract machines such as WAM or ATOAM.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Similar content being viewed by others

References

  1. Apt, K. R. and Van Emden, M. H.: Contributions to the theory of logic programming, J. ACM29(3) (1982), 841-862.

    Google Scholar 

  2. Bol, R. N., Apt, K. R. and Klop, J. W.: An analysis of loop checking mechanisms for logic programs, Theoret. Comput. Sci.86(1) (1991), 35-79.

    Google Scholar 

  3. Bol, R. N. and Degerstedt, L.: The underlying search for magic templates and tabulation, in Proc. of the Tenth International Conference on Logic Programming, MIT Press, 1993.

  4. Bol, R. N. and Degerstedt, L.: Tabulated resolution for the well-founded semantics, J. Logic Programming34(2) (1998), 67-109.

    Google Scholar 

  5. Chan, D.: Constructive negation based on the completed database, in R. A. Kowalski and K. A. Bowen (eds.), Proc. of the Fifth International Conference and Symposium on Logic Programming, MIT Press, Cambridge, Mass., 1988, pp. 111-125.

    Google Scholar 

  6. Chen, W. D., Swift, T. and Warren, D. S.: Efficient top-down computation of queries under the well-founded semantics, J. Logic Programming24(3) (1995), 161-199.

    Google Scholar 

  7. Chen, W. D. and Warren, D. S.: Tabled evaluation with delaying for general logic programs, J. ACM43(1) (1996), 20-74.

    Google Scholar 

  8. Clark, K. L.: Negation as failure, in H. Gallaire and J. Minker (eds.), Logic and Databases, Plenum, New York, 1978, pp. 293-322.

    Google Scholar 

  9. De Schreye, D. and Decorte, S.: Termination of logic programs: The never-ending story, J. Logic Programming19/20 (1993), 199-260.

    Google Scholar 

  10. Drabent, W.:What is failure? An approach to constructive negation, Acta Inform.32(1) (1995), 27-59.

    Google Scholar 

  11. Gelfond, M. and Lifschitz, V.: The stable model semantics for logic programming, in R.A. Kowalski and K. A. Bowen (eds.), Proc. of the Fifth International Conference and Symposium on Logic Programming, MIT Press, Cambridge, Mass., 1988, pp. 1070-1080.

    Google Scholar 

  12. Kowalski, R. A. and Kuehner, D.: Linear resolution with selection functions, Artificial Intelligence2 (1971), 227-260.

    Google Scholar 

  13. Kowalski, R. A.: Predicate logic as a programming language, in IFIP 74, pp. 569-574.

  14. Liu, J. Y., Adams, L. and Chen, W.: Constructive negation under the well-founded semantics, J. Logic Programming38(3) (1999), 295-330.

    Google Scholar 

  15. Lloyd, J. W.: Foundations of Logic Programming, 2nd edn, Springer-Verlag, Berlin, 1987.

    Google Scholar 

  16. Nilsson, U. and Maluszynski, J.: Logic Programming and Prolog, 2nd edn, Wiley, New York, 1995.

    Google Scholar 

  17. Przymusunski, T.: On the declarative and procedural semantics of logic programs, J. Automated Reasoning5 (1989), 167-205.

    Google Scholar 

  18. Przymusunski, T.: Every logic program has a natural stratification and an iterated fixed point model, in Proc. of the 8th ACM Symposium on Principles of Database Systems, 1989, pp. 11-21.

  19. Przymusunski, T.: On constructive negation in logic programming, in E. L. Lusk and R. A. Overbeek (eds.), Proc. of the North American Conference on Logic Programming, MIT Press, Cambridge, Mass., 1989, Addendum to the volume.

  20. Przymusunski, T.: The well-founded semantics coincides with the three-valued stable semantics, Fund. Inform.13 (1990), 445-463.

    Google Scholar 

  21. Robinson, J. A.: A machine-oriented logic based on the resolution principle, J. ACM12(1) (1965), 23-41.

    Google Scholar 

  22. Ross, K.: A procedural semantics for well-founded negation in logic programs, J. Logic Programming13(1) (1992), 1-22.

    Google Scholar 

  23. Sagonas, K., Swift, T. and Warren, D. S.: XSB as an efficient deductive database engine, in Proc. of the ACM SIGMOD Conference on Management of Data, Minneapolis, 1994, pp. 442-453.

  24. Sagonas, K. and Swift, T.: An abstract machine for tabled execution of fixed-order stratified logic programs, ACM Trans. Programming Languages and Systems20(3) (1998).

  25. Sagonas, K., Swift, T., Warren, D. S., Freire, J. and Rao, P.: The XSB Programmer's Manual (Version 1.8), 1998.

  26. Shen, Y. D.: An extended variant of atoms loop check for positive logic programs, New Generation Comput.15(2) (1997), 187-204.

    Google Scholar 

  27. Shen, Y. D., Yuan, L. Y., You, J. H. and Zhou, N. F.: Linear tabulated resolution based on Prolog control strategy, Theory and Practice of Logic Programming(previously J. Logic Programming) 1(1) (2001), 71-103.

    Google Scholar 

  28. Shen, Y. D., Yuan, L. Y., You, J. H. and Zhou, N. F.: Linear tabulated resolution for the well founded semantics, in Proc. of the 5th International Conference on Logic Programming and Nonmonotonic Reasoning, Texas, 1999, pp. 192-205.

  29. Shepherdson, J. C.: Negation in logic programming, in J. Minker (ed.), Foundations of Deductive Databases and Logic Programming, Morgan Kaufmann, 1988, pp. 19-88.

  30. Tamaki, H. and Sato, T.: OLD resolution with tabulation, in Proc. of the Third International Conference on Logic Programming, London, 1986, pp. 84-98.

  31. Van Emden, M. H. and Kowalski, R. A.: The semantics of predicate logic as a programming language, J. ACM23(4) (1976), 733-742.

    Google Scholar 

  32. Van Gelder, A.: Negation as failure using tight derivations for general logic programs, J. Logic Programming6 (1&2) (1989), 109-133.

    Google Scholar 

  33. Van Gelder, A., Ross, K. and Schlipf, J.: The well-founded semantics for general logic programs, J. ACM38(3) (1991), 620-650.

    Google Scholar 

  34. Vardi, M.: The complexity of relational query languages, in ACM Symposium on Theory of Computing, 1982, pp. 137-146.

  35. Vieille, L.: Recursive query processing: The power of logic, Theoret. Comput. Sci.69 (1989), 1-53.

    Google Scholar 

  36. Warren, D. H. D.: An abstract Prolog instruction set, Technical Report 309, SRI International, 1983.

  37. Warren, D. S.: Memoing for logic programs, CACM35(3) (1992), 93-111.

    Google Scholar 

  38. Zhou, N. F.: Parameter passing and control stack management in Prolog implementation revisited, ACM Trans. Programming Languages and Systems18(6) (1996), 752-779.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Shen, YD., Yuan, LY. & You, JH. SLT-Resolution for the Well-Founded Semantics. Journal of Automated Reasoning 28, 53–97 (2002). https://doi.org/10.1023/A:1020116927466

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1023/A:1020116927466

Navigation