(07) Semantic Web Technologies - Description Logics

1,374 views

Published on

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,374
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
106
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

(07) Semantic Web Technologies - Description Logics

  1. 1. Semantic Web Technologies Lecture Dr. Harald Sack Hasso-Plattner-Institut für IT Systems Engineering University of Potsdam Winter Semester 2012/13 Lecture Blog: http://semweb2013.blogspot.com/ This file is licensed under the Creative Commons Attribution-NonCommercial 3.0 (CC BY-NC 3.0)Dienstag, 27. November 12
  2. 2. last lecture i c o g L2 a l on t i i c o s i & o g o p L P r e r r d t O r s F i Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  3. 3. Semantic Web Technologies Content3 1. Introduction 2. Semantic Web - Basic Architecture Languages of the Semantic Web - Part 1 3. Knowledge Representation and Logics Languages of the Semantic Web - Part 2 4. Applications in the ,Web of Data‘ Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 27. November 12
  4. 4. Semantic Web Technologies Content4 3. Knowledge Representation and Logics The Languages of the Semantic Web - Part 2 • Excursion: Ontologies in Philosophy and Computer Science • Recapitulation: Popositional Logic and First Order Logic • Description Logics • RDF(S) Semantics • OWL and OWL-Semantics • OWL 2 and Rules Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  5. 5. next lecture i o n5 p t i s r c c i s g e o D L Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  6. 6. 3. Knowledge Representation & Logic 3.3 Description Logics6 3.3 Description Logics 3.3.1 Motivation 3.3.2 Description Logics Overview 3.3.3 ALC - Syntax and Semantic 3.3.4 Inference and Reasoning 3.3.5 Tableaux Algorithm Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  7. 7. Ontologies in Computer Science7 An Ontology is a formal specification machine understandable of a shared group of people/agents conceptualization about concepts of a domain of interest between general description and individual use Tom Gruber, 1993 Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12 Turmbau zu Babel, Pieter Brueghel, 1563
  8. 8. Ontologies and Communication8 Agent 1 Agent 2 Person 1 Person 2 Ontology exchange exchange of symbols Symbol Description of symbols „Golf“ H1 H2 Semantics M1 M2 concept concept Concept agreement Ontology agreement specific domain, Thing e.g. sports Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  9. 9. RDF and RDFS • Definition of Classes,9 Class Hierarchies, Relations, a:hasName Springer Individuals Heidelberg • only for the a:hasLocation Definition of a:hasTitel simple ontologies a:hasPublisher WWW • not appropriate ISBN 0-00-651409-X a:hasPublicationdate to model more 2004 complex a:hasName Harald Sack ontologies a:hasAutor http://hpi-web.de/HaraldSack.html a:hasHomepage Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  10. 10. next lecture i o n10 p t i s r c c i s g e o D L We need more semantic expressivity Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  11. 11. 3.3 Description Logics 3.3.1 Motivation11 3.3.2 Description Logics Overview 3.3.3 ALC - Syntax and Semantic 3.3.4 Entailment and Reasoning 3.3.5 Tableaux Algorithm Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  12. 12. Knowledge Representations12 logic-based non logic-based formalisms formalisms • more complex and difficult • closer to human intuition to understand • therfore easier to • all based on first order logic understand • consistent semantics • usually don‘t have • FOL Syntax consistent semantics • FOL Semantic • FOL Entailment • E.g.: • Semantic Networks • E.g.: • Frame-based representations • Description Logics • Rule-based representations Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  13. 13. FO FOL as Semantic Web Language?13 • Why not simply take FOL for Ontologies? L • FOL can do everything... • compare higher programming languages to assemblers • FOL has • high expressivity • too bulky for modelling • not appropriate to find consensus in modelling • proof theoretically very complex (semi-decidable) • FOL is also not a Markup Language Look for an appropriate fragment of FOL Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  14. 14. Description Logics (DLs)14 • DLs are Fragments of FOL • In DL from simple descriptions more complex descriptions are created with the help of Constructors. • DLs differ in the applied constructors (Expressivity) • DLs have been developed from „semantic Networks“ • DLs are decidable (most times) • DLs posess sufficient expressivity (most times) • DLs are related to modal logics • e.g., W3C Standard OWL 1 DL is based on description logics SHOIN(D) Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  15. 15. General DL Architecture15 Knowledge Base TBox Terminological Knowledge Knowledge about concepts of a domain (classes, attributes, properties,..) Inference Engine EuroBook ≣ Book ⨅ PublishedInEurope Interface ABox Assertional Knowledge Knowledge about Individuals / Entities EuroBook(“Semantic Web Grundlagen“) Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  16. 16. General DL Architecture16 • DLs are a family of logic-based formalisms applied for knowledge representation • Special languages characterized by: • Constructors for complex concepts and roles from simpler concepts and roles • Set of Axioms to express Facts about concepts, roles and individuals • ALC (Attribute Language with Complement) is the smallest deductively complete DL • Conjunction, Disjunction, Negation are class constructors, denoted as ⊓, ⊔ , ¬ • Quantifiers restrict domain and range of roles: Man ⊓ ∃hasChild.Female ⊓ ∃hasChild.Male ⊓ ∀hasChild.(Rich ⊔ Happy) Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  17. 17. Further DL Expressions17 • Further Constructors are e.g. • Number restrictions for roles: ≥3 hasChild, ≤1 hasMother • Qualified number restrictions for roles: ≥2 hasChild.Female, ≤1 hasParent.Male • Nominals (definition by extension): {Italy, France, Spain} • Concrete domains (datatypes): hasAge.(≥21) • Inverse roles: hasChild– ≡ hasParent • Transitive roles: hasAncestor ⊑+ hasAncestor • Role composition: hasParent.hasBrother(uncle) Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  18. 18. 18 3.3 Description Logics 3.3.1 Motivation 3.3.2 Description Logics Overview 3.3.3 ALC - Syntax and Semantic 3.3.4 Entailment and Reasoning 3.3.5 Tableaux Algorithm Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  19. 19. ALC - Building Blocks19 • Classes • Roles • Individuals • Student(Christian) Individual Christian is of class Student • Lecture(SemanticWeb) Individual SemanticWeb is of class lecture • visitsLecture(Christian, SemanticWeb) Christian visits the lecture SemanticWeb Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  20. 20. ALC - Building Blocks20 • Atomic Types • Concept names A,B, ... • Special concepts • ⊤ - Top (universal concept) • ⊥ - Bottom concept • Role names R,S, ... • Constructors • Negation: ¬C • Conjunction: C ⊓ D • Disjunction: C ⊔ D • Existential quantifier: ∃R.C • Universal quantifier: ∀R.C Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  21. 21. ALC - Building Blocks21 • Class Inclusion • Professor ⊑ FacultyMember • every Professor is a Faculty Member • equals (∀x)(Professor(x) → FacultyMember(x)) • Class Equivalence • Professor ≡ FacultyMember • the Faculty Members are exactly the Professors • equals (∀x)(Professor(x) FacultyMember(x)) Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  22. 22. ALC - Complex Class Relations22 • Conjunction ⊓ • Disjunction ⊔ • Negation ¬ Professor ⊑ (Person ⊓ UniversityEmployee) ! ! ⊔ (Person ⊓ ¬Student) (∀x)(Professor(x) → ((Person(x) Λ UniversityEmployee(x)) V (Person(x) Λ ¬Student(x))) Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  23. 23. ALC - Quantifiers on Roles23 •Strict Binding of the Range of a Role to a Class •Examination ⊑ ∀has Supervisor.Professor • An Examination must be supervised by a Professor • (∀x)(Examination(x) → (∀y)(hasSupervisor(x,y) → Professor(y))) •Open Binding of the Range of a Role to a Class •Examination ⊑ ∃hasSupervisor.Person • Every Examination has at least one supervisor (who is a person) • (∀x)(Examination(x) → (∃y)(hasSupervisor(x,y) Λ Person(y))) Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  24. 24. ALC - Formal Syntax24 •Production rules for creating classes in ALC: (A is an atomic class, C and D are complex Classes and R a Role) •C,D::= A|⊤|!|¬C|C⊓D|C⊔D|∃R.C|∀R.C •An ALC TBox contains assertions of the form C ⊑ D and C ≡ D, where C,D are complex classes. •An ALC ABox contains assertions of the form C(a) and R(a,b), where C is a complex Class, R a Role and a,b Individuals. •An ALC-Knowledge Base contains an ABox and a TBox. Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  25. 25. ALC - Semantic (Interpretation) •we define a model-theoretic semantic for ALC25 (i.e. Entailment will be defined via Interpretations) •an Interpretation I=(ΔI,.I) contains •a set ΔI (Domain) of Individuals and •an interpretation function .I that maps •Individual names a to Domain elements aI∈ΔI •Class names C to a set of Domain elements CI⊆ΔI •Role names R to a set of Pairs of Domain elements RI⊆ΔI×ΔI Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  26. 26. ALC - Semantic (Interpretation)26 Individual Names Class Names Role Names Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  27. 27. ALC - Semantic (Interpretation)27 • Extension for complex classes: •⊤I = ΔI and ⊥I = ∅ •(C ⊔ D)I = CI ∪ DI and (C ⊓ D)I = CI ∩ DI •(¬C)I = ΔI CI •∀R.C={a∈ΔI|(∀b∈ΔI)((a,b)∈RI&b∈CI)} •∃R.C={a∈ΔI|(∃b∈ΔI)((a,b)∈RI∧b∈CI)} Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  28. 28. ALC - Semantic (Interpretation)28 •...and Axioms: • C(a) holds, iff aI ∈ CI • R(a,b) holds, iff (aI,bI) ∈ RI • C ⊑ D holds, iff CI ⊆ DI • C ≡ D holds, iff CI = DI Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  29. 29. ALC - alternative Semantic29 • Translation into FOL via Mapping π • ABox: π (C(a))=C(a) π (R(a,b))=R(a,b) • TBox: recursive Definition • where C,D are complex Classes, R a Role and A an atomic Class. Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  30. 30. ALC - Knowledgebase30 • Terminological Knowledge (TBox) Axioms that describe the Structure of the modelled domain (conceptional Schema): • Human ⊑ ∃parentOf.Human • Orphan ≡ Human ⊓ ¬∃hasParent.Alive • Assertional Knowledge (ABox) Axioms that describe specific situations (data): • Orphan(harrypotter) • hasParent(harrypotter,jamespotter) Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  31. 31. Description Logics Operator/Constructor Syntax Language31 Conjunction A⊓B Value Restriction ∀R.C FL Existential Quantifier ∃R Top ⊤ Bottom ⊥ S* Negation ¬A Disjunction A⊔B AL* Existential Restriction ∃R.C Number Restriction (≤nR) (≥nR) Set of Inividuals {a1,...,a2} Role Hierarchy R⊑S H inverse Role R-1 I Qualified Number Restriction (≤nR.C) (≥nR.C) Q Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  32. 32. Description Logics • ALC: Attribute Language with Complement32 • S: ALC + Transitivity of Roles • H: Role Hierarchies • O: Nominals • I: Inverse Roles • N: Number restrictions ≤n R etc. • Q: Qualified number restrictions ≤n R.C etc. • (D): Datatypes • F: Functional Roles • R: Role Constructors • OWL 1 DL is SHOIN(D) / OWL 2 DL is SHROIQ(D) Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  33. 33. 33 3.3 Description Logics 3.3.1 Motivation 3.3.2 Description Logics Overview 3.3.3 ALC - Syntax and Semantic 3.3.4 Inference and Reasoning 3.3.5 Tableaux Algorithm Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  34. 34. Open World vs. Closed World Assumption34 • OWA: Open World Assumption The existence of further individuals is possible, if they are not explicitly excluded. • CWA: Closed World Assumption It is assumed that the knowledge base contains all individuals. if we assume that we know no idea since everything about are all children we do not know Bill then all of his of Bill male? all children of Bill children are male child(Bill,Bob) ? ⊨ ∀child.Man(Bill) DL answers PROLOG answers Man(Bob) don‘t know yes now we know ≤1 child.⊤(Bill) ? ⊨ ∀child.Man(Bill) yes everything about Bill‘s children Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  35. 35. Description Logics and Inference35 • Let D be a Terminology (T-Box) and C and D concept descriptions in a language (description logic) L • C is satisfiable wrt. D, iff there exists a model I for D that holds CI≠∅ otherwise C is not satisfiable (a contradiction) wrt. D • C is subsumed by D wrt. D, C ⊑D D or D ⊨ C ⊑ D, iff for all models I of D it holds that CI ⊆ DI • C and D are equivalent wrt. D, C ≣D D or D ⊨ C ≣ D, iff for all models I of D it holds that CI = DI • C and D are disjunct wrt. D, iff for all models I of D it holds that CI ∩ DI = ∅ Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  36. 36. Description Logics and Inference36 • Let D be a Terminology (T-Box) and A a set of Assertions (A-Box) in a language (description logic) L. Let α be an assertion, C a concept description and a a constant in L • A is consistent wrt. D, iff there is an Interpretation I for L that is also a model for D and A • a is entailed by A and D, A ∪ D ⊨ a, iff for all Interpretations I for L it holds that, if I is also a model for D and A, then I also is a model for the assertion a • a is an Instance of C wrt. D and A, iff A ∪ D ⊨ C(a) Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  37. 37. Problems of Inference (1)37 • Global (In)Consistency of the knowledge base • Does the knowledge base make sense? KB ⊨ ┴? • Class(in)consistency C≡┴? • Must class C be empty? • Class inclusion (Subsumption) C ⊑ D? • Structuring the knowledge base • Class equivalency C ≡ D? • Are two classes the same? Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  38. 38. Problems of Inference (2)38 • Class disjunctness C ⊓ D = ┴? • Are two classes disjunct? • Class membership C(a)? • Is individual a contained in class C? • Instance generation (Retrieval) „find all x with C(x)“ • Find all (known!) Individuals of class C. Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  39. 39. Description Logics and Inference39 • Decidability: for each inference problem there always exists an algorithm that terminates in finite time • DLs are fragments of FOL, therefore (in principle) FOL inference algorithms (Resolution, Tableaux) can be applied. • But FOL algorithms do not always terminate! • Problem: Find algorithms that always terminate! • There might be no „naive“ solutions! Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  40. 40. Decidability and DL40 • FOL inference algorithms (Tableaux algorithm and Resolution) must be adapted for DLs • We will restrict to ALC • Tableaux algorithm and Resolution show unsatisfiability of a theory (knowledge base) • Adaption of entailment problems to the detection of contradictions in the knowledge base, i.e. proof of the unsatisfiability of the knowledge base! Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  41. 41. Reduction to Unsatisfiability (1)41 • Class (in)consistency C≡┴ • iff KB ⋃ {C(a)} unsatisfiable (a new) • Class inclusion (Subsumption) C⊑D • iff KB ⋃ {(C ⊓ ¬D)(a)} unsatisfiable (a new) • Class equivalency C≡D • iff C ⊑ D und D ⊑ C Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  42. 42. Reduction to Unsatisfiability (2)42 • Class disjunctness C⊓D=┴ • iff KB ⋃ {(C ⊓ D)(a)} unsatisfiable (a new) • Class membership C(a) • iff KB ⋃ {¬C(a)} unsatisfiable • Instance generation (Retrieval) „find all x with C(x)“ • Check class membership for all individuals • but: efficiency...? Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  43. 43. 43 3.3 Description Logics 3.3.1 Motivation 3.3.2 Description Logics Overview 3.3.3 ALC - Syntax and Semantic 3.3.4 Entailment and Reasoning 3.3.5 Tableaux Algorithm Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  44. 44. Tableaux Algorithm for Propositional Logic • syntactic algorithms to check the consistency of logical assertions44 • Basic Idea (similar to Resolution): • Proof algorithm to check the consistency of a logical formula by inferring that its negation is a contradiction (proof by refutation). • Tableaux algorithm is based on disjunctive Normalform representation (Resolution: conjunctive Normalform) • Construct Tree, where each node is marked with a logical formula. A path from the root to a leaf is the conjunction of all formulas represented within the nodes of the path; a branch of the path represents a disjunction. • The tree is created by successive application of the Tableaux Extension Rules. • A path in the Tableau is closed, if along the path as well X as ¬X for a formula X occurs, or if false occurs (X doesn‘t have to be atomic). Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  45. 45. Tableaux Algorithm for Propositional Logic • Construct a Tree, where each node is marked with a logical45 formula. A path from the root to a leaf is the conjunction of all formulas represented within the nodes of the path; a branch of the path represents a disjunction. (q ∧ r) ∨ (p ∧ ¬ r) ∨ r (q ∧ r) (p ∧ ¬ r) ∨ r q (p ∧ ¬ r) r r p ¬r Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  46. 46. Tableaux Algorithm for Propositional Logic • Basic Idea (continued):46 • A tableaux is fully expanded, if no extension rules are possible. • A tableaux is called closed, if all its paths are closed. • A Tableaux Proof for a formula X is a closed tableaux for ¬X. • The selection of the extension rules to be applied in the Tableaux is not deterministic. • There are heuristics for the propositional logic tableaux to select which extension rules to be applied best Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  47. 47. Tableaux Extension Rules47 • für PL: ¬¬X ¬W ¬F X F W • für conjunctive Formula (α-Rules): α X∧Y ¬(X∨Y) ¬(X Y) α1 X ¬X X α2 Y ¬Y ¬Y • für disjunctive formula (β-Rules): β X∨Y ¬(X∧Y) (X Y) β1 | β2 X|Y ¬X | ¬Y ¬X | Y Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  48. 48. Tableaux Algorithm (PL) Example (1):48 proof: ((q ∧ r) (¬q ∨ r)) α-Rule (1) ¬((q ∧ r) (¬q ∨ r)) = ¬(¬(q ∧ r) ∨ (¬q ∨ r)) = (q ∧ r) ∧ ¬(¬q ∨ r)) ¬(X Y) X (2) α,1: (q ∧ r) ¬Y (3) α,1: ¬(¬q ∨ r) = q ∧ ¬r (4) α,2: q (5) α,2: r (6) α,3: q (7) α,3: ¬r Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  49. 49. Tableaux Algorithm (PL) Example (2): proof: (p (q r)) ((p q) (p r))49 α-Rule ¬(X Y) (1) ¬((p (q r)) ((p q) (p r))) X (2|α from 1) (p (q r)) ¬Y (3|α from 1) ¬((p q) (p r)) (4|α from 3) (p q) (5|α from 3) ¬(p r) (6|α from 5) p (7|α from 5) ¬r (8|β from 2) ¬p | (9|β from 2) (q r) (10|β from 9) ¬q | (11|β from 9) r (12|β from 4) ¬p | (13|β from 4) q Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  50. 50. Tableaux Algorithm Extensions for FOL • as for propositional logic - X and Y stand for arbitrary50 (FOL) formulas • Additional Rules for quantified formulas : γ δ γ[t] δ[c] • γ for universally quantified formulas, δ existentially quantified formulas, with: γ γ[t] δ δ[c] ∀x.Φ Φ[x←t] ∃x.Φ Φ[x←c] ¬∃x.Φ ¬Φ[x←t] ¬∀x.Φ ¬Φ[x←c] • t is an arbitrary ground term (i.e. doesn‘t contain variables that are bound in Φ), • c is a „new“ constant Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  51. 51. Tableaux Algorithm (FOL) Example(3):51 γ γ[t] Proof: (∀x.P(x)∨Q(x)) (∃x.P(x))∨(∀x.Q(x)) ∀x.Φ Φ[x←t] (1) ¬((∀x.P(x)∨Q(x)) (∃x.P(x))∨(∀x.Q(x))) ¬∃x.Φ ¬Φ[x←t] (2|α from 1) (∀x.P(x)∨Q(x)) (3|α from 1) ¬((∃x.P(x))∨(∀x.Q(x))) δ δ[c] (4|α from 3) ¬(∃x.P(x)) ∃x.Φ Φ[x←c] (5|α from 3) ¬(∀x.Q(x)) ¬∀x.Φ ¬Φ[x←c] (6|δ from 5) ¬Q(c) (7|γ from 4) ¬P(c) (8|γ from 2) P(c)∨Q(c) (9|β from 8) P(c) | (10|β from 8) Q(c) Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  52. 52. Tableaux Algorithm for Description Logics52 •Transformation to Negation normalform necessary •Let W be a knowledge base, •Substitute C≡D by C⊑D and D⊑C •Substitute C⊑D by C⊓¬D. •Apply the NNF Transformations from the next page •Resulting knowledge base NNF(W) •Negation normalform of W. •Negation is placed directly in front of atomic classes. Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  53. 53. Tableaux Transformation in Negation Normalform53 • NNF Transformations NNF(C) = C, falls C atomar ist NNF(¬C) = ¬C, falls C atomar ist NNF(¬¬C) = NNF(C) NNF(C ⊔ D) = NNF(C) ⊔ NNF(D) NNF(C ⊓ D) = NNF(C) ⊓ NNF(D) NNF(¬(C ⊔ D)) = NNF(¬C) ⊓ NNF(¬D) NNF(¬(C ⊓ D)) = NNF(¬C) ⊔ NNF(¬D) NNF(∀R.C) = ∀ R.NNF(C) NNF(∃R.C) = ∃ R.NNF(C) NNF(¬∀R.C) = ∃R.NNF(¬C) NNF(¬∃R.C) = ∀R.NNF(¬C) • W and NNF(W) are logically equivalent. Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  54. 54. Tableaux Transformation in Negation Normalform54 • Example: P⊑(E⊓U)⊔¬(¬E⊔D) • In NNF: " P⊓¬((E⊓U)⊔¬(¬E⊔D)) = " " ¬P⊔(E⊓U)⊔(E⊓¬D) Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  55. 55. Tableaux Extension Rules for DL Selection Action55C(a)∈W (ABox) Add C(a) R(a,b)∈W (ABox) Add R(a,b) C∈W (TBox) Add C(a) for a known Individual a (C⊓D)(a)∈A Add C(a) and D(a) (C⊔D)(a)∈A Split the path. Add (1) C(a) and (2) D(a) (∃R.C)(a)∈A Add R(a,b) and C(b) for a new Individual b (∀R.C)(a)∈A if R(a,b)∈A, then add C(b) • If the resulting tableaux is closed, the original knowledge base is unsatisfiable. • Only select elements that lead to new elements within the tableaux. If this is not possible, then the algorithm terminates and the original knowledge base is satisfiable. Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  56. 56. Tableaux Algorithm (DL) Example(4):56 • P … Professor • E … Person • U … University Employee • D … PhD student • Knowledge Base: P⊑(E⊓U)⊔(E⊓¬D) • Is P⊑E a logical consequence? • Knowledge Base (with [negated] query) in NNF: {¬P⊔(E⊓U)⊔(E⊓¬D), (P⊓¬E)(a)} Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  57. 57. Tableaux Algorithm (DL) Example(4):57 • Knowledge Base: ¬P⊔(E⊓U)⊔(E⊓¬D) (P⊓¬E)(a) • Tableaux: (1) (P⊓¬E)(a) (from knowledge base) (2|α from 1) P(a) (3|α from 1) ¬E(a) (4) (¬P⊔(E⊓U)⊔(E⊓¬D))(a) (from knowledge base) (5|β from 4)) ¬P(a) | (6)((E⊓U)⊔(E⊓¬D))(a) (7|β from 4) (E ⊓ U)(a) | (8) (E ⊓ ¬D)(a) (9|α from 7) E(a) (10|α from 8) E(a) (11|α from 7) U(a) (12|α from 8) ¬D(a) Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  58. 58. Tableaux Algorithm (DL) Example(5): • Knowledge Base: ¬Person ⊔ ∃hasParent.Person58 • infer: ¬Person(Bill) Person(Bill) (¬Person ⊔ ∃hasParent.Person)(Bill) ¬Person(Bill) ∃hasParent.Person(Bill) ⊔ hasParent(Bill,x1) ∃ Person(x1) (¬Person ⊔ ∃hasParent.Person)(x1) ¬Person(x1) ∃hasParent.Person(x1) ⊔ hasParent(x1,x2) ∃ Person(x2) Problem with existential (¬Person ⊔ ∃hasParent.Person)(x2) quantification ¬Person(x2) ∃hasParent.Person(x2) ⊔ also for OWL:minCardinality no termination possible Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  59. 59. Idea of Blocking59 • the following had been constructed in the Tableaux: Person Person Person ∃hasParent.Person ∃hasParent.Person ∃hasParent.Person hasParent hasParent hasParent • Idea: reuse old nodes Person Person ∃hasParent.Person ∃hasParent.Person hasParent Blocking Correctness of this short cut hasParent must be proven! Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  60. 60. Tableaux Algorithm (DL) with Blocking • Knowledge Base: ¬Person ⊔ ∃hasParent.Person60 • infer: ¬Person(Bill) Person(Bill) (¬Person ⊔ ∃hasParent.Person)(Bill) ¬Person(Bill) ∃hasParent.Person(Bill) ⊔ hasParent(Bill,x1) ∃ Person(x1) (¬Person ⊔ ∃hasParent.Person)(x1) ¬Person(x1) ∃hasParent.Person(x1) ⊔ Person Person σ(Βill) = {Person, ∃hasParent.Person ∃hasParent.Person ¬Person ⊔ ∃hasParent.Person, ∃hasParent.Person} hasParent σ(x1) = { Person, ¬Person ⊔ ∃hasParent.Person, hasParent ∃hasParent.Person} σ(x1) ⊆ σ(Bill), so Bill blocks x1 termination Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  61. 61. Tableaux Algorithm (DL) with Blocking61 • The Selection of (∃R.C)(a) in the tableaux path A is blocked, if there is already an individual b with {C|C(a)∈A}⊆{C|C(b)∈A}. • Two possibilities of termination: 1. Closing the Tableaux. Knowledge Base is unsatisfiable. 2. All non blocked selections from the tableaux don‘t lead to an extension. Knowledge Base is satisfiable. Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  62. 62. 3. Knowledge Representation & Logic 3.3 Description Logics62 3.3 Description Logics 3.3.1 Motivation 3.3.2 Description Logics Overview 3.3.3 ALC - Syntax and Semantic 3.3.4 Entailment and Reasoning 3.3.5 Tableaux Algorithm Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  63. 63. Semantic Web Technologies Content63 3. Knowledge Representation and Logics The Languages of the Semantic Web - Part 2 • Excursion: Ontologies in Philosophy and Computer Science • Recapitulation: Popositional Logic and First Order Logic • Description Logics • RDF(S) Semantics • OWL and OWL-Semantics • OWL 2 and Rules Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  64. 64. next lecture...64 t ic a n S e m ) l a RDF (S r m F o o r f Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS van Rijn, Die Anatomie des Dr. Tulp, 1632 Rembrandt 2012/13Dienstag, 27. November 12
  65. 65. 3. Knowledge Representation & Logic 3.3 Description Logics65 Bibliography • P. Hitzler, S. Roschke, Y. Sure: Semantic Web Grundlagen, Springer, 2007. » F. Baader, D. McGuinness, D. Nardi, P. Patel-Schneider (eds.) The Description Logic Handbook - Theory, Implementation, and Application, 2nd ed. (2010). (cf. further reading, online resources) Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13Dienstag, 27. November 12
  66. 66. 3. Knowledge Representation & Logic 3.3 Description Logics66 □Blog http://semweb2013.blogspot.com/ □Webseite http://www.hpi.uni-potsdam.de/studium/ lehrangebot/itse/veranstaltung/ semantic_web_technologien-3.html □bibsonomy - Bookmarks http://www.bibsonomy.org/user/lysander07/ swt1213_07 Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 27. November 12

×