Default Reasoning and Negation As Failure in General Logic Programming

About This Presentation
Title:

Default Reasoning and Negation As Failure in General Logic Programming

Description:

Default Reasoning and Negation As Failure in General Logic Programming Jacques Robin Outline Default Logic Syntax Semantics Examples Limitations Negation As Failure ... –

Number of Views:60
Avg rating:3.0/5.0
Slides: 14
Provided by: jacq199
Category:

less

Transcript and Presenter's Notes

Title: Default Reasoning and Negation As Failure in General Logic Programming


1
Default Reasoning andNegation As Failurein
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 Clarks
    Completion
  • Limitation of Clarks 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) ?gt 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 (PJ/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 gt C alias for PC/C
  • e.g., bird(X) gt flies(X) alias for
    bird(X) flies(X) / flies(X)

Default Theory
5
Default Logic Semantics
  • Default theory K (L,D) where
  • L l1 ?...? ln is an and base logic formula,
    Ls l1, ..., ln, and
  • D is the default rule base

Default Theory
/extension

prerequisite
Base LogicFormula
And Base Logic Formula
/groundExtension subset extension
justification
conclusion
  • Extension E(K) e1 ?...? em ?ei 1?i ?m, (Ls ?
    c (pj/c ? D) ? p?e1, ..., em ? ?j?e1, ...,
    em) ei
  • ?(Ls) d1, ..., dn defined as
  • minimal superset of Ls, i.e., (Ls ? ?(Ls)) ? (?S,
    Ls ? S ? ?(Ls) ? S)
  • closed under entailment, i.e., ?f, d1 ?...? dn ?
    f ? f?d1, ..., dn
  • such that pj/c ? D ? p??(Ls) ? ?j?Ls ? c??(Ls)
  • Ground Extension Eg(K) g1 ?...? gm Eg(K)
    ?(Eg(K))

6
Default Logic Examples
  • If K1 (L1,D1), where
  • L1 (?X penguin(X) ? ?flies(X)) ? (?X pigeon(X)
    ? bird(X)) ? (?X penguin(X) ? bird(X)) ?
    pigeon(valiant) ? penguin(tux)
  • D1 (?X bird(X) gt flies(X))
  • Then E(K1) Eg(K1) L1 ? flies(valiant) ?
    ?flies(tux) is the sole extension of K1
  • If K2 (L2,D2), where
  • L2 quaker(nixon) ? republican(nixon)
  • D2 (?X quaker(X) gt pacifist(X)) ? (?X
    republican(X) gt ?pacifist(X))
  • Then E1(K2) L2 ? pacifist(nixon), E2(K2)
    L2 ? ?pacifist(nixon) are the two extensions
    of K2
  • A skeptical default reasoner will derive the
    intersection of all extensions Es(K2) L2
  • A credulous default reasoner will derive one of
    the extensions, e.g., Ec(K2) L2
    ?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 K3 (L3,D3), where
  • L3 quaker(nixon) ? republican(nixon) ? (?X
    republican(X) ? political(X)) ?
    ?republican(carter) ? quaker(carter)
  • D3 (?X (quaker(X) (pacifist(X)) ?
    ?political(X)) / pacifist(X)) ? (?X republican(X)
    gt ?pacifist(X))

7
General Logic Programs (GLP)Abstract Syntax
body
predicate
gc 2..
GLPClause
GLP Literal
FOL Atom
GLP
arg
head
arg 1..
1..
disjoint, complete
disjoint, complete
disjoint, complete
FOL Term
FOL Atom
GLP NAF Literal
a
GLP Query
Fact
GLP Rule
Non Functional Term
Functional Term
Non Ground Term
Ground Term
2..
GLP Ground NAF Literal
DLPClause
FOL Ground Atom
ga
DLP
functor
dBodysubset body
subset gc
Symbol
Variable
subset a
  • context Fact inv body-gtIsEmpty()
  • context GLPQuery inv head-gtIsEmpty() and
    body-gtforall(oclIsKindOf(FOLAtom) or
    oclIsKindOf(GLPGroundNAFLiteral))
  • context GLPRule inv head-gtNotEmpty() and
    body-gtNotEmpty()
  • context GroundTerm inv oclIsKindOf(Symbol) or
    arg-gtforall(oclIsKindOf(GroundTerm))
  • context GroundFOLAtom inv arg-gtforall(oclIsKindOf
    (GroundTerm))

8
GLP Declarative Logical Semantics Clarks
Completion
  • Partitions program in clause sets, each one
    defining one predicate (i.e., group together
    clauses with same predicate c(t1, ..., tn) as
    conclusion)
  • Replaces each such set by a logical equivalence
  • One side of this equivalence contains c(X1, ...,
    Xn) where X1, ..., Xn 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
  • Xi ci ?...? Xj cj, if the original clause is
    a ground fact
  • ?Yi ... Yj Xi Yi ?...? Xj Yj ? p1(...) ?...?
    pk(...) ? ?l1(...) ?...? ?ll(...)
  • if the original clause is a rule with body
    l1(...),...,ln(...),naf l1(...),...,naf ll(...)
    containing variables Yi ... Yj
  • Joins all resulting equivalences in a conjunction
  • Adds conjunction of the form ?(ci cj) for all
    possible pairs (ci,cj) of constant symbols in
    pure Prolog program

9
GLP Clarks 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))))

10
GLP Operational SemanticsSLDNF Resolution
Principle
  • Consume the query literals Q1, ..., Qn from left
    to right
  • For each positive literal atom Qi a
  • Call SLD resolution of a
  • If it finitely succeeds, then go to next literal,
    propagating to it the unification substitutions
    executed during the successful SLD resolution
  • Else, if it finitely fails, then return fail
  • For each negative literal atom Qi naf b
  • Call SLD resolution on b
  • If it finitely succeeds, then return fail
  • 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 SemanticsSLDNF 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).

12
GLP Clarks 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
    Biff 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)
  • ...

13
GLP Clarks 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)
  • ? ?(ca ? ?Y(edge(Y,c) ? reachable(Y))
  • ? ?Y edge(Y,c) ? ?reachable(Y)
  • ? ?reachable(d)
  • Limitation 2 (Floundering)
  • comp(P) ? sink(b)
  • sink(b) ? (bU ? ??V edge(V,U))
  • ? ?V edge(V,U) ? bU
Write a Comment
User Comments (0)
About PowerShow.com