Skip to main content

Computing the well-founded semantics faster

  • Conference paper
  • First Online:
Logic Programming and Nonmonotonic Reasoning (LPNMR 1995)

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 928))

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

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

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. J. Dix. A classification theory of semantics of normal logic programs: II. Weak properties. To appear in JCSS.

    Google Scholar 

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

    Google Scholar 

  3. M. Fitting. A Kripke-Kleene semantics for logic programs. Journal of Logic Programming, 2(4):295–312, 1985.

    Google Scholar 

  4. M. Gelfond and V. Lifschitz. The stable model semantics for logic programming. In Proc. 5th Int'l Conf. Symp. on Logic Programming, 1988.

    Google Scholar 

  5. V. Lifschitz and H. Turner. Splitting a logic program. Preprint.

    Google Scholar 

  6. 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).

    Google Scholar 

  7. W. Marek and M. Truszczyński. Autoepistemic logic. Journal of the ACM 38(3), pages 588–619, 1991.

    Google Scholar 

  8. J. Reif. A topological approach to dynamic graph connectivity. Information Processing Letters 25(1), pages 65–70.

    Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

  11. V. S. Subrahmanian, personal communication.

    Google Scholar 

  12. R. Tarjan, “Depth first search and linear graph algorithms,” SIAM Journal on Computing 1 (1972), 146–160.

    Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

V. Wiktor Marek Anil Nerode M. Truszczyński

Rights and permissions

Reprints 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

Publish with us

Policies and ethics