On the Problem of Computing the Well-Founded Semantics
The well-founded semantics is one of the most widely studied and used semantics of logic programs with negation. In the case of finite propositional programs, it can be computed in polynomial time, more specifically, in O(|At(P)| × size(P)) steps, where size(P) denotes the total number of occurrences of atoms in a logic program P. This bound is achieved by an algorithm introduced by Van Gelder and known as the alternating-fixpoint algorithm. Improving on the alternating-fixpoint algorithm turned out to be difficult. In this paper we study extensions and modifications of the alternating-fixpoint approach. We then restrict our attention to the class of programs whose rules have no more than one positive occurrence of an atom in their bodies. For programs in that class we propose a new implementation of the alternating-fixpoint method in which false atoms are computed in a top-down fashion. We show that our algorithm is faster than other known algorithms and that for a wide class of programs it is linear and so, asymptotically optimal.
KeywordsLogic Program Logic Programming Unicyclic Graph Nonmonotonic Reasoning Normal Logic Program
Unable to display preview. Download preview PDF.
- 2.K. Berman, J. Schlipf, and J. Franco. Computing the well-founded semantics faster. In Logic Programming and Nonmonotonic Reasoning (Lexington, KY, 1995), volume 928 of Lecture Notes in Computer Science, pages 113–125, Berlin, 1995. Springer.Google Scholar
- 4.S. Brass and J. Dix and B. Freitag and U. Zukowski. Transformation-based bottom-up computation of the well-founded model. Manuscript.Google Scholar
- 8.M. C. Fitting. Fixpoint semantics for logic programming-a survey. Theoretical Computer Science, 1999. To appear.Google Scholar
- 9.M.C. Fitting. Well-founded semantics, generalized. In Logic programming (San Diego, CA, 1991, MIT Press Series in Logic Programming, pages 71–84, Cambridge, MA, 1991. MIT Press.Google Scholar
- 10.M. Gelfond and V. Lifschitz. The stable semantics for logic programs. In R. Kowalski and K. Bowen, editors, Proceedings of the 5th International Symposium on Logic Programming, pages 1070–1080, Cambridge, MA, 1988. MIT Press.Google Scholar
- 12.I. Niemelä and P. Simons. Efficient implementation of the well-founded and stable model semantics. In Proceedings of JICSLP-96. MIT Press, 1996.Google Scholar
- 13.P. Rao, I.V. Ramskrishnan, K. Sagonas, T. Swift, D. S. Warren, and J. Freire. XSB: A system for efficiently computing well-founded semantics. In Proceedings of LPNMR’97, pages 430–440. Berlin: Springer-Verlag, 1997. Lecture Notes in Computer Science, 1265.Google Scholar
- 15.A. Van Gelder. The alternating fixpoints of logic programs with negation. In ACM symposium on principles of database systems, pages 1–10, 1989.Google Scholar
- 17.U. Zukowski, S. Brass, and B. Freitag. Improving the alternating fixpoint: the transformation approach. In Proceedings of LPNMR’97, pages 40–59. Berlin: Springer-Verlag, 1997. Lecture Notes in Computer Science, 1265.Google Scholar