Search Mailing List Archives

Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] FW: SWRL rule problem : y isSiblingOf y

Martin O'Connor sunid at
Sat Sep 2 09:31:33 PDT 2006

swrlb:notEqual (like all SWRL core built-in comparison operations)
applies only to datatypes - it can not be used with individuals. cf. for its definition. I
will try to throw a more intelligent exception when it is used with

You need to use the SWRL language construct differentFrom(?x, ?y). And
to make this work the way you intend in your rule, you will need to
explicitly state that all individuals of type person are distinct using
the owl:allDifferent construct.


Ramnath, Vasudha wrote:

>I guess you should add a swrlb:notEqual(?x, ?y) clause and try.
>since Person(?x) and Person(?y) will each match all the instances of Persons and the Person X Person space will have (Anna, Anna) etc.. too ?
>-----Original Message-----
>From: protege-owl-bounce at crg-gw.Stanford.EDU [mailto:protege-owl-bounce at crg-gw.Stanford.EDU] On Behalf Of Laurent Kevers
>Sent: Thursday, August 31, 2006 10:34 PM
>To: protege-owl at
>Subject: [protege-owl] SWRL rule problem : y isSiblingOf y
>Hi all,
>I try to use SWRL and Jess to write some basic rules... I have in my 
>ontology a class "Person" and for this class the properties"hasName", 
>"hasParent" and a "isSiblingOf". "isSiblingOf" is transitive and 
>symmetric. I have 4 instances with the following properties :
>person_1 : hasName 'Anna'
>person_2 : hasName 'Michel'
>person_3 : hasName 'Elise', hasParent 'person_1', hasParent 'person_2'
>person_4 : hasName 'Paul', hasParent 'person_1', hasParent 'person_2'
>I write the following rule to infer the "isSiblingOf" property between 
>person_3 and person_4 (and the symmertic property between person_4 and 
>person_3) :
>Person(?x) ∧ Person(?y) ∧ hasParent(?x, ?a) ∧ hasParent(?x, ?b) ∧ 
>hasParent(?y, ?a) ∧ hasParent(?y, ?b) → isSiblingOf(?x, ?y)
>When I run this rule with Jess in the SWRL Tab, the result is 4 
>"isSiblingOf" properties ! I obtain the 2 correct properties between 
>person_3 and person_4 but also a wrong "isSiblingOf" between person_3 
>and himself and person_4 and himself...
>Where these two inferred properties come from (from my OWL ontology or 
>from the SWRL rule) ? Where is the error with this ? Any idea ?
>Thanks for your help,
>Laurent Kevers
>Research assistant
>Cental - UCL
>To unsubscribe go to
>------------ Institute For Infocomm Research - Disclaimer -------------
>This email is confidential and may be privileged.  If you are not the intended recipient, please delete it and notify us immediately. Please do not copy or use it for any purpose, or disclose its contents to any other person. Thank you.
>protege-owl mailing list
>protege-owl at

More information about the protege-owl mailing list