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.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
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.
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.
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.
N. Leone et al. dlv-a disjunctive datalog system. http://www.dbai.tuwien.ac.at/proj/dlv/.
V. Lifschitz, D. Pearce, and A. Valverde. Strongly equivalent logic programs. ACM Transactions on Computational Logic, 2:526–541, 2001.
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.
J.W. Lloyd. Foundations of Logic Programming. Springer-Verlag, Berlin, 1987.
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.
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.
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.
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.
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.
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.
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.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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