Download presentation

Presentation is loading. Please wait.

Published byTatyana Matter Modified over 2 years ago

1
Ontologies Reasoning Components Agents Simulations Default Reasoning and Negation As Failure in General Logic Programming Jacques Robin

2
Outline Default Logic Syntax Semantics Examples Limitations Negation As Failure (NAF) in General Logic Programming (GLP) GLP Syntax GLP Example GLP Declarative Logical Semantics: Clark’s Completion Limitation of Clark’s Completion GLP Operational Semantics: SLDNF Resolution

3
Default Reasoning (DR) Extends deduction with certain knowledge and inference rules with derivation of uncertain but plausible default assumption knowledge and inference rules for environment properties not known with certainty but needed for decision making Example DR inference rules: Closed-World Assumption (CWA) Inheritance with overriding Classical DR knowledge example: KB: X (bird(X) > flies(X) // default knowledge penguin(X) flies(X) pigeon(X) bird(X) penguin(X) bird(X)) pigeon(valiant) penguin(tux) KB |= flies(valiant) flies(tux)

4
Default Logic: Syntax Default rule: (P:J/C) where, P: prerequisite formula J: justification formula C: conclusion formula e.g., quaker(X) : (pacifist(X) political(X)) / pacifist(X) Normal default rule: P ~> C alias for P:C/C e.g., bird(X) ~> flies(X) alias for bird(X) : flies(X) / flies(X) Default Theory conclusion prerequisite justification Default Rule 1..* drb Classical Full First-Order Logic Formula Classical Full Propositional Logic Formula Classical Horn Propositional Logic Formula Classical Horn First-Order Logic Formula Classical INF First-Order Logic Formula Classical INF Propositional Logic Formula /extension /groundExtension {subset extension} Normal Default Theory 1..* ndrb {subset drb} Normal Default Rule inv: justification = conclusion inv: connective.name = “and” Base Logic Formula And Base Logic Formula

5
Default Logic: Semantics Extension E(K) = e 1 ... e m | e i 1 i m, (L s {c | (p:j/c D) p {e 1,..., e m } j {e 1,..., e m }) |= e i (L s ) = {d 1,..., d n } defined as minimal superset of L s, i.e., (L s (L s )) ( S, L s S (L s ) S) closed under entailment, i.e., f, d 1 ... d n | f f {d 1,..., d n } such that: p:j/c D p (L s ) j L s c (L s ) Ground Extension E g (K) = g 1 ... g m | E g (K) = (E g (K)) Default theory K = (L,D) where L = l 1 ... l n is an and base logic formula, L s = {l 1,..., l n }, and D is the default rule base Default Theory conclusion prerequisite justification Default Rule 1..* drb /extension /groundExtension {subset extension} Base Logic Formula And Base Logic Formula *

6
Default Logic: Examples If K 1 = (L 1,D 1 ), where L 1 = ( X penguin(X) flies(X)) ( X pigeon(X) bird(X)) ( X penguin(X) bird(X)) pigeon(valiant) penguin(tux) D 1 = ( X bird(X) ~> flies(X)) Then E(K 1 ) = E g (K 1 ) L 1 flies(valiant) flies(tux) is the sole extension of K 1 If K 2 = (L 2,D 2 ), where L 2 = quaker(nixon) republican(nixon) D 2 = ( X quaker(X) ~> pacifist(X)) ( X republican(X) ~> pacifist(X)) Then {E 1 (K 2 ) = L 2 pacifist(nixon), E 2 (K 2 ) = L 2 pacifist(nixon)} are the two extensions of K 2 A skeptical default reasoner will derive the intersection of all extensions: E s (K2) = L 2 A credulous default reasoner will derive one of the extensions, e.g., E c (K2) = L 2 pacifist(nixon)} Both approaches equally problematic in such cases: Skeptical derivation equivalent to not leveraging default knowledge Credulous derivation lacks criteria to choose among alternative extensions If K 3 = (L 3,D 3 ), where L 3 = quaker(nixon) republican(nixon) ( X republican(X) political(X)) republican(carter) quaker(carter) D 3 = ( X (quaker(X) : (pacifist(X)) political(X)) / pacifist(X)) ( X republican(X) ~> pacifist(X)) Then E 1 (K 3 ) = L 3 pacifist(nixon) pacifist(carter) is the sole extension of K 3

7
{disjoint, complete} General Logic Programs (GLP): Abstract Syntax context Fact inv: body->IsEmpty() context GLPQuery inv: head->IsEmpty() and body->forall(oclIsKindOf(FOLAtom) or oclIsKindOf(GLPGroundNAFLiteral)) context GLPRule inv: head->NotEmpty() and body->NotEmpty() context GroundTerm inv: oclIsKindOf(Symbol) or arg->forall(oclIsKindOf(GroundTerm)) context GroundFOLAtom inv: arg->forall(oclIsKindOf(GroundTerm)) GLP GLP Clause GLP Literal FOL Atom GLP NAF Literal DLP DLP Clause GLP Query FOL Ground Atom gc 2..* body * head GLP Ground NAF Literal Fact GLP Rule 2..* {subset gc} dBody {subset body} a ga FOL Atom Symbol predicate arg 1..* FOL Term Non Functional Term Variable Functional Term Ground Term Non Ground Term {disjoint, complete} {disjoint, complete} arg 1..* functor {subset a}

8
GLP Declarative Logical Semantics: Clark’s Completion Partitions program in clause sets, each one defining one predicate (i.e., group together clauses with same predicate c(t 1,..., t n ) as conclusion) Replaces each such set by a logical equivalence One side of this equivalence contains c(X 1,..., X n ) where X 1,..., X n are fresh universally quantified variables The other side contains a disjunction of conjunctions, one for each original clause Each conjunction is either of the form: X i = c i ... X j = c j, if the original clause is a ground fact Y i... Y j X i = Y i ... X j = Y j p 1 (...) ... p k (...) l 1 (...) ... l l (...) if the original clause is a rule with body l 1 (...),...,l n (...),naf l 1 (...),...,naf l l (...) containing variables Y i... Y j Joins all resulting equivalences in a conjunction Adds conjunction of the form (c i = c j ) for all possible pairs (c i,c j ) of constant symbols in pure Prolog program

9
GLP Clark’s Completion Semantics: Example P: founding(X) :- on(Y,X), onGround(X). onGround(X) :- naf offGround(X). offGround(X) :- on(X,Y) on(c,b). on(b,a). comp(P): ( A (founding(A) ( X,Y (A = X on(Y,X) onGround(X))) ( A (onGround(A) ( X (A = X offGround(X)) ( A (offGround(A) ( X,Y (A = X on(X,Y))) ( U,V (on(U,V) ((U = c V = b) (U = b V = a)))) C B A

10
GLP Operational Semantics: SLDNF Resolution Principle 1.Consume the query literals Q 1,..., Q n from left to right 2.For each positive literal atom Q i = a a.Call SLD resolution of a b.If it finitely succeeds, then go to next literal, propagating to it the unification substitutions executed during the successful SLD resolution c.Else, if it finitely fails, then return fail 3.For each negative literal atom Q i = naf b a.Call SLD resolution on b b.If it finitely succeeds, then return fail c.Else, if it finitely fails, then go to next literal, propagating to it the unification substitutions executed during the successful SLD resolution

11
GLP Operational Semantics: SLDNF Resolution Example P: founding(X) :- on(Y,X), onGround(X). onGround(X) :- naf offGround(X). offGround(X) :- on(X,Y) on(c,b). on(b,a). C B A

12
GLP Clark’s Completion Semantics: Limitations Only valid for stratified GLP i.e., GLP with no (direct or indirect) recursion through naf In a GLP P, an atom A directly depends on an atom B iff P contains one clause with A as head and B in its body The dependencies of a GLP can be drawn as a directed graph The GLP is stratified iff its dependency graph contains no loop with a naf node Example of non-stratified GLP man(X) :- human(X), naf woman(X). woman(X) :- human(X), naf man(X). female(X) :- woman(X). human(roberta). ? – man(roberta)... founding(X) on(Y,X) onGround(X) offGround(X) naf Strata 1 Strata 0 man(X) human(X) woman(X) female(X) naf

13
GLP Clark’s Completion Semantics: Limitations P: edge(a,b). edge(c,d). edge(d,c). reachable(a). reachable(X) :- edge(Y,X), reachable(Y). sink(X) :- not edge(X,Y). ?- reachable(c)............... ?- sink(b). yes ?- sink(X). no comp(P): edge(a,b) edge(c,d) edge(d,c) ( Vx reachable(Vx) (Vx = a Vx = X Y (edge(Y,X) reachable(Y)))) (( Vu sink(Vu) (Vu = U V edge(V,U))) Limitation 1: comp(P) | reachable(c). comp(P) | reachable(d). reachable(c) (c=a Y(edge(Y,c) reachable(Y)) Y edge(Y,c) reachable(Y) reachable(d) Limitation 2 (Floundering): comp(P) | sink(b) sink(b) (b =U V edge(V,U)) V edge(V,U) b =U a b c d

Similar presentations

OK

CS 4100 Artificial Intelligence Prof. C. Hafner Class Notes Jan 17, 2012.

CS 4100 Artificial Intelligence Prof. C. Hafner Class Notes Jan 17, 2012.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on networking related topics to accounting Ppt on obesity and overweight Ppt on acid-base titration equivalence point Ppt on buddhism and jainism gained Ppt online open bank Ppt on history of australian Ppt on interview etiquettes of life Ppt on introduction to object-oriented programming definition Ppt on electricity for class 10th exam Ppt on magic of thinking big