0

I am studying the inference in OWL, currently the restriction in domain definition:

@prefix : <http://www.test.org/2015/4/ontology#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@base <http://www.test.org/2015/4/ontology> .

<http://www.test.org/2015/4/ontology> rdf:type owl:Ontology .


:Class1 rdf:type owl:Class .

:Prop1 rdf:type owl:DatatypeProperty ;
       rdfs:domain [ rdf:type owl:Class ;
                 owl:intersectionOf ( :Class1
                                      [ rdf:type owl:Restriction ;
                                        owl:onProperty :Prop1 ;
                                        owl:hasValue "class1"
                                      ]
                                    )
               ] .

:Ind1 rdf:type owl:NamedIndividual ;
      :Prop1 "p" .

I've expected that the reasoner (Pellet) infers

:Ind1 rdf:type :Class1 

only if there is

:Ind1 :Prop1 "class1"

but it seems to ignore the restriction in the domain definition.

Is it correct to define restrictions in damain definitions? The reasoner (Pellet) does not forbid me to do that.

igor.br
  • 29
  • 7
  • "seems to ignore the restriction in the damain definition." What do you base that on? Does Pellet say that something is false? Do you see a result that you do not expect? Do you not see a result that you do expect? Note that Protege does not show datatype inferences by default, as explained in [this answer](http://stackoverflow.com/a/21592981/1281433); you have to change the Protege settings to display datatype inferences. – Joshua Taylor Apr 03 '15 at 14:31
  • Maybe I'm wrong in understanding of the domain restriction of the property Prop1 **:Class1 and :Prop1 value "class1"**. I understand it as **:Prop1 belongs to domain :Class1 if its value is "class1"**. Thus if **:Ind1 :Prop1 "p"** than the :Ind1 should not be of type :Class1 – igor.br Apr 03 '15 at 20:50
  • A value restriction is just another kind of class. E.g., **(hasFavoriteFlavor value "vanilla")** is the class of individuals that have "vanilla" as the value of the "hasFavoriteFlavor" property. – Joshua Taylor Apr 03 '15 at 20:52
  • When you say that the domain of prop1 is "Class1 and (prop1 value "class1")", you're saying that *if* something has any value for prop1, then it is a member of the Class1, and a member of (prop1 value "class1"), which means that it has the "class1" as a value for prop1. Remember that individuals can have more than one value for a property, so you can have `x hasName "Abe"` and `x hasName "Abraham"`. – Joshua Taylor Apr 03 '15 at 20:54
  • Exactly the _:Ind1 :Prop1 "class1"_ has been inferred by reasoner. Ok, I've understood your explanation. Thank you. I was looking for how to define a condition in property domain defintion. Is it possible at all? – igor.br Apr 03 '15 at 21:25
  • What do you mean by "a condition in property domain"? – Joshua Taylor Apr 03 '15 at 21:36
  • E.g. _Prop1 belongs to domain :Class1 if its value is "class1"_ – igor.br Apr 03 '15 at 21:39
  • Sure, you just use a subclass axiom: **(Prop1 value "class1") SubClassOf Class1** That says that "IF an individual has value "class1" for Prop1, THEN it is a member of Class1". That's a "general class axiom" since it has a complex class expression on the left side. [This answer](http://stackoverflow.com/a/16973359/1281433) shows where to enter those in Protege (since it's not obvious). So does [this answer](http://stackoverflow.com/a/22535681/1281433). And [this answer](http://stackoverflow.com/a/21245642/1281433). – Joshua Taylor Apr 03 '15 at 21:43

0 Answers0