An implementation of the well-founded and stable model semantics for range-restricted function-free normal programs is presented. It includes two modules: an algorithm for implementing the two semantics for ground programs and an algorithm for computing a grounded version of a range-restricted function-free normal program. The latter algorithm does not produce the whole set of ground instances of the program but a subset which is suucient in the sense that no stable models are lost. The implementation of the stable model semantics for ground programs is based on bottom-up backtracking search. It works in linear space and employs a powerful pruning method based on an approximation technique for stable models which is closely related to the well-founded semantics. The implementation includes an eecient algorithm for computing the well-founded model of a ground program. The implementation has been tested extensively and compared with a state of the art implementation of the stable model semantics, the SLG system. In tests involving ground programs it clearly outperforms SLG.
[1]
Jean H. Gallier,et al.
Linear-Time Algorithms for Testing the Satisfiability of Propositional Horn Formulae
,
1984,
J. Log. Program..
[2]
David Scott Warren,et al.
Computation of Stable Models and Its Integration with Logical Query Processing
,
1996,
IEEE Trans. Knowl. Data Eng..
[3]
John S. Schlipf,et al.
Computing Well-founded Semantics Faster
,
1995,
LPNMR.
[4]
A RossKenneth,et al.
The well-founded semantics for general logic programs
,
1991
.
[5]
Anil Nerode,et al.
Mixed integer programming methods for computing nonmonotonic deductive databases
,
1994,
JACM.
[6]
Victor W. Marek,et al.
Experimenting with Nonmonotonic Reasoning
,
1995,
ICLP.