LDK R Logics for Data and Knowledge Representation ClassL (part 2): Reasoning with a TBox 1.

Slides:



Advertisements
Similar presentations
CS848: Topics in Databases: Foundations of Query Optimization Topics covered  Introduction to description logic: Single column QL  The ALC family of.
Advertisements

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.
Propositional and First Order Reasoning. Terminology Propositional variable: boolean variable (p) Literal: propositional variable or its negation p 
Logic Concepts Lecture Module 11.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
LDK R Logics for Data and Knowledge Representation Modal Logic Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia,
1 Conditional XPath, the first order complete XPath dialect Maarten Marx Presented by: Einav Bar-Ner.
Tableau Algorithm.
Intro. to Logic CS402 Fall Propositional Calculus - Semantics (2/3) Propositional Calculus - Semantics (2/3) Moonzoo Kim CS Division of EECS Dept.
Notes on DL Reasoning Shawn Bowers April, 2004.
LDK R Logics for Data and Knowledge Representation ClassL (part 3): Reasoning with an ABox 1.
CS 103 Discrete Structures Lecture 10 Basic Structures: Sets (1)
Topics in artificial intelligence 1/1 Dr hab. inż. Joanna Józefowska, prof. PP Reasoning and search techniques.
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 PL of Classes.
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.
CompSci 102 Discrete Math for Computer Science
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.
Knowledge Representation in Description Logic. 1. Introduction Description logic denotes a family of knowledge representation formalisms that model the.
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
DL Overview Second Pass Ming Fang 06/19/2009. Outlines  Description Languages  Knowledge Representation in DL  Logical Inference in DL.
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.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
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
LDK R Logics for Data and Knowledge Representation Propositional Logic Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia,
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.
CSE-291: Ontologies in Data Integration Department of Computer Science & Engineering University of California, San Diego CSE-291: Ontologies in Data Integration.
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.
1 Section 7.1 First-Order Predicate Calculus Predicate calculus studies the internal structure of sentences where subjects are applied to predicates existentially.
Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
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.
CENG 424-Logic for CS Introduction Based on the Lecture Notes of Konstantin Korovin, Valentin Goranko, Russel and Norvig, and Michael Genesereth.
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
Back to “Serious” Topics…
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
Presentation transcript:

LDK R Logics for Data and Knowledge Representation ClassL (part 2): Reasoning with a TBox 1

Outline  Terminology (TBox)  Normalization of a TBox  Reasoning with the TBox  Some definitions  Primitive and defined concepts  Use and directly use  Cyclic and acyclic terminologies  Expansion of a TBox  Eliminating the TBox: Reducing to DPLL reasoning 2

Terminological axioms  Two new logical symbols ⊑ (subsumption), with σ ⊨ C ⊑ D iff σ (C) ⊆ σ (D) ≡ (equivalence), with σ ⊨ C ≡ D iff σ (C) = σ (D) Inclusion axioms C ⊑ D has to be read “C is subsumed by (more specific than / less general than) D” Equality axioms C ≡ D has to be read “C is equivalent to D” NOTE: C ≡ D holds iff both C ⊑ D and D ⊑ C hold NOTE: ⊑ and ≡ in CLassL are the alter ego of the → and ↔ in PL NOTE: if C ⊑ D, we can use the symbol ⊒ to say that D ⊒ C to be read “D subsumes (less specific than / more general than) C” 3 TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX

Semantics: Venn diagrams to represent axioms  σ (A ⊑ B)  σ (A ≡ B) 4 B A BA TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX

Examples of terminological axioms  Inclusion Axioms (inclusions) Master ⊑ Student Woman ⊑ Person Woman ⊔ Father ⊑ Person  Equality Axioms (equalities) Student ≡ Pupil Parent ≡ Mother ⊔ Father Woman ≡ Person ⊓ Female 5 TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX

Definitions and specializations  A definition is an equality with an atomic concept on the left hand  A specialization is an inclusion with an atomic concept on the left hand 6 Bachelor ≡ Student ⊓ Undergraduate Woman ≡ Person ⊓ Female Parent ≡ Mother ⊔ Father Student ⊑ Person ⊓ Study PhD ⊑ Student ⊓ Lecturer TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX

Terminology (TBox)  A terminology (or TBox) is a set of definitions and specializations  Terminological axioms express constraints on the concepts of the language, i.e. they limit the possible models  The TBox is the set of all the constraints on the possible models 7 Woman ≡ Person ⊓ Female Man ≡ Person ⊓ ¬Woman Student ⊑ Person ⊓ Study Bachelor ≡ Student ⊓ Undergraduate PhD ⊑ Student ⊓ Lecturer TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX

Normalization of a TBox  It is always possible to transform a specialization into a definition by introducing an auxiliary symbol as follows:  If from a TBox we transform all specializations into definitions we say we have normalized the TBox  A TBox with definitions only is called a regular terminology 8 Woman ⊑ Person (the specialization) Woman ≡ Person ⊓ Female (the normalized specialization) TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX

Reasoning with a TBox T  Given two class-propositions P and Q, we want to reason about the following relations between them:  Satisfiability w.r.t. T T ⊨ P ?  Subsumption T ⊨ P ⊑ Q? T ⊨ Q ⊑ P?  Equivalence T ⊨ P ⊑ Q and T ⊨ Q ⊑ P?  Disjointness T ⊨ P ⊓ Q ⊑ ⊥ ? 9 TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX

Satisfiability with respect to a TBox T  A concept P is satisfiable w.r.t. a terminology T, if there exists (or for all) an interpretation I with I ⊨ θ for all θ ∈ T, and such that I ⊨ P, namely I(P) is not empty  In this case we also say that I is a model for P  In other words, the interpretation I not only satisfies P, but also complies with all the constraints in T NOTE: Instead of σ in DL literature the symbol I (interpretation) is preferred. Therefore, from now on we use it instead of σ. 10 TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX

Satisfiability with respect to a TBox T  Suppose we describe the students/listeners in a course:  The TBox is satisfiable. A possible model is: 11 Undergraduate ⊑  Teach Bachelor ≡ Student ⊓ Undergraduate Master ≡ Student ⊓  Undergraduate PhD ≡ Master ⊓ Research Assistant ≡ PhD ⊓ Teach TBox T StudentUndergraduate Bachelor Master Research PhD Teach Assistant In this model the two concepts Bachelor and Assistant are satisfiable w.r.t. T, while the concept Assistant ⊓ Bachelor is not. TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX

TBox reasoning: subsumption  Let T be a TBox. Subsumption (with respect to T): T ⊨ P ⊑ Q (P ⊑ T Q) A concept P is subsumed by a concept Q with respect to T if I(P)  I(Q) for every model I of T NOTE: subsumption is a property of all models. Used to implement entailment and validity (when T empty) 12 TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX

Subsumption with respect to a TBox T (1)  Suppose we describe the students/listeners in a course:  T ⊨ PhD ⊑ Student 13 Undergraduate ⊑  Teach Bachelor ≡ Student ⊓ Undergraduate Master ≡ Student ⊓  Undergraduate PhD ≡ Master ⊓ Research Assistant ≡ PhD ⊓ Teach TBox T StudentUndergraduate Bachelor Master Research PhD Teach Assistant TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX

Subsumption with respect to a TBox T (2) PhD ⊑ Student Proof: PhD ≡ Master ⊓ Research ≡ ( Student ⊓  Undergraduate) ⊓ Research ⊑ Student 14 TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX

TBox reasoning: equivalence  Let T be a TBox. Equivalence (with respect to T): (T ⊨ P ≡ Q) (P ≡ T Q) Two concepts P and Q are equivalent with respect to T if I(P) = I(Q) for every model I of T. NOTE: equivalence is a property of all models. 15 TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX

Equivalence with respect to a TBox T (1)  Suppose we describe the students/listeners in a course:  T ⊨ Student  Bachelor ⊔ Master 16 Undergraduate ⊑  Teach Bachelor ≡ Student ⊓ Undergraduate Master ≡ Student ⊓  Undergraduate PhD ≡ Master ⊓ Research Assistant ≡ PhD ⊓ Teach TBox T StudentUndergraduate Bachelor Master Research PhD Teach Assistant TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX

Equivalence with respect to a TBox T (2) Student ≡ Bachelor ⊔ Master Proof: Bachelor ⊔ Master ≡ (Student ⊓ Undergraduate) ⊔ Master ≡ (Student ⊓ Undergraduate) ⊔ (Student ⊓  Undergraduate) ≡ Student ⊓ (Undergraduate ⊔  Undergraduate) ≡ Student ⊓⊤ ≡ Student 17 TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX

TBox reasoning: disjointness  Let T be a TBox. Disjointness (with respect to T): T ⊨ P ⊓ Q ⊑ ⊥ (P ⊓ Q ⊑ T ⊥ ) Two concepts P and Q are disjoint with respect to T if their intersection is empty, I(P)  I(Q) = ∅, for every model I of T. NOTE: disjointness is a property of all models 18 TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX

Disjointness with respect to a TBox T (1)  Suppose we describe the students/listeners in a course:  T ⊨ Undergraduate ⊓ Assistant ⊑ ⊥ 19 Undergraduate ⊑  Teach Bachelor ≡ Student ⊓ Undergraduate Master ≡ Student ⊓  Undergraduate PhD ≡ Master ⊓ Research Assistant ≡ PhD ⊓ Teach TBox T StudentUndergraduate Bachelor Master Research PhD Teach Assistant TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX

Disjointness with respect to a TBox T (2)  It can be proved showing that: T ⊨ Undergraduate ⊓ Assistant ⊑ ⊥ Proof: Undergraduate ⊓ Assistant ⊑  Teach ⊓ Assistant ≡  Teach ⊓ PhD ⊓ Teach ≡ ⊥ ⊓ PhD ≡ ⊥ 20 TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX

Exercise 21 Suppose we describe the students/attendees in a course:  Is Bachelor ⊓ PhD satisfiable? NO!  Consider the following propositions: Assistant, Student, Bachelor, Teach, PhD, Master ⊓ Teach 1. Which pairs are subsumed/supersumed? 2. Which pairs are disjoint? Undergraduate ⊑  Teach Bachelor ≡ Student ⊓ Undergraduate Master ≡ Student ⊓  Undergraduate PhD ≡ Master ⊓ Research Assistant ≡ PhD ⊓ Teach TBox T TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX

TBox: primitive and defined concepts  In a TBox there are two kinds of concepts (symbols):  Primitive concepts (or base symbols), which occur only on the right hand of axioms  Defined concepts (or name symbols) which occur on the left hand of axioms 22 A ⊑ B ⊓ (C ⊔ D) B, C and D are primitive concepts. A is a defined concept Undergraduate ⊑  Teach Bachelor ≡ Student ⊓ Undergraduate Master ≡ Student ⊓  Undergraduate PhD ≡ Master ⊓ Research Assistant ≡ PhD ⊓ Teach Teach, Student and Research are primitive concepts. Undergraduate, Bachelor, Master, PhD and Assistant are defined. TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX

Use and direct use Let A and B be atomic concepts in a terminology T.  We say that A directly uses B in T if B appears in the right hand of the defintion of A.  We say that A uses B in T if B appears in the right hand after the definition of A has been “unfolded” so that there are only primitive concepts in the left hand side of the definition of A 23 A ⊑ B ⊓ (C ⊔ D) A directly uses B, C, D A ⊑ B ⊓ (C ⊔ D)---> A ⊑ (C ⊔ E) ⊓ (C ⊔ D) B ⊑ C ⊔ E A directly uses B; A uses E (because B is defined in terms of E) TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX

Cyclic and acyclic terminologies  A terminology T contains a cycle (is cyclic) if it contains a concept which uses itself.  A terminilogy is acyclic otherwise 24 Parent ≡ Father ⊔ Mother Father ⊑ Male Mother ⊑ Female Male ≡ Person ⊓  Female Is acyclic Father ≡ Male ⊓ hasChild hasChild ≡ Father ⊔ Mother Is cyclic TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX

Expansion and equivalent terminologies  The expansion T’ of an acyclic terminology T is a terminology obtained from T by unfolding all definitions until all concepts occurring on the right hand side of definitions are primitive  T and T’ are equivalent when they have the same expansion.  Reasoning with T’ will yield the same results as reasoning with T.  If T’ is the expansion of T then they are equivalent. NOTE: it is possible to expand also a cyclic TBox. In some cases some models exist even if the TBox is cyclic. These models are called fixpoints and there are some methods to find them and break the recursion (we will not see them). 25 TT’ A ⊑ B ⊓ (C ⊔ D)A ⊑ (C ⊔ E) ⊓ (C ⊔ D) B ⊑ (C ⊔ E)B ⊑ (C ⊔ E) TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX

Expansion requires normalization  To expand a terminology we should first normalize it. Otherwise, if we use a specialization to expand a definition, the definition reduces to a specialization  From now on we deal with regular terminologies only (see next slide for the regular version of the terminology T above) 26 T Parent ≡ Father ⊔ Mother Father ⊑ Male Mother ⊑ Female Male ≡ Person ⊓  Female T’ Parent ⊑ (Person ⊓  Female) ⊔ Female Father ⊑ Person ⊓  Female Mother ⊑ Female Male ≡ Person ⊓  Female TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX

Concept expansion  For each concept C we define the expansion of C with respect to T as the concept C’ that is obtained from C by replacing each occurrence of a name symbol A in C by the concept D, where A ≡ D is the definition of A in T’, the expansion of T 27 T Parent ≡ Mother ⊔ Father Father ≡ Male ⊓ hasChild Mother ≡ Female ⊓ hasChild Male ≡ Person ⊓  Female The expansion of Parent w.r.t. T is: (Female ⊓ hasChild) ⊔ (Person ⊓  Female ⊓ hasChild) TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX

Eliminating the TBox using expansion Assume C’ expansion of C w.r.t. T. For all σ satisfying all the axioms in T we have:  T ⊨ C iff σ ⊨ C’ (Satisfiability)  T ⊨ C ⊑ D iff σ ⊨ C’ ⊑ D’ (Subsumption, Equivalence)  T ⊨ C ⊓ D ⊑ ⊥ iff σ ⊨ C’ ⊓ D’ ⊑ ⊥ (Disjointness) 28 T Person≡ Male ⊓ Female Male≡ Person ⊓  Female Is Person satisfiable? NO! The expansion of Person w.r.t. T is: (Person ⊓  Female) ⊓ Female which is equivalent to ⊥ and therefore unsatisfiable TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX

Expansion, final considerations  As we are going to see, expanding a TBox is an important step to reason on it.  The expansion of T to T’ or C to C’ can be costly: In the worst case T’ is exponential in the size of T, and this propagates to single concepts. 29 TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX

Reduction to subsumption and unsatisfiability  Reduction to subsumption. Given two concepts C and D,  C is unsatisfiable ⇔ C ⊑ ⊥  C ≡ D ⇔ C ⊑ D and D ⊑ C  C ⊥ D ⇔ C ⊓ D ⊑ ⊥  Reduction to unsatisfiability. Given two concepts C and D,  C ⊑ D ⇔ C ⊓  D is unsatisfiable  C ≡ D ⇔ both (C ⊓  D) and (  C ⊓ D) are unsatisfiable  C ⊥ D ⇔ C ⊓ D is unsatisfiable 30 TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX

PL and ClassL: table of the symbols PLClassL Syntax ∧⊓ ∨⊔  ⊤⊤ ⊥⊥ →⊑ ↔≡ P, Q... Semantics∆={true, false} ∆={o, …} (compare models) 31  RECALL: A proposition P is true iff it is satisfiable TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX

PL and ClassL are notational variants  Theorem: P is satisfiable w.r.t. an intensional interpretation ν if and only if P is satifisfiable w.r.t. an extensional interpretation σ (already seen in ClassL without the TBox) 32 INTRODUCTION :: SYNTAX :: SEMANTICS :: PL AND CLASSL :: CLASSL REASONINGTBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX

Eliminating the TBox: the algorithm  With acyclic TBoxes T it is always possible to reduce reasoning problems w.r.t. T to problems without T. See for instance the algorithm for subsumption (all the others can be reduced to it).  Input: a TBox T, the two concepts C and D  Output: true if C ⊑ D holds or false otherwise boolean function IsSubsumedBy(T, C, D) { T’ = Normalize(T); C’ = Expand(C, T’); D’ = Expand(D, T’); C’ = RewriteInPL(C’); D’ = RewriteInPL(D’); return DPLL(C’ → D’); } 33 Normalization Expansion, TBox elimination DPLL Reasoning TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX Conversion in PL