hasValue restriction on datatype property not taken into account..

View: New views
5 Messages — Rating Filter:   Alert me  

hasValue restriction on datatype property not taken into account..

by skouk :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have defined a hasValue restriction on a functional datatype property in Protege:
<rdfs:subClassOf>
      <owl:Class>
        <owl:unionOf rdf:parseType="Collection">
          <owl:Restriction>
            <owl:hasValue rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
            >0</owl:hasValue>
            <owl:onProperty>
              <owl:FunctionalProperty rdf:ID="value"/>
            </owl:onProperty>
          </owl:Restriction>
          <owl:Restriction>
            <owl:hasValue rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
            >1</owl:hasValue>
            <owl:onProperty>
              <owl:FunctionalProperty rdf:about="#value"/>
            </owl:onProperty>
          </owl:Restriction>
        </owl:unionOf>
      </owl:Class>
    </rdfs:subClassOf>

So "value" property can only takes values 0 and 1. I created an individual of this class and gave a value other than 0 and 1, however Pellet does not signal any errors. Did I do anything wrong?

Re: hasValue restriction on datatype property not taken into account..

by Tania Tudorache :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I could not reproduce this. What version of protege did you use? I
suppose you used the direct reasoner, not the DIG reasoner, right?

Can you send us the ontology?

Thanks,
Tania

skouk wrote:

> I have defined a hasValue restriction on a functional datatype property in
> Protege:
> <rdfs:subClassOf>
>       <owl:Class>
>         <owl:unionOf rdf:parseType="Collection">
>           <owl:Restriction>
>             <owl:hasValue
> rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>             >0</owl:hasValue>
>             <owl:onProperty>
>               <owl:FunctionalProperty rdf:ID="value"/>
>             </owl:onProperty>
>           </owl:Restriction>
>           <owl:Restriction>
>             <owl:hasValue
> rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>             >1</owl:hasValue>
>             <owl:onProperty>
>               <owl:FunctionalProperty rdf:about="#value"/>
>             </owl:onProperty>
>           </owl:Restriction>
>         </owl:unionOf>
>       </owl:Class>
>     </rdfs:subClassOf>
>
> So "value" property can only takes values 0 and 1. I created an individual
> of this class and gave a value other than 0 and 1, however Pellet does not
> signal any errors. Did I do anything wrong?
>  

_______________________________________________
protege-owl mailing list
protege-owl@...
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 

Re: hasValue restriction on datatype property not taken into account..

by Tania Tudorache :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you for sending the ontology.

The DIG reasoner does not support the hasValue restriction, so this
restriction will not be sent to the reasoner. Probably you also got in
the reasoner window some warnings that hasValue construct is not
supported by DIG 1.1 and it will be ignored.

I suggest that you upgrade to the latest version of Protege 3.4 beta and
use the direct reasoner [1], which will signal that the ontology is
inconsistent, and it will also give you a reason for it. The direct
reasoner communicates with the reasoner using the API, rather than DIG,
and therfore it will not have the DIG drawbacks.

I have tested the direct reasoner in Protege 3.4 beta with your ontology
and it works fine.

Cheers,
Tania

[1]:
http://protegewiki.stanford.edu/index.php/Using_Reasoners#Using_the_Direct_Reasoner



Tania Tudorache wrote:

> I could not reproduce this. What version of protege did you use? I
> suppose you used the direct reasoner, not the DIG reasoner, right?
>
> Can you send us the ontology?
>
> Thanks,
> Tania
>
> skouk wrote:
>  
>> I have defined a hasValue restriction on a functional datatype property in
>> Protege:
>> <rdfs:subClassOf>
>>       <owl:Class>
>>         <owl:unionOf rdf:parseType="Collection">
>>           <owl:Restriction>
>>             <owl:hasValue
>> rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>>             >0</owl:hasValue>
>>             <owl:onProperty>
>>               <owl:FunctionalProperty rdf:ID="value"/>
>>             </owl:onProperty>
>>           </owl:Restriction>
>>           <owl:Restriction>
>>             <owl:hasValue
>> rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>>             >1</owl:hasValue>
>>             <owl:onProperty>
>>               <owl:FunctionalProperty rdf:about="#value"/>
>>             </owl:onProperty>
>>           </owl:Restriction>
>>         </owl:unionOf>
>>       </owl:Class>
>>     </rdfs:subClassOf>
>>
>> So "value" property can only takes values 0 and 1. I created an individual
>> of this class and gave a value other than 0 and 1, however Pellet does not
>> signal any errors. Did I do anything wrong?
>>  
>>    
>
> _______________________________________________
> protege-owl mailing list
> protege-owl@...
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
>
>  

_______________________________________________
protege-owl mailing list
protege-owl@...
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 

Re: hasValue restriction on datatype property not taken into account..

by skouk :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you very much Tania for your tips.

Actually I know that the DIG reasoner has many limitations but the strange thing is that even the direct reasoner sometimes did not signal the error. Then I found out what the problem is. I had declared that the property with the hasValue restriction has range xsd:int. When I gave the individual of the restricted class a value larger than 127 the reasoner would not signal the error. I guess this is probably because xsd:int can only take values -128 to 127, right?

So I declared that the property has range xsd:long but even that is not enough. What I probably need to do is to use xsd:long even for the datatype values when defining the restriction, so actually I need to be able to define that piece of OWL in Protege:

<rdfs:subClassOf>
       <owl:Class>
         <owl:unionOf rdf:parseType="Collection">
           <owl:Restriction>
             <owl:hasValue
 rdf:datatype="http://www.w3.org/2001/XMLSchema#long"
             >0</owl:hasValue>
             <owl:onProperty>
               <owl:FunctionalProperty rdf:ID="value"/>
             </owl:onProperty>
           </owl:Restriction>.....

However, I am not sure how I can do that in the expression builder of Protege. Any hints?

Thanks in advance.



Tania Tudorache wrote:
Thank you for sending the ontology.

The DIG reasoner does not support the hasValue restriction, so this
restriction will not be sent to the reasoner. Probably you also got in
the reasoner window some warnings that hasValue construct is not
supported by DIG 1.1 and it will be ignored.

I suggest that you upgrade to the latest version of Protege 3.4 beta and
use the direct reasoner [1], which will signal that the ontology is
inconsistent, and it will also give you a reason for it. The direct
reasoner communicates with the reasoner using the API, rather than DIG,
and therfore it will not have the DIG drawbacks.

I have tested the direct reasoner in Protege 3.4 beta with your ontology
and it works fine.

Cheers,
Tania

[1]:
http://protegewiki.stanford.edu/index.php/Using_Reasoners#Using_the_Direct_Reasoner



Tania Tudorache wrote:
> I could not reproduce this. What version of protege did you use? I
> suppose you used the direct reasoner, not the DIG reasoner, right?
>
> Can you send us the ontology?
>
> Thanks,
> Tania
>
> skouk wrote:
>  
>> I have defined a hasValue restriction on a functional datatype property in
>> Protege:
>> <rdfs:subClassOf>
>>       <owl:Class>
>>         <owl:unionOf rdf:parseType="Collection">
>>           <owl:Restriction>
>>             <owl:hasValue
>> rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>>             >0</owl:hasValue>
>>             <owl:onProperty>
>>               <owl:FunctionalProperty rdf:ID="value"/>
>>             </owl:onProperty>
>>           </owl:Restriction>
>>           <owl:Restriction>
>>             <owl:hasValue
>> rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>>             >1</owl:hasValue>
>>             <owl:onProperty>
>>               <owl:FunctionalProperty rdf:about="#value"/>
>>             </owl:onProperty>
>>           </owl:Restriction>
>>         </owl:unionOf>
>>       </owl:Class>
>>     </rdfs:subClassOf>
>>
>> So "value" property can only takes values 0 and 1. I created an individual
>> of this class and gave a value other than 0 and 1, however Pellet does not
>> signal any errors. Did I do anything wrong?
>>  
>>    
>
> _______________________________________________
> protege-owl mailing list
> protege-owl@lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
>
>  

_______________________________________________
protege-owl mailing list
protege-owl@lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 

Re: hasValue restriction on datatype property not taken into account..

by Tania Tudorache :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

skouk wrote:

> Thank you very much Tania for your tips.
>
> Actually I know that the DIG reasoner has many limitations but the strange
> thing is that even the direct reasoner sometimes did not signal the error.
> Then I found out what the problem is. I had declared that the property with
> the hasValue restriction has range xsd:int. When I gave the individual of
> the restricted class a value larger than 127 the reasoner would not signal
> the error. I guess this is probably because xsd:int can only take values
> -128 to 127, right?
>
>  
I am not sure why the inference is not made if the value is out of
range. You could ask on the Pellet mailing list.

> So I declared that the property has range xsd:long but even that is not
> enough. What I probably need to do is to use xsd:long even for the datatype
> values when defining the restriction, so actually I need to be able to
> define that piece of OWL in Protege:
>
> <rdfs:subClassOf>
>        <owl:Class>
>          <owl:unionOf rdf:parseType="Collection">
>            <owl:Restriction>
>              <owl:hasValue
>  rdf:datatype="http://www.w3.org/2001/XMLSchema#long"
>              >0</owl:hasValue>
>              <owl:onProperty>
>                <owl:FunctionalProperty rdf:ID="value"/>
>              </owl:onProperty>
>            </owl:Restriction>.....
>
> However, I am not sure how I can do that in the expression builder of
> Protege. Any hints?
>  

I could not find a way of doing this in the restriction editor in
Protege 3.. But, you can do it in Protege 4 :) It would look like:

myProp value "0"^^long

Tania

> Thanks in advance.
>
>
>
>
> Tania Tudorache wrote:
>  
>> Thank you for sending the ontology.
>>
>> The DIG reasoner does not support the hasValue restriction, so this
>> restriction will not be sent to the reasoner. Probably you also got in
>> the reasoner window some warnings that hasValue construct is not
>> supported by DIG 1.1 and it will be ignored.
>>
>> I suggest that you upgrade to the latest version of Protege 3.4 beta and
>> use the direct reasoner [1], which will signal that the ontology is
>> inconsistent, and it will also give you a reason for it. The direct
>> reasoner communicates with the reasoner using the API, rather than DIG,
>> and therfore it will not have the DIG drawbacks.
>>
>> I have tested the direct reasoner in Protege 3.4 beta with your ontology
>> and it works fine.
>>
>> Cheers,
>> Tania
>>
>> [1]:
>> http://protegewiki.stanford.edu/index.php/Using_Reasoners#Using_the_Direct_Reasoner
>>
>>
>>
>> Tania Tudorache wrote:
>>    
>>> I could not reproduce this. What version of protege did you use? I
>>> suppose you used the direct reasoner, not the DIG reasoner, right?
>>>
>>> Can you send us the ontology?
>>>
>>> Thanks,
>>> Tania
>>>
>>> skouk wrote:
>>>  
>>>      
>>>> I have defined a hasValue restriction on a functional datatype property
>>>> in
>>>> Protege:
>>>> <rdfs:subClassOf>
>>>>       <owl:Class>
>>>>         <owl:unionOf rdf:parseType="Collection">
>>>>           <owl:Restriction>
>>>>             <owl:hasValue
>>>> rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>>>>             >0</owl:hasValue>
>>>>             <owl:onProperty>
>>>>               <owl:FunctionalProperty rdf:ID="value"/>
>>>>             </owl:onProperty>
>>>>           </owl:Restriction>
>>>>           <owl:Restriction>
>>>>             <owl:hasValue
>>>> rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>>>>             >1</owl:hasValue>
>>>>             <owl:onProperty>
>>>>               <owl:FunctionalProperty rdf:about="#value"/>
>>>>             </owl:onProperty>
>>>>           </owl:Restriction>
>>>>         </owl:unionOf>
>>>>       </owl:Class>
>>>>     </rdfs:subClassOf>
>>>>
>>>> So "value" property can only takes values 0 and 1. I created an
>>>> individual
>>>> of this class and gave a value other than 0 and 1, however Pellet does
>>>> not
>>>> signal any errors. Did I do anything wrong?
>>>>  
>>>>    
>>>>        
>>> _______________________________________________
>>> protege-owl mailing list
>>> protege-owl@...
>>> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>>>
>>> Instructions for unsubscribing:
>>> http://protege.stanford.edu/doc/faq.html#01a.03 
>>>
>>>  
>>>      
>> _______________________________________________
>> protege-owl mailing list
>> protege-owl@...
>> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>>
>> Instructions for unsubscribing:
>> http://protege.stanford.edu/doc/faq.html#01a.03 
>>
>>
>>    
>
>  

_______________________________________________
protege-owl mailing list
protege-owl@...
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
LightInTheBox - Buy quality products at wholesale price