1 / 20

Logics for Data and Knowledge Representation

Logics for Data and Knowledge Representation. Exercises: ClassL. Fausto Giunchiglia, Rui Zhang and Vincenzo Maltese. Outline. Syntax Symbols and formation rules Reasoning with a TBox Reasoning with an ABox. 2. Symbols in ClassL. SYNTAX :: REASONING WIN A TBOX :: REASONING WITH AN ABOX.

dewitt
Télécharger la présentation

Logics for Data and Knowledge Representation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Logics for Data and KnowledgeRepresentation Exercises: ClassL Fausto Giunchiglia, Rui Zhang and Vincenzo Maltese

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

  3. 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

  4. 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

  5. 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

  6. Satisfiability A B 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. 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

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

  8. 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. MODEL for A MODEL for B MODEL for A MODEL for B 8

  9. 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

  10. 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 interpretationI with I⊨θ for all θ∈T, and such that I⊨P, namely I(P) is not empty 10

  11. Satisfiability with respect to a TBox T 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? Survive GetBanana MonkeyLow SYNTAX :: REASONING WIN A TBOX :: REASONING WITH AN ABOX YES! Look at the Venn diagram 11

  12. Satisfiability with respect to a TBox T 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 ? Survive GetBanana MonkeyLow SYNTAX :: REASONING WIN A TBOX :: REASONING WITH AN ABOX YES! Look at the Venn diagram 12

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

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

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

  16. ABox: Instance checking 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? NO SYNTAX :: REASONING WIN A TBOX :: REASONING WITH AN ABOX 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

  17. 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

  18. 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

  19. ABox: Concept realization 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. SYNTAX :: REASONING WIN A TBOX :: REASONING WITH AN ABOX T MonkeyLow ≡  GetBanana ⊓  ClimbBox GetBanana ≡ Survive A MonkeyLow(Cita) Survive(Cita) 19

  20. 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 NOTE: ClassL is not expressive enough to represent database constrains such as keys involving two fields. 20

More Related