Suitability of a KR for OBDM• Last time
– We explored how a KR (like OWL) can support• terminology development• schema development
– form and query expansion– debugging and integration
• Is OWL fit for these purposes?– Terminology?– Schema, query, etc?
• Shape?• Values?
• How do we work with standard datatypes?
1Friday, 28 March 14
Ontology Based Data Access (ODBA)• Ontology at run time?
– More, ontology for the end user!??!• By end user, I mean, “someone writing queries”
• Familiar– Controlled vocabulary– Query by example
• New– “Better” queries– Integrated views of data
Friday, 28 March 14
“Better” queries• Better how?
– Consider a simple schema– What does the logical schema look like?– Lots of variants
• Sane queries– SELECT hasAge FROM employee
WHERE hasSalary >= 50000;– SELECT hasAge FROM student
WHERE hasSalary >= 50000;– What about Persons?
• Union query?
• Rather write– SELECT hasAge FROM Person
WHERE hasSalary >= 50000;– no matter what kind of persons there are
Person
Student Employee
hasAge hasSalary
create table employee(id number(4) hasAge number(3), hasSalary number(6);create table student(id number(4) hasAge number(3), hasSalary number(5);
Friday, 28 March 14
What do we need?• Richer query language!
– Need at least conjunctive queries• I.e., patterns with explicit varibles• Increases complexity!
– Ontology sensitive!• The queries should respect the semantics
• Data access!– ETL...populate an ABox from a Database– Distributed
• Leave my database ALOOOOOONNNNNEE!!!!!
– Need mappings
• Good computation– Some fragments of OWL tuned for this
• Cf OWL QL and OWL EL• Polynomial; OWL QL has pure query expansion implementations
Friday, 28 March 14
OWL and Data (Properties)
Sebastian Brandt [email protected]
(Slides by Bijan Parsia, [email protected])
Friday, 28 March 14
OWL Has Two “Worlds”• The world of logic
– Classes, individuals, (object) object properties– Java analogue:
• Classes, instances, and object valued instance variables
• The world of “data”– Datatypes, data values, data properties
(well, these span worlds)– Java analogue:
• Primitive types, primitive data values, primitively-valued instance vars
6Friday, 28 March 14
The World of Logic: “Abstract”• Individuals are members of classes• We know nothing about them except what the ontology
says– Individual: Bijan Types: Person.– Individual: Sean Types: Person.– Class: Instructor SubClassOf: Person– What do we know about Bijan, Sean, Instructor, and Person?
• Individuals (etc.) are characterized entirely by the user axioms– Ok, mostly. Tautologies: Bijan Types: owl:Thing.– What’s left unsaid may or may not hold
• Open world assumption (and no unique name assumption)• Think of the various models
• Remember: the interpretation domain is arbitrary7
Friday, 28 March 14
The World of Data: “Concrete”
8
• Just as with primitive types, we have predefined names:– For individuals:
• 1, 2, 0, 1.0, “I’m a string!”, "51"^^xsd:integer– For sets of individuals (aka types)
• integer, xsd:string, xsd:nonNegativeInteger, xsd:decimal, etc.
• These names have a fixed interpretation!– That is, (“1”^^xsd:integer)I is always the integer 1.– xsd:integer is always the set of integers– The atomic names (singular and plural) have built-in meaning
• On the abstract side, this is only true for owl:Thing, owl:Nothing, owl:topObjectProperty, owl:bottomObjectProperty, owl:topDataProperty, owl:bottomDataProperty, and the logical connectives
• The actual meanings for the tops vary with the interpretation domain
Friday, 28 March 14
Fixed meaning!• There is a lot we know about integers
– DataProperty: Height Characteristics: Functional– Individual: Bijan Facts: height “6”^^xsd:integer
• We know that my height cannot be equal to 2, 4, or 8–Bijan Facts: height 6, height 2
» Inconsistent!• We know that my height cannot be a xsd:string
• Compare with:– ObjectProperty: Height Characteristics: Functional– Individual: Bijan height Six, height Two– What follows?
• We can replicate the inequality on the abstract side– Just add Individual: Six DifferentFrom: Two– For all integers… (DifferentIndividuals helps only a little)– Many more entailments to formalize... 9
Friday, 28 March 14
What Can We Define?• We have an “expression language” for data
– We can derive new types from our primitives•integer[>= 0 , <=150]• This is a restriction on integer (a DataRestriction)
– The subset of integers between 0 and 150, inclusive• “<=” and “>=” have built in meaning
– That the values respect, e.g., 1<=2 but not 2 <=1– We can name these expressions
• In a limited way•Datatype: personAge EquivalentTo: integer[>= 0 , <=150]
– We can express boolean combinations of expressions•not personAge•integer[>=0] or integer[<=150]•(integer[>=0] or integer[<=150]) and not personAge• (And enumerations, e.g., {1, 2, 3})
10
“facet”
Friday, 28 March 14
Between Two Worlds• DataProperties
– Disjoint from ObjectProperties– ObjectProperties are interpreted into the crossproduct of the
(abstract) domain (i.e., Δ⨯Δ)– DataProperties are interpreted into the crossproduct of the
abstract and data domains (i.e., Δ⨯Δd)– Δ and Δd are disjoint– Δd is a (large) superset of the union of the value spaces
• DataProperty Axioms– Most of the usual: Sub/Equivalent/Disjoint, etc.
• Restrictions on DataProperties– In general no “chaining”:
• No transitive, inverse, reflexive, etc.• Anything that would potentially “merge” the domains
11Friday, 28 March 14
Between Two Worlds
6
12
ΔI Δinteger
b
-1 10
2-2a
Example interpretation I
......
different type or sort
Bijan Facts: height “6”^^xsd:integer
•I•I•I
Fixed for any interpretationFriday, 28 March 14
Between Two Worlds• Class: To3 EquivalentTo: P min 3 Thing
• Individual: Bijan Facts: P X, P Y, P Z (*)
de
c
13
Δ Δ
Interpretation I
b
Bijan Bijan
b
Z
X
Y
•I
•I
•I
•J
•J•I
f
P•I
•J
•J
Interpretation JI ⊨ (*)
I ⊨ Bijan :Types To3
J ⊨ (*)
J ⊭ Bijan :Types To3
•J
object property
Friday, 28 March 14
Between Two Worlds• Class: To3 EquivalentTo: DP min 3 integer
• Individual: Bijan Facts: DP 1, DP 2, DP 3 (*)
14
Bijan
3ΔIΔinteger
DP
b-1
1
0
2
-2a
•I •I
Example interpretation I
I ⊨ (*) implies I ⊨ Bijan :Types To3 for any interpretation I
data property
Friday, 28 March 14
Two World Philosophy • OWL is for developing theories about the world
– Very blank slate– We’re cautious about what we conclude
• Pedantry is critical!
• We have excellent theories about integers– And strings! As well as how to compute with them
• There’s no point in trying to formalize integers– Integers should be a standard part of our language
• Very hard to recognize a half baked integer theory– As a theory of integers
15Friday, 28 March 14
The Standard Datatype Map: Types“Maths” Numbers String Misc
owl:realowl:rationalxsd:decimalxsd:integerxsd:nonNegativeIntegerxsd:nonPositiveIntegerxsd:positiveIntegerxsd:negativeIntegerxsd:longxsd:intxsd:shortxsd:bytexsd:unsignedLongxsd:unsignedIntxsd:unsignedShortxsd:unsignedByte
rdf:plainLiteralxsd:IRIxsd:stringxsd:normalizedStringxsd:tokenxsd:languagexsd:Namexsd:NCNamexsd:NMTOKEN
rdf:XMLLiteralxsd:boolean
owl:realowl:rationalxsd:decimalxsd:integerxsd:nonNegativeIntegerxsd:nonPositiveIntegerxsd:positiveIntegerxsd:negativeIntegerxsd:longxsd:intxsd:shortxsd:bytexsd:unsignedLongxsd:unsignedIntxsd:unsignedShortxsd:unsignedByte
rdf:plainLiteralxsd:IRIxsd:stringxsd:normalizedStringxsd:tokenxsd:languagexsd:Namexsd:NCNamexsd:NMTOKEN
Date and Time
owl:realowl:rationalxsd:decimalxsd:integerxsd:nonNegativeIntegerxsd:nonPositiveIntegerxsd:positiveIntegerxsd:negativeIntegerxsd:longxsd:intxsd:shortxsd:bytexsd:unsignedLongxsd:unsignedIntxsd:unsignedShortxsd:unsignedByte
rdf:plainLiteralxsd:IRIxsd:stringxsd:normalizedStringxsd:tokenxsd:languagexsd:Namexsd:NCNamexsd:NMTOKEN
xsd:dateTimexsd:dateTimeStamp
owl:realowl:rationalxsd:decimalxsd:integerxsd:nonNegativeIntegerxsd:nonPositiveIntegerxsd:positiveIntegerxsd:negativeIntegerxsd:longxsd:intxsd:shortxsd:bytexsd:unsignedLongxsd:unsignedIntxsd:unsignedShortxsd:unsignedByte
rdf:plainLiteralxsd:IRIxsd:stringxsd:normalizedStringxsd:tokenxsd:languagexsd:Namexsd:NCNamexsd:NMTOKEN Binary
owl:realowl:rationalxsd:decimalxsd:integerxsd:nonNegativeIntegerxsd:nonPositiveIntegerxsd:positiveIntegerxsd:negativeIntegerxsd:longxsd:intxsd:shortxsd:bytexsd:unsignedLongxsd:unsignedIntxsd:unsignedShortxsd:unsignedByte
rdf:plainLiteralxsd:IRIxsd:stringxsd:normalizedStringxsd:tokenxsd:languagexsd:Namexsd:NCNamexsd:NMTOKEN
xsd:hexBinaryxsd:hex64Binary
owl:realowl:rationalxsd:decimalxsd:integerxsd:nonNegativeIntegerxsd:nonPositiveIntegerxsd:positiveIntegerxsd:negativeIntegerxsd:longxsd:intxsd:shortxsd:bytexsd:unsignedLongxsd:unsignedIntxsd:unsignedShortxsd:unsignedByte
“Computer” Numbers xsd:hexBinaryxsd:hex64Binary
owl:realowl:rationalxsd:decimalxsd:integerxsd:nonNegativeIntegerxsd:nonPositiveIntegerxsd:positiveIntegerxsd:negativeIntegerxsd:longxsd:intxsd:shortxsd:bytexsd:unsignedLongxsd:unsignedIntxsd:unsignedShortxsd:unsignedByte
xsd:doublexsd:float
xsd:hexBinaryxsd:hex64Binary
16Friday, 28 March 14
The Standard Datatype Map: Facets“Maths” Numbers String Misc
xsd:minInclusivexsd:maxInclusexsd:minExclusivexsd:maxExclusive
xsd:lengthxsd:minLengthxsd:maxLengthxsd:pattern
(for rdf:plainLiteralrdf:langRange)
Nonexsd:minInclusivexsd:maxInclusexsd:minExclusivexsd:maxExclusive
xsd:lengthxsd:minLengthxsd:maxLengthxsd:pattern
(for rdf:plainLiteralrdf:langRange)
Date and Time
xsd:minInclusivexsd:maxInclusexsd:minExclusivexsd:maxExclusive
xsd:lengthxsd:minLengthxsd:maxLengthxsd:pattern
(for rdf:plainLiteralrdf:langRange)
xsd:minInclusivexsd:maxInclusexsd:minExclusivexsd:maxExclusive
xsd:minInclusivexsd:maxInclusexsd:minExclusivexsd:maxExclusive
xsd:lengthxsd:minLengthxsd:maxLengthxsd:pattern
(for rdf:plainLiteralrdf:langRange)
Binary
xsd:minInclusivexsd:maxInclusexsd:minExclusivexsd:maxExclusive
xsd:lengthxsd:minLengthxsd:maxLengthxsd:pattern
(for rdf:plainLiteralrdf:langRange)
xsd:lengthxsd:minLengthxsd:maxLength
xsd:minInclusivexsd:maxInclusexsd:minExclusivexsd:maxExclusive
“Computer” Numbers xsd:lengthxsd:minLengthxsd:maxLength
xsd:minInclusivexsd:maxInclusexsd:minExclusivexsd:maxExclusive
xsd:minInclusivexsd:maxInclusexsd:minExclusivexsd:maxExclusive
xsd:lengthxsd:minLengthxsd:maxLength
17
integer[<= 0
, >= 150]
Friday, 28 March 14
The Standard Datatype Map“Maths” Numbers String Misc
Everything derived from owl:Real. Note that there area many elements of owl:Real which have no lexical form.
Everything derived from rdf:plainLiteral except xsd:IRI (which is disjoint from the rest)
Mutually DisjointEverything derived from owl:Real. Note that there area many elements of owl:Real which have no lexical form.
Everything derived from rdf:plainLiteral except xsd:IRI (which is disjoint from the rest)
Date and Time
Everything derived from owl:Real. Note that there area many elements of owl:Real which have no lexical form.
Everything derived from rdf:plainLiteral except xsd:IRI (which is disjoint from the rest)
Mutually disjoint
Everything derived from owl:Real. Note that there area many elements of owl:Real which have no lexical form.
Everything derived from rdf:plainLiteral except xsd:IRI (which is disjoint from the rest)
Binary
Everything derived from owl:Real. Note that there area many elements of owl:Real which have no lexical form.
Everything derived from rdf:plainLiteral except xsd:IRI (which is disjoint from the rest)
Mutually disjoint
Everything derived from owl:Real. Note that there area many elements of owl:Real which have no lexical form.
“Computer” Numbers Mutually disjoint
Everything derived from owl:Real. Note that there area many elements of owl:Real which have no lexical form.
Disjoint from owl:Real (and the other categories) and each other
Mutually disjoint
18Friday, 28 March 14
Key Restrictions• Restrictions on datatypes: “admissible”
– Support top predicate– Closed under negation– Satisfiability of conjunctions is decidable
• integer[<=0] and integer[>=10] is unsatisfiable
• We consider only unary predicates
• Benefits– Admissible datatypes + OWL(DL) = decidable KR formalism– Can be implemented using a “datatype oracle”
• Simply extend existing reasoner by solvers for datatypes• No need to build new reasoner from scratch
19Friday, 28 March 14
Robustness of Datatypes• Semantically robust
– Ontologies don’t change when you add or remove non-used datatypes
• Computationally robust– Very robust for decidability– Complexity is a bit trickier
• Implementably robust– Highly modular implementation
• Expressively limited– Can’t even say “a square’s height equals its width”!– Can’t talk about the whole data domain
• We trade off expressivity for robustness
20Friday, 28 March 14
Two World Philosophy BenefitsFrom a user perspective:• + Integers "Just Work"
• So do strings, floats, decimals, etc.• Powerful constructors
• + Normal syntax• + Clean separation
(data and objects; user theory and builtin theory)• May be a -
• - Limits on user extensibility• And transparency, explorability
• - Expressivity restrictions (no addition!)• From a theory perspective:
• + Analyzable• From an implementation perspective:
• + Modular implementation• - Must extend implementation to accommodate new types, facets
21Friday, 28 March 14
Liberalization• Our restrictions are overstrict
– Simple generalisation: Allow n-ary comparisons• Not just age some integer[>=5]• Compare values on different properties
– age only integer[<= height] (made up syntax!)– Bijan Facts: age 42, height 6
• Note that these still must be path free!– No, Person that hasCar hasAge
» only integer[= hasHouse hasAge]– People whose cars are only as old as their houses
– We can liberalize this a bit further• Allow for (linear) (in)equations as “predicates”
22
EquivalentClasses(SafelyDosedPatient DataAllValuesFrom(tookDrugInAmount weight DataComparison(Arguments(totalDoseInMg weightinKg) leq(totalDoseInMg times(2, weightInKg)))))
Friday, 28 March 14
Top Related