(08) Semantic Web Technologies - RDF(S) Semantics

1,605 views

Published on

Formal Semantics for RDF(S)
(08) Semantic Web Technologies, Lecture at Hasso-Plattner-Institute (HPI), University Potsdam, Germany, 04.12.2012

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

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

No notes for slide

(08) Semantic Web Technologies - RDF(S) Semantics

  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, 4. Dezember 12
  2. 2. Semantic Web Technologies Content2 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, 4. Dezember 12
  3. 3. last lecture i o n3 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, 4. Dezember 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, 4. Dezember 12
  5. 5. c s t i a n5 em S F(S ) a l D m r R r o F o fWhy do we need formal semantics for RDF(S)? Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam Rembrandt van Rijn, Die Anatomie des Dr. Tulp, 1632Dienstag, 4. Dezember 12
  6. 6. 3. Knowledge Representation & Logic 3.4 RDF(S) Semantics6 3.4 RDF(S) Semantics 3.4.1 Why do we need semantics for RDF(S)? 3.4.2 Model-theoretic semantics for RDF(S) 3.4.3 Simple Interpretation 3.4.4 RDF Interpretation 3.4.5 RDFS Interpretation 3.4.6 RDF(S) Entailment 3.4.7 Sematic Limitations of RDF(S) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  7. 7. 7 Gregor Reisch: Typus Logicae aus „Margarita Philosophica“ Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam (1503/1508)Dienstag, 4. Dezember 12 Turmbau zu Babel, Pieter Brueghel, 1563
  8. 8. 8 Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12 Turmbau zu Babel, Pieter Brueghel, 1563
  9. 9. 9 Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12 Turmbau zu Babel, Pieter Brueghel, 1563
  10. 10. 10 Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12 Turmbau zu Babel, Pieter Brueghel, 1563
  11. 11. 11 RDF(S) Spezification from W3C in 1999 did not provide a formal definition of RDF(S) Semantics Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12 Turmbau zu Babel, Pieter Brueghel, 1563
  12. 12. Why do we need semantics for RDF(S)? ■ RDF(S) Spezification from W3C in 1999 did not provide a12 formal definition of RDF(S) Semantics ■ Tool developer complain about Incompatibilities □ esp. for Triple Stores, e.g. same query at different Triple Stores (same RDF data, same SPARQL query) delivers different results □ Reason: different Interpretations of RDF data and RDF queries ■ Consequence: Definition of a formal semantic is mandatory! Semantic Web requires a shareable, declarative and computable semantics Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12 Turmbau zu Babel, Pieter Brueghel, 1563
  13. 13. Why do we need semantics for RDF(S)? ■ Reasoning about RDF(S) facts would be „nice“...13 ■ Example: ■ ex:SemanticWeb rdf:type ex:Lecture. ex:Lecture rdfs:subClassOf ex:Course. therefore we may deduce ex:SemanticWeb rdf:type ex:Course. ■ Which statements are logical consequences is governed by the formal semantics Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12 Turmbau zu Babel, Pieter Brueghel, 1563
  14. 14. What are the Requirements?14 ■ Mathematical Logic is applied to formalize correct deductions and inferences. ■ Therefore, the following is required: □ Set of statements about which inferences and deductions can be made (=statements S) □ Entailment relation ⊨ ⊆ 2S × S □to make inferences, as e.g. {s1,s2,s3} ⊨ s □ Logic L = (S, ⊨) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12 Turmbau zu Babel, Pieter Brueghel, 1563
  15. 15. 15 3.4 RDF(S) Semantics 3.4.1 Why do we need semantics for RDF(S)? 3.4.2 Model-theoretic semantics for RDF(S) 3.4.3 Simple Interpretation 3.4.4 RDF Interpretation 3.4.5 RDFS Interpretation 3.4.6 RDF(S) Entailment 3.4.7 Sematic Limitations of RDF(S) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  16. 16. Model-theoretic Semantics16 ■ Basic Idea: Find a relation / mapping for statements of a logic with interpretations ■ Interpretation (ΔI, I) □ ΔI … Domain of Discourse, ΔI ≠ ∅ □ Interpretationsfunktion I I :A→AI ⊆ ΔI , A … atomic Concept I :R→RI ⊆ ΔI x ΔI , R … atomic Relation ■ Definition of criteria to decide, if a given Interpretation I „satisfies“ a statement s∈S (Model relation) □ I is Model of s, I ⊨ s Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  17. 17. Model-theoretic Semantics17 ■ Definition of the Entailment Relation ⊨ : □ A statement s∈S is entailed from a set of statements S⊆S (i.e. S ⊨ s) exactly if □ all Interpretations I satisfying all statements s‘∈S (i.e. I ⊨ s‘, for all s‘∈S) are also a model for s (i.e. I ⊨ s) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  18. 18. Model-theoretic Semantics18 statements ⊨ entailment s1 s2 s ⊨ ⊨ ⊨ Model Model Model of s1 of s of s2 interpretations Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  19. 19. Model-theoretic Semantics for RDF(S)19 • What are statements in RDF(S)? • every triple (s,p,o) is a statement • Triple can be represented with a vocabulary V •URIs, bnodes and literals • (s,p,o) ∈ (URI ∪ bnode) × URI × (URI ∪ bnode ∪ literal) • An (RDF-)Graph is a finite set of triples • Every (RDF-)Graph is a statement Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  20. 20. Model-theoretic Semantics for RDF(S)20 • Entailment Relation ⊨ •⊨ denotes that an RDF(S)-Graph G entails an RDF(S)-Graph G‘ (G‘ is the logical consequence of G) , • i.e. G ⊨ G‘ • To define a model-theoretic semantic for RDF(S) we define a set of interpretations and denote which interpretation is a model of a given graph Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  21. 21. Model-theoretic Semantics for RDF(S)21 • Step-by-step definition simple Interpretation RDF-Interpretation RDFS-Interpretation • Goal: formally correct mapping of the intention behind RDF(S) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  22. 22. 22 3.4 RDF(S) Semantics 3.4.1 Why do we need semantics for RDF(S)? 3.4.2 Model-theoretic semantics for RDF(S) 3.4.3 Simple Interpretation 3.4.4 RDF Interpretation 3.4.5 RDFS Interpretation 3.4.6 RDF(S) RDF(S) Entailment 3.4.7 Sematic Limitations of RDF(S) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  23. 23. Simple Interpretation A simple Interpretation I of a vocabulary V23 consists of • IR, a non-empty set of Resources, alternatively called. the Domain or Universe of Discurse of I, • IP, the set of Properties of I, • IEXT, a function assigning each property to a set of pairs from I, i.e. IEXT: IP!2IR×IR, where IEXT(p) is called Extension of the Property p, • IS, a function mapping URIs from V to the union of the sets IR and IP, i.e. IS: V!IR∪IP, • IL, a function from the (typed) Literals of V into the set IR of resources, i.e. IL: V!IR and • LV ⊆ IR, a particular set of Literal Values containing (at least) all untyped Literals from V Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  24. 24. Simple Interpretation24 • We define a simple Interpretation Function .I mapping all Literals and URIs from V to Resources and Properties. • every untyped Literal “a“ is mapped to a: (“a“)I=a • every untyped Literal with language tag “a“@t is mapped to the pair〈a,t〉i.e. (“a@t“)I=〈a,t〉 • every typed Literal l is mapped to IL(l):lI= IL(l) • every URI u is mapped to IS(u): uI=IS(u) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  25. 25. Simple Interpretation (schematics)25 Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  26. 26. When is an Interpretation a Model of the Graph?26 http://hpi-web.de/LehrVeranstaltung#Name Semantic Web http://hpi-web.de/WS0809/semanticweb/ ⊨ http://hpi-web.de/LehrVeranstaltung#SWS 2 http://hpi-web.de/LehrVeranstaltung#Name Semantic Web ⊨ http://hpi-web.de/WS0809/semanticweb/ ⊨ http://hpi-web.de/WS0809/semanticweb/ http://hpi-web.de/LehrVeranstaltung#SWS 2 ...if the interpretation is a model for all triples of the graph Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  27. 27. When is an Interpretation a Model of a Triple?27 p o http://hpi-web.de/LehrVeranstaltung#Name Semantic Web ⊨ http://hpi-web.de/WS0809/semanticweb/ s • iff s,p,o ∈ V und 〈sI,oI〉∈ IEXT (pI) * this holds for grounded triples only, i.e. triples that do not contain blank nodes. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  28. 28. Simple Interpretation of a Triple (schematics) The Interpretation .I28 assigns a truth value to the Graph G GI=true iff TI=true for all triples T∈G Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  29. 29. What about Blank Nodes?29 • Let A be a function assigning all bnodes to elements of IR • for the interpretation I let I+A be defined as I where in addition for all bnodes b it holds that •bI+A = A(b) • an Interpretation I is a model of an RDF-Graph G, if there exists an A such as all triples wrt. I+A are true • Conclusion: A Graph G1 simply entails a Graph G2, if every simple Interpretation that is a model of G1 is also a model of G2. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  30. 30. 30 Example http://hpi-web.de/Pizza http://hpi-web.de/Mozarella http://hpi-web.de/ingredient _:id1 125g http://hpi-web.de/hasIngredient http://hpi-web.de/amount IS = hpi:Pizza → χ IR = {χ,υ,τ,ν,ε,ι,125g} IP = {τ, ν, ι} hpi:Mozarella → υ LV = {125g} hpi:hasIngredient → τ IEXT = τ→{〈χ,ε〉} hpi:ingredient → ν ν→{〈ε,υ〉} hpi:amount → ι ι→{〈ε,125g〉} IL = empty, no typed literals A = _:id1 → ε Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  31. 31. It‘s really simple!31 Example http://hpi-web.de/Pizza http://hpi-web.de/Mozarella http://hpi-web.de/ingredient _:id1 125g http://hpi-web.de/hasIngredient http://hpi-web.de/amount If you chose A: _:id1 → ε then the result is 〈hpi:PizzaI+A,_:id1I+A〉 = 〈χ,ε〉 ∈ IEXT(τ) = IEXT(hpi:hasIngredientI+A) 〈_:id1I+A,hpi:MozarellaI+A〉 = 〈ε,υ〉 ∈ IEXT(ν) = IEXT(hpi:ingredientI+A) 〈_:id1I+A,“125g“I+A〉 = 〈ε,125g〉 ∈ IEXT(ι) = IEXT(hpi:amountI+A) Therefore also the full graph will become true. I is a model of the Graph (wrt. simple Interpretation) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  32. 32. 32 3.4 RDF(S) Semantics 3.4.1 Why do we need semantics for RDF(S)? 3.4.2 Model-theoretic semantics for RDF(S) 3.4.3 Simple Interpretation 3.4.4 RDF Interpretation 3.4.5 RDFS Interpretation 3.4.6 RDF(S) RDF(S) Entailment 3.4.7 Sematic Limitations of RDF(S) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  33. 33. RDF-Interpretations • Simple Interpretations treat all URIs the same33 • For the understanding of RDF Vocabulary additional requirements regarding the set of correct interpretations are necessary • RDF Vocabulary VRDF: rdf:type rdf:Property rdf:XMLLiteral rdf:nil rdf:List rdf:Statement rdf:subject rdf:predicate rdf:object rdf:first rdf:rest rdf:Seq rdf:Bag rdf:Alt rdf:_1 rdf:_2 ... Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  34. 34. Semantics of the RDF Vocabulary • rdf:type34 • assigns a type to an URI • class membership of the resource denoted by the URI • rdf:Property • denotes a specific type of resource • characterizes all URIs that in RDF triples occur as Property • rdf:XMLLiteral • predefined datatype (XML-Fragment) • distinguish well-typed / illtyped Literals Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  35. 35. RDF-Interpretations • An RDF-Interpretation for a Vocabulary V is a simple35 Interpretation for the Vocabulary V∪VRDF that additionally satisfies the following conditions: (1) x ∈ IP exactly if 〈x, rdf:PropertyI〉∈ IEXT(rdf:typeI) • x is a Property exactly if it is connected to the resource denoted by rdf:Property via the rdf:type-Property • (this automatically causes IP ⊆ IR for any RDF- Interpretation). Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  36. 36. RDF-Interpretations (2) if "s"^^rdf:XMLLiteral is contained in V and s is a36 well-typed XML-Literal, then • IL("s"^^rdf:XMLLiteral) is the XML-value of s • IL("s"^^rdf:XMLLiteral)∈LV • 〈IL("s"^^rdf:XMLLiteral),rdf:XMLLiteralI〉 ∈ IEXT(rdf:typeI) (3) if "s"^^rdf:XMLLiteral is contained in V and s is an ill-typed XML-Literal, then •IL("s"^^rdf:XMLLiteral)∉LV •〈IL("s"^^rdf:XMLLiteral),rdf:XMLLiteralI〉 ∉ IEXT(rdf:typeI) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  37. 37. RDF-Interpretations • Additional semantic restrictions for RDF-Interpretations: all subsequent „axiomatic“ triples must be true37 rdf:type rdf:type rdf:Property . rdf:subject rdf:type rdf:Property . rdf:predicate rdf:type rdf:Property . rdf:object rdf:type rdf:Property . rdf:first rdf:type rdf:Property . rdf:rest rdf:type rdf:Property . rdf:value rdf:type rdf:Property . rdf:_1 rdf:type rdf:Property . rdf:_2 rdf:type rdf:Property . ... ... ... rdf:nil rdf:type rdf:List . • a Graph G1 RDF entails a Graph G2, if all RDF-Interpretations that are a model of G1 are also a model of G2 . Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  38. 38. 38 3.4 RDF(S) Semantics 3.4.1 Why do we need semantics for RDF(S)? 3.4.2 Model-theoretic semantics for RDF(S) 3.4.3 Simple Interpretation 3.4.4 RDF Interpretation 3.4.5 RDFS Interpretation 3.4.6 RDF(S) RDF(S) Entailment 3.4.7 Sematic Limitations of RDF(S) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  39. 39. RDFS-Interpretations39 • For understanging RDFS Vocabulary additional requirements regarding the set of correct interpretations for RDF-Interpretations are necessary • RDF Vocabulary VRDFS: rdfs:domain rdfs:range rdfs:Resource rdfs:Literal rdfs:Datatype rdfs:Class rdfs:subClassOf rdfs:subPropertyOf rdfs:member rdfs:Container rdfs:ContainerMembershipProperty rdfs:comment rdfs:seeAlso rdfs:isDefinedBy rdfs:label Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  40. 40. RDFS-Interpretations • To simplify the representation:40 • Class extension function ICEXT: IR # 2IR • ICEXT(y) contains exactly those elements x for which〈x,y〉∈ IEXT(rdf:typeI) • IC = ICEXT(rdfs:ClassI) IC is the extension of the special URI rdfs:Class Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  41. 41. RDFS-Interpretations41 • An RDFS-Interpretation for a Vocabulary V is an RDF- Interpretation for the vocabulary V∪VRDFS that additionally satisfies the following conditions: (1) IR = ICEXT(rdfs:ResourceI) Every resource has the type rdfs:Resource (2) LV = ICEXT(rdfs:LiteralI) Every well-typed or untyped Literal has the type rdfs:Literal Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  42. 42. RDFS-Interpretations • An RDFS-Interpretation for a Vocabulary V is an RDF-42 Interpretation for the vocabulary V∪VRDFS that additionally satisfies the following conditions (contd.): (3) If 〈x,y〉∈ IEXT(rdfs:domainI) and 〈u,v〉∈ IEXT(x), then u∈ICEXT(y) (4) If 〈x,y〉∈ IEXT(rdfs:rangeI) and 〈u,v〉∈ IEXT(x), then v∈ ICEXT(y) If x and y are connected via property rdfs:domain/ rdfs:range and the Property x connects resources u and v, then u/v is of type y Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  43. 43. RDFS-Interpretations43 • An RDFS-Interpretation for a Vocabulary V is an RDF- Interpretation for the vocabulary V∪VRDFS that additionally satisfies the following conditions (contd.): (5) IEXT(rdfs:subPropertyOfI) is reflexive and transitive on IP (6) If〈x,y〉∈ IEXT(rdfs:subPropertyOfI), then x,y ∈ IP and IEXT(x) ⊆ IEXT(y) (7) If x ∈ IC, then 〈x,rdfs:ResourceI〉∈ IEXT(rdfs:subClassOfI) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  44. 44. RDFS-Interpretations • An RDFS-Interpretation for a Vocabulary V is an RDF-44 Interpretation for the vocabulary V∪VRDFS that additionally satisfies the following conditions (contd.): (8) If 〈x,y〉∈ IEXT(rdfs:subClassOfI), then x,y ∈ IC and ICEXT(x) ⊆ ICEXT(y) (9) IEXT(rdfs:subClassOfI) is reflexive and transitive on IC (10) If x∈ICEXT(rdfs:ContainerMembershipPropertyI), then 〈x,rdfs:memberI ∈IEXT(rdfs:subPropertyOfI) (11) If x ∈ ICEXT(rdfs:DatatypeI), then 〈x,rdfs:LiteralI ∈IEXT(rdfs:subClassOfI) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  45. 45. RDFS-Interpretations In addition there are numerous axiomatic triples (1)45 xy has domain zy Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  46. 46. RDFS-Interpretations In addition there are numerous axiomatic triples (2)46 Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  47. 47. RDFS-Interpretations In addition there are numerous axiomatic triples (3)47 Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  48. 48. RDFS-Interpretations48 • a Graph G1 RDFS entails a Graph G2, if all RDFS-Interpretations that are a model of G1 are also a model of G2 . Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  49. 49. 49 3.4 RDF(S) Semantics 3.4.1 Why do we need semantics for RDF(S)? 3.4.2 Model-theoretic semantics for RDF(S) 3.4.3 Simple Interpretation 3.4.4 RDF Interpretation 3.4.5 RDFS Interpretation 3.4.6 RDF(S) RDF(S) Entailment 3.4.7 Sematic Limitations of RDF(S) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  50. 50. 50 • Model-theoretic Semantics describes the behaviour of a Logic wrt. correct Entailments, but is not well suited algorithmic implemen- tations Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  51. 51. 51 •Model-theoretic Semantics describes the behaviour of a Logic wrt. correct Entailments, but is not well suited algorithmic implemen- tations •To proof G1 ⊨ G2 via model-theoretic semantics ALL (RDFS)-Interpretations would have to be considered Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  52. 52. Syntactic Reasoning with Deduction Rules52 • Therefore Algorithms are developed, to decide the validity of reasoning in a syntactic way (Algorithms only apply assertions of logic without using the interpretation) • Proof of correctness is mandatory (!), i.e. operational (proof-theoretic) semantics and model- theoretic Semantics are congruent (operational Semantics = Results of an algorithm) • Proof theory reduces model-theoretic semantics to symbol manipulation. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  53. 53. Syntactic Reasoning with Deduction Rules53 • General Form of Deduction Rules: s1 ... sn s • If statements s1,...,sn are contained in the set of known valid assertions (are valid), then also the statement s can be added (is also valid). • The whole set of deduction rules for a logic is called Deduction calculus Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  54. 54. General Notation for RDF(S) Deductiuon Rules54 • a and b refer to arbitrary URIs (anything admissible for the Property of a triple) • _:n will be used for the ID of a bnode • u snd v refer to arbitrary URIs or IDs of blank nodes (any possible Subject of a triple) • l may be any Literal • x and y refer to arbitrary URIs, IDs of blank nodes or literals (any possible Object of a triple) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  55. 55. Deduction Rules for Simple Entailment55 • all URIs are treated likewise uax. se1 u a _:n . Attention: uax. _:n must not be contained se2 _:n a x . in the graph the rule is applied to! • Theorem: A Graph G1 simply entails a Graph G2, if G1 via deduction rules se1 and se2 can be transformed to a Graph G1‘ in a way that G2 is contained in G1‘. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  56. 56. Deduction Rules for Simple Entailment56 • Rules se1 and se2 „weaken“ specific Subject/Object relations via undetermined bnode • Example.: ex:PizzaFunghi ex:isDeliveredBy ex:PizzaToGo se1 _:id1 ex: isDeliveredBy ex:PizzaToGo ex:Mushrooms ex:isToppingOf ex:PizzaFunghi se2 ex:Mushrooms ex:isToppingOf _:id1 ...problematic, if _:id1 exists, e.g. _:id1 ex:isHeadOfStateOf ex:Kanada Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  57. 57. Deduction Rules for RDF Entailment57 every axiomatic tripel „u a x .“ can rdfax uax. always be deduced ual. literals can be substituted by bnodes lg u a _:n . that do not already occur in the graph uay. for all properties in a triple can be deduced rdf1 that it is an entity of the class of properties a rdf:type rdf:Property ual. where _:n does not yet occur in the graph rdf2 _:n rdf:type rdf:XMLLiteral unless it has been introduced by a preceeding application of the lg rule Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  58. 58. Deduction Rules for RDF Entailment58 • Theorem: A Graph G1 RDF entails a Graph G2 exactly if there exists a Graph G1‘ that can be derived from G1 via the rules rdfax, lg, rdf1 und rdf2 and that simply entails G2. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  59. 59. Deduction Rules for RDFS Entailment59 • Property Restrictions a rdfs:domain x . u a y . rdfs2 u rdf:type x . a rdfs:range x . u a y . rdfs3 y rdf:type x . Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  60. 60. Deduction Rules for RDFS Entailment60 • Everything is a resource u a x. rdfs4a u rdf:type rdfs:Resource . u a x. rdfs4b x rdf:type rdfs:Resource . Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  61. 61. Deduction Rules for RDFS Entailment61 • Subproperties u rdfs:subPropertyOf v . v rdfs:subPropertyOf x . rdfs5 u rdfs:subPropertyOf x . u rdf:type rdf:Property . rdfs6 u rdfs:subPropertyOf u . a rdfs:subPropertyOf b . u a y . rdfs7 uby. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  62. 62. Deduction Rules for RDFS Entailment • Subclasses62 u rdf:type rdfs:Class . rdfs8 u rdfs:subClassOf rdfs:Resource . u rdfs:subClassOf x . v rdf:type u . rdfs9 v rdf:type x . u rdf:type rdfs:Class . rdfs10 u rdfs:subClassOf u . u rdfs:subClassOf v . v rdfs:subClassOf x . rdfs11 u rdfs:subClassOf x . Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  63. 63. Deduction Rules for RDFS Entailment • Container63 u rdf:type rdfs:ContainerMembershipProperty . rdfs12 u rdfs:subPropertyOf rdfs:member . • Literals u rdf:type rdfs:Datatype . rdfs13 u rdfs:subClassOf rdfs:Literal . u a _:n . gl ual. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  64. 64. RDFS Entailment and Inconsistencies64 • An inconsistent Graph G entails every arbitrary Graph • Inconsistency: there is no interpretation I with GI=true • But with RDF(S) there are only restricted possibilities to create inconsistencies • Example: „XML-Clash“: ex:hasSmiley rdfs:range rdf:Literal . rx:meanRemark ex:hasSmiley „>:->“^^XMLLiteral . Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  65. 65. RDFS-Entailment (refined)65 • Theorem: A Graph G1 RDFS entails a Graph G2 exactly if there exists a Graph G1‘ that can be derived from G1 via the rules rdfax, lg, rdf1, rdf2, rdfs1-rdfs13, gl, and rdfsax with (1) G1‘ simply entails G2, or (2) G1‘ contains an XML-Clash (is inconsistent) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  66. 66. Completeness of the Deduction Calculus • simple entailment and RDF entailment is sound and66 complete • RDF(S) entailment is sound and complete (at least according to the specification), but: ex:hasTopping rdfs:subPropertyOf _:bnode . _:bnode rdfs:domain ex:Pizza . ex:PizzaFunghi ex:hasTopping ex:Mushrooms . has the logical consequence ex:PizzaFunghi rdf:type ex:Pizza . but this is not derivable using the deduction rules. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  67. 67. Additional Rules for external Datatypes67 • In RDFS external datatypes can be represented via rdfs:Datatype • „Functionality“ of external datatypes cannot completely be represented via RDF(S) graph • Additional deduction rules for general relations of external datatypes d rdf:type rdfs:Datatype . u a “s“^^d . rdfD1 _:n rdf:type d. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  68. 68. Additional Rules for external Datatypes68 • Range of some datatypes might overlap, e.g. “15“^^xsd:double and “15“^^xsd:Integer • If s with datatype d represents the same value as t with datatype e, then d rdf:type rdfs:Datatype . e rdf:type rdfs:Datatype . u a “s“^^d . rdfD2 u a “t“^^e . • If the range of datatype d in included within the range of datatype e, then rdfDAx d rdfs:subClassOf e . Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  69. 69. 69 3.4 RDF(S) Semantics 3.4.1 Why do we need semantics for RDF(S)? 3.4.2 Model-theoretic semantics for RDF(S) 3.4.3 Simple Interpretation 3.4.4 RDF Interpretation 3.4.5 RDFS Interpretation 3.4.6 RDF(S) RDF(S) Entailment 3.4.7 Sematic Limitations of RDF(S) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  70. 70. Intensional vs. Extensional Semantics • Denoted semantics („standard semantics“, intentional70 semantics) is not the only „reasonable“ semantics for RDF(S) • Other semantics might force stronger requirements to interpretations (extensional semantics) • But: deduction rules of intensional semantics are easier to implement • Problem: RDF(S) does not have the possibility of negation • hpi:harald rdf:type hpi:NonSmoker . hpi:harald rdf:type hpi:Smoker . --> does not automatically generate a contradiction.... Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  71. 71. Locality of global properties71 subClassOf Vegetables Domain Range Animal eats Food subClassOf Meat Problem: Cows only eat vegetables Other animals also eat meat. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  72. 72. Disjunctive Classes72 subClassOf Woman Human ≠ Man subClassOf Problem: Subclass relation cannot express disjunctive class (subclass) membership Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  73. 73. Class Combinations73 subClassOf Motorist subClassOf Motorcyclist Road User subClassOf Pedestrian subClassOf Cyclist Problem: Combination of classes define a new class. New class contains only members from given class combinations. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  74. 74. Cardinality Restrictions74 hasParent Human Parent Problem: Every human (usually) has two partents Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  75. 75. Special Property Constraints • Transitivity (e.g. „is greater than“)75 • Uniqueness (e.g. „is mother of“) • Inversiveness (e.g. „is parent of“ and „is child of“) essiv ity! ntic expr more sema We need Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  76. 76. 3. Knowledge Representation & Logic 3.4 RDF(S) Semantics76 3.4 RDF(S) Semantics 3.4.1 Why do we need semantics for RDF(S)? 3.4.2 Model-theoretic semantics for RDF(S) 3.4.3 Simple Interpretation 3.4.4 RDF Interpretation 3.4.5 RDFS Interpretation 3.4.6 RDF(S) Entailment 3.4.7 Sematic Limitations of RDF(S) Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  77. 77. Semantic Web Technologies Content77 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 Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  78. 78. next lecture78 g e u a W LL ang O g y ol o n t b O W e Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  79. 79. 3. Knowledge Representation & Logic 3.4 RDF(S) Semantics79 Bibliography • P. Hitzler, S. Roschke, Y. Sure: Semantic Web Grundlagen, Springer, 2007. • P. Hitzler, M. Krötzsch, S. Rudolph: Foundations of Semantic Web Technologies, CRC Press, 2009. Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12
  80. 80. 3. Knowledge Representation & Logic 3.4 RDF(S) Semantics80 □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_08 Thank you very much to Pascal Hitzler from Kno.e.sis Center, Wright State University, Dayton, OH for his cool textbook and his slides for the lecture ,Knowledge Representation for the Semantic Web‘ that have been the foundation for this lecture! Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamDienstag, 4. Dezember 12

×