Well-founded semantics

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

In computer science, the well-founded semantics is a three-valued semantics for logic programming, which gives a precise meaning to general logic programs.

History

[edit | edit source]

The well-founded semantics was defined by Van Gelder, et al. in 1988.[1][2] The Prolog system XSB implements the well-founded semantics since 1997.[3][4]

Three-valued logic

[edit | edit source]

The well-founded semantics assigns a unique model to every general logic program. However, instead of only assigning propositions true or false, it adds a third value unknown for representing ignorance.[1]

A simple example is the logic program that encodes two propositions a and b, and in which a must be true whenever b is not and vice versa:

a :- not(b).
b :- not(a).

neither a nor b are true or false, but both have the truth value unknown. In the two-valued stable model semantics, there are two stable models, one in which a is true and b is false, and one in which b is true and a is false.

Stratified logic programs have a 2-valued well-founded model, in which every proposition is either true or false. This coincides with the unique stable model of the program. The well-founded semantics can be viewed as a three-valued version of the stable model semantics.[5]

Complexity

[edit | edit source]

In 1989, Van Gelder suggested an algorithm to compute the well-founded semantics of a propositional logic program whose time complexity is quadratic in the size of the program.[6] As of 2001, no general subquadratic algorithm for the problem was known.[7]

References

[edit | edit source]
  1. ^ a b Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  2. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  3. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  4. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  5. ^ Przymusinski, Teodor. Well-founded Semantics Coincides with Three-Valued Stable Semantics. Fundamenta Informaticae XIII pp. 445-463, 1990.
  6. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  7. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).