Skip to main content

Testing the Equivalence of Logic Programs under Stable Model Semantics

  • Conference paper
  • First Online:
Logics in Artificial Intelligence (JELIA 2002)

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

Included in the following conference series:

Abstract

Solving a problem in the answer set programming approach means constructing a logic program so that the answer sets of the program correspond to the solutions to the problem. Typically, a programmer develops a series of improved formulations for a particular problem. Consequently, the programmer is confronted by another problem, namely ensuring that subsequent formulations are equivalent, i.e., give rise to the same answer sets. To ease answer set programming, we propose a methodology for testing the equivalence of logic programs. The basic idea is to translate the logic programs P and Q under consideration into a single logic program R whose answer sets (if such exist) yield counter-examples to the equivalence of P and Q. The translation function presented in the paper has been implemented as a translator program lpeq that enables the equivalence testing of logic programs using the smodels system. Experiments performed with lpeq and smodels suggest that establishing the equivalence of logic programs in this way is in certain cases much faster than explicit cross-checking of answer sets.

The research reported in this paper is affiliated with the project “Applications of Rule-Based Constraint Programming” (#53695) funded by the Academy of Finland.

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 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.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. K.L. Clark. Negation as failure. In H. Gallaire and J. Minker, editors, Logic and Data Bases, pages 293–322. Plenum Press, New York, 1978.

    Google Scholar 

  2. M. Gelfond and V. Lifschitz. The stable model semantics for logic programming. In Proceedings of the 5th International Conference on Logic Programming, pages 1070–1080, Seattle, USA, August 1988. The MIT Press.

    Google Scholar 

  3. T. Janhunen, I. Niemelä, P. Simons, and J.-H. You. Unfolding partiality and disjunctions in stable model semantics. In Principles of Knowledge Representation and Reasoning: Proceedings of the 7th International Conference, pages 411–419, Breckenridge, Colorado, April 2000. Morgan Kaufmann.

    Google Scholar 

  4. N. Leone et al. dlv-a disjunctive datalog system. http://www.dbai.tuwien.ac.at/proj/dlv/.

  5. V. Lifschitz, D. Pearce, and A. Valverde. Strongly equivalent logic programs. ACM Transactions on Computational Logic, 2:526–541, 2001.

    Article  MathSciNet  Google Scholar 

  6. F. Lin. Reducing strong equivalence of logic programs to entailment in classical propositional logic. In Principles of Knowledge Representation and Reasoning: Proceedings of the 8th International Conference, pages 170–176, Tolouse, France, April 2002. Morgan Kaufmann.

    Google Scholar 

  7. J.W. Lloyd. Foundations of Logic Programming. Springer-Verlag, Berlin, 1987.

    MATH  Google Scholar 

  8. W. Marek and M. Truszczyński. Stable models and an alternative logic programming paradigm. In The Logic Programming Paradigm: a 25-Year Perspective, pages 375–398. Springer-Verlag, 1999.

    Google Scholar 

  9. I. Niemelä. Logic programs with stable model semantics as a constraint programming paradigm. Annals of Mathematics and Artificial Intelligence, 25(3,4):241–273, 1999.

    Article  MATH  MathSciNet  Google Scholar 

  10. I. Niemelä and P. Simons. Extending the Smodels system with cardinality and weight constraints. In Jack Minker, editor, Logic-Based Artificial Intelligence, chapter 21, pages 491–521. Kluwer Academic Publishers, 2000.

    Google Scholar 

  11. I. Niemelä, P. Simons, and T. Soininen. Stable model semantics of weight constraint rules. In Proceedings of the 5th International Conference on LP & NMR, pages 317–331, El Paso, Texas, USA, December 1999. Springer-Verlag. LNAI 1730.

    Google Scholar 

  12. I. Niemelä, P. Simons, and T. Syrjänen. Smodels: a system for answer set programming. In Proceedings of the 8th International Workshop on Non-Monotonic Reasoning (cs.AI/0003073), Breckenridge, Colorado, USA, April 2000. cs.AI/0003033.

    Google Scholar 

  13. D. Pearce, H. Tompits, and S. Woltran. Encodings for equilibirium logic and logic programs with nested expressions. In P. Brazdil and A. Jorge, editors, Proceedings of the 10th Portuguese Conference on Artificial Intelligence, pages 306–320, Porto, Portugal, December 2001. Springer Verlag. LNAI 2258.

    Google Scholar 

  14. P. Simons. Extending the stable model semantics with more expressive rules. In Proceedings of the 5th International Conference on LP & NMR, pages 305–316, El Paso, Texas, USA, December 1999. Springer-Verlag. LNAI 1730.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2002 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Janhunen, T., Oikarinen, E. (2002). Testing the Equivalence of Logic Programs under Stable Model Semantics. In: Flesca, S., Greco, S., Ianni, G., Leone, N. (eds) Logics in Artificial Intelligence. JELIA 2002. Lecture Notes in Computer Science(), vol 2424. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45757-7_41

Download citation

  • DOI: https://doi.org/10.1007/3-540-45757-7_41

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-44190-8

  • Online ISBN: 978-3-540-45757-2

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics