MiP
MiP

Reputation: 483

Define mutiple domains/ranges in a same propery in OWL

What's the correct way to set domains/ranges of data/object properties in OWL?

If I have two classes A, B and a data property hasName:

<Declaration><Class IRI="#A"/></Declaration>
<Declaration><Class IRI="#B"/></Declaration>
<Declaration><DataProperty IRI="#hasName"/></Declaration>
<FunctionalDataProperty>
    <DataProperty IRI="#hasName"/>
</FunctionalDataProperty>
<DataPropertyRange>
    <DataProperty IRI="#hasName"/>
    <Datatype abbreviatedIRI="xsd:string"/>
</DataPropertyRange>

I want to set class A and class B as solely domains for hasName. I tried to do it in three ways, which approach bellow is correct?

From option 1, I got 3 results from HermiT reasoner: A, B, and owl:Thing, but when I read this post he said that I wrote wrong semantics and should've use owl:unionOf.

Then I tried to express the classes like in option 2, but when I infered again, I only get the class owl:Thing, not A or B.

With option 3, I set the classes as domains in the equivalent class axioms. It could work but then I cannot use the powerful reasoner tool to infer:

Set<OWLClass> classes = reasoner.getDataPropertyDomains(hasNameProperty, false).getFlattened();

Upvotes: 3

Views: 1225

Answers (1)

UninformedUser
UninformedUser

Reputation: 8465

First and most important point: Domain and range for a property hasName in OWL semantics are not restrictions on hasName! Instead, those axioms are used to infer types of individuals that are related via the property hasName.

Option 1

Regarding your example, it declares multiple domains for the property hasName, which means the intersection of those classes, i.e. A and B.

Option 2

This is indeed the most common way.

Option 3

I don't get what you're doing here. But in OWL the Open World Assumption (OWA) holds, which means unknown information is not considered to be false. It's just unknown. Thus, if you have an individual a that is only related to an individual x via property hasName a standard OWL reasoner cannot (and must not) conclude that a belongs to class A.

Note, the semantic equivalent subClassOf axiom for a domain axiom in OWL is (in pseudo Manchester Syntax)

hasName Domain: A

(hasName some owl:Thing) SubClassOf: A

Upvotes: 3

Related Questions