semantic constraints on properties

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

semantic constraints on properties

selma selma
Hello,
Is it possible to express semantic constraints on properties in owl. I give an example: Date1 and Date2 are two datatype properties. I have a contraint which is always true: 
date2 = Date1 + 5 days.
How can I insert this statement in my ontology ?
Thanks.

_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
Reply | Threaded
Open this post in threaded view
|

Re: semantic constraints on properties

Timothy Redmond
On 05/16/2011 10:24 AM, selma selma wrote:
Hello,
Is it possible to express semantic constraints on properties in owl. I give an example: Date1 and Date2 are two datatype properties. I have a contraint which is always true: 
date2 = Date1 + 5 days.
How can I insert this statement in my ontology ?

At a first cut this is impossible in OWL DL.   However a good option in this case would be to use SWRL.  You should be able to state the constraint as a SWRL rule.

-Timothy



Thanks.
_______________________________________________ protege-owl mailing list [hidden email] https://mailman.stanford.edu/mailman/listinfo/protege-owl Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03


_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
Reply | Threaded
Open this post in threaded view
|

Re: semantic constraints on properties

Thomas Russ
In reply to this post by selma selma

On May 16, 2011, at 10:24 AM, selma selma wrote:

> Hello,
> Is it possible to express semantic constraints on properties in owl. I give an example: Date1 and Date2 are two datatype properties. I have a contraint which is always true:
> date2 = Date1 + 5 days.
> How can I insert this statement in my ontology ?

This cannot be expressed in OWL.  OWL does not allow constraints between the values of different properties.

As Timothy Redmond notes, you could write a SWRL rule that would assert the Date2 property value.  But I'm not sure what would happen if this conflicted with an existing value.  I would hope that this would just lead to two value assertions, and if the property were functional, then this would lead to an inconsistent ontology.  Perhaps Martin O'Connor can explain exactly what would occur.

_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
Reply | Threaded
Open this post in threaded view
|

Re: semantic constraints on properties

Martin O'Connor

Yes - a SWRL rule (with built-ins) can be used asserts a value for date2. If this value differs from an existing value then the property will effectively get two values. If the property is functional then a reasoner should indicate that the ontology is inconsistent.

Martin

----- Original Message -----
From: "Thomas Russ" <[hidden email]>
To: "User support for the Protege-OWL editor" <[hidden email]>
Sent: Monday, May 16, 2011 10:16:36 PM
Subject: Re: [protege-owl] semantic constraints on properties


On May 16, 2011, at 10:24 AM, selma selma wrote:

> Hello,
> Is it possible to express semantic constraints on properties in owl. I give an example: Date1 and Date2 are two datatype properties. I have a contraint which is always true:
> date2 = Date1 + 5 days.
> How can I insert this statement in my ontology ?

This cannot be expressed in OWL.  OWL does not allow constraints between the values of different properties.

As Timothy Redmond notes, you could write a SWRL rule that would assert the Date2 property value.  But I'm not sure what would happen if this conflicted with an existing value.  I would hope that this would just lead to two value assertions, and if the property were functional, then this would lead to an inconsistent ontology.  Perhaps Martin O'Connor can explain exactly what would occur.

_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

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