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

80
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

description

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

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

Page 1: (08) Semantic Web Technologies - RDF(S) Semantics

Semantic Web Technologies

LectureDr. Harald Sack

Hasso-Plattner-Institut für IT Systems EngineeringUniversity 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

Page 2: (08) Semantic Web Technologies - RDF(S) Semantics

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

2 1. Introduction 2. Semantic Web - Basic Architecture

Languages of the Semantic Web - Part 1

3. Knowledge Representation and LogicsLanguages of the Semantic Web - Part 2

4. Applications in the ,Web of Data‘

Semantic Web Technologies Content

Dienstag, 4. Dezember 12

Page 3: (08) Semantic Web Technologies - RDF(S) Semantics

Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13

3

Descri

ption

Logics

last lecture

Dienstag, 4. Dezember 12

Page 4: (08) Semantic Web Technologies - RDF(S) Semantics

Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13

4 3. Knowledge Representation and LogicsThe 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

Semantic Web Technologies Content

Dienstag, 4. Dezember 12

Page 5: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam Rembrandt van Rijn, Die Anatomie des Dr. Tulp, 1632

5

Why do we need formal semantics for RDF(S)?

Formal

Seman

tics

for RD

F(S)

Dienstag, 4. Dezember 12

Page 6: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

63.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 Interpretation3.4.4 RDF Interpretation3.4.5 RDFS Interpretation3.4.6 RDF(S) Entailment3.4.7 Sematic Limitations of RDF(S)

3. Knowledge Representation & Logic3.4 RDF(S) Semantics

Dienstag, 4. Dezember 12

Page 7: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563

7

Gregor Reisch: Typus Logicae aus „Margarita Philosophica“ (1503/1508)

Dienstag, 4. Dezember 12

Page 8: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563

8

Dienstag, 4. Dezember 12

Page 9: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563

9

Dienstag, 4. Dezember 12

Page 10: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563

10

Dienstag, 4. Dezember 12

Page 11: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563

11

RDF(S) Spezification from W3C in 1999 did not provide a formal definition of RDF(S) Semantics

Dienstag, 4. Dezember 12

Page 12: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563

12

Why do we need semantics for RDF(S)?

■RDF(S) Spezification from W3C in 1999 did not provide a 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

Dienstag, 4. Dezember 12

Page 13: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563

13

Why do we need semantics for RDF(S)?

■ Reasoning about RDF(S) facts would be „nice“...■ 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

Dienstag, 4. Dezember 12

Page 14: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563

14

What are the Requirements?

■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, ⊨)

Dienstag, 4. Dezember 12

Page 15: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

15

3.4 RDF(S) Semantics3.4.1 Why do we need semantics for RDF(S)?3.4.2 Model-theoretic semantics for RDF(S) 3.4.3 Simple Interpretation3.4.4 RDF Interpretation3.4.5 RDFS Interpretation3.4.6 RDF(S) Entailment3.4.7 Sematic Limitations of RDF(S)

Dienstag, 4. Dezember 12

Page 16: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

16

Model-theoretic Semantics

■ 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 ConceptI :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

Dienstag, 4. Dezember 12

Page 17: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

17 ■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)

Model-theoretic Semantics

Dienstag, 4. Dezember 12

Page 18: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

18

s1 s2 s⊨

Modelof s1

Modelof s2

Modelof s

⊨ ⊨ ⊨

Model-theoretic Semantics

statements

interpretations

entailment

Dienstag, 4. Dezember 12

Page 19: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

19

Model-theoretic Semantics for RDF(S)

•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

Dienstag, 4. Dezember 12

Page 20: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

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

Model-theoretic Semantics for RDF(S)

Dienstag, 4. Dezember 12

Page 21: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

21 •Step-by-step definition

•Goal: formally correct mapping of the intention behind RDF(S)

RDF-Interpretation

RDFS-Interpretation

simple Interpretation

Model-theoretic Semantics for RDF(S)

Dienstag, 4. Dezember 12

Page 22: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

22

3.4 RDF(S) Semantics3.4.1 Why do we need semantics for RDF(S)?3.4.2 Model-theoretic semantics for RDF(S) 3.4.3 Simple Interpretation3.4.4 RDF Interpretation3.4.5 RDFS Interpretation3.4.6 RDF(S) RDF(S) Entailment3.4.7 Sematic Limitations of RDF(S)

Dienstag, 4. Dezember 12

Page 23: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

23

Simple Interpretation

A simple Interpretation I of a vocabulary V 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

Dienstag, 4. Dezember 12

Page 24: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

24 •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)

Simple Interpretation

Dienstag, 4. Dezember 12

Page 25: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

25

Simple Interpretation (schematics)

Dienstag, 4. Dezember 12

Page 26: (08) Semantic Web Technologies - RDF(S) Semantics

...if the interpretation is a model for all triples of the graph

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

26

When is an Interpretation a Model of the Graph?

Semantic Web

2

http://hpi-web.de/WS0809/semanticweb/

http://hpi-web.de/LehrVeranstaltung#SWS

http://hpi-web.de/LehrVeranstaltung#Name

⊨Semantic Web

http://hpi-web.de/WS0809/semanticweb/

http://hpi-web.de/LehrVeranstaltung#Name

2

http://hpi-web.de/WS0809/semanticweb/

http://hpi-web.de/LehrVeranstaltung#SWS

Dienstag, 4. Dezember 12

Page 27: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

27

When is an Interpretation a Model of a Triple?

•iff s,p,o ∈ V und 〈sI,oI〉∈ IEXT (pI)

⊨Semantic Web

http://hpi-web.de/WS0809/semanticweb/

http://hpi-web.de/LehrVeranstaltung#Name

s

p o

* this holds for grounded triples only,i.e. triples that do not contain blank nodes.

Dienstag, 4. Dezember 12

Page 28: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

28The Interpretation .I assigns a truth value tothe Graph G

GI=true iff TI=truefor all triples T∈G

Simple Interpretation of a Triple (schematics)

Dienstag, 4. Dezember 12

Page 29: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

29

What about Blank Nodes?

•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 everysimple Interpretation that is a model of G1 is alsoa model of G2.

Dienstag, 4. Dezember 12

Page 30: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

30

http://hpi-web.de/Pizza http://hpi-web.de/Mozarella

125ghttp://hpi-web.de/hasIngredient

http://hpi-web.de/ingredient

http://hpi-web.de/amount

IR = {χ,υ,τ,ν,ε,ι,125g}IP = {τ, ν, ι}LV = {125g}IEXT = τ→{〈χ,ε〉} ν→{〈ε,υ〉} ι→{〈ε,125g〉}

IS = hpi:Pizza → χ hpi:Mozarella → υ hpi:hasIngredient → τ hpi:ingredient → ν hpi:amount → ιIL = empty, no typed literalsA = _:id1 → ε

_:id1

Example

Dienstag, 4. Dezember 12

Page 31: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

31

http://hpi-web.de/Pizza http://hpi-web.de/Mozarella

125ghttp://hpi-web.de/hasIngredient

http://hpi-web.de/ingredient

http://hpi-web.de/amount_:id1

Example

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)

It‘s really simple!

Dienstag, 4. Dezember 12

Page 32: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

32

3.4 RDF(S) Semantics3.4.1 Why do we need semantics for RDF(S)?3.4.2 Model-theoretic semantics for RDF(S) 3.4.3 Simple Interpretation3.4.4 RDF Interpretation3.4.5 RDFS Interpretation3.4.6 RDF(S) RDF(S) Entailment3.4.7 Sematic Limitations of RDF(S)

Dienstag, 4. Dezember 12

Page 33: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

33

RDF-Interpretations

•Simple Interpretations treat all URIs the same•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 ...

Dienstag, 4. Dezember 12

Page 34: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

34

•rdf:type•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

Semantics of the RDF Vocabulary

Dienstag, 4. Dezember 12

Page 35: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

35• An RDF-Interpretation for a Vocabulary V is a simple

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

RDF-Interpretations

Dienstag, 4. Dezember 12

Page 36: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

36(2) if "s"^^rdf:XMLLiteral is contained in V and s is a

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)

RDF-Interpretations

Dienstag, 4. Dezember 12

Page 37: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

37

•Additional semantic restrictions for RDF-Interpretations: all subsequent „axiomatic“ triples must be true

•a Graph G1 RDF entails a Graph G2, if all RDF-Interpretations that are a model of G1 are also a model of G2 .

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 .

RDF-Interpretations

Dienstag, 4. Dezember 12

Page 38: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

38

3.4 RDF(S) Semantics3.4.1 Why do we need semantics for RDF(S)?3.4.2 Model-theoretic semantics for RDF(S) 3.4.3 Simple Interpretation3.4.4 RDF Interpretation3.4.5 RDFS Interpretation3.4.6 RDF(S) RDF(S) Entailment3.4.7 Sematic Limitations of RDF(S)

Dienstag, 4. Dezember 12

Page 39: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

39

RDFS-Interpretations

•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:ContainerMembershipPropertyrdfs:comment rdfs:seeAlso rdfs:isDefinedBy rdfs:label

Dienstag, 4. Dezember 12

Page 40: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

40•To simplify the representation:

•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

RDFS-Interpretations

Dienstag, 4. Dezember 12

Page 41: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

41•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

RDFS-Interpretations

Dienstag, 4. Dezember 12

Page 42: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

42•An RDFS-Interpretation for a Vocabulary V is an RDF-

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

RDFS-Interpretations

Dienstag, 4. Dezember 12

Page 43: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

43•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)

RDFS-Interpretations

Dienstag, 4. Dezember 12

Page 44: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

44•An RDFS-Interpretation for a Vocabulary V is an RDF-

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)

RDFS-Interpretations

Dienstag, 4. Dezember 12

Page 45: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

45

In addition there are numerous axiomatic triples (1)

RDFS-Interpretations

xy has domain zy

Dienstag, 4. Dezember 12

Page 46: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

46

In addition there are numerous axiomatic triples (2)

RDFS-Interpretations

Dienstag, 4. Dezember 12

Page 47: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

47

In addition there are numerous axiomatic triples (3)

RDFS-Interpretations

Dienstag, 4. Dezember 12

Page 48: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

48 •a Graph G1 RDFS entails a Graph G2, if all RDFS-Interpretations that are a model of G1 are also a model of G2 .

RDFS-Interpretations

Dienstag, 4. Dezember 12

Page 49: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

49

3.4 RDF(S) Semantics3.4.1 Why do we need semantics for RDF(S)?3.4.2 Model-theoretic semantics for RDF(S) 3.4.3 Simple Interpretation3.4.4 RDF Interpretation3.4.5 RDFS Interpretation3.4.6 RDF(S) RDF(S) Entailment3.4.7 Sematic Limitations of RDF(S)

Dienstag, 4. Dezember 12

Page 50: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

50

•Model-theoretic Semantics describes the behaviour of a Logic wrt. correct Entailments, but is not well suited algorithmic implemen-tations

Dienstag, 4. Dezember 12

Page 51: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

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

Dienstag, 4. Dezember 12

Page 52: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

52 •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.

Syntactic Reasoning with Deduction Rules

Dienstag, 4. Dezember 12

Page 53: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

53•General Form of Deduction Rules:

•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

s1 ... sns

Syntactic Reasoning with Deduction Rules

Dienstag, 4. Dezember 12

Page 54: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

54

General Notation for RDF(S) Deductiuon Rules

•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)

Dienstag, 4. Dezember 12

Page 55: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

55

Deduction Rules for Simple Entailment

•all URIs are treated likewise

•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‘.

u a x .u a _:n . se1

u a x ._:n a x . se2

Attention:_:n must not be contained in the graph the rule is applied to!

Dienstag, 4. Dezember 12

Page 56: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

56•Rules se1 and se2 „weaken“ specific Subject/Object

relations via undetermined bnode

•Example.:ex:PizzaFunghi ex:isDeliveredBy ex:PizzaToGo_:id1 ex: isDeliveredBy ex:PizzaToGo

se1

ex:Mushrooms ex:isToppingOf ex:PizzaFunghiex:Mushrooms ex:isToppingOf _:id1

se2

...problematic, if _:id1 exists, e.g._:id1 ex:isHeadOfStateOf ex:Kanada

Deduction Rules for Simple Entailment

Dienstag, 4. Dezember 12

Page 57: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

57

u a x . rdfax every axiomatic tripel „u a x .“ canalways be deduced

u a l .

u a _:n .lg literals can be substituted by bnodes

that do not already occur in the graph

u a y .

a rdf:type rdf:Property rdf1for all properties in a triple can be deduced that it is an entity of the class of properties

u a l .

_:n rdf:type rdf:XMLLiteralrdf2 where _:n does not yet occur in the graph

unless it has been introduced by a preceeding application of the lg rule

Deduction Rules for RDF Entailment

Dienstag, 4. Dezember 12

Page 58: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

58 •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.

Deduction Rules for RDF Entailment

Dienstag, 4. Dezember 12

Page 59: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

59 •Property Restrictions

a rdfs:domain x . u a y .u rdf:type x .

rdfs2

rdfs3a rdfs:range x . u a y .

y rdf:type x .

Deduction Rules for RDFS Entailment

Dienstag, 4. Dezember 12

Page 60: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

60 •Everything is a resource

u a x.u rdf:type rdfs:Resource . rdfs4a

rdfs4bu a x.

x rdf:type rdfs:Resource .

Deduction Rules for RDFS Entailment

Dienstag, 4. Dezember 12

Page 61: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

61 •Subproperties

u rdfs:subPropertyOf v . v rdfs:subPropertyOf x .u rdfs:subPropertyOf x .

rdfs5

rdfs6u rdfs:subPropertyOf u . u rdf:type rdf:Property .

a rdfs:subPropertyOf b . u a y .u b y .

rdfs7

Deduction Rules for RDFS Entailment

Dienstag, 4. Dezember 12

Page 62: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

62•Subclasses

u rdf:type rdfs:Class .u rdfs:subClassOf rdfs:Resource .

rdfs8

rdfs9u rdfs:subClassOf x . v rdf:type u .

v rdf:type x .

u rdfs:subClassOf u . u rdf:type rdfs:Class .

rdfs10

rdfs11u rdfs:subClassOf v . v rdfs:subClassOf x .

u rdfs:subClassOf x .

Deduction Rules for RDFS Entailment

Dienstag, 4. Dezember 12

Page 63: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

63•Container

•Literals

rdfs12u rdf:type rdfs:ContainerMembershipProperty .

u rdfs:subPropertyOf rdfs:member .

u rdfs:subClassOf rdfs:Literal . u rdf:type rdfs:Datatype .

rdfs13

u a l . u a _:n .

gl

Deduction Rules for RDFS Entailment

Dienstag, 4. Dezember 12

Page 64: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

64

RDFS Entailment and Inconsistencies

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

Dienstag, 4. Dezember 12

Page 65: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

65

RDFS-Entailment (refined)

•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)

Dienstag, 4. Dezember 12

Page 66: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

66

Completeness of the Deduction Calculus

•simple entailment and RDF entailment is sound and complete

•RDF(S) entailment is sound and complete (at least according to the specification), but:

has the logical consequence

but this is not derivable using the deduction rules.

ex:hasTopping rdfs:subPropertyOf _:bnode ._:bnode rdfs:domain ex:Pizza .ex:PizzaFunghi ex:hasTopping ex:Mushrooms .

ex:PizzaFunghi rdf:type ex:Pizza .

Dienstag, 4. Dezember 12

Page 67: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

67

Additional Rules for external Datatypes

•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 ._:n rdf:type d.

rdfD1

Dienstag, 4. Dezember 12

Page 68: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

68 •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

•If the range of datatype d in included within the range of datatype e, then

d rdf:type rdfs:Datatype .e rdf:type rdfs:Datatype .

u a “s“^^d .u a “t“^^e . rdfD2

d rdfs:subClassOf e . rdfDAx

Additional Rules for external Datatypes

Dienstag, 4. Dezember 12

Page 69: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

69

3.4 RDF(S) Semantics3.4.1 Why do we need semantics for RDF(S)?3.4.2 Model-theoretic semantics for RDF(S) 3.4.3 Simple Interpretation3.4.4 RDF Interpretation3.4.5 RDFS Interpretation3.4.6 RDF(S) RDF(S) Entailment3.4.7 Sematic Limitations of RDF(S)

Dienstag, 4. Dezember 12

Page 70: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

70

Intensional vs. Extensional Semantics

•Denoted semantics („standard semantics“, intentional 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....

Dienstag, 4. Dezember 12

Page 71: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

71

Locality of global properties

Problem: Cows only eat vegetablesOther animals also eat meat.

Animal eats FoodDomain Range

Vegetables

Meat

subClassOf

subClassOf

Dienstag, 4. Dezember 12

Page 72: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

72

Disjunctive Classes

Problem: Subclass relation cannot express disjunctive class (subclass) membership

Human

Woman

Man

subClassOf

subClassOf

Dienstag, 4. Dezember 12

Page 73: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

73

Class Combinations

Problem: Combination of classes define a new class.New class contains only members from given class combinations.

Motorist

Pedestrian

Motorcyclist

Cyclist

Road User

subClassOf

subClassOf

subClassOf

subClassOf

Dienstag, 4. Dezember 12

Page 74: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

74

Cardinality Restrictions

Problem: Every human (usually) has two partents

Human ParenthasParent

Dienstag, 4. Dezember 12

Page 75: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

75

Special Property Constraints

• Transitivity (e.g. „is greater than“)• Uniqueness (e.g. „is mother of“) • Inversiveness (e.g. „is parent of“ and „is child of“)

We need more se

mantic express

ivity!

Dienstag, 4. Dezember 12

Page 76: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

763.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 Interpretation3.4.4 RDF Interpretation3.4.5 RDFS Interpretation3.4.6 RDF(S) Entailment3.4.7 Sematic Limitations of RDF(S)

3. Knowledge Representation & Logic3.4 RDF(S) Semantics

Dienstag, 4. Dezember 12

Page 77: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

77 3. Knowledge Representation and LogicsThe 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

Semantic Web Technologies Content

Dienstag, 4. Dezember 12

Page 78: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

OWL

Web On

tology

Langu

age78

next lecture

Dienstag, 4. Dezember 12

Page 80: (08) Semantic Web Technologies - RDF(S) Semantics

Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

80

□Bloghttp://semweb2013.blogspot.com/

□Webseitehttp://www.hpi.uni-potsdam.de/studium/lehrangebot/itse/veranstaltung/semantic_web_technologien-3.html

□bibsonomy - Bookmarkshttp://www.bibsonomy.org/user/lysander07/swt1213_08

3. Knowledge Representation & Logic3.4 RDF(S) Semantics

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!

Dienstag, 4. Dezember 12