Algorithm Search⌘K

Definitioncore

Stable model semantics

Also called Gelfond-Lifschitz semantics, answer set semantics.

A set of atoms is a stable model of a normal program when it equals the least model of the program's reduct by that set. A program can have no, one or many stable models.

The stable model semantics gives a normal logic program a set of intended models, the stable models. A candidate set MM of true atoms is stable when the program, with each not c\mathit{not}\ c read as "c∉Mc \notin M", derives exactly MM. Gelfond and Lifschitz (1988) proposed it as a reading of negation as failure close to autoepistemic logic, and it became the basis of answer set programming. The transformation it uses is defined on the Gelfond-Lifschitz reduct page. This page gives the semantics, its main properties and its relation to the other readings of negation.

Definition

Let PP be a ground normal program, with rules h←b1,…,bm,not c1,…,not ckh \leftarrow b_1, \ldots, b_m, \mathit{not}\ c_1, \ldots, \mathit{not}\ c_k. For a set MM of atoms, the reduct PMP^M deletes each rule with some cj∈Mc_j \in M and then deletes all negative literals. A set MM is a stable model (or answer set) of PP if

M=lm(PM),M = \mathrm{lm}(P^M),

where lm\mathrm{lm} is the least model of a definite program. A program with variables has the stable models of its ground instance. A constraint ←L1,…,Lk\leftarrow L_1, \ldots, L_k is written as f←L1,…,Lk,not ff \leftarrow L_1, \ldots, L_k, \mathit{not}\ f with a new atom ff; it removes the stable models in which its body is true.

An equivalent form uses unfounded sets. A set XX is unfounded for MM if each rule with its head in XX has a positive body atom outside MM or in XX, or a negative body literal not c\mathit{not}\ c with c∈Mc \in M. Then MM is stable if and only if MM is a model of PP and no nonempty subset of MM is unfounded for MM. The atoms of a stable model are true for a reason that does not lean on themselves.

Examples and non-examples

  • Two models. p←not qp \leftarrow \mathit{not}\ q, q←not pq \leftarrow \mathit{not}\ p, r←p,not sr \leftarrow p, \mathit{not}\ s has the stable models {q}\{q\} and {p,r}\{p, r\}. The reduct by {p}\{p\} is {p, r←p}\{p,\ r \leftarrow p\}, with least model {p,r}≠{p}\{p, r\} \ne \{p\}, so {p}\{p\} is not stable.
  • A constraint selects. p←not qp \leftarrow \mathit{not}\ q, q←not pq \leftarrow \mathit{not}\ p, f←p,not ff \leftarrow p, \mathit{not}\ f has the single stable model {q}\{q\}. For M={p}M = \{p\}, the reduct contains f←pf \leftarrow p, so ff is derived; for M={p,f}M = \{p, f\}, the rule for ff is deleted and ff is not derived.
  • No model. p←not pp \leftarrow \mathit{not}\ p has no stable model.
  • Self support is rejected. p←pp \leftarrow p has the stable model ∅\emptyset only, although {p}\{p\} is a model of its completion.
  • Not classical. p←not qp \leftarrow \mathit{not}\ q has the one stable model {p}\{p\}, although the classical formula q∨pq \vee p also has the minimal model {q}\{q\}.
  • Graph coloring. For each vertex vv and colors 1,2,31, 2, 3, rules ci(v)←not cj(v),not ck(v)c_i(v) \leftarrow \mathit{not}\ c_j(v), \mathit{not}\ c_k(v) with {i,j,k}={1,2,3}\{i, j, k\} = \{1, 2, 3\}, and a constraint ←ci(u),ci(v)\leftarrow c_i(u), c_i(v) for each edge uvuv and color ii. The stable models are the proper 3-colorings.
  • Properties. Every stable model is a minimal model of PP and a supported model (M=TP(M)M = T_P(M), a model of the completion). No stable model is a proper subset of another. Adding a fact can remove stable models and create new ones, so the semantics is nonmonotonic.
  • Stratified programs. A stratified program has exactly one stable model, its standard model (Gelfond and Lifschitz 1988).
  • Well-founded semantics. The atoms true in the well-founded model are in every stable model, and the false ones are in none. The well-founded model can be weaker: for a←not ba \leftarrow \mathit{not}\ b, b←not ab \leftarrow \mathit{not}\ a, c←ac \leftarrow a, c←bc \leftarrow b, the atom cc is in both stable models but undefined in the well-founded model. If the well-founded model is total, it is the unique stable model.
  • Completion and loops. For tight programs the stable models are the models of the completion (Fages' theorem). In general they are the models of the completion that satisfy every loop formula (Lin and Zhao).
  • Modularity. The splitting set theorem computes stable models layer by layer, and strong equivalence says when one part of a program can be replaced by another.
  • Complexity. To decide whether a finite ground program has a stable model is NP-complete (Marek and Truszczyński 1991). Solvers such as Smodels and clasp search for them.
  • Extensions. Disjunctive programs use minimal models of the reduct, and choice rules and strong negation are part of the answer set language.

References

  1. Michael Gelfond and Vladimir Lifschitz, The stable model semantics for logic programming, in Robert A. Kowalski and Kenneth A. Bowen (eds.), Logic Programming: Proceedings of the Fifth International Conference and Symposium, MIT Press, 1070 to 1080 (1988), the definition of stable models and the result for stratified programs
  2. V. Wiktor Marek and Mirosław Truszczyński, Autoepistemic logic, Journal of the ACM 38(3), 588 to 619 (1991), the NP-completeness of the existence of a stable model
  3. Allen Van Gelder, Kenneth A. Ross and John S. Schlipf, The well-founded semantics for general logic programs, Journal of the ACM 38(3), 620 to 650 (1991), the relation between the well-founded model and the stable models, and the characterization by unfounded sets
  4. Vladimir Lifschitz, Answer Set Programming, Springer (2019), the chapters on stable models of propositional programs and their properties
  5. Martin Gebser, Roland Kaminski, Benjamin Kaufmann and Torsten Schaub, Answer Set Solving in Practice, Morgan and Claypool (2012), the chapter on the stable model semantics and the characterization by completion and loop formulas

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/9AF70E/text.yaml