2

I am studying the notion of OWL restrictions with Protege 4 using FaCT++ and a trivial ontology. Suppose I have an individual foo of class Something:

:Something a owl:Class.
:foo a :Something, owl:NamedIndividual.

and another class defined from a restriction on the hasBar property:

:hasBar a owl:ObjectProperty.
:SomethingElse owl:equivalentClass [a owl:Restriction;
                                    owl:onProperty :hasBar;
                                    owl:allValuesFrom :Something].

If I assert that:

:x :hasBar :foo.

why can't I infer from it that x is a SomethingElse (via the fact that foo is a Something)? The only way I can make it work is if the range of hasBar is defined:

:hasBar a owl:ObjectProperty;
        rdfs:range :Something.

But I'd like to avoid that, because it puts a constraint on what can be the subject of hasBar (which causes me further trouble).

cjauvin
  • 3,433
  • 4
  • 29
  • 38

1 Answers1

3

I think it is simpler to reason over real examples, let's consider the following knowledge base:

:eats rdf:type owl:ObjectProperty .

:Vegetable rdf:type owl:Class ;
       rdfs:subClassOf owl:Thing .

:Vegetarian rdf:type owl:Class ;
        owl:equivalentClass [ rdf:type owl:Restriction ;
                              owl:onProperty :eats ;
                              owl:allValuesFrom :Vegetable
                            ] .

:Carrot rdf:type :Vegetable ,
             owl:NamedIndividual .

:John rdf:type owl:NamedIndividual , owl:Thing ;
      :eats :carrot .

You have some equivalences with your example: hasBar is eats, Vegetarian is SomethingElse, Vegetable is Something, foo is carrot and finally x is John.

Now you would like to infer that John is a Vegetarian (= x is SomethingElse).

It makes sense that it doesn't work with an owl:allValuesFrom. What you are saying here is that all instances of vegetarian, if they have a property, they must have Vegetable in range. So from that you could deduce that carrot is a vegetable for example, assuming you would know that John is a vegetarian in the first place.

It makes sense in natural language too: In your ontology you only know that John eats a carrot, this doesn't automatically make him a vegetarian (non-vegetarian people eat also carrots).

You could use a owl:someValuesFrom instead of a owl:allValuesFrom. This way, you would define every vegetarian has someone that eats some vegetable. In this case if we know that John eats a carrot, therefore he would be classified as vegetarian by the reasoner, based on your definition of the concept vegetarian.

Universal (allValuesFrom) and existential (someValuesFrom) restrictions are complicated to understand, there is often no right or wrong solution, it mostly depends to what you want to achieve.

loopasam
  • 3,027
  • 2
  • 21
  • 22
  • Thanks for the detailed answer! I had already figured out that using `owl:someValuesFrom` works better in that case, but this explains nicely why. Even though my intuition easily accepts your natural language interpretation, I still find that in a sense, you could argue that given all you know about the world (namely that `John` `eats` a `Carrot`, which is a `Vegetable`), the condition for being in the `owl:allValuesFrom` version of the `Vegetarian` restriction are thus fully satisfied. But I guess this is related to the open/closed world notion, which I don't fully grok yet. – cjauvin Apr 16 '13 at 12:45
  • yeah, restrictions are super tricky, but the reasoner helps you out as you have seen, to better understand the semantics of OWL. Good luck! – loopasam Apr 16 '13 at 13:32