3
votes

I'm playing with Protégé 5 to build ontologies. After googling around on the topic of domains and ranges, I'm seeing that domains and ranges are not necessarily the right way to relate two things.

[protege-owl] Specifying domain and range in object properties:

The important thing to remember is that OWL restrictions enable
inference. So what that means is that if you supply domain and range information for object properties, then those classes can be inferred based on the use of the property. In particular, domain and ranges
are NOT type checks in the sense of traditional programming
languages. They can only (sometimes) act that way if you have enough disjointness information to be able to create a logical inconsistency.

So, for example, let's assume that we have the following ontology

Class: Person
Class: Vehicle
Class: Engine
Property: hasEngine :domain Vehicle :range Engine

John isa Person
John hasEngine engine-1

At this point, inference will occur and conclude that John isa
Vehicle. This is not a type violation because the domain and range
information are used for inference. (If Person and Vehicle were
declared to be disjoint classes, then an inconsistent ontology would
result, which is closer to a classical type-checking result, but it
only applies if the classes really are disjoint).

So, if domains and ranges are bad, then what should I use instead to model relationships between classes of Things?

Edit: I originally had stated that there were no domain / range fields in the new version. Almost immediately after posting this, I realized that those fields were, in fact, still available.

1
Where don't you have domain and range fields for object properties? Both Protege 5 Beta and Web Protege have such fields...Joshua Taylor
@JoshuaTaylor you're right, they both have those fields. question updated :)Kristian

1 Answers

6
votes

You can still declare the domains and ranges of object properties in Protege 5. Here's a screenshot from the Protege 5 beta with an object property hasParent which has a domain Human:

object property with domain in Protege 5 Beta

You can do the same in Web Protege too:

object property with domain in Web Protege

That said, if for some reason you couldn't use rdfs:domain and rdfs:range axioms, you can get the same effect using restrictions and subclass axioms. The axioms:

p rdfs:range R
p rdfs:domain D

are equivalent to

⊤ ⊑ ∀p.R
⊤ ⊑ ∀p-1.D

or in Manchester syntax

owl:Thing subClassOf p only R
owl:Thing subClassOf (inverse p) only D

I think that the message on the list is just pointing out one of the common pitfalls that users have when coming to OWL from a typed programming language; they expect that "car72 hasSocialSecurityNumber xxx" will be an inconsistency because the domain of hasSocialNumber is Person and car72 has type Car . Instead, car72 will be inferred to have types Car and Person, which isn't inconsistent unless there are additional axioms that make it inconsistent.