*** Welcome to piglix ***

Stable model semantics


The concept of a stable model, or answer set, is used to define a declarative semantics for logic programs with negation as failure. This is one of several standard approaches to the meaning of negation in logic programming, along with program completion and the well-founded semantics. The stable model semantics is the basis of answer set programming.

Research on the declarative semantics of negation in logic programming was motivated by the fact that the behavior of SLDNF resolution — the generalization of SLD resolution used by Prolog in the presence of negation in the bodies of rules — does not fully match the truth tables familiar from classical propositional logic. Consider, for instance, the program

Given this program, the query will succeed, because the program includes as a fact; the query will fail, because it does not occur in the head of any of the rules. The query will fail also, because the only rule with in the head contains the subgoal in its body; as we have seen, that subgoal fails. Finally, the query succeeds, because each of the subgoals , succeeds. (The latter succeeds because the corresponding positive goal fails.) To sum up, the behavior of SLDNF resolution on the given program can be represented by the following truth assignment:


...
Wikipedia

...