Negated Properties in SWRLTab

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

Negated Properties in SWRLTab

Matt Williams-9
Dear All,

Is there any way of using negated properties in SWRL?

I would like to use a rule such as:

?a myProp ?b -> ?a not myOtherProp ?b

but the editor won't allow me.

Any ideas?

Matt

--
http://acl.icnet.uk/~mw
http://adhominem.blogsome.com/
+44 (0)7834 899570
_______________________________________________
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: Negated Properties in SWRLTab

Papapanagiwtou Petros
Dear Matt,

I'm afraid negation is not supported by SWRL.

Adding support for negation isn't a trivial matter. Negation-as-failure
is contradictory to the SW open-world assumption. Thus, SWRL is,
unfortunately, limited in this regard.

You'll have to think of a way around it, if any.

Petros

Matt Williams wrote:

> Dear All,
>
> Is there any way of using negated properties in SWRL?
>
> I would like to use a rule such as:
>
> ?a myProp ?b -> ?a not myOtherProp ?b
>
> but the editor won't allow me.
>
> Any ideas?
>
> Matt
>
>  

_______________________________________________
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: Negated Properties in SWRLTab

Matt Williams-9
Dear Petros,

Thanks for that - just a point that I was referring to negation, not
NAF, and they are not the same - after all, OWL has negation, but does
not have NAF.

Having said that, I can't see any references in the SWRL docs that talk
about negation, but then that would mean we can't write:

A(x) -> not B(x)

which would seem to be a fairly trivial assertion to make (and since it
does not extend OWL, should also not cause problems with reasoning).

Matt

Papapanagiotou Petros wrote:

> Dear Matt,
>
> I'm afraid negation is not supported by SWRL.
>
> Adding support for negation isn't a trivial matter. Negation-as-failure
> is contradictory to the SW open-world assumption. Thus, SWRL is,
> unfortunately, limited in this regard.
>
> You'll have to think of a way around it, if any.
>
> Petros
>
> Matt Williams wrote:
>> Dear All,
>>
>> Is there any way of using negated properties in SWRL?
>>
>> I would like to use a rule such as:
>>
>> ?a myProp ?b -> ?a not myOtherProp ?b
>>
>> but the editor won't allow me.
>>
>> Any ideas?
>>
>> Matt
>>
>>  
>
> _______________________________________________
> 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 

--
http://acl.icnet.uk/~mw
http://adhominem.blogsome.com/
+44 (0)7834 899570
_______________________________________________
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: Negated Properties in SWRLTab

Papapanagiwtou Petros
Dear Matt,

I was just referring to NAF to demonstrate the difficulty in defining
negation in SWRL at least for the lhs of the rules.

There's only the ComplementOf construction which could work as unary
negation over classes.

Moreover, if you're talking about the rhs, a simple workaround is to
build a class in OWL that satisfies the desired properties (or their
negation) and have the SWRL rule assert the variable object as an
instance of that class.

Petros

Matt Williams wrote:

> Dear Petros,
>
> Thanks for that - just a point that I was referring to negation, not
> NAF, and they are not the same - after all, OWL has negation, but does
> not have NAF.
>
> Having said that, I can't see any references in the SWRL docs that
> talk about negation, but then that would mean we can't write:
>
> A(x) -> not B(x)
>
> which would seem to be a fairly trivial assertion to make (and since
> it does not extend OWL, should also not cause problems with reasoning).
>
> Matt
>
> Papapanagiotou Petros wrote:
>> Dear Matt,
>>
>> I'm afraid negation is not supported by SWRL.
>>
>> Adding support for negation isn't a trivial matter.
>> Negation-as-failure is contradictory to the SW open-world assumption.
>> Thus, SWRL is, unfortunately, limited in this regard.
>>
>> You'll have to think of a way around it, if any.
>>
>> Petros
>>
>> Matt Williams wrote:
>>> Dear All,
>>>
>>> Is there any way of using negated properties in SWRL?
>>>
>>> I would like to use a rule such as:
>>>
>>> ?a myProp ?b -> ?a not myOtherProp ?b
>>>
>>> but the editor won't allow me.
>>>
>>> Any ideas?
>>>
>>> Matt
>>>
>>>  
>>
>> _______________________________________________
>> 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: Negated Properties in SWRLTab

Martin O'Connor

You can also use OWL descriptions in SWRL rules. You could rewrite the
rule to add a cardinality zero restriction for myOtherProp to
individuals that have a myProp value:

myProp(?a, ?b) -> (myOtherProp = 0)(?a)

However, the SWRLTab does not currently support the use of restrictions
in SWRL rules. This is something I hope to support when I migrate the
SWRLTab to Protege 4, which has much better reasoner integration.

OWL 1.1 has disjoint object properties that would also make this
possible (and cleaner).

Martin


Papapanagiotou Petros wrote:

>Dear Matt,
>
>I was just referring to NAF to demonstrate the difficulty in defining
>negation in SWRL at least for the lhs of the rules.
>
>There's only the ComplementOf construction which could work as unary
>negation over classes.
>
>Moreover, if you're talking about the rhs, a simple workaround is to
>build a class in OWL that satisfies the desired properties (or their
>negation) and have the SWRL rule assert the variable object as an
>instance of that class.
>
>Petros
>
>Matt Williams wrote:
>  
>
>>Dear Petros,
>>
>>Thanks for that - just a point that I was referring to negation, not
>>NAF, and they are not the same - after all, OWL has negation, but does
>>not have NAF.
>>
>>Having said that, I can't see any references in the SWRL docs that
>>talk about negation, but then that would mean we can't write:
>>
>>A(x) -> not B(x)
>>
>>which would seem to be a fairly trivial assertion to make (and since
>>it does not extend OWL, should also not cause problems with reasoning).
>>
>>Matt
>>
>>Papapanagiotou Petros wrote:
>>    
>>
>>>Dear Matt,
>>>
>>>I'm afraid negation is not supported by SWRL.
>>>
>>>Adding support for negation isn't a trivial matter.
>>>Negation-as-failure is contradictory to the SW open-world assumption.
>>>Thus, SWRL is, unfortunately, limited in this regard.
>>>
>>>You'll have to think of a way around it, if any.
>>>
>>>Petros
>>>
>>>Matt Williams wrote:
>>>      
>>>
>>>>Dear All,
>>>>
>>>>Is there any way of using negated properties in SWRL?
>>>>
>>>>I would like to use a rule such as:
>>>>
>>>>?a myProp ?b -> ?a not myOtherProp ?b
>>>>
>>>>but the editor won't allow me.
>>>>
>>>>Any ideas?
>>>>
>>>>Matt
>>>>
>>>>  
>>>>        
>>>>
>>>_______________________________________________
>>>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 
>
>  
>

_______________________________________________
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