# Logic programs with stable model semantics as a constraint programming paradigm

- 311 Downloads
- 220 Citations

## Abstract

Logic programming with the stable model semantics is put forward as a novel constraint programming paradigm. This paradigm is interesting because it bring advantages of logic programming based knowledge representation techniques to constraint programming and because implementation methods for the stable model semantics for ground (variable‐free) programs have advanced significantly in recent years. For a program with variables these methods need a grounding procedure for generating a variable‐free program. As a practical approach to handling the grounding problem a subclass of logic programs, domain restricted programs, is proposed. This subclass enables efficient grounding procedures and serves as a basis for integrating built‐in predicates and functions often needed in applications. It is shown that the novel paradigm embeds classical logical satisfiability and standard (finite domain) constraint satisfaction problems but seems to provide a more expressive framework from a knowledge representation point of view. The first steps towards a programming methodology for the new paradigm are taken by presenting solutions to standard constraint satisfaction problems, combinatorial graph problems and planning problems. An efficient implementation of the paradigm based on domain restricted programs has been developed. This is an extension of a previous implementation of the stable model semantics, the Smodels system, and is publicly available. It contains, e.g., built‐in integer arithmetic integrated to stable model computation. The implementation is described briefly and some test results illustrating the current level of performance are reported.

## Keywords

Logic Program Logic Programming Stable Model Constraint Satisfaction Problem Integrity Constraint## Preview

Unable to display preview. Download preview PDF.

## References

- [1]K.R. Apt, H.A. Blair and A. Walker, Towards a theory of declarative knowledge, in:
*Foundations of Deductive Databases and Logic Programming*, ed. J. Minker (Morgan Kaufmann, Los Altos, 1988) pp. 89-148.Google Scholar - [2]C. Bell, A. Nerode, R.T. Ng and V.S. Subrahmanian, Mixed integer programming methods for computing nonmonotonic deductive databases, Journal of the ACM 41(6) (1994) 1178-1215.zbMATHMathSciNetCrossRefGoogle Scholar
- [3]A.L. Blum and M.L. Furst, Fast planning through planning graph analysis, Artificial Intelligence 90 (1997) 281-300.zbMATHCrossRefGoogle Scholar
- [4]T. Bylander, Complexity results for planning, in:
*Proceedings of the 12th International Joint Conference on Artificial Intelligence*, Sydney, Australia (Morgan Kaufmann, 1991) pp. 274-279.Google Scholar - [5]M. Cadoli and L. Palopoli, Circumscribing DATALOG: Expressive power and complexity, Theor. Comput. Sci. 1–2 (1998) 215-244.MathSciNetCrossRefGoogle Scholar
- [6]M. Cadoli, L. Palopoli, A. Schaerf and D. Vasile, NP-SPEC: An executable specification language for solving all problems in NP, in:
*Proceedings of the First International Workshop on Practical Aspects of Declarative Languages*, San Antonio, TX, January 1999 (Springer, 1999) pp. 16-30.Google Scholar - [7]W. Chen and D.S. Warren, Computation of stable models and its integration with logical query processing, IEEE Trans. Knowledge Data Engrg. 8(5) (1996) 742-757.CrossRefGoogle Scholar
- [8]W. Chen and D.S. Warren, Tabled evaluation with delaying for general logic programs, Journal of the ACM 43(1) (1996) 20-74.zbMATHMathSciNetCrossRefGoogle Scholar
- [9]P. Cholewiński, Towards programming in default logic, in:
*Proceedings of the 9th International Symposium on Methodologies for Intelligent Systems*, Zakopane, Poland, June 1996 (Springer, 1996) pp. 223-232.Google Scholar - [10]P. Cholewiński, V.W. Marek, A. Mikitiuk and M. Truszczyński, Experimenting with nonmonotonic reasoning, in:
*Proceedings of the 12th International Conference on Logic Programming*, Tokyo (June 1995) pp. 267-281.Google Scholar - [11]P. Cholewiński, V.W. Marek and M. Truszczyński, Default reasoning system DeReS, in:
*Proceedings of the 5th International Conference on Principles of Knowledge Representation and Reasoning*, Cambridge, MA, November 1996 (Morgan Kaufmann, 1996) pp. 518-528.Google Scholar - [12]J.M. Crawford and L.D. Auton, Experimental results on the crossover point in random 3-SAT, Artificial Intelligence 81(1) (1996) 31-57.MathSciNetCrossRefGoogle Scholar
- [13]Y. Dimopoulos, B. Nebel and J. Koehler, Encoding planning problems in non-monotonic logic programs, in:
*Proceedings of the Fourth European Conference on Planning*, Toulouse, France, September 1997 (Springer, 1997) pp. 169-181.Google Scholar - [14]W.F. Dowling and J.H. Gallier, Linear-time algorithms for testing the satisfiability of propositional Horn formulae, J. Logic Programming 3 (1984) 267-284.MathSciNetCrossRefGoogle Scholar
- [15]T. Eiter, N. Leone, C. Mateis, G. Pfeifer and F. Scarnello, The KR system dlv: Progress report, comparisons and benchmarks, in:
*Proceedings of the 6th International Conference on Principles of Knowledge Representation and Reasoning*, Trento, Italy, June 1998 (Morgan Kaufmann, 1998) pp. 406-417.Google Scholar - [16]C. Elkan, A rational reconstruction of nonmonotonic truth maintenance systems, Artificial Intelligence 43 (1990) 219-234.zbMATHMathSciNetCrossRefGoogle Scholar
- [17]M. Gelfond and V. Lifschitz, The stable model semantics for logic programming, in:
*Proceedings of the 5th International Conference on Logic Programming*, Seattle, August 1988 (MIT Press, Cambridge, MA, 1988) pp. 1070-1080.Google Scholar - [18]M. Gelfond and V. Lifschitz, Logic programs with classical negation, in:
*Proceedings of the 7th International Conference on Logic Programming*, Jerusalem, Israel, June 1990 (MIT Press, Cambridge, MA, 1990) pp. 579-597.Google Scholar - [19]M. Gelfond and V. Lifschitz, Representing actions and change by logic programs, J. Logic Programming 17 (1993) 301-322.zbMATHMathSciNetCrossRefGoogle Scholar
- [20]K. Heljanko, Using logic programs with stable model semantics to solve deadlock and reachability problems for 1-safe Petri nets, in:
*Proceedings of the 5th International Conference on Tools and Algorithms for the Construction and Analysis of Systems*, Amsterdam, The Netherlands, March 1999 (Springer, 1999) pp. 240-254.Google Scholar - [21]J. Jaffar and J.-L. Lassez, Constraint logic programming, in:
*Conference Record of the 14th Annual ACM Symposium on Principles of Programming Languages*, ed. M.J. O'Donnell, Munich, Germany, January 1987 (ACM Press, 1987) pp. 111-119.Google Scholar - [22]A.C. Kakas and C. Mourlas, ACLP: Flexible solutions to complex problems, in:
*Proceedings of the 4th International Conference on Logic Programming and Non-Monotonic Reasoning*, Dagstuhl, Germany, July 1997 (Springer, Berlin, 1997) pp. 387-398.Google Scholar - [23]D.E. Knuth, The Stanford GraphBase, 1993. Available at ftp://labrea.stanford.edu/.Google Scholar
- [24]X. Liu, C.R. Ramakrishnan and S.A. Smolka, Fully local and efficient evaluation of alternating fixed points, in:
*Proceedings of the 4th International Conference on Tools and Algorithms for the Construction and Analysis of Systems*, ed. B. Steffen, Lisbon, Portugal, March/April 1998 (Springer, Berlin, 1998) pp. 5-19.Google Scholar - [25]W. Marek and M. Truszczyński, Autoepistemic logic, Journal of the ACM 38 (1991) 588-619.zbMATHCrossRefGoogle Scholar
- [26]W. Marek and M. Truszczyński, Stable models and an alternative logic programming paradigm, in:
*The Logic Programming Paradigm: a 25-Year Perspective*(Springer, 1999) pp. 375-398, to appear.Google Scholar - [27]R.C. Moore, Semantical considerations on nonmonotonic logic, Artificial Intelligence 25 (1985) 75-94.zbMATHMathSciNetCrossRefGoogle Scholar
- [28]I. Niemelä, Towards efficient default reasoning, in:
*Proceedings of the 14th International Joint Conference on Artificial Intelligence*, Montreal, Canada, August 1995 (Morgan Kaufmann, 1995) pp. 312-318.Google Scholar - [29]I. Niemelä and P. Simons, Efficient implementation of the well-founded and stable model semantics, in:
*Proceedings of the Joint International Conference and Symposium on Logic Programming*, ed. M. Maher, Bonn, Germany, September 1996 (MIT Press, Cambridge, MA, 1996) pp. 289-303.Google Scholar - [30]I. Niemelä and P. Simons, Smodels — an implementation of the stable model and well-founded semantics for normal logic programs, in:
*Proceedings of the 4th International Conference on Logic Programming and Non-Monotonic Reasoning*, Dagstuhl, Germany, July 1997 (Springer, Berlin, 1997) pp. 420-429.Google Scholar - [31]R. Reiter, A logic for default reasoning, Artificial Intelligence 13 (1980) 81-132.zbMATHMathSciNetCrossRefGoogle Scholar
- [32]K. Sagonas, T. Swift and D.S. Warren, An abstract machine for computing the well-founded semantics, in:
*Proceedings of the Joint International Conference and Symposium on Logic Programming*, ed. M. Maher, Bonn, Germany, September 1996 (MIT Press, Cambridge, MA, 1996) pp. 274-288.Google Scholar - [33]P. Simons, Towards constraint satisfaction through logic programs and the stable model semantics, Research report A47, Helsinki University of Technology, Helsinki, Finland (August 1997). Available at http://www.tcs.hut.fi/pub/reports/A47.ps.gz.Google Scholar
- [34]V.S. Subrahmanian, D. Nau and C. Vago, WFS + branch and bound = stable models, IEEE Trans. Knowledge Data Engrg. 7(3) (1995) 362-377.CrossRefGoogle Scholar
- [35]T. Syrjänen, Implementation of local grounding for logic programs with stable model semantics, Technical report B18, Helsinki University of Technology, Digital Systems Laboratory, Espoo, Finland (October 1998). Available at http://www.tcs.hut.fi/pub/reports/B18.ps.gz.Google Scholar
- [36]M.H. van Emden and R.A. Kowalski, The semantics of predicate logic as a programming language, Journal of the ACM 23 (1976) 733-742.zbMATHMathSciNetCrossRefGoogle Scholar
- [37]A. Van Gelder, K.A. Ross and J.S. Schlipf, The well-founded semantics for general logic programs, Journal of the ACM 38(3) (1991) 620-650.zbMATHMathSciNetCrossRefGoogle Scholar
- [38]J.-H. You, R. Cartwright and M. Li, Iterative belief revision in extended logic programming, Theor. Comput. Sci. 170 (1996) 383-406.zbMATHMathSciNetCrossRefGoogle Scholar