Reputation: 2436
OWL uses Open World Assumptions. Thus if I have class Animal and property eats (domain Animal, range Animal) Mouse, Cat (eats Mouse), Dog and if I state the DL Query for instances (Protege 5.2) Animal and not (eats some) the result is empty.
Is there any way to make this query return Mouse and Dog with Owl e.g. make it somehow behave closed world?
thanks,
Upvotes: 1
Views: 681
Reputation: 4772
The main point is as you implied: you have close the world in some way. I.e. currently there is nothing in your ontology from which the reasoner can infer that Dog
and Mouse
don't eat mice. This can be achieved by:
Class: Animal
DisjointUnionOf:
Cat, Dog, Mouse
Class: Cat
EquivalentTo:
eats some Mouse
SubClassOf:
Animal
Class: Dog
SubClassOf:
Animal,
eats only (not (Mouse))
Class: Mouse
SubClassOf:
Animal,
eats only (not (Mouse))
I have written about some of the ways in which open world assumption issues can be avoided when using existential (some
) and universal (only
) property restrictions here and here.
As an aside: You may want to rethink your domain and range restrictions on eats
. What domain and range restrictions do is whenever, in this case, one individual eats another individual, it will infer that both individuals are of type Animal
. This would mean if an individual of type Mouse
eats say cheese, it will infer that the cheese is an Animal
.
Upvotes: 2