Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "LDK R Logics for Data and Knowledge Representation ClassL (part 2): Reasoning with a TBox 1."— Presentation transcript:

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

2 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

3 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

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

5 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

6 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

7 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

8 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

9 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

10 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

11 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

12 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

13 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

14 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

15 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

16 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

17 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

18 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

19 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

20 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

21 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

22 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

23 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

24 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

25 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

26 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

27 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

28 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

29 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

30 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

31 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

32 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

33 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


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

Similar presentations


Ads by Google