Abstract
We address methods of speeding up the calculation of the well-founded semantics for normal propositional logic programs. We first consider two algorithms already reported in the literature and show that these, plus a variation upon them, have much improved worst-case behavior for special cases of input. Then we propose a general algorithm to speed up the calculation for logic programs with at most two positive subgoals per clause, intended to improve the worst case performance of the computation. For a logic program P in atoms A 1, the speed up over the straight Van Gelder alternating fixed point algorithm (assuming worst-case behavior for both algorithms) is approximately (¦P¦/¦A¦)(1/3). For ¦P¦≥¦A¦4, the algorithm runs in time linear in ¦P¦.
Preview
Unable to display preview. Download preview PDF.
References
J. Dix. A classification theory of semantics of normal logic programs: II. Weak properties. To appear in JCSS.
W. F. Dowling and J. H. Gallier. Linear time algorithms for testing the satisfiability of propositional Horn formulae. Journal of Logic Programming 1 (1984), 267–284.
M. Fitting. A Kripke-Kleene semantics for logic programs. Journal of Logic Programming, 2(4):295–312, 1985.
M. Gelfond and V. Lifschitz. The stable model semantics for logic programming. In Proc. 5th Int'l Conf. Symp. on Logic Programming, 1988.
V. Lifschitz and H. Turner. Splitting a logic program. Preprint.
A. Itai and J. Makowsky, On the complexity of Herbrand's theorem. Technical Report No. 243, Department of Computer Science, Israel Institute of Technology, Haifa (1982).
W. Marek and M. Truszczyński. Autoepistemic logic. Journal of the ACM 38(3), pages 588–619, 1991.
J. Reif. A topological approach to dynamic graph connectivity. Information Processing Letters 25(1), pages 65–70.
J. S. Schlipf. The expressive powers of the logic programming semantics. To appear in JCSS. A preliminary version appeared in Ninth ACM Symposium on Principles of Database Systems, pages 196–204, 1990. Expanded version available as University of Cincinnati Computer Science Technical Report CIS-TR-90-3.
M. G. Scutellà. A note on Dowling and Gallier's top-down algorithm for propositional Horn satisfiability. Journal of Logic Programming 8, pages 265–273, 1990.
V. S. Subrahmanian, personal communication.
R. Tarjan, “Depth first search and linear graph algorithms,” SIAM Journal on Computing 1 (1972), 146–160.
A. Van Gelder. The alternating fixpoint of logic programs with negation. In Eighth ACM Symposium on Principles of Database Systems, pages 1–10, 1989. Available from UC Santa Cruz as UCSC-CRL-88-17.
A. Van Gelder, K. A. Ross, and J. S. Schlipf. The well-founded semantics for general logic programs. Journal of the ACM 38(3), pages 620–650, 1991.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1995 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Berman, K.A., Schlipf, J.S., Franco, J.V. (1995). Computing the well-founded semantics faster. In: Marek, V.W., Nerode, A., Truszczyński, M. (eds) Logic Programming and Nonmonotonic Reasoning. LPNMR 1995. Lecture Notes in Computer Science, vol 928. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-59487-6_9
Download citation
DOI: https://doi.org/10.1007/3-540-59487-6_9
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-59487-1
Online ISBN: 978-3-540-49282-5
eBook Packages: Springer Book Archive