Logics for Data and Knowledge Representation

Slides:



Advertisements
Similar presentations
LDK R Logics for Data and Knowledge Representation Exercises: First Order Logics (FOL) Originally by Alessandro Agostini and Fausto Giunchiglia Modified.
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.
LDK R Logics for Data and Knowledge Representation Modal Logic Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia,
Logics for Data and Knowledge Representation Modeling Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia, Rui Zhang.
LDK R Logics for Data and Knowledge Representation Description Logics as query language.
LDK R Logics for Data and Knowledge Representation Exercise 1: Model and Language.
LDK R Logics for Data and Knowledge Representation Context Logic Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia,
LDK R Logics for Data and Knowledge Representation Exercise 2: PL, ClassL, Ground ClassL.
LDK R Logics for Data and Knowledge Representation Modeling First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia.
LDK R Logics for Data and Knowledge Representation Exercise 3: DLs.
Logics for Data and Knowledge Representation Exercises: Modeling Fausto Giunchiglia, Rui Zhang and Vincenzo Maltese.
LDK R Logics for Data and Knowledge Representation Context Logic Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia,
LDK R Logics for Data and Knowledge Representation ClassL (part 3): Reasoning with an ABox 1.
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 Languages for Data Representation First version by Alessandro Agostini and Fausto Giunchiglia Second version.
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)
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.
LDK R Logics for Data and Knowledge Representation Query languages Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia,
Logics for Data and Knowledge Representation
LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1.
LDK R Logics for Data and Knowledge Representation First Order Logics (FOL) Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto.
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.
LDK R Logics for Data and Knowledge Representation Context Logic Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia,
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.
Logics for Data and Knowledge Representation Exercises: DL.
LDK R Logics for Data and Knowledge Representation Description Logics: family of languages.
LDK R Logics for Data and Knowledge Representation Modal Logic: exercises Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia,
LDK R Logics for Data and Knowledge Representation Modal Logic: exercises Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia,
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
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Exercises: First Order Logics (FOL)
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
Propositional Logic: exercises
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
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: ClassL Fausto Giunchiglia, Rui Zhang and Vincenzo Maltese

Outline Syntax Reasoning with a TBox Reasoning with an ABox Symbols and formation rules Reasoning with a TBox Reasoning with an ABox 2

SYNTAX :: REASONING WIN A TBOX :: REASONING WITH AN ABOX Symbols in ClassL SYNTAX :: REASONING WIN A TBOX :: REASONING WITH AN ABOX Which of the following symbols are used in ClassL? ⊓  ⊤ ∨ ≡ ⊔ ⊑ → ↔ ⊥ ∧ ⊨ Which of the following symbols are in well formed formulas? 3

Symbols in ClassL (solution) SYNTAX :: REASONING WIN A TBOX :: REASONING WITH AN ABOX Which of the following symbols are used in ClassL? ⊓  ⊤ ∨ ≡ ⊔ ⊑ → ↔ ⊥ ∧ ⊨ Which of the following symbols are in well formed formulas? Remember the BNF grammar: <Atomic Formula> ::= A | B | ... | P | Q | ... | ⊥ | ⊤ <wff> ::= <Atomic Formula> | ¬<wff> | <wff> ⊓ <wff> | <wff> ⊔ <wff> | <Atomic Formula> ⊑ <wff> | <Atomic Formula> ≡ <wff> 4

SYNTAX :: REASONING WIN A TBOX :: REASONING WITH AN ABOX Formation rules SYNTAX :: REASONING WIN A TBOX :: REASONING WITH AN ABOX Which of the following is not a wff in ClassL?  MonkeyLow ⊔ BananaHigh   MonkeyLow ⊓ BananaHigh ⊑  GetBanana MonkeyLow  ⊓ BananaHigh MonkeyLow   GetBanana NUM 2, 3, 4 ! 5

SYNTAX :: REASONING WIN A TBOX :: REASONING WITH AN ABOX Satisfiability SYNTAX :: REASONING WIN A TBOX :: REASONING WITH AN ABOX Given the TBox T={A⊑B, B⊑A}, is (A⊓B) satisfiable in ClassL? RECALL: to prove satisfiability it is enough to find one model. We can use Venn Diagrams. A B In alternative, this can be proved with entailment + DPLL: P: A⊑B Q: B⊑A S: (A⊓B) {P, Q} ⊨ S DPLL(RewriteInPL(P)  RewriteInPL(Q)  RewriteInPL(T)) DPLL(((A B)  (B A))  (A  B)) 6

SYNTAX :: REASONING WIN A TBOX :: REASONING WITH AN ABOX ClassL Exercises 2 SYNTAX :: REASONING WIN A TBOX :: REASONING WITH AN ABOX Given the TBox T={C⊑A, C⊑B} is (A⊓B) satisfiable in ClassL? A B C 7

Proprieties of the ∧ and ⊓ (I) SYNTAX :: REASONING WIN A TBOX :: REASONING WITH AN ABOX Suppose that A and B are satisfiable. Is A ∧ B always satisfiable in PL? We can easily observe that the fact that A and B are satisfiable does not necessarily imply that A ∧ B is also satisfiable. Think for instance to the case B =  A. A B A∧B T F MODEL for A MODEL for B MODEL for A MODEL for B 8

Proprieties of the ∧ and ⊓ (II) SYNTAX :: REASONING WIN A TBOX :: REASONING WITH AN ABOX Suppose that A and B are satisfiable. Is A ⊓ B always satisfiable in ClassL? We can easily observe that the fact that A and B are satisfiable does not imply that A ⊓ B is also satisfiable. Think to the case in which their extensions are disjoint. A A B B A B 9

Satisfiability with respect to a TBox T SYNTAX :: REASONING WIN A TBOX :: REASONING WITH AN ABOX RECALL: A concept P is satisfiable w.r.t. a terminology T, if there exists an interpretation I with I ⊨ θ for all θ ∈ T, and such that I ⊨ P, namely I(P) is not empty ADD EXAMPLE 10

Satisfiability with respect to a TBox T SYNTAX :: REASONING WIN A TBOX :: REASONING WITH AN ABOX Suppose we model the Monkey-Banana problem as follows: “If the monkey is low in position then it cannot get the banana. If the monkey gets the banana it survives”. TBox T MonkeyLow ⊑  GetBanana GetBanana ⊑ Survive Is T satisfiable? YES! Look at the Venn diagram Survive GetBanana MonkeyLow 11

Satisfiability with respect to a TBox T SYNTAX :: REASONING WIN A TBOX :: REASONING WITH AN ABOX Suppose we model the Monkey-Banana problem as follows: TBox T MonkeyLow ⊑  GetBanana GetBanana ⊑ Survive Is it possible for a monkey to survive even if it does not get the banana? We can restate the problem as follow: does T ⊨  GetBanana ⊓ Survive ? YES! Look at the Venn diagram Survive GetBanana MonkeyLow 12

Normalization of a TBox SYNTAX :: REASONING WIN A TBOX :: REASONING WITH AN ABOX Normalize the TBox below: MonkeyLow ⊑  GetBanana GetBanana ≡ Survive Possible solution: MonkeyLow ≡  GetBanana ⊓  ClimbBox Note that, with this theory, the monkey necessarily needs to get the banana to survive. 13

SYNTAX :: REASONING WIN A TBOX :: REASONING WITH AN ABOX Expansion of a TBox SYNTAX :: REASONING WIN A TBOX :: REASONING WITH AN ABOX Expand the TBox below: MonkeyLow ≡  GetBanana ⊓  ClimbBox GetBanana ≡ Survive T’, expansion of T (The Venn diagram gives a possible model): MonkeyLow ≡  Survive ⊓  ClimbBox Survive GetBanana MonkeyLow ClimbBox Notice that the fact that a monkey climbs the box does not necessarily mean that it survives. 14

SYNTAX :: REASONING WIN A TBOX :: REASONING WITH AN ABOX ABox: Consistency SYNTAX :: REASONING WIN A TBOX :: REASONING WITH AN ABOX Check the consistency of A w.r.t. T via expansion. T MonkeyLow ≡  GetBanana ⊓  ClimbBox GetBanana ≡ Survive A MonkeyLow(Cita) Survive(Cita) Expansion of A is consistent: MonkeyLow(Cita)  GetBanana(Cita) ClimbBox(Cita)  Survive(Cita) 15

ABox: Instance checking SYNTAX :: REASONING WIN A TBOX :: REASONING WITH AN ABOX Given T and A below Is Cita an instance of MonkeyLow? YES Is Cita an instance of ClimbBox? NO Is Cita an instance of GetBanana? T MonkeyLow ≡  GetBanana ⊓  ClimbBox GetBanana ≡ Survive A MonkeyLow(Cita) Survive(Cita) Expansion of A MonkeyLow(Cita)  GetBanana(Cita) ClimbBox(Cita)  Survive(Cita) GetBanana(Cita) 16

Instance Retrieval. Consider the following expansion… SYNTAX :: REASONING WIN A TBOX :: REASONING WITH AN ABOX T Undergraduate ⊑  Teach Bachelor ≡ Student ⊓ Undergraduate Master ≡ Student ⊓  Undergraduate PhD ≡ Master ⊓ Research Assistant ≡ PhD ⊓ Teach A Master(Chen) PhD(Enzo) Assistant(Rui) The expansion of A Master(Chen) Student(Chen) Undergraduate(Chen) PhD(Enzo) Master(Enzo) Research(Enzo) Student(Enzo) Undergraduate(Enzo) Assistant(Rui) PhD(Rui) Teach(Rui) Master(Rui) Research(Rui) Student(Rui) Undergraduate(Rui) 17

Instance Retrieval. … find the instances of Master SYNTAX :: REASONING WIN A TBOX :: REASONING WITH AN ABOX T Undergraduate ⊑  Teach Bachelor ≡ Student ⊓ Undergraduate Master ≡ Student ⊓  Undergraduate PhD ≡ Master ⊓ Research Assistant ≡ PhD ⊓ Teach A Master(Chen) PhD(Enzo) Assistant(Rui) The expansion of A Master(Chen) Student(Chen) Undergraduate(Chen) PhD(Enzo) Master(Enzo) Research(Enzo) Student(Enzo) Undergraduate(Enzo) Assistant(Rui) PhD(Rui) Teach(Rui) Master(Rui) Research(Rui) Student(Rui) Undergraduate(Rui) 18

ABox: Concept realization SYNTAX :: REASONING WIN A TBOX :: REASONING WITH AN ABOX Find the most specific concept C such that A ⊨ C(Cita) Notice that MonkeyLow directly uses GetBanana and ClimbBox, and it uses Survive. The most specific concept is therefore MonkeyLow. T MonkeyLow ≡  GetBanana ⊓  ClimbBox GetBanana ≡ Survive A MonkeyLow(Cita) Survive(Cita) 19

Defining the TBox and ABox: the LDKR Class SYNTAX :: REASONING WIN A TBOX :: REASONING WITH AN ABOX Define a TBox and ABox for the following database: ABox = {Italian(Fausto), Italian(Enzo), Chinese(Rui), Indian(Bisu), BlackHair(Enzo), BlackHair(Rui), BlackHair(Bisu), WhiteHair(Fausto)} TBox = {Italian ⊑ LDKR, Indian ⊑ LDKR, Chinese ⊑ LDKR, BlackHair ⊑ LDKR, WhiteHair ⊑ LDKR} LDKR Name Nationality Hair Fausto Italian White Enzo Black Rui Chinese Bisu Indian NOTE: ClassL is not expressive enough to represent database constrains such as keys involving two fields. 20