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

Slides:



Advertisements
Similar presentations
First-Order Logic.
Advertisements

Logic Programming Automated Reasoning in practice.
Automated Reasoning Systems For first order Predicate Logic.
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
Converting formulas into a normal form Consider the following FOL formula stating that a brick is an object which is on another object which is not a pyramid,
Answer Set Programming Overview Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma de Guadalajara
Propositional Logic CMSC 471 Chapter , 7.7 and Chuck Dyer
Logic.
1 Applied Computer Science II Resolution in FOL Luc De Raedt.
Outline Recap Knowledge Representation I Textbook: Chapters 6, 7, 9 and 10.
Formal Logic Proof Methods Direct Proof / Natural Deduction Conditional Proof (Implication Introduction) Reductio ad Absurdum Resolution Refutation.
Computability and Complexity 8-1 Computability and Complexity Andrei Bulatov Logic Reminder.
Logic in general Logics are formal languages for representing information such that conclusions can be drawn Syntax defines the sentences in the language.
The idea of completion In LP one uses “if” but mean “iff” [Clark78] This doesn’t imply that -1 is not a natural number! With this program we mean: This.
Logic Programming Languages. Objective To introduce the concepts of logic programming and logic programming languages To introduce a brief description.
Inference and Resolution for Problem Solving
Methods of Proof Chapter 7, second half.
Knoweldge Representation & Reasoning
Inference in First-Order Logic
ASP vs. Prolog like programming ASP is adequate for: –NP-complete problems –situation where the whole program is relevant for the problem at hands èIf.
Artificial Intelligence Chapter 17 Knowledge-Based Systems Biointelligence Lab School of Computer Sci. & Eng. Seoul National University.
Notes for Chapter 12 Logic Programming The AI War Basic Concepts of Logic Programming Prolog Review questions.
Ontologies Reasoning Components Agents Simulations Belief Update, Planning and the Fluent Calculus Jacques Robin.
Ming Fang 6/12/2009. Outlines  Classical logics  Introduction to DL  Syntax of DL  Semantics of DL  KR in DL  Reasoning in DL  Applications.
Pattern-directed inference systems
Logical Agents Logic Propositional Logic Summary
CSE S. Tanimoto Horn Clauses and Unification 1 Horn Clauses and Unification Propositional Logic Clauses Resolution Predicate Logic Horn Clauses.
An Introduction to Artificial Intelligence – CE Chapter 7- Logical Agents Ramin Halavati
Unification Algorithm Input: a finite set Σ of simple expressions Output: a mgu for Σ (if Σ is unifiable) 1. Set k = 0 and  0 = . 2. If Σ  k is a singleton,
CPSC 322, Lecture 23Slide 1 Logic: TD as search, Datalog (variables) Computer Science cpsc322, Lecture 23 (Textbook Chpt 5.2 & some basic concepts from.
CS Introduction to AI Tutorial 8 Resolution Tutorial 8 Resolution.
CS4026 Formal Models of Computation Part II The Logic Model Lecture 2 – Prolog: History and Introduction.
Dr. Muhammed Al-Mulhem ICS An Introduction to Logical Programming.
Logical Agents Chapter 7. Knowledge bases Knowledge base (KB): set of sentences in a formal language Inference: deriving new sentences from the KB. E.g.:
Propositional calculus
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
Ch. 13 Ch. 131 jcmt CSE 3302 Programming Languages CSE3302 Programming Languages (notes?) Dr. Carter Tiernan.
CS 4100 Artificial Intelligence Prof. C. Hafner Class Notes Jan 24, 2012.
Automated Reasoning Systems For first order Predicate Logic.
Inverse Entailment in Nonmonotonic Logic Programs Chiaki Sakama Wakayama University, Japan.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
1 Reasoning with Infinite stable models Piero A. Bonatti presented by Axel Polleres (IJCAI 2001,
Inference in First Order Logic. Outline Reducing first order inference to propositional inference Unification Generalized Modus Ponens Forward and backward.
Knowledge Repn. & Reasoning Lec. #5: First-Order Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2004.
First-Order Logic Reading: C. 8 and C. 9 Pente specifications handed back at end of class.
Dr. Shazzad Hosain Department of EECS North South Universtiy Lecture 04 – Part B Propositional Logic.
1-1 An Introduction to Logical Programming Sept
1 Propositional Logic Limits The expressive power of propositional logic is limited. The assumption is that everything can be expressed by simple facts.
Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 10 of 42 Wednesday, 13 September.
First-Order Logic Semantics Reading: Chapter 8, , FOL Syntax and Semantics read: FOL Knowledge Engineering read: FOL.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
Answer Extraction To use resolution to answer questions, for example a query of the form  X C(X), we must keep track of the substitutions made during.
OWL, DL and Rules Based on slides from Grigoris Antoniou, Frank van Harmele and Vassilis Papataxiarhis.
Artificial Intelligence Logical Agents Chapter 7.
Computing & Information Sciences Kansas State University Monday, 18 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 11 of 42 Monday, 18 September.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
OWL, DL and rules Based on slides from Grigoris Antoniou, Frank van Harmele and Vassilis Papataxiarhis.
Introduction to Logic for Artificial Intelligence Lecture 2
Artificial Intelligence Chapter 17 Knowledge-Based Systems
Knowledge-Based Systems Chapter 17.
Artificial Intelligence Chapter 17 Knowledge-Based Systems
Chapter 7: Beyond Definite Knowledge
Logic Programming Languages
Logic: Top-down proof procedure and Datalog
Horn Clauses and Unification
Artificial Intelligence Chapter 17. Knowledge-Based Systems
Artificial Intelligence Chapter 17 Knowledge-Based Systems
Propositional Logic CMSC 471 Chapter , 7.7 and Chuck Dyer
Answer Set Programming
A Tutorial Summary of Description Logic and Hybrid Rules
Presentation transcript:

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

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

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)

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

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 *

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

{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}

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

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

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

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

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

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