Download presentation

Presentation is loading. Please wait.

Published byStanley Biggins Modified over 3 years ago

1
Ontologies Reasoning Components Agents Simulations Deduction Jacques Robin

2
Outline Classical Propositional Logic (CPL) Syntax Full CPL Implicative Normal Form CPL (INFCPL) Horn CPL (HCPL) CPL Semantics Cognitive and Herbrand interpretations, models CPL Reasoning FCPL Reasoning Truth-tabel based model checking Multiple inference rules INFCPL Reasoning Resolution and factoring DPLL WalkSat HCPL Reasoning Forward chaining Backward chaining Classical First-Order Logic (CFOL) Syntax Full CFOL Implicative Normal Form CFOL (INFCFOL) Horn CFOL (HCFOL) Semantics First-order interpretations and models Reasoning Lifting propositional reasoning to first- order reasoning INFCFOL reasoning: First-order resolution An ontology of logics and engines Properties of logics Commitments, complexity Properties of inference engines Soundness, completeness, complexity

3
Full Classical Propositional Logic (FCPL): syntax FCPLFormula Syntax (a (b (( c d) a) b)) FCPLConnective Functor ConstantSymbol Arg 1..2 FCPLUnaryConnective Connective: enum{ } FCPLBinaryConnective Connective: enum{,,, }

4
CPL Normal Forms INFCPLFormula Functor = Implicative Normal Form (INF) Conjunctive Normal Form (CNF) CNFCPLFormula Functor = Semantic equivalence: a b c d (a b) c d a b c d INFCPLClause Functor = * INFCLPLHS Functor = Premise INFCLPRHS Functor = Conclusion * ConstantSymbol * CNFCPLClause Functor = * Literal * NegativeLiteral Functor = ConstantSymbol

5
Horn CPL ConstantSymbol INFCPLFormula Functor = INFCPLClause Functor = INFCLPLHS Functor = Premise Conclusion Implicative Normal Form (INF) Conjunctive Normal Form (CNF) CNFCPLFormula Functor = CNFCPLClause Functor = NegativeLiteral Functor = LiteralConstantSymbol * * * * DefiniteClause context DefiniteClause inv DC: Literal.oclIsKindOf(ConstantSymbol)->size() = 1 DefiniteClause context DefiniteClause inv DC: Conclusion.ConstantSymbol <> false a b c d IntegrityConstraint context IntegrityConstraint inv IC: Literal->forAll(oclIsKindOf(NegativeLiteral)) a b c Fact context Fact inv Fact: Literal->forAll(oclIsKindOf(ConstantSymbol)) d Fact context Fact inv Fact: Premise -> size() = 1 and Premise -> ConstantSymbol = true true d IntegrityConstraint context IntegrityConstraint inv IC: Conclusion.ConstantSymbol = false a b c false

6
FCLPCognitiveInterpretation Convention defined by knowledge engineer FCPL semantics: Cognitive and Herbrand Interpretations FCPLFormula FCPLConnective FCPLUnaryConnective Connective: enum{ } FCPLBinaryConnective Connective: enum{,,, } FCLPHerbrandInterpretation Syntax Arg Functor ConstantValuation 1..2 FCLPHerbrandModel ConstantSymbol AtomicDomainProperty ConstantMapping csm1(pitIn12) = there is a pit in (1,2) csm2(pitIn12) = John is King of England CompoundDomainProperty FormulaMapping fm1(pitIn12 pitIn11) = there is a pit in (1,2) and no pit in (1,1) fm1(pitIn12 pitIn11) = John is King of England and is not King of France Semantics TruthValue Value: enum{true,false} Known by knowledge engineer Entered as input to inference engine by knowledge engineer FormulaValuation Defined from Arg.AtomicDomainProperty.TruthValue and FCPL truth table Derived by the knowledge engineer: CompoundDomainProperty.TruthValue = FCPLFormula.TruthValue

7
Entailment and models I c (f): cognitive interpretation of formula f I h (f): Herbrand interpretation of formula f Herbrand model: A Herbrand interpretation I h (f) of formula f is a Herbrand model M h (f) iff f is true in I h (f) Entailment |=: f |= f iff: I h (f true in I h (f) f´true in I h (f)) Logical equivalence : f f iff f |= f and f |= f f valid (or tautology) iff true in all I h (f), ex, a a f satisfiable iff true in at least one I h (f) f unsatisfiable (or contradiction) iff false in all I h (f), ex, a a Theorems: f |= f iff: M h (f) M h (f´) f |= f iff: f f´is satisfiable f |= f iff: f f´is unsatisfiable (since f f´ ( f f´) (f f´) Valid formulas Satisfiable formulas Unsatisfiable formulas

8
Cognitive x Herbrand Semantics Cognitive semantics: Knowledge engineer and application domain dependent symbolic convention Truth values associated to constant symbols and formulas indirectly via knowledge engineer beliefs about atomic and compound properties of the real world domain being represented Allows deductively deriving new properties n 1, …, n i about entities of this domain from other, given properties g 1, …, g j Herbrand semantics: Knowledge engineer and application domain independent syntactical convention Truth values associated directly to constant symbols and formulas Relies on connective truth-table to deduct truth value of formula f from those of its constant symbols Allows testing inference engine reasoning soundness and completeness independently of any specific knowledge base or real world referential

9
Logic-Based Agent Ask Tell Retract Environment Actuators Knowledge Base B: Domain Model in Logic L Inference Engine: Theorem Prover for Logic L Given B as axiom, formula f is a theorem of L? i.e., B |= L f ? Sensors Strenghts: Reuse results and insights about correct reasoning that matured over 23 centuries Semantics (meaning) of a knowledge base can be represented formally as syntax, a key step towards automating reasoning Relies on: Mh(B) Mh(f) ? (model checking) B f is satisfiable ? (boolean CSP search) B f is unsatisfiable ? (refutation proof)

10
Model Checking: Truth-Table Enumeration kb = persistentKb volatileKb = pf1 pf2 pf3 vf1 vf2 = p11 (b11 p12 p21) (b21 p22 p31 p11) b11 b21 q1 = p12, q2 = p22, q3 = p31 kb |= q1, kb | q2, kb | q3, b11b21p11p12p21p22p31pf1pf2pf3vf1vf2kbq1q2q3 fffffffttttffttt fffffftttftffttf................................................................................................ fttffffftfttfttt ftfffftttttttttf ftffftftttttttft ftffftttttttttff ftfftfftffttfttt................................................................................................ tttttttfttftffff 112131 2212 VA, B P?

11
FCLP inference rules Bi-directional (logical equivalences) R 1 : f g g f R 2 : f g g f R 3 : (f g) h f (g h) R 4 : (f g) h f (g h) R 5 : f f R 6 : f g g f R 7 : f g f g R 8 : f g (f g) (g f) R 9 : (f g) f g R 10 : (f g) f g R 11 : f (g h) (f g) (f h) R 12 : f (g h) (f g) (f h) R 13 : f f f %factoring Directed (logical entailments) R 14 : f g, f |= g %modus ponens R 15 : f g, g |= f %modus tollens R 16 : f g |= f %and-elimination R 17 : l 1... l i... l k, m 1... m j-1 l i m j+1... m k |= l 1... l i-1 l i+1... l k m 1... m j-1 m j+1... m k %resolution

12
Multiple inference rule application Idea: KB |= f ? KB 0 = KB Apply inference rule: KB i |= g Update KB i+1 = KB i g Iterate until f KB k or until f KB n and KB n+1 = KB n Transforms proving KB |= f into search problem At each step: Which inference rule to apply? To which sub-formula of f? Example proof: KB 0 = P 1,1 (B 1,1 P 1,2 P 2,1 ) (B 2,1 P 1,1 P 2,2 P 3,1 ) B 1,1 B 2,1 Query: (P 1,2 P 2,1 ) Cognitive interpretation: B X,Y : agent felt breeze in coordinate (X,Y) P X,Y : agent knows there is a pit in coordinate (X,Y) Apply R 8 to B 1,1 P 1,2 P 2,1 KB 1 = KB 0 (B 1,1 (P 1,2 P 2,1 )) ((P 1,2 P 2,1 ) B 1,1 ) Apply R 6 to last sub-formula KB 2 = KB 1 ( B 1,1 (P 1,2 P 2,1 )) Apply R 14 to B 1,1 and last sub-formula KB 3 = KB 2 (P 1,2 P 2,1 )

13
Resolution and factoring Repeated application of only two inference rules: resolution and factoring More efficient than using multiple inference rules search space with far smaller branching factor Refutation proof: Derive false from KB Query Requires both in normal form (conjunctive or implicative) Example proof in conjunctive normal form:

14
Resolution strategies Search heuristics for resolution-based theorem proving Two heuristic classes: Choice of clause pair to resolve inside current KB Choice of literals to resolve inside chosen clause pair Unit preference: Prefer pairs with one unit clause (i.e., literals) Rationale: generates smaller clauses, eliminates much literal choice in pair Unit resolution: turn preference into requirement Set of support: Define small subset of initial clauses as initial set of support At each step: Only consider clause pairs with one member from current set of support Add step result to set of support Efficiency depend on cleverness of initial set of support Common domain-independent initial set of support: negated query Beyond efficiency, results in easier to understand, goal-directed proofs Linear resolution: At each step only consider pairs (f,g) where f is either: (a) in KB 0, or (b) an ancestor of g in the proof tree Input resolution: Specialization of linear resolution excluding (b) case Generates spine-looking proofs trees

15
FCPL theorem proving as boolean CSP exhaustive global backtracking search Put f = KB Query in conjunctive normal form Try to prove it unsatisfiable Consider each literal in f as a boolean variable Consider each clause in f as a constraint on these variables Solve the underlying boolean CSP problem by using: Exhaustive global backtracking search of all complete variable assignments showing none satisfies all constraint in f Initial state: empty assignment of pre-ordered variables Search operator: Tentative assignment of next yet unassigned variable L i (i th literal in f) Apply truth table definitions to propagate constraints in which L i appears (clauses of f involving L) If propagation violates one constraint, backtrack on L i If propagation satisfies all constraints: iterate on L i+1 if L i was last literal in f, fail, KB Query satisfiable, and thus KB | Query

16
FCPL theorem proving as boolean CSP backtracking search: example Variables = {B 1,1, P 1,2, P 2,1 } Constraints: { B 1,1, P 1,2 B 1,1, P 2,1 B 1,1, B 1,1 P 1,2 P 2,1, P 1,2 } V = [?,?,?] C = [?,?,?,?,?] V = [0,?,?] C = [1,?,?,1,?] V = [1,?,?] C = [0,1,1,?,?] V = [0,0,?] C = [1,1,?,1,0] V = [0,1,?] C = [1,0,?,1,1] false

17
DPLL algorithm General purpose CSP backtracking search very inefficient for proving large CFPL theorems Davis, Putnam, Logemann & Loveland algorithm (DPPL): Specialization of CSP backtracking search Exploits specificity of CFPL theorem proving recast as CSP search To apply search completeness preserving heuristics Concepts: Pure symbol S: yet unassigned variable positive in all clauses or negated in all clauses Unit clause C: clause with all but one literal already assigned to false Heuristics: Pure symbol heuristic: assign pure symbols first Unit propagation: Assign unit clause literals first Recursively generate new ones Early termination heuristic: After assigning L i = true, propagate C j = true C j | L i C j (avoiding truth-table look-ups) Prune sub-tree below any node where C j | C j = false Clause caching

18
Satisfiability of formula as boolean CSP heuristic local stochastic search DPLL is not restricted to proving entailment by proving unsatisfiability It can also prove satisfiability of a FCPL formula Many problems in computer science and AI can be recast as a satisfiability problem Heuristic local stochastic boolean CSP search more space-scalable than DPLL for satisfiability However since it is not exhaustive search, it cannot prove unsatisfiability (and thus entailment), only strongly suspect it WalkSAT Initial state: random assignment of pre-ordered variables Search operator: Pick a yet unsatisfied clause and one literal in it Flip the literal assignment At each step, randomly chose between to picking strategies: Pick literal which flip results in steepest decrease in number of yet unsatisfied clauses Random pick

19
Direct x indirect use of search for agent reasoning Agent Decision Problem Domain Specific Agent Decision Problem Search Model: State data structure Successor function Goal function Heuristic function Domain Specific Knowledge Base Model: Logic formulas true d f g h c... Domain Independent Inference Engine Search Model State data structure Successor function Goal function Heuristic function Domain Independent Search Algorithm Agent Application Developer Reasoning Component Developer

20
Horn CPL reasoning Practical limitations of FCPL reasoning: For experts in most application domain (medicine, law, business, design, troubleshooting): Non-intuitiveness of FCPL formulas for knowledge acquisition Non-intuitiveness of proofs generated by FCPL algorithms for knowledge validation Theoretical limitation of FCPL reasoning: exponential in the size of the KB Syntactic limitation to Horn clauses overcome both limitations: KB becomes base of simple rules If p 1 and... and p n then c, with logical semantics p 1... p n c Two algorithms are available, rule forward chaining and rule backward chaining, that are: Intuitive Sound and complete for HCPL Linear in the size of the KB For most application domains, loss of expressiveness can be overcome by addition of new symbols and clauses: ex, FCPL KB 1 = p q c d has no logical equivalent in HCPL in terms of alphabet {p,q,c,d} However KB 2 = (p q notd c) (p q notc d) (c notc false) (d notd false) is an HCPL formula logically equivalent to KB 1

21
Propositional forward chaining Repeated application of modus ponens until reaching a fixed point At each step i: Fire all rules (i.e., Horn clauses with at least one positive and one negative literal) with all premises already in KB i Add their respective conclusions to KB i+1 Fixed point k reached when KB k = KB k-1 KB k = {f | KB 0 |= f}, i.e., all logical conclusions of KB 0 If f KB k, then KB 0 |= f, otherwise, KB 0 | f Naturally data-driven reasoning: Guided by fact (axioms) in KB 0 Allows intuitive, direct implementation of reactive agents Generally inefficient for: Inefficient for specific entailment query Cumbersome for deliberative agent implementations Builds and-or proof graph bottom-up

22
Propositional forward chaining: example

29
Propositional backward chaining Repeated application of resolution using: Unit input resolution strategy with negated query as initial set of support At each step i: Search KB 0 for clause of the form p 1... p n g to resolve with clause g popped from the goal stack If there are several ones, pick one, push p 1... p n to goal stack, and push other ones to alternative stack for consideration upon backtracking If there are none, backtrack (i.e., pop alternative stack) Terminates: Successfully when goal stack is empty As failure when goal stack is non empty but alternative stack is Naturally goal-driven reasoning: Guided by goal (theorem to prove) Allows intuitive, direct implementation of deliberative agents Generally: Inefficient for deriving all logical conclusions from KB Cumbersome implementation of reactive agents Builds and-or proof graph top-down

30
Propositional backward chaining: example Goal Stack Q Alternative Stack

31
Propositional backward chaining: example Goal Stack P Alternative Stack *

32
Propositional backward chaining: example Goal Stack L M Alternative Stack *

33
Propositional backward chaining: example Goal Stack A P M Alternative Stack A B * *

34
Propositional backward chaining: example Goal Stack P M Alternative Stack A B * * * *

35
Propositional backward chaining: example Goal Stack A B M Alternative Stack * * * *

36
Propositional backward chaining: example Goal Stack M Alternative Stack * * * * * *

37
Propositional backward chaining: example Goal Stack B L Alternative Stack * * * * * *

38
Propositional backward chaining: example Goal Stack Alternative Stack * * * * * * *

39
Propositional backward chaining: example Goal Stack Alternative Stack * * * * * * *

40
Propositional backward chaining: example Goal Stack Alternative Stack * * * * * * *

41
Limitations of propositional logic Ontological: Cannot represent knowledge intentionally No concise representation of generic relations (generic in terms of categories, space, time, etc.) ex, no way to concisely formalize the Wumpus world rule: at any step during the exploration, the agent perceiving a stench makes him knows that there is a Wumpus in a location adjacent to his Propositional logic: Requires conjunction of 100,000 equivalences to represent this rule for an exploration of at most 1000 steps of a cavern size 10x10 (stench1_1_1 wumpus1_1_2 wumpus1_2_1)...... (stench1000_1_1 wumpus1000_1_2 wumpus1000_2_1)...... (stench1_10_10 wumpus1_9_10 wumpus1_10_9)...... (stench1000_10_10 wumpus1000_9_10 wumpus1000_9_10) Epistemological: Agent always completely confident of its positive or negative beliefs No explicit representation of ignorance (missing knowledge) Only way to represent uncertainty is disjunction Once held, agent belief cannot be questioned by new evidence (ex, from sensors)

42
Full Classical First-Order Logic (FCFOL): syntax Syntax FCLUnaryConnective Connective: enum{ } FCLBinaryConnective Connective: enum{,,, } FCLConnective FCFOLFormula Functor QuantifierExpression Quantifier: enum{, } * Arg 1..2 X,Y (p(f(X),Y) q(g(a,b))) ( U,V Z ((X = a) r(Z)) (U = h(V,Z)))) FCFOLAtomicFormula PredicateSymbol FCFOLTerm Arg 1..* FCFOLFunctionalTermFCFOLNonFunctionalTerm Arg 1..* FunctionSymbol ConstantSymbolFOLVariable Functor 1..*

43
FCFOL Normal Forms Conjunctive Normal Form (CNF) CNFCFOLFormula Functor = CNFCFOLClause Functor = NegativeLiteral Functor = Literal * INFCFOLFormula Functor = INFCFOLClause Functor = INFCLPLHS Functor = INFCLPRHS Functor = Premisse Conclusion Implicative Normal Form (INF) * FCFOLAtomicFormula PredicateSymbol FCFOLTerm Arg 1..* FCFOLFunctionalTermFCFOLNonFunctionalTerm Arg 1..* FunctionSymbol ConstantSymbol FOLVariable Functor * * *

44
* Horn CFOL (HCFOL) INFCFOLFormula Functor = INFCFOLClause Functor = INFCFOLLHS Functor = Premisse Conclusion Implicative Normal Form (INF) Conjunctive Normal Form (CNF) CNFCFOLFormula Functor = CNFCFOLClause Functor = NegativeLiteral Functor = Literal * DefiniteClause IntegrityConstraint Fact DefiniteClause IntegrityConstraint Fact context IntegrityConstraint inv IC: Conclusion.ConstantSymbol = false context DefiniteClause inv DC: Conclusion.ConstantSymbol false context Fact inv Fact: Premisse -> size() = 1 and Premisse -> ConstantSymbol = true context IntegrityConstraint inv IC: Literal->forAll(oclIsKindOf(NegativeLiteral)) context DefiniteClause inv DC: Literal.oclIsKindOf(ConstantSymbol)->size() = 1 context Fact inv Fact: Literal->forAll(oclIsKindOf(ConstantSymbol)) FCFOLAtomicFormula * * *

45
FCFOLNonGroundTerm FCFOL semantics: cognitive interpretations Syntax FCFOLFormula Arg 1..2 FCFOLAtomicFormula PredicateSymbol FCFOLTerm Arg 1..* FCFOLFunctionalTermFCFOLNonFunctionalTerm Arg 1..* FunctionSymbol ConstantSymbolFOLVariable FCFOLGroundTerm SimpleEntityProperty SimpleRelation * EntitySet * ComplexEntityProperty ComplexRelation * * EntityName ConstantMapping FunctionMapping EntityPropertyName RelationName PredicateMapping Entity * Semantics TruthValue Value: enum{true,false}

46
EntitySet FCFOLNonGroundTerm FCFOL semantics: cognitive interpretations Syntax FCFOLFormula Arg 1..2 FCFOLAtomicFormula PredicateSymbol FCFOLTerm Arg 1..* FCFOLFunctionalTermFCFOLNonFunctionalTerm Arg 1..* FunctionSymbolConstantSymbolFOLVariable EntityPropertyName RelationName EntityName SimpleEntityProperty SimpleRelation Entity FCFOLGroundTerm ComplexEntityProperty ComplexRelation * * * * TruthValue Value: enum{true,false} NounGroundTermMapping GroundTermMapping AtomMapping * Semantics FormulaMapping TruthMapping

47
FCFOL semantics: cognitive interpretations FCFOLFormula NounGroundTermMapping AtomMapping GroundTermMapping FormulaMapping TruthMapping ConstantMapping PredicateMapping FunctionMapping FCFOLCognitiveInterpretation semantics

48
FCFOL semantics: Herbrand interpretations Herbrand universe U h of FCFOL formula k: Set of all terms built from constant and function symbols appearing in k U h (k) = {t = f(t 1,...,t n ) | f functions(k), t i constants(k) U h (k)} ex: k = {parent(joe,broOf(dan)) parent(broOf(dan),pat) ( A,D anc(A,D) (parent(A,D) ( P anc(A,P) parent(P,D))))} U h (k) = {joe,dan,pat,broOf(joe),broOf(dan),broOf(pat), broOf(broOf(joe), broOf(broOf(dan), broOf(broOf(pat),...} Herbrand base B h of FCFOL formula k: Set of all atomic formulas built from predicate symbols appearing in k and Herbrand universe elements as arguments B h = {a = p(t 1,...,t n ) | p predicates(k), t i U h (k)} ex: B h = {parent(joe,joe), parent(joe,dan),..., parent(broOf(pat),broOf(pat)),..., anc(joe,joe), anc(joe,dan),..., anc(broOf(pat),broOf(pat)},...}

49
FCFOL semantics: Herbrand interpretations Herbrand interpretation I h of FCFOL formula k: Truth valuation of Herbrand base I h (k): B h (k) {true,false} ex: {parent(joe,joe) = false,...parent(joe,dan) = true,... parent(broOf(pat),broOf(pat))= false,... anc(joe,joe) = true,..., anc(joe,dan) = true} model Herbrand model M h of FCFOL formula k: Interpretation I h (k) in which k is true ex, M h (k) = {parent(joe,broOf(dan)) = true, parent(broOf(dan),pat) = true, anc(joe,brofOf(dan)) = true, anc(joe,pat) = true, all others members of B h (k) = false }

50
FCFOLNonGroundTerm FCFOL semantics: Herbrand interpretations Syntax FCFOLFormula Arg 1..2 FCFOLAtomicFormula PredicateSymbol FCFOLTerm Arg 1..* FCFOLFunctionalTermFCFOLNonFunctionalTerm Arg 1..* FunctionSymbol ConstantSymbolFOLVariable FCFOLGroundTerm Semantics HerbrandUniverse HerbrandModel TruthValue Value: enum{true,false} AtomValuation HerbrandInterpretation Herbrand semantics HerbrandBase 1..*

51
Reasoning in CFOL Key difference between CFOL and CPL? Quantified variables which extend expressive power of CPL Ground terms do not extend expressive power of CPL Alone, they are merely syntactic sugar i.e, clearer for the knowledge engineer but equivalent to constant symbols for an inference engine ex, anc(joe,broOf(dan)) ancJoeBroOfDan, loc(agent,step(3),coord(2,2)) locAgent3_2_2 How to reason in CFOL? Reuse CPL reasoning approaches, principles and engines! Fully (formulas propositionalization) transforms CFOL formulas into CPL formulas as preprocessing step Partially (inference method generalization) lift CPL reasoning engines with new, variable handling component (unification) all CPL approaches free of exhaustive truth value enumeration can be lifted to CFOL

52
Propositionalization Variable substitution function Subst(,k): Given a set of pairs variable/constant, Subst(,k) = formula obtained from k by substituting its variables with their associated constants in Subst({X/a,Y/b}, X,Y,Z p(X,Y) q(Y,Z)) ( Z p(a,b) q(b,Z)) Substitutes CFOL formula k by conjunction of ground formulas ground(k) generated as follows: For each universally quantified variable X in k and each v Uh(k) Add Subst({X/v},k) to the conjunction For each existentially quantified variable Y in k Add Subst({Y/s},k) to the conjunction where s is a new Skolem ground term, i.e. s Uh(k) Skolem term to eliminate existentially quantified variable Y in scope of outer universal quantifier Q must be function of the variables quantified by Q ex, Y X,Z p(X,Y,Z) becomes X,Z p(X,a,Z)) but X,Z Y p(X,Y,Z) becomes X,Z p(X,f(X,Z),Z)

53
Propositionalization Get prop(k) from ground(k) by turning each ground atomic formula into an equivalent constant symbol through concatenation of its predicate, function and constant symbol Example: k = parent(joe,broOf(dan)) parent(broOf(dan),pat) ( A,D anc(A,D) (parent(A,D) ( P anc(A,P) parent(P,D)))) ground(k) = parent(joe,broOf(dan)) parent(broOf(dan),pat) (anc(joe,joe) (parent(joe,joe) (anc(joe,s1(joe,joe) parent(s1(joe,joe),joe))) (anc(joe,broOf(dan)) (parent(joe,broOf(dan)) (anc(joe,s2(joe,broOf(dan))) parent(s2(joe,broOf(dan)),joe)))...... (anc(pat,pat) (parent(pat,pat) (anc(pat,sn(pat,pat)) parent(sn(pat,pat),pat)))) prop(k) = parentJoeBroOfDan parentBroOfDanPat (ancJoeJoe (parentJoeJoe (ancJoeS1JoeJoe parentS1JoeJoeJoe))) (ancJoeBroOfDan (parentJoeBroOfDan (ancJoeS2JoeBroOfDan parentS2JoeBroOfDanJoe...... (ancPatPat (parentPatPat (ancPatSnPatPat parentSnPatPatPat)))

54
Propositionalization k |= CFOL k iff prop(k) |= CPL prop(k) Fixed-depth Herbrand base: U h (k,d) = {f U h (k) | depth(f) = d} Fixed-depth propositionalization: prop(k,d) = {c 1... c n | c i built only from elements in U h (k,d)} Thm de Herbrand: prop(k) |= CPL prop(k) d, prop(k,d) |= CPL prop(k,d) For infinite prop(k) prove prop(k) |= CPL prop(k) iteratively: try proving prop(k,0) |= CPL prop(k,0), then prop(k,1) |= CPL prop(k,1),... until prop(k,d) |= CPL prop(k,d)

55
First-Order Term Unification p aX p Yb p aX p Yf cZ X/f(c,Z) Y/a p af cZ p ab X/b Y/a p aX p Xb fail X/b X/a p aX p Yf cZ p af cd X/f(c,d) Y/a Z/d p aX X fail X/p(a,X) Failure by Occur-Check p aX XX/p(a,X)p ap ap Guarantees termination

56
Lifted inference rules Bi-direction CPL rules trivially lifted as valid CFOL rules by substituting CPL formulas inside them by CFOL formulas Lifted modus ponens: Subst(,p 1 ),..., Subst(,p n ), (p 1... p n c) |= Subst(,c) Lifted resolution: l 1... l i... l k, m 1... m j... m k, Subst(,l i ) = Subst(, m j ) |= Subst(, l 1... l i-1 l i+1... l k m 1... m j-1 m j+1... m k ) CFFOL inference methods (theorem provers): Multiple lifted inference rule application Repeated application of lifted resolution and factoring CHFOL inference methods (logic programming): First-order forward chaining through lifted modus ponens First-order backward chaining through lifted linear unit resolution guided by negated query as set of support Common edge over propositionalization: focus on relevant substitutions

57
FCFOL theorem proving by repeated lifted resolution and factoring: example

58
Deduction with equality Axiomatization: Include domain independent sub-formulas defining equality in the KB ( X X = X) ( X,Y X = Y Y = X) ( X,Y,Z (X = Y Y = Z) X = Z) ( X,Y X = Y (f 1 (X) = f 1 (Y)... f n (X) = f n (Y)) ( X,Y,U,V (X= Y U = V) f 1 (X,U) = f 1 (Y,V)... f n (X,U) = f n (Y,V))... ( X,Y X = Y (p 1 (X) p 1 (Y)... p m (X) p m (Y)) ( X,Y,U,V (X= Y U = V) p 1 (X,U) p 1 (Y,V)... p m (X,U) p m (Y,V))... New inference rule (parademodulation): l 1... l k t 1 = t 2, m 1... m n (...,t 3,...) |= Subst(unif(t 1, t 2 ), l 1... l k m 1... m n (..., t 2,...)) ex, p(f(X),a) f(X) = f(b) q(d,h(f(X)) |= p((f(b),a) q(d,h(f(b))) Extend unification to check for equality (equational unification): ex, if a = b + c, then p(X,f(a)) unifies with p(b,f(X+c)) with {X/b}

59
Characteristics of logics and knowledge representation languages Commitments: ontological: meta-conceptual elements to model agents environment epistemological: meta-conceptual elements to model agents beliefs Hypothesis and assumptions: Unique name or equality theory open-world or closed-world Monotonicity: if KB |= f, then KB g |= f Semantic compositionality: semantics(a 1 c 1 a 2 c 2... c n-1 a n ) = f(semantics(a 1 ),...,semantics(a n )) ex, propositional logic truth tables define functions to compute semantics of a formula from semantics of its parts Modularity semantics(a i ) independent from its context in larger formulas ex, semantics(a 1 ) independent of semantics(a 2 ),..., semantics(a n ) in contrast to natural language

60
Characteristics of logics and knowledge representation languages Expressive power: theoretical (in terms of language and grammar theory) practical: concisely, directly, intuitively, flexibly, etc. Inference efficiency: theoretical limits practical limits due to availability of implemented inference engines Acquisition efficiency: easy to formulate and maintain by human experts possible to learn automatically from data (are machine learning engines available?)

61
Characteristics of inference engines Engine inference: f |- E g, if engine E infers g from f Engine E sound for logic L: f |- E g only if f |= L g Engine E fully complete for logic L: if f |= L g, then f |- E g if f | L g, then (f g) |- E false Engine E refutation-complete for logic L: if f |= L g, then f |- E g but if f | L g, then either (f g) |- E false or inference never terminates (equivalent to halting problem) Engine inference complexity: exponential, polynomial, linear, logarithmic in KB size

62
Some theoretical results about logics and inference methods Results about logic: Satisfiability of full classical propositional logic formula is decidable but exponential Entailment between two full classical first-order logic formulas is semi- decidable Entailment between two full classical high-order logic formulas is undecidable Results about inference methods: Truth-table model checking, multiple inference rule application resolution-factoring application and DPLL are sound and fully complete for full classical propositional logic WalkSAT sound but fully incomplete for full classical propositional logic Forward-chaining and backward chaining sound, fully complete and worst- case linear for Horn classical propositional logic Lifted resolution-factoring sound, refutation complete and worst case exponential for full classical first-order logic

Similar presentations

OK

Propositional Logic Reading: C. 7.4-7.8, C. 8. 2 Logic: Outline Propositional Logic Inference in Propositional Logic First-order logic.

Propositional Logic Reading: C. 7.4-7.8, C. 8. 2 Logic: Outline Propositional Logic Inference in Propositional Logic First-order logic.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on sports day ideas Ppt on history of cricket Ppt on building information modeling revit Ppt on clothes we wear in india Ppt on javascript events trigger Ppt on water pollution in australia Ppt on idea cellular advertisement Free ppt on mobile number portability idea Ppt on orientation for kindergarten parents Maths ppt on exponents and powers