CSE 428 Semantic Web Topics OWL Jeff Heflin Lehigh University.
(10) Semantic Web Technologies - OWL 2
-
Upload
harald-sack -
Category
Education
-
view
1.926 -
download
7
description
Transcript of (10) Semantic Web Technologies - OWL 2
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, 18. Dezember 12
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, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
OWL
Web On
tology
Langu
age3
last lecture
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
4 OWL
Extension
SHROIQ(D)
SHOIN(D)
OWL2
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
5 3. Knowledge Representation and LogicsThe Languages of the Semantic Web - Part 2
• Excursion: Ontologies in Philosophy and Computer Science
• Recapitulation: Propositional Logic and First Order Logic
• Description Logics
• RDF(S) Semantics• OWL and OWL-Semantics• OWL 2
• Rules
Semantic Web Technologies Content
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
6 OWL
OWL 2
Extension
SHROIQ(D)
SHOIN(D)
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
7
3. Knowledge Representation & Logic3.6 OWL 2
3.6 OWL 23.6.1 Development of OWL 2
3.6.2 From SHOIN(D) to SHROIQ(D)
3.6.3 OWL 2 Syntax3.6.4 Complexity and other Properties3.6.5 OWL 2 Profiles
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563
8
OWL – Web Ontology Language
• OWL is a semantic fragment of FOL• OWL exists in different flavors• OWL Lite ⊆ OWL DL ⊆ OWL Full
FOL
SWRL/RIF OWL Full
OWL DL
OWL Lite RDFS
ConceptHierarchies
OWL ELOWL RLOWL QL
OWL1
OWL1Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563
9
OWL – Web Ontology Language
• OWL is a semantic fragment of FOL• OWL exists in different flavors• OWL Lite ⊆ OWL DL ⊆ OWL Full
• for OWL2:• OWL EL, OWL RL, OWL QL
⊆ OWL DL ⊆ OWL Full
FOL
SWRL/RIF OWL Full
OWL DL
OWL Lite RDFSOWL ELOWL RLOWL QL
OWL2
OWL2ConceptHierarchies
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563
10
OWL2 – Web Ontology Language 2
• DAML (DARPA Agent Markup Language, 1999)• RDF based markup language for knowledge
representation (http://www.daml.org/)
• DAML+OIL (Ontology Inference Layer, 2002)• Embedded infrastructure for Semantic Web applications• Based on description logics and frame logic
• OWL 1 - W3C Recommendation since 2004
• OWL 2 (previously called OWL 1.1)• W3C Recommendation since 2009
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563
11
OWL2 – Web Ontology Language 2
• What has changed since OWL1?
• Extensions from best practices and experiences with OWL 1• additional expressivity with new ontological axioms• Refinement of OWL language flavors• additional extensions
• new syntax, comments, etc.
• Compatibility as far as possible with the old standard• Maintaining decidability for OWL 2 DL• Solving problems of the OWL 1 standard
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
12
3.6 OWL 23.6.1 Development of OWL 2
3.6.2 From SHOIN(D) to SHROIQ(D)
3.6.3 OWL 2 Syntax3.6.4 Complexity and other Properties3.6.5 OWL 2 Profiles
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563
13
OWL 1 DL is based on SHOIN(D)• Axioms• TBox: Subclass relationships C ⊑ D
• RBox: Subproperty relationships R ⊑ S (H),
inverse properties R- (I), transitivity ⊑+ (S)
• ABox: Facts for classes C(a), properties R(a,b), equality a=b, difference a≠b
•Class constructors:• conjunction C ⊓ D, disjunction C ⊔ D, Negation ¬C of classes• property restrictions: universal ∀R.C and existential ∃R.C
• number restrictions: ≤n R und ≥n R (N)
• enumerated classes: {a} (O)
•Datatypes (D)
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563
14
From SHOIN(D) zu SHROIQ(D)• SHOIN(D) supports various ABox facts:
• class membership C(a) (C is complex class)
• Exception: negated class membership ¬C(a) (C is complex class)
• equality a=b
• difference a≠b
• property relation R(a,b)• negated property relation....?
Extension from SHOIN(D) to SHROIQ(D)
SHROIQ(D) allows negated properties in the ABox: ¬R(a,b)
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563
15Number Restrictions
• SHOIN(D) supports simple number restrictions (N):
• Person ⊓ ≥3hasChild
• Class of all persons with at least 3 children
• SHROIQ(D) also supports qualified number restrictions (Q):
• Person ⊓ ≥3hasChild.(Woman⊓Professor)
• Class of all persons with at least 3 daughters, who are professors
From SHOIN(D) zu SHROIQ(D)
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563
16The Self Concept
• Try to model this: „Every Human knows himself.“
• SHOIN(D)
• knows(Harald, Harald) knows(Magnus, Magnus) ...
• General modeling in TBox not possible
• SHROIQ(D) has a special element: Self
• Human ⊑ ∃knows.Self
From SHOIN(D) zu SHROIQ(D)
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563
17 Property Axioms• In SHOIN(D) properties can be modeled as
• transitive, symmetric, functional and invers functional
• SHROIQ(D) offers additional property axioms:
• Antisymmetry: ∀a,b∈ΔI:(a,b)∈RI"(b,a)∉RI
• Reflexivity: ∀a∈ΔI:(a,a)∈RI
• Irreflexivity: ∀a∈ΔI:(a,a)∉RI
• Disjunctiveness: ∀a,b∈ΔI:(a,b)∉RI∩SI
From SHOIN(D) zu SHROIQ(D)
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563
18 Property Axioms
•Additionaly for SHROIQ(D) an universal property U has been introduced:• ∀a,b∈ΔI: (a,b)∈UI, UI=∆Ix∆I
• U was introduced to be the counterpart of the universal class ⊤
From SHOIN(D) zu SHROIQ(D)
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität PotsdamTurmbau zu Babel, Pieter Brueghel, 1563
19General Property Inclusion
• „The friends of my friends are also my friends.“
• can be expressed as SHOIN(D) transitive property
•But: „The foes of my friends are also my foes.“
• cannot be expressed as SHOIN(D)
hasFoehasFriend
From SHOIN(D) zu SHROIQ(D)
• In FOL as Rule:• ∀x,y,z:hasFriend(x,y)∧hasFoe(y,z)"hasFriendsFoe(x,z)
• hasFriend º hasFoe ⊑ hasFriendsFoe
Dienstag, 18. Dezember 12
General Property Inclusion
• „The friends of my friends are also my friends.“
• can be expressed as SHOIN(D) transitive property
•But: „The foes of my friends are also my foes.“
• cannot be expressed as SHOIN(D)
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
20
Property Inclusion• RBox expressions of the form R1ºR2ºR3º.....ºRn⊑Se.g.: hasFriend º hasFoe ⊑ hasFriendsFoe
• Semantics: if (x0,x1)∈R1I,(x1,x2)∈R2I...(xn-1,xn)∈RnI , then it also holds that (x0,xn)∈SI
E.g.: (x0,x1)∈hasFriendI and (x1,x2)∈hasFoeI, then it also holds (x0,x2)∈hasFriendsFoeI
From SHOIN(D) zu SHROIQ(D)
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
21
Expressivity of Property Inclusion
• With RBoxes formal Languages can be defined
Example•Grammar for the (context free) language of the words ab, aabb, aaabbb, ...
•∃L.⊤ ≢ ⊥ („ ∃L.⊤ necessarely non-empty“) means:„There exists a chain Ra and Rb pertaining to the language.“
•∃L1.∃L2- ≢ ⊥ for two languages L1 and L2 means:„There exists a word pertaining to L1 and also to L2.“
L ::= abL ::= aLb
gets Ra º Rb ⊑ LRa º L º Rb ⊑ L
But from formal languages is known:Emptiness of the intersection of context free languages is not decidable
From SHOIN(D) zu SHROIQ(D)
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
22Expressivity of Property Inclusion
• With RBoxes formal Languages can be defined
OWL with general propertry inclusion in UNDECIDABLE !
From SHOIN(D) zu SHROIQ(D)
Example•Grammar for the (context free) language of the words ab, aabb, aaabbb, ...
•∃L.⊤ ≢ ⊥ („ ∃L.⊤ necessarely non-empty“) means:„There exists a chain Ra and Rb pertaining to the language.“
•∃L1.∃L2- ≢ ⊥ for two languages L1 and L2 means:„There exists a word pertaining to L1 and also to L2.“
L ::= abL ::= aLb
gets Ra º Rb ⊑ LRa º L º Rb ⊑ L
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
23
Regular RBoxes• Can property inclusion restricted in some way to stay
decidable?• Rboxes are like grammars for context-free languages• Intersection of context free languages is problematic• Therefore restriction to regular languages!
Regular RBoxes•Property names are ordered with ≺ (strict partial Ordering).•Each RBox Inclusion must must be formed like:
•Where: Si ≺ R for all i=1,2,...,n•An RBox is called regular, if such an (strict) Ordering ≺ exists.
•R º R ⊑ R•R- ⊑ R•S1 º S2 º S3 º ... º Sn ⊑ R
•R º S1 º S2 º S3 º...º Sn ⊑ R •S1 º S2 º S3 º... º Sn º R ⊑ R
From SHOIN(D) zu SHROIQ(D)
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
24
Regular RBoxes - Examples• Example:R º S ⊑ R S º S ⊑ S R º S º R ⊑ Tis regular with ordering S ≺ R ≺ T
• Example:R º T º S ⊑ Tis not regular (not allowed inclusion)
• Example:R º S ⊑ S S º R ⊑ Ris not regular (no valid ordering possible)
From SHOIN(D) zu SHROIQ(D)
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
25
Regular RBoxes - Examples• Example:hasParent º hasHusband ⊑ hasFatherhasFather ⊑ hasParent
• is not regular because regularity would enforcebothhasParent ≺ hasFatherand hasFather ≺ hasParentwhich is impossible because ≺ must be strict
From SHOIN(D) zu SHROIQ(D)
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
26
Restrictions for simple Properties• Simple properties in SHOIN(D) are properties without
transitive subproperties
• In SHROIQ(D) property inclusion has to be considered
•Non-simple properties are properties that are directly (or indirectly) dependent of property chains (º )
Simple Properties• are all properties that• are not on the right side of a property inclusion,• are the inverse of other simple properties,• are only on the right side of property inclusions R ⊑ S,
where on the left side is a simple property
From SHOIN(D) zu SHROIQ(D)
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
27Rectricions for Simple Properties
• The following expressions are permitted ONLY for simple properties:
•≤n R.C and ≥n R.C (qualified number restriction)• Irreflexive properties•Disjunctive properties•∃R.Self
•¬R(a,b)
•Reason: Saving Decidability
From SHOIN(D) zu SHROIQ(D)
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
28
Summary• To ensure decidability the following structural restrictions
must hold or SHROIQ(D):• Regularity:
Restriction of potential interaction of RBox axioms• Simplicity of properties:
Restrictions of how to apply properties in number restrictions
• Therefore a number of restrictions arise for the overall structure of the knowledge base that have to be considered for all axioms.
• Attention: The union of several SHROIQ(D) knowledge bases might violate these restrictions, although each underlying knowledge base does comply to the restrictions!
From SHOIN(D) zu SHROIQ(D)
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
29
SHROIQ(D) Overview
Class Expressions• Class names A,B• Conjunction C ⊓ D• Disjunction C ⊔ D• Negation ¬C• Exist. property restriction ∃R.C• Univ property restriction ∀R.C• Self ∃S.Self• Greater-than ≥n S.C• Less-than ≤ S• Enumerated classes {a}
Properties• Property names R,S,T• Simple properties S,T• Inverse properties R-
• Universal property U
Tbox (Class axioms)• Inclusion C ⊑ D• Equivalence C ≣ D
Rbox (Property Axioms)• Inclusion R1 ⊑ R2
• General Inclusion R(-)1 º R (-) 2 º ..... º R (-) n ⊑ R• Transitivity• Symmetry• Reflexivity• Irreflexivity• Disjunctiveness
Abox (Facts)• Class membership C(a)• Property relation R(a,b)• Negated property relation ¬S(a,b)• Equality a=b• Inequality a≠b
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
30
3.6 OWL 23.6.1 Development of OWL 2
3.6.2 From SHOIN(D) to SHROIQ(D)
3.6.3 OWL 2 Syntax3.6.4 Complexity and other Properties3.6.5 OWL 2 Profiles
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
31
• OWL 2 can be represented in different Syntax variants• Functional Syntax: substitutes abstract Syntax of OWL 1• RDF-Syntax: extension of existing OWL/RDF• XML-Syntax: Independent XML Serialisation• Manchester-Syntax: machine readable Syntax, esp. for
ontology editors• Turtle: optional
• Functional Syntax is easy to define, no RDF restrictions, more compact
• RDF-Syntax important for compatibility issues• Turtle: simple and efficient to write...
OWL 2 Syntax Variants
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
32
OWL 2 - Functional SyntaxSubClassOf( :Teenager DataSomeValuesFrom( :hasAge DatatypeRestriction( xsd:integer xsd:minExclusive "12"^^xsd:integer xsd:maxInclusive "19"^^xsd:integer ) ) )SubClassOf( :Woman :Person )SubClassOf( :Mother :Woman )...SubObjectPropertyOf( :hasWife :hasSpouse )SymmetricObjectProperty( :hasSpouse ) AsymmetricObjectProperty( :hasChild )...Declaration( NamedIndividual( :John ) )Declaration( NamedIndividual( :Mary ) )Declaration( NamedIndividual( :Jim ) )...ClassAssertion( :Person :Mary )ClassAssertion( :Woman :Mary )...ObjectPropertyAssertion( :hasWife :John :Mary )NegativeObjectPropertyAssertion( :hasWife :Bill :Mary )
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
33
OWL 2 - Manchester Syntax
Class: Person Annotations: ... SubClassOf: owl:Thing that hasFirstName exactly 1 and hasFirstName only string[minLength 1] ,... SubClassOf: hasAge exactly 1 and hasAge only not NegInt,... SubClassOf: hasGender exactly 1 and hasGender only {female , male} ,... SubClassOf: not hates Self, ... EquivalentTo: g:People ,... DisjointWith: g:Rock , g:Mineral ,...
ObjectProperty: hasWife Annotations: ... Characteristics: Functional, InverseFunctional, Reflexive, Irreflexive, Asymmetric, Transitive Domain: Man Range: Person, Woman SubPropertyOf: hasSpouse, loves EquivalentTo: isMarriedTo ,... DisjointWith: hates ,... InverseOf: hasSpouse
Individual: John Annotations: ... Types: Person , hasFirstName value "John" or hasFirstName value "Jack"^^xsd:string Facts: hasWife Mary, not hasChild Susan, hasAge 33, hasChild _:child1 SameAs: Jack ,... DifferentFrom: Susan ,...
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
34
OWL 2 - Turtle Syntax
:HappyPerson a owl:Class ; owl:equivalentClass [ a owl:Class ; owl:intersectionOf ([ a owl:Restriction ; owl:onProperty :hasChild ; owl:allValuesFrom :HappyPerson ] [ a owl:Restriction ; owl:onProperty :hasChild ; owl:someValuesFrom :HappyPerson ] ) ].
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
35
• OWL 2 can be represented in different Syntax variants• Functional Syntax: substitutes abstract Syntax of OWL 1• RDF-Syntax: extension of existing OWL/RDF• XML-Syntax: Independent XML Serialisation• Manchester-Syntax: machine readable Syntax, esp. for
ontology editors• Turtle: optional
• Functional Syntax is easy to define, no RDF restrictions, more compct
• RDF-Syntax important for compatibility issues• Turtle: simple and efficient to write...
OWL 2 Syntax Variants
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
36 • In OWL 2 Individuals can be defined as named entity also without direct class membership
:HaraldSack a owl:NamedIndividual .
OWL 2 Individual Definition
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
37
OWL 2 Disjunctive Classes
• In OWL 1 two classes can be defined to be disjunctive (owl:disjointWith)
• OWL 2 offers a shortcut for defining several classes to be disjunctive
[] a owl:AllDisjointClasses ; owl:members ( :KindergartenKinder :Schueler :Studenten :Professoren ) .
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
38• In OWL 1 a class can be defined to be the union of two
classes via owl:unionOf
• OWL 2 offers the possibility of defining a class as disjunctive union of classes, i.e. C⊑D⊔E with D⊓E=⊥
OWL 2 Disjunctive Classes
:MusicInstruments a owl:class; rdfs:subClassOf [ owl:disjointUnionOf ( :StringInstrument :PercussionInstrument :PuckedInstrument :KeyboardInstrument ) ] .
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
39
OWL 2 Properties and Relations
• In OWL 1 properties can be defined as transitive, symmetric, functional and inverse functional
• OWL 2 offers in addition
• Asymmetric properties via owl:AsymmetricProperty• Reflexive properties via owl:ReflexiveProperty• Irreflexive properties via owl:IrreflexiveProperty
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
40• In addition OWL 2 offers to model assertions of the following
kind:
All students of the HPI with the same name and the same birth date are the same students.“
• In General: In OWLs for a Class there can be defined a set of properties, that identify individuals of that class in the same way as a key
OWL 2 Properties and Relations
:HPIStudents rdf:type owl:Class ; owl:hasKey (:hasName :hasBirthDate ) .
Dienstag, 18. Dezember 12
• In addition OWL 2 offers to model assertions of the following kind:
All students of the HPI with the same name and the same birth date are the same students.“
• In General: In OWLs for a Class there can be defined a set of properties, that identify individuals of that class in the same way as a key
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
41
Attention:•Keys must only be applied to named Individuals•Keys is not an element of description logics
OWL 2 Properties and Relations
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
42• OWL 2 offers the Definition of disjunctive properties
• Two properties R and S are disjunctive, if two individuals x,y are never related via both properties
• Shortcut for several disjunctive properties
OWL 2 Properties and Relations
:hasParent a owl:ObjectProperty ; owl:propertyDisjointWith :hasChild .
[] rdf:type owl:AllDisjointProperties owl:members ( :hasParent :hasChild :hasGrandchild ) .
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
43• OWL 2 defines a universal and empty property as
counterparts for top and bottom classes:• owl:topObjectProperty
relates each potential pair of individuals, superclass for object properties
• owl:bottomObjectPropertyconnects no individuals, subclass of all object properties
• owl:topDatatypePropertyrelates all individuals with all typed literals, superclass for all datatye properties
• owl:bottomDatatypePropertyconnects no individual and no typed literal, subclass of all datatype properties
OWL 2 Properties and Relations
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
44 • OWL 2 enables the definition of inverse properties
• Not allowed for datatype properties
OWL 2 Properties and Relations
:hasExaminer a owl:ObjectProperty ; rdfs:subPropertyOf [ a owl:ObjectProperty ; owl:inverseOf :participatesAt ] .
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
45
OWL 2 General Property Inclusion
• OWL 2 enables property chaining
• Not allowed for datatype properties
hasFoehasFriend
:hasFriendsFoe a owl:ObjectProperty ; owl:PropertyChainAxiom ( :hasFriend :hasFoe ) .
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
46
OWL 2 Qualified Number Restriction
• OWL 2 enables class constructors with number restrictions on properties connected with a range constraint
• E.g.: Examination ⊑ ≥2 hasExaminer.Professor
• owl:maxQualifiedCardinality, owl:minQualifiedCardinality, owl:qualifiedCardinality
:Examination a owl:Class; rdfs:subClassOf [ a owl:Restriction ; owl:onProperty :hasExaminer ; owl:minQualifiedCardinality “2“^^xsd:nonNegativeInteger; owl:onClass :Professor ] .
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
47
OWL 2 Reflexive Property Restriction
• OWL 2 enables the definition of classes that contain individuals that are related to themselves for specific properties
:Philosoph a owl:Class ; rdfs:subClassOf [ a owl:Restriction ; owl:onProperty :knows ; owl:hasSelf “true“^^xsd:boolean ] .
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
48
OWL 2 Negated Property Instantiation
• OWL 1 enables two individuals to be connected via an object property
• OWL 2 also enables to express that two individuals are NOT related via a given property
• E.g..: ¬isBrother(Max,Moritz)
[] rdf:type owl:negativePropertyAssertion ; owl:sourceIndividual :Max ; owl:assertionProperty :isBrother ; owl:targetIndividual :Moritz .
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
49
OWL 2 Datatypes
• OWL 2 supports most XML Schema Datatypes that have been supported by OWL 1• Exception: xsd:time, xsd:date, xsd:gYear, xsd:gMonth, xsd:gDay, xsd:gMonthDay, xsd:gYearMonth
• The following new Datatypes are available for OWL2:
• owl:real, owl:rational, rdf:PlainLiteral, rdf:XMLLiteral, xsd:dateTimeStamp
• Additional possibility to restrict the range of datatype properties:
• Numbers: xsd:maxExclusive, xsd:minExclusive, xsd:maxInclusive, xsd:minInclusive
• Strings: xsd:minLength, xsd:maxLength, xsd:length, xsd:pattern
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
50 3.6 OWL 23.6.1 Development of OWL 2
3.6.2 From SHOIN(D) to SHROIQ(D)
3.6.3 OWL 2 Syntax3.6.4 Complexity and other Properties3.6.5 OWL 2 Profiles
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
51
How complex is SHROIQ(D)?
• SHOIN(D) (OWL DL) is rather complex (NExpTime)
• What about SHROIQ(D)?• Observation: some expressions are not mandatory
• Transitive properties correspond to R º R ⊑ R
• Symmetry corresponds to R- ⊑ R • Irreflexivity corresponds to ⊤ ⊑ ¬∃R.Self
• Universal property corresponds to the following Axiom: ⊤ ⊑ ∃R.{a}, R º R- ⊑ U
• ABox can be expressed via enumerated classes: e.g. R(a,b) corresponds to {a} ⊑ ∃R.{b}
• Qualified number restriction is not problematic• Main Problem:
Property axioms and general property inclusion
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
52
How to Deal with Property Inclusion?
• RBox-Axioms are similar to formal grammars• each property R defines a regular language:
the languages of a property chain, which entails R
• regular languages ≡ regular expressions ≡ finite automatons
• Approach: Extend Tableaux algorithm with „RBox automaton“
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
53
Decidability of SHROIQ(D)?
• Tableaux algorithm for SHROIQ(D) available:
• Tableaux algorithm not well suited for estimating complexity• Complexity result (2008): SHROIQ(D) is N2ExpTime complete
SHROIQ(D) is decidable.
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
54
OWL 2 DL Meta Modeling
• Examples: • „The class Person was created on 3.1.2010 by Magnus.“• „For the class City the property inhabitants is
recommended.“• „The assertion ‚Dresden was founded at 1206 AD‘ was
determined by machine with a probability of 85%.“
• (Compare to reification in RDF)
Meta ModelingSpecification of ontological knowledge about single ontology elements (including classes, properties, axioms).
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
55
„Wordplay“ in OWL 2: Punning
• Meta modeling in expressive logics is dangerous and expensive...
• OWL 2 only supports limited meta modeling
• Example:
• Person(Harald), classCreatedBy(Person, Magnus)
Punning• Names for classes, properties, individuals do not have to be
disjunctive (Exception: ObjectPropertys and DataPropertys)
• no logical relation between class, individual and property of the same name
• Relations only relevant for pragmatic interpretation
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
56
Via http://lifeinbonetown.blogspot.com/2010_08_01_archive.html
3.6 OWL 23.6.1 Development of OWL 2
3.6.2 From SHOIN(D) to SHROIQ(D)
3.6.3 OWL 2 Syntax3.6.4 Complexity and other Properties3.6.5 OWL 2 Profiles
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
57
OWL 2 Profiles
• OWL 2 Profiles are sub-languages of OWL 2
• OWL 2 DL corresponds to SHROIQ(D)
• OWL 2 Full simply is an extension of OWL 1 Full• What about OWL 2 Lite?
• OWL 1 Lite has nearly the same complexity as OWL 1 DL• Originally intended as part of OWL that is simple and
efficient to implement
• New approach for OWL 2: • Definition of several language profiles• languages should have efficient runtime complexity
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
58
OWL 2 Profiles• Approach:
• Identify maximal OWL 2 sub-languages (fragments) that are decidable in polynomial time
• Main reason for super-polynomial runtime: Non-Determinism (requires guessing / backtracking)• Disjunction or Negation + Conjunction• Maximum number restrictions• Combination of existential and universal quantification
in one superclass• Non-unary enumerated classes
• therefore not allowed for OWL 2 Profiles
• Attention: many other features may also lead to non- determinism...
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
59
• OWL 2 EL Profile is based on the description logic EL++:
Description Logic EL++• Conjunction C⊓D, existential Restriction ∃R.C, ⊤ and ⊥• Enumerated Classes, restricted property ranges• General property inclusion (RBox), Transitivity• NOT ALLOWED: Universal quantification, disjunction,
complement, number restrictions, disjunctiveness und inverted properties
⊓∃⊤⊥ ⊑ ⊓∃⊤⊥
OWL Profiles• OWL 2 EL• OWL 2 QL• OWL 2 RL
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
60
OWL Profiles• OWL 2 EL• OWL 2 QL• OWL 2 RL
• Advantages:• Polynomial complexity for standard entailment, i.e.
decidability, class membership, etc.• simple implementation• supports important ontologies (e.g. SNOMED-CT)
• OWL 2 EL Profile is based on the description logic EL++:
Description Logic EL++• Conjunction C⊓D, existential Restriction ∃R.C, ⊤ and ⊥• Enumerated Classes, restricted property ranges• General property inclusion (RBox), Transitivity• NOT ALLOWED: Universal quantification, disjunction,
complement, number restrictions, disjunctiveness und inverted properties
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
61
•OWL 2 EL Examples:• ∃has.Sorrow ⊑ ∃has.Liqueur
• ∃married.⊤ ⊓ CatholicPriest ⊑ ⊥
• German ⊑ ∃knows.{angela}
• hasParent º hasParent ⊑ hasGrandparent
OWL Profiles• OWL 2 EL• OWL 2 QL• OWL 2 RL
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
62
• OWL 2 QL Profile is based on description logic DL Lite:
• Example:• ∃married.⊤ ⊑ Lucky ⊓
∃has.noSorrows
Description Logic DL Lite• Superclasses (R⊑S): ⊓, ¬, ∃R.C
• Subclasses (R⊑S): ∃R.⊤
• inverse properties, simple property hierarchies• ABox like SHROIQ(D) • NOT ALLOWED: Universal quantification, enumerated classes, disjunction, self, functional and inverse functional properties, number restrictions, transitivity, general property inclusion, equality of individuals
OWL Profiles• OWL 2 EL• OWL 2 QL• OWL 2 RL
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
63
• OWL 2 QL Profile is based on description logic DL Lite:
• Advantages:• Sub-polynomial complexity (related to Relational Databases),
Instance retrieval in LogSpace• fast implementations available, scalable
Description Logic DL Lite• Superclasses (R⊑S): ⊓, ¬, ∃R.C
• Subclasses (R⊑S): ∃R.⊤
• inverse properties, simple property hierarchies• ABox like SHROIQ(D) • NOT ALLOWED: Universal quantification, enumerated classes, disjunction, self, functional and inverse functional properties, number restrictions, transitivity, general property inclusion, equality of individuals
OWL Profiles• OWL 2 EL• OWL 2 QL• OWL 2 RL
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
64
• OWL 2 RL Profile is based on Horn-Rule fragment of OWL2:• Subclass axioms (R⊑S) can be interpreted as rules
(R"S)
Horn-Rule fragment of OWL 2:• Superclasses (R⊑S): ⊓, ∃R.{a},∀R.C, ≤1R.C
• Subclasses (R⊑S): ⊓, ⊔, ∃R.C, ∃R.{a}
• ⊤, ⊥• NOT ALLOWED: negated facts, reflexivity, ...
OWL Profiles• OWL 2 EL• OWL 2 QL• OWL 2 RL
• Advantages:• Polynomial complexity (PTime-complete)• Simple Implementation (OWL Axioms as Rules)
• Related to rule languages
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
65
• OWL 2 RL Examples:• ∃parentOf.∃parentOf.⊤ ⊑ Grandparent
(as rule: parentOf(x,y) ⋀ parentOf(y,z) → Grandparent(x)
• Orphan ⊑ ∀hasParent.Dead(as rule: Orphan(x) ⋀ hasParent(x,y) → Dead(y)
• Monogamous ⊑ ≤1 married.Alive(as rule: Monogamous(x) ⋀ married(x,y) ⋀ Alive(y) ⋀ married(x,z) ⋀ Alive(z) → y=z )
• childOf º childOf ⊑ grandchildOf(as rule: childOf(x,y) ⋀ childOf(y,z) → grandchildOf(x,z) )
OWL Profiles• OWL 2 EL• OWL 2 QL• OWL 2 RL
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
66
OWL 2 FULL
• Extension of OWL 1 Full with new OWL 2 constructs, i.e. union of OWL 2 DL and RDFS
• Serves as conceptional modeling language, but currently only low software support for automated reasoning
• logical consistency of existing specification in not already clear (as of OWL 1 Full)
• But:• Many OWL 1 Full ontologies can now be interpreted as
OWL 2 DL ontology (cf. Punning)
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
67
•OWL 2 DL:• Pellet: http://clarkparsia.com/pellet/
• HermiT: http://www.hermit-reasoner.com/•OWL 2 EL:• CEL: http://code.google.com/p/cel/
•OWL 2 RL:• in principle all rule based reasoners
•OWL 2 QL:
• in principle all SQL databases (of course only with transcriptions...)
OWL 2 Reasoner
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
68
3. Knowledge Representation & Logic3.6 OWL 2
3.6 OWL 23.6.1 Development of OWL 2
3.6.2 From SHOIN(D) to SHROIQ(D)
3.6.3 OWL 2 Syntax3.6.4 Complexity and other Properties3.6.5 OWL 2 Profiles
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
69 3. Knowledge Representation and LogicsThe Languages of the Semantic Web - Part 2
• Excursion: Ontologies in Philosophy and Computer Science
• Recapitulation: Propositional Logic and First Order Logic
• Description Logics
• RDF(S) Semantics• OWL and OWL-Semantics• OWL 2
• Rules
Semantic Web Technologies Content
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
70
next lecture
Rules
&
the Se
mantic
Web
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
71
• 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.
Bibliography
3. Knowledge Representation & Logic3.6 OWL 2
Dienstag, 18. Dezember 12
Vorlesung Semantic Web, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
72
□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_10
3. Knowledge Representation & Logic3.6 OWL 2
Dienstag, 18. Dezember 12