Logics for Data and Knowledge Representation

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

LDK R Logics for Data and Knowledge Representation Description Logics: tableaux.
LDK R Logics for Data and Knowledge Representation Description Logics as query language.
Logics for Data and Knowledge Representation Propositional Logic: Reasoning Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto.
Tableau Algorithm.
LDK R Logics for Data and Knowledge Representation ClassL (part 3): Reasoning with an ABox 1.
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.
Semantic web course – Computer Engineering Department – Sharif Univ. of Technology – Fall Description Logics: Logic foundation of Semantic Web Semantic.
Logics for Data and Knowledge Representation Exercises: DL.
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.
DL Overview Second Pass Ming Fang 06/19/2009. Outlines  Description Languages  Knowledge Representation in DL  Logical Inference in DL.
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.
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
Propositional Logic Rather than jumping right into FOL, we begin with propositional logic A logic involves: §Language (with a syntax) §Semantics §Proof.
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
Logics for Data and Knowledge Representation Exercises: DL.
LDK R Logics for Data and Knowledge Representation Description Logics: family of languages.
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.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
Logics for Data and Knowledge Representation
Chapter 7. Propositional and Predicate Logic
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Computer Science cpsc322, Lecture 20
Knowledge Representation and Reasoning
Logics for Data and Knowledge Representation
The Propositional Calculus
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
Back to “Serious” Topics…
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Chapter 7. Propositional and Predicate Logic
Knowledge Representation I (Propositional Logic)
Logics for Data and Knowledge Representation
TRUTH TABLES.
Bottom Up: Soundness and Completeness
Bottom Up: Soundness and Completeness
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Bottom Up: Soundness and Completeness
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 SYNTAX :: SEMANTICS :: TBOX REASONING :: ABOX REASONING :: TABLEAU CALCULUS AL <Atomic> ::= A | B | ... | P | Q | ... | ⊥ | ⊤ <wff> ::= <Atomic> | ¬<Atomic> | <wff> ⊓ <wff> | ∀R.C | ∃R.⊤ ALU <wff> ⊔ <wff> ALE ∃R.C ALN ≥nR | ≤nR ALC ¬ <wff> FL- is AL with the elimination of ⊤, ⊥ and  FL0 is FL- with the elimination of ∃R.⊤

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

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

Modeling a problem Formalize the following problem in DL: 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 to detect whether doctors curated a patient or worked at their computer. The system detected that doctor Peter curated the patient Smith. Doctor ⊑ cure.Patient ⊔ work.Computer cure ⊑ near work ⊑ near Doctor (Peter) Patient (Smith) cure(Peter, Smith)

Venn diagrams Provide the Venn diagram for: A ⊑ B ⊓ ¬C SYNTAX :: SEMANTICS :: TBOX REASONING :: ABOX REASONING :: TABLEAU CALCULUS Provide the Venn diagram for: A ⊑ B ⊓ ¬C Note: Venn Diagrams can be used only for propositional DL B A C

Interpretation of Value Restriction I(∀R.C) = {a ∈ ∆ | for all b, if (a,b)∈I(R) then b∈I(C)} Those a that have only values b in C with role R. b I(C) a if (a,b) ∈I(R) b' b'' if (a,b') ∈I(R) if (a,b'') ∈I(R)

Interpretation of Existential Quantifier I(∃R.C) = {a ∈ ∆ | exists b s.t. (a,b) ∈ I(R), b ∈ I(C)} Those a that have some value b in C with role R. b I(C) a (a,b)∈I(R)

Proofs in DL semantics SYNTAX :: SEMANTICS :: TBOX REASONING :: ABOX REASONING :: TABLEAU CALCULUS Verify the following equivalences hold for all interpretations (∆,I). Use definitions or graphical representation. I(¬(C ⊓ D)) = I(¬C ⊔ ¬D) I(¬(C ⊔ D)) = I(¬C ⊓ ¬D) I(¬∀R.C) = I(∃R.¬C) 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) 9

TBox and ABox reasoning TBox reasoning requires in general the usage of the Tableaux algorithm (subject of the next lecture) Now, we provide a list of cases that can be addressed WITHOUT it 10

Using DPLL for reasoning tasks SYNTAX :: SEMANTICS :: TBOX REASONING :: ABOX REASONING :: TABLEAU CALCULUS DPLL solves the CNFSAT-problem by searching a truth-assignment that satisfies all clauses θi in the input proposition P = θ1  …  θn NOTE: DL sentences must to be translated in PL (via TBox and ABox elimination) and therefore it can only be used for propositional DL. Model checking Does ν satisfy P? (ν ⊨ P?) Check if ν(P) = true Satisfiability Is there any ν such that ν ⊨ P? Check that DPLL(P) succeeds and returns a ν Unsatisfiability Is 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 11

Modeling the problem Codify in DL the following problem: SYNTAX :: SEMANTICS :: TBOX REASONING :: ABOX REASONING :: TABLEAU CALCULUS 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

Satisfiability of a TBox (a set of formulas) SYNTAX :: SEMANTICS :: TBOX REASONING :: ABOX REASONING :: TABLEAU CALCULUS 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 apply the tableaux calculus and provide the ABox built

Satisfiability w.r.t. a TBox SYNTAX :: SEMANTICS :: TBOX REASONING :: ABOX REASONING :: TABLEAU CALCULUS Consider the TBox T: FederalAgent ⊑ ∃Access.TopSecretDocument XFile ⊑ TopSecretDocument ⊓ Restricted ⊓ ∀Read-1.Policeman and the formula P: TopSecretDocument ⊓ Restricted Is there any model such that 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)

I(Access) = {(A, D1), (A, D2)} Subsumption SYNTAX :: SEMANTICS :: TBOX REASONING :: ABOX REASONING :: TABLEAU CALCULUS 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: 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}

Expansion of an ABox SYNTAX :: SEMANTICS :: TBOX REASONING :: ABOX REASONING :: TABLEAU CALCULUS 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)

ABox Reasoning services: Consistency SYNTAX :: SEMANTICS :: TBOX REASONING :: ABOX REASONING :: TABLEAU CALCULUS 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⊑≤1hasChild} 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 17

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

Drawing consequences (II) SYNTAX :: SEMANTICS :: TBOX REASONING :: ABOX REASONING :: TABLEAU CALCULUS 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) 19