A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of...
-
Upload
haley-molyneaux -
Category
Documents
-
view
221 -
download
5
Transcript of A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of...
![Page 1: A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.](https://reader035.fdocuments.net/reader035/viewer/2022062712/56649cb65503460f9497b0a8/html5/thumbnails/1.jpg)
A rewritting method for Well-Founded Semantics with Explicit Negation
Pedro Cabalar
University of Corunna, SPAIN.
![Page 2: A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.](https://reader035.fdocuments.net/reader035/viewer/2022062712/56649cb65503460f9497b0a8/html5/thumbnails/2.jpg)
2
Introduction
• Logic programming (LP) semantics for default negation:
– Stable models [Gelfond&Lifschitz88]
– Well-Founded Semantics (WFS) [van Gelder et al. 91]
• Bottom-up computation for WFS [Brass et al. 01]
– More efficient than van Gelder’s alternated fixpoint
– Based on program transformations
![Page 3: A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.](https://reader035.fdocuments.net/reader035/viewer/2022062712/56649cb65503460f9497b0a8/html5/thumbnails/3.jpg)
3
Introduction
• Extended Logic Programming:default negation (not p) plus explicit negation ( ) :
– Answer Sets [Gelfond&Lifschitz91]
– WFS with explicit negation (WFSX) [Pereira&Alferes92]
p
• Our work: extend Brass et al’s method to WFSX
– Adding two natural transformations
– Helps to understand relation WFS vs. WFSX
![Page 4: A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.](https://reader035.fdocuments.net/reader035/viewer/2022062712/56649cb65503460f9497b0a8/html5/thumbnails/4.jpg)
Outline
Some LP definitions Brass et al’s method WFSX Coherence transformations Conclusions
![Page 5: A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.](https://reader035.fdocuments.net/reader035/viewer/2022062712/56649cb65503460f9497b0a8/html5/thumbnails/5.jpg)
Outline
Some LP definitions Brass et al’s method WFSX Coherence transformations Conclusions
![Page 6: A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.](https://reader035.fdocuments.net/reader035/viewer/2022062712/56649cb65503460f9497b0a8/html5/thumbnails/6.jpg)
6
Some LP definitions
• Logic program P: set of rules like a b , not c
c not b
b
• Reduct PI: we use I to interprete all ‘not p’. Example: take I={a,b}
![Page 7: A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.](https://reader035.fdocuments.net/reader035/viewer/2022062712/56649cb65503460f9497b0a8/html5/thumbnails/7.jpg)
7
Some LP definitions
• Logic program P: set of rules like a b , not c
c not b
b
• Reduct PI: we use I to interprete all ‘not p’. Example: take I={a,b}
(I) = least model of PI
• Stable model: any fixpoint I = (I)
• Well-founded model (WFM):
– Positive atoms I+ = least fixpoint of – Negative atoms I- = HB – greatest fixpoint of
l.f.p.g.f.p.+
-
HB
![Page 8: A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.](https://reader035.fdocuments.net/reader035/viewer/2022062712/56649cb65503460f9497b0a8/html5/thumbnails/8.jpg)
Outline
Some LP definitions Brass et al’s method WFSX Coherence transformations Conclusions
![Page 9: A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.](https://reader035.fdocuments.net/reader035/viewer/2022062712/56649cb65503460f9497b0a8/html5/thumbnails/9.jpg)
Outline
Some LP definitions Brass et al’s method WFSX Coherence transformations Conclusions
![Page 10: A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.](https://reader035.fdocuments.net/reader035/viewer/2022062712/56649cb65503460f9497b0a8/html5/thumbnails/10.jpg)
10
Brass et al’s method
• Trivial interpretation: a 3-valued interpretation where
– Positive atoms I+ = facts(P)
– Negative atoms I- = HB – heads(P)
• We exhaustively apply 5 program transformationsP N S F L
• The trivial interpretation of the final program will bethe WFM
![Page 11: A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.](https://reader035.fdocuments.net/reader035/viewer/2022062712/56649cb65503460f9497b0a8/html5/thumbnails/11.jpg)
11
Brass et al’s method: an example
a not b , c d not g , e
b not a e not g , d
c f not d
d not c f g , not e
I+ = facts(P) = {c}
I- = HB – heads(P) = {g}
![Page 12: A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.](https://reader035.fdocuments.net/reader035/viewer/2022062712/56649cb65503460f9497b0a8/html5/thumbnails/12.jpg)
12
Brass et al’s method: an example
a not b , c d not g , e
b not a e not g , d
c f not d
d not c f g , not e
I+ = facts(P) = {c}
I- = HB – heads(P) = {g}
SSuccess: delete c from bodiesNegative reduction: delete rules with not c in the bodyN
![Page 13: A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.](https://reader035.fdocuments.net/reader035/viewer/2022062712/56649cb65503460f9497b0a8/html5/thumbnails/13.jpg)
13
Brass et al’s method: an example
a not b , c d not g , e
b not a e not g , d
c f not d
d not c f g , not e
I+ = facts(P) = {c}
I- = HB – heads(P) = {g}
PPositive reduction: delete not g from bodiesFailure: delete rules with g in the bodyF
![Page 14: A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.](https://reader035.fdocuments.net/reader035/viewer/2022062712/56649cb65503460f9497b0a8/html5/thumbnails/14.jpg)
14
Brass et al’s method: an example
a not b d e
b not a e d
c f not d
I+ = facts(P) = {c}
I- = HB – heads(P) = {g}
Interesting property: exhausting {P,N,S,F} yields Fitting’s model… but for WFS we must get rid of positive cycles (d,e)
![Page 15: A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.](https://reader035.fdocuments.net/reader035/viewer/2022062712/56649cb65503460f9497b0a8/html5/thumbnails/15.jpg)
15
Brass et al’s method: an example
a not b d e
b not a e d
c f not d
I+ = facts(P) = {c}
I- = HB – heads(P) = {g}
LPositive loop detection: delete rules with some p ()optimistic viewing: “what if all not’s happened to be true?”
![Page 16: A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.](https://reader035.fdocuments.net/reader035/viewer/2022062712/56649cb65503460f9497b0a8/html5/thumbnails/16.jpg)
16
Brass et al’s method: an example
a not b d e
b not a e d
c f not d
I+ = facts(P) = {c}
I- = HB – heads(P) = {g}
LPositive loop detection: delete rules with some p ()() = {a, b, c, f }
![Page 17: A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.](https://reader035.fdocuments.net/reader035/viewer/2022062712/56649cb65503460f9497b0a8/html5/thumbnails/17.jpg)
17
Brass et al’s method: an example
a not b d e
b not a e d
c f not d
I+ = facts(P) = {c}
I- = HB – heads(P) = {g}
LPositive loop detection: delete rules with some p ()() = {a, b, c, f } i.e. delete rules with some {d, e, g}
![Page 18: A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.](https://reader035.fdocuments.net/reader035/viewer/2022062712/56649cb65503460f9497b0a8/html5/thumbnails/18.jpg)
18
Brass et al’s method: an example
a not b
b not a
c f not d
I+ = facts(P) = {c}
I- = HB – heads(P) = {g, e, d}
P
... we must go on until no new transformation is applicable.
Positive reduction: delete not d from bodies
![Page 19: A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.](https://reader035.fdocuments.net/reader035/viewer/2022062712/56649cb65503460f9497b0a8/html5/thumbnails/19.jpg)
19
Brass et al’s method: an example
I+ = facts(P) = {c, f }
I- = HB – heads(P) = {g, e, d }
We can’t go on: ge get the WFM!
a not b
b not a
c f not d
![Page 20: A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.](https://reader035.fdocuments.net/reader035/viewer/2022062712/56649cb65503460f9497b0a8/html5/thumbnails/20.jpg)
Outline
Some LP definitions Brass et al’s method WFSX Coherence transformations Conclusions
![Page 21: A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.](https://reader035.fdocuments.net/reader035/viewer/2022062712/56649cb65503460f9497b0a8/html5/thumbnails/21.jpg)
Outline
Some LP definitions Brass et al’s method WFSX Coherence transformations Conclusions
![Page 22: A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.](https://reader035.fdocuments.net/reader035/viewer/2022062712/56649cb65503460f9497b0a8/html5/thumbnails/22.jpg)
22
WFSX
• Extended LP: two negations
not p “p is not known to be true”
“p is known to be false”p
• Objective literal L is any p or . We’ll denote L s.t. = pp p
• Answer sets: reject stable models containing both p and p
• WFS Coherence problem: should imply not pp
p not qq not pp
WFM+ = { }WFM- = { }
pq
![Page 23: A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.](https://reader035.fdocuments.net/reader035/viewer/2022062712/56649cb65503460f9497b0a8/html5/thumbnails/23.jpg)
23
WFSX
• Given P we define its seminormal version Ps
p not qq not pp
p not q, not p q not p, not q not pp
P Ps
• The well-founded model is defined now as:
– Positive atoms I+ = least fixpoint of s
– Negative atoms I- = s(I+)
• In the example, we get I+ = { , q } I- = { p, }p q
![Page 24: A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.](https://reader035.fdocuments.net/reader035/viewer/2022062712/56649cb65503460f9497b0a8/html5/thumbnails/24.jpg)
Outline
Some LP definitions Brass et al’s method WFSX Coherence transformations Conclusions
![Page 25: A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.](https://reader035.fdocuments.net/reader035/viewer/2022062712/56649cb65503460f9497b0a8/html5/thumbnails/25.jpg)
Outline
Some LP definitions Brass et al’s method WFSX Coherence transformations Conclusions
![Page 26: A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.](https://reader035.fdocuments.net/reader035/viewer/2022062712/56649cb65503460f9497b0a8/html5/thumbnails/26.jpg)
26
Coherence transformations
• We begin redefining trivial interpretation ...
– I+ = facts(P) = { p }
– I- = HB – heads(P) = { , }a b
a not bb not a bpp
![Page 27: A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.](https://reader035.fdocuments.net/reader035/viewer/2022062712/56649cb65503460f9497b0a8/html5/thumbnails/27.jpg)
27
Coherence transformations
• We begin redefining trivial interpretation ...
– I+ = facts(P) = { p }
– I- = HB – heads(P) { L | L facts(P) } = { , , }a b
a not bb not a bpp
p
![Page 28: A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.](https://reader035.fdocuments.net/reader035/viewer/2022062712/56649cb65503460f9497b0a8/html5/thumbnails/28.jpg)
28
Coherence transformations
p not qq not pq p
p
I+ = { }I- = { p }
p
![Page 29: A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.](https://reader035.fdocuments.net/reader035/viewer/2022062712/56649cb65503460f9497b0a8/html5/thumbnails/29.jpg)
29
Coherence transformations
p not qq not pq p
p
I+ = { }I- = { p }
p
RCoherence reduction: delete not p from bodiesCoherence Failure: delete rules with p in the bodyC
![Page 30: A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.](https://reader035.fdocuments.net/reader035/viewer/2022062712/56649cb65503460f9497b0a8/html5/thumbnails/30.jpg)
30
Coherence transformations
p not qq
p
I+ = { }I- = { }
p , q
NDelete rules containing not q in the body
p , q
![Page 31: A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.](https://reader035.fdocuments.net/reader035/viewer/2022062712/56649cb65503460f9497b0a8/html5/thumbnails/31.jpg)
31
Coherence transformations
• Theorem 2: transformations {P,S,N,F,L,C,R} are sound w.r.t. WFSX
• Theorem 3: Let W be the WFM under WFS:(i) if W contradictory (p, p W+) then P contradictory in
WFSX(ii) the WFM under WFSX contains more or equal info than W
• The converse of (i) does not hold ...
• Corollary: when WFS leads to complete (and not contradictory) WFM it coincides with WFSX
a not a
a
![Page 32: A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.](https://reader035.fdocuments.net/reader035/viewer/2022062712/56649cb65503460f9497b0a8/html5/thumbnails/32.jpg)
32
Coherence transformations
Theorem 4 (main result)
Given P ... P' where
x {P, S, N, F, L, C, R}
P' is the final program (free of contradictory facts)
The trivial interpretation of P' is the WFM of P under WFSX.
x x
![Page 33: A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.](https://reader035.fdocuments.net/reader035/viewer/2022062712/56649cb65503460f9497b0a8/html5/thumbnails/33.jpg)
Outline
Some LP definitions Brass et al’s method WFSX Coherence transformations Conclusions
![Page 34: A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.](https://reader035.fdocuments.net/reader035/viewer/2022062712/56649cb65503460f9497b0a8/html5/thumbnails/34.jpg)
Outline
Some LP definitions Brass et al’s method WFSX Coherence transformations Conclusions
![Page 35: A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.](https://reader035.fdocuments.net/reader035/viewer/2022062712/56649cb65503460f9497b0a8/html5/thumbnails/35.jpg)
35
Conclusions
• We added two natural transformations w.r.t. coherence:
"whenever L founded, L unfounded"
• Used and implemented for applying WFSX to causal theories of actions [Cabalar01]
• Can be used as slight efficiency improvement for answer sets?
• Explore a new semantics: Fitting's + coherence transformations