Logics for Data and Knowledge Representation Exercises: DL.

Slides:



Advertisements
Similar presentations
OWL - DL. DL System A knowledge base (KB) comprises two components, the TBox and the ABox The TBox introduces the terminology, i.e., the vocabulary of.
Advertisements

Possible World Semantics for Modal Logic
1 A Description Logic with Concrete Domains CS848 presentation Presenter: Yongjuan Zou.
Logic Concepts Lecture Module 11.
Knoweldge Representation & Reasoning
LDK R Logics for Data and Knowledge Representation Description Logics: tableaux.
Part 6: Description Logics. Languages for Ontologies In early days of Artificial Intelligence, ontologies were represented resorting to non-logic-based.
LDK R Logics for Data and Knowledge Representation Description Logics as query language.
Notes for Chapter 12 Logic Programming The AI War Basic Concepts of Logic Programming Prolog Review questions.
Inference is a process of building a proof of a sentence, or put it differently inference is an implementation of the entailment relation between sentences.
An Introduction to Description Logics. What Are Description Logics? A family of logic based Knowledge Representation formalisms –Descendants of semantic.
Logics for Data and Knowledge Representation Propositional Logic: Reasoning Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto.
Tableau Algorithm.
Notes on DL Reasoning Shawn Bowers April, 2004.
LDK R Logics for Data and Knowledge Representation ClassL (part 3): Reasoning with an ABox 1.
Presented by:- Somya Gupta( ) Akshat Malu ( ) Swapnil Ghuge ( ) Franz Baader, Ian Horrocks, and Ulrike Sattler.
Advanced Topics in Propositional Logic Chapter 17 Language, Proof and Logic.
Topics in artificial intelligence 1/1 Dr hab. inż. Joanna Józefowska, prof. PP Reasoning and search techniques.
Slide 1 Propositional Definite Clause Logic: Syntax, Semantics and Bottom-up Proofs Jim Little UBC CS 322 – CSP October 20, 2014.
An Introduction to Description Logics (chapter 2 of DLHB)
Semantic web course – Computer Engineering Department – Sharif Univ. of Technology – Fall Description Logics: Logic foundation of Semantic Web Semantic.
LDK R Logics for Data and Knowledge Representation Modal Logic Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia,
LDK R Logics for Data and Knowledge Representation Description Logics (ALC)
More on Description Logic(s) Frederick Maier. Note Added 10/27/03 So, there are a few errors that will be obvious to some: So, there are a few errors.
LDK R Logics for Data and Knowledge Representation Description Logics.
Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.
LDK R Logics for Data and Knowledge Representation Propositional Logic: Reasoning First version by Alessandro Agostini and Fausto Giunchiglia Second version.
Logics for Data and Knowledge Representation
LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1.
Logics for Data and Knowledge Representation Exercises: ClassL Fausto Giunchiglia, Rui Zhang and Vincenzo Maltese.
LDK R Logics for Data and Knowledge Representation ClassL (part 2): Reasoning with a TBox 1.
Description Logics Dr. Alexandra I. Cristea. Description Logics Description Logics allow formal concept definitions that can be reasoned about to be expressed.
ece 627 intelligent web: ontology and beyond
Logic: Proof procedures, soundness and correctness CPSC 322 – Logic 2 Textbook §5.2 March 7, 2011.
LDK R Logics for Data and Knowledge Representation Propositional Logic Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia,
Complexity of Reasoning
Knowledge Repn. & Reasoning Lec #11+13: Frame Systems and Description Logics UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2004.
Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.
Knowledge Representation and Reasoning University "Politehnica" of Bucharest Department of Computer Science Fall 2011 Adina Magda Florea
Of 29 lecture 15: description logic - introduction.
Logics for Data and Knowledge Representation Exercises: DL.
LDK R Logics for Data and Knowledge Representation Description Logics: family of languages.
Knowledge Repn. & Reasoning Lecture #9: Propositional Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2005.
Artificial Intelligence Knowledge Representation.
Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.
LDK R Logics for Data and Knowledge Representation Description Logics.
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
ece 720 intelligent web: ontology and beyond
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Description logics (book, page 456)
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Presentation transcript:

Logics for Data and Knowledge Representation Exercises: DL

DL family of languages AL ::= A | B |... | P | Q |... | ⊥ | ⊤ ::= | ¬ | ⊓ | ∀ R.C | ∃ R. ⊤ ALU ⊔ ALE ∃ R.C ALN ≥nR | ≤nR ALC ¬ FL- is AL with the elimination of ⊤, ⊥ and  FL0 is FL- with the elimination of ∃ R. ⊤ SYNTAX :: SEMANTICS :: TBOX REASONING :: ABOX REASONING :: TABLEAU CALCULUS

DL family of languages  Examples of formulas in each of the languages: 3 Formula ALALUALEALNALC AA  A⊔BA⊔B  ∃ R.C  ≥2R   (A ⊓ B) A⊔BA⊔B  SYNTAX :: SEMANTICS :: TBOX REASONING :: ABOX REASONING :: TABLEAU CALCULUS

Formalization of a semantic network 4 instance-of Person ⊑ ∃ Drives.Car Person ⊑ ∃ HasHobby.SportCar Person ⊑ ∃ HasHobby.Opera Student ⊑ Person SportCar ⊑ Car Student(Ralf) Opera(DonCarlos) SYNTAX :: SEMANTICS :: TBOX REASONING :: ABOX REASONING :: TABLEAU CALCULUS

Modeling a problem 5 Doctor ⊑  cure.Patient ⊓  work.Computer Doctor (Peter) Patient (Smith) cure(Peter, Smith) SYNTAX :: SEMANTICS :: TBOX REASONING :: ABOX REASONING :: TABLEAU CALCULUS Formalize the following problem in DL:  In a hospital patients, doctors and computers are equipped with proximity sensors able top detect whether doctors curated a patient or worked at their computer. The system detected that doctor Peter curated the patient Smith.

Venn diagrams  Provide the Venn diagram for: A ⊑ B ⊓ ¬C 6 B A C SYNTAX :: SEMANTICS :: TBOX REASONING :: ABOX REASONING :: TABLEAU CALCULUS

Proofs in DL semantics  Verify the following equivalences hold for all interpretations (∆,I). Use definitions or Venn diagrams. 1. I(¬(C ⊓ D)) = I(¬C ⊔ ¬D) 2. I(¬(C ⊔ D)) = I(¬C ⊓ ¬D) 3. I(¬ ∀ R.C) = I( ∃ R.¬C) 4. I(¬ ∃ R.C) = I( ∀ R.¬C) Let us prove the last one: I(¬ ∃ R.C)= {a ∈ ∆ | not exists b s.t. (a,b) ∈ I(R), b ∈ I(C)} = {a ∈ ∆ | not ∃ b. R(a,b) and C(b)} = {a ∈ ∆ | ∀ b. not (R(a,b) and C(b))} = {a ∈ ∆ | ∀ b. if R(a,b) then ¬C(b)} = I( ∀ R.¬C) 7 SYNTAX :: SEMANTICS :: TBOX REASONING :: ABOX REASONING :: TABLEAU CALCULUS

Using DPLL for reasoning tasks  DPLL solves the CNFSAT-problem by searching a truth-assignment that satisfies all clauses θ i in the input proposition P = θ 1  …  θ n  DL sentences must to be translated in PL (via TBox and ABox elimination)  Model checkingDoes ν satisfy P? ( ν ⊨ P?) Check if ν (P) = true  Satisfiability Is there any ν such that ν ⊨ P? Check that DPLL(P) succeeds and returns a ν  UnsatisfiabilityIs it true that there are no ν satisfying P? Check that DPLL(P) fails  Validity Is P a tautology? (true for all ν ) Check that DPLL(  P) fails 8 SYNTAX :: SEMANTICS :: TBOX REASONING :: ABOX REASONING :: TABLEAU CALCULUS

Modeling the problem  Codify in DL the following problem: “A federal agent can access top secret documents. An X file is a top secret document with no restricted access that can be read by policemen.” FederalAgent ⊑ ∃ Access.TopSecretDocument XFile ⊑ TopSecretDocument ⊓  Restricted ⊓ ∀ Read -1.Policeman 9 SYNTAX :: SEMANTICS :: TBOX REASONING :: ABOX REASONING :: TABLEAU CALCULUS

Satisfiability of a TBox (a set of formulas)  Say if the following TBox is satisfiable and provide a model in the case: FederalAgent ⊑ ∃ Access.TopSecretDocument XFile ⊑ TopSecretDocument ⊓  Restricted ⊓ ∀ Read -1.Policeman I(FederalAgent) = {A}We have that I ⊨ T I(TopSecretDocument) = {D1, D2} I(Access) = {(A, D1), (A, D2)} I(XFile) = {D1} I(Restricted) = {D2} I(Read) = {(B, D1)} I(Policeman) = {B}  Otherwise you can either draw a Venn diagram or apply the tableaux calculus and provide the ABox built 10 SYNTAX :: SEMANTICS :: TBOX REASONING :: ABOX REASONING :: TABLEAU CALCULUS

Satisfiability w.r.t. a TBox  Consider the TBox T: FederalAgent ⊑ ∃ Access.TopSecretDocument XFile ⊑ TopSecretDocument ⊓  Restricted ⊓ ∀ Read -1.Policeman and the formula P: TopSecretDocument ⊓ Restricted does T ⊨ P ?  Yes, if fact these is an interpretation I (e.g. the one of the previous exercise) such that I ⊨ T and I ⊨ P I(TopSecretDocument) = {D1, D2} I(Restricted) = {D1}  Notice that T does not affect P at all (i.e. we cannot further expand P w.r.t. T) 11 SYNTAX :: SEMANTICS :: TBOX REASONING :: ABOX REASONING :: TABLEAU CALCULUS

Subsumption  Consider the TBox T: FederalAgent ⊑ ∃ Access.TopSecretDocument XFile ⊑ TopSecretDocument ⊓  Restricted ⊓ ∀ Read -1.Policeman does T ⊨ TopSecretDocument ⊑ Restricted in all models? By definition, it must be I(TopSecretDocument )  I(Restricted ) for every model I of T. Even if this is true for the I of the previous exercise, this is not true in general. It is enough to provide a counterexample: 12 SYNTAX :: SEMANTICS :: TBOX REASONING :: ABOX REASONING :: TABLEAU CALCULUS I(FederalAgent) = {A} I(TopSecretDocument) = {D2} I(Access) = {(A, D1), (A, D2)} I(XFile) = {D2} I(Restricted) = {D1} I(Read) = {(B, D2)} I(Policeman) = {B}

Reduce to PL reasoning Consider the TBox T = {A ⊑ B ⊔ C, C ⊑ D ⊓ E}. Determine if A ⊑ E by elimination of T. T’ = {C ≡ (B ⊔ C) ⊓ X, C ≡ D ⊓ E ⊓ Y } A’ = (B ⊔ (D ⊓ E ⊓ Y )) ⊓ X E’ = E A’ = (B  (D  E  Y ))  X E’ = E P = CNF(B  (D  E  Y ))  X → E) Call DPLL(P) 13 The steps: T’ = Normalize(T); A’ = Expand(A, T’); E’ = Expand(E, T’); A’ = RewriteInPL(A’); E’ = RewriteInPL(E’); return DPLL(CNF(A’ → E’)); SYNTAX :: SEMANTICS :: TBOX REASONING :: ABOX REASONING :: TABLEAU CALCULUS

Expansion of an ABox  Provide the expansion of A w.r.t. T (without normalization), where: TBox T = {Student ⊑ Faculty, Professor ⊑ Faculty ⊓ Teach} ABox A = {Professor(Bob), Faculty(Rui)} Professor(Bob), Faculty(Bob), Teach(Bob) Faculty(Rui) 14 SYNTAX :: SEMANTICS :: TBOX REASONING :: ABOX REASONING :: TABLEAU CALCULUS

ABox Reasoning services: Consistency  An ABox A is consistent with respect to a TBox T if there is an interpretation I which is a model of both A and T. T = {Parent ⊑≤1 hasChild} A = {hasChild(mary, bob), hasChild(mary, cate), Parent(mary)} A is consistent ALONE but is not consistent with respect T. In fact, from A mary has two children while T imposes maximum one 15 SYNTAX :: SEMANTICS :: TBOX REASONING :: ABOX REASONING :: TABLEAU CALCULUS

Drawing consequences (I) Given the TBox and ABox below  T:  Female ⊑ Human  Male ⊑ Human  Mother ⊑ Female  Father ⊑ Male  Child ≡∃ has.Mother ⊓ ∃ has.Father  Male ⊓ Female ⊑⊥ 16 Prove: 1.Human(Anna) 2.¬ Female(Bob) 3.Child(Cate)  A:  Mother(Anna)  Father(Bob)  has(Cate,Anna)  has(Cate,Bob) SYNTAX :: SEMANTICS :: TBOX REASONING :: ABOX REASONING :: TABLEAU CALCULUS

Drawing consequences (II) 17 Expand A w.r.t. T:  A:  Mother(Anna)  Female(Anna)  Human(Anna)  Father(Bob)  Male(Bob)  Human(Bob), ¬Female(Bob)  has(Cate,Anna)  Child(Cate)  has(Cate,Bob)  Child(Cate) SYNTAX :: SEMANTICS :: TBOX REASONING :: ABOX REASONING :: TABLEAU CALCULUS

Reasoning using Tableau calculus (a)  Given the ABox A = {hasParent(Speedy, Furia)}, prove with Tableau algorithm the satisfiability of the following formula: ∃ Parent.Horse ⊓  (Horse ⊓ Mule) Both ∃ Parent.Horse and  (Horse ⊓ Mule) have to be satisfied ⊓ -rule (i) ∃ hasParent.Horse  A’’ = A’ ∪ {Horse(Furia)} ∃ -rule (ii)  (Horse ⊓ Mule)   Horse ⊔  Mule  It is not consistent for A’ = A ∪ {  Horse(Furia)} ⊔ -rule (backtracking) It is consistent for A’ = A ∪ {  Mule(Furia)} ⊔ -rule 18 SYNTAX :: SEMANTICS :: TBOX REASONING :: ABOX REASONING :: TABLEAU CALCULUS

Reasoning using Tableau calculus (b)  Using the tableau calculus, say whether the formula ( ∀ R.A ⊓ ∃ R.¬A) ⊔ ∀ R.(A ⊓ B) is satisfiable given the TBox T = {A ⊑  B}. Motivate your response with a proof. By ⊔ -rule we split into (i) ( ∀ R.A ⊓ ∃ R.¬A) (x) and (ii) ∀ R.(A ⊓ B) (x). We need one of the two to be satisfiable. (i) By ⊓ -rule we put into the ABox both ∀ R.A (x) and ∃ R.¬A (x) (i.1) For ∀ R.A (x), by ∀ -rule we add into the ABox both R(x, y) and A(y) (i.2) For ∃ R.¬A (x), by ∃ -rule we add into the ABox both R(x, y) and ¬A(y) i.1. and i.2 clearly contradict each other (backtracking) (ii) It is clearly in contradiction with the axiom in T. In fact A and B are disjoint Since none of the two is satisfiable, then the formula is NOT satisfiable. 19 SYNTAX :: SEMANTICS :: TBOX REASONING :: ABOX REASONING :: TABLEAU CALCULUS