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

Laurent Kevers laurent.kevers at uclouvain.be
Tue Sep 5 02:57:20 PDT 2006


I found the 'owl:AllDifferent' wizard in the 'OWL' menu and used it... 
but I still have the problem (in SWRL Tab) that Protégé replace my rule 
by '<empty rule>' when inserting the 'owl:AllDifferent(?x)' atom in it. 
I catch the following error message :

[SWRLTextAreaPanel]  Fatal error
SEVERE: Exception caught -- java.lang.ClassCastException: 
edu.stanford.smi.protegex.owl.model.impl.DefaultRDFSNamedClass
        at 
edu.stanford.smi.protegex.owl.model.impl.AbstractOWLModel.getOWLNamedClass(Unknown 
Source)
        at 
edu.stanford.smi.protegex.owl.swrl.parser.SWRLParser.parseClassAtomParameters(Unknown 
Source)
        at 
edu.stanford.smi.protegex.owl.swrl.parser.SWRLParser.parseAtom(Unknown 
Source)
        at 
edu.stanford.smi.protegex.owl.swrl.parser.SWRLParser.parse(Unknown Source)
        at 
edu.stanford.smi.protegex.owl.swrl.model.impl.DefaultSWRLImp.setExpression(Unknown 
Source)
        at 
edu.stanford.smi.protegex.owl.swrl.ui.code.SWRLTextAreaPanel.showEditDialog(Unknown 
Source)
        at 
edu.stanford.smi.protegex.owl.swrl.ui.table.ViewRuleAction.actionPerformed(Unknown 
Source)
        at 
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
        at 
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
        at 
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
        at 
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
        at 
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
        at 
java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
        at java.awt.Component.processMouseEvent(Component.java:5488)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
        at java.awt.Component.processEvent(Component.java:5253)
        at java.awt.Container.processEvent(Container.java:1966)
        at java.awt.Component.dispatchEventImpl(Component.java:3955)
        at java.awt.Container.dispatchEventImpl(Container.java:2024)
        at java.awt.Component.dispatchEvent(Component.java:3803)
        at 
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
        at 
java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
        at java.awt.Container.dispatchEventImpl(Container.java:2010)
        at java.awt.Window.dispatchEventImpl(Window.java:1774)
        at java.awt.Component.dispatchEvent(Component.java:3803)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
        at 
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
        at 
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
        at 
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
        at 
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

Laurent


Martin O'Connor wrote:
>
> You need to use the owl:AllDifferent wizard in the Protege-OWL GUI to 
> make all individuals of type Person distinct. (I don't have access to 
> Protege-OWL at the moment and cannot remember exactly where this menu 
> is, but it should be easy to find.) Then you can use differentFrom(?x, 
> ?y) in the SWRL rule.
>
> Using owl:AllDifferent directly in a rule should not be allowed and I 
> should have forbidden its use. I will fix this bug.
>
> Martin
>
> Laurent Kevers wrote:
>
>>
>> Ok, when I try to use owl:AllDifferent(?x) in my rule, Protégé 
>> transforms it in an empty rule (when I press enter my rule is 
>> replaced by "<empty rule>"). The live validation of the rule editor 
>> shows me that the rule is syntactically correct... Is it a bug or do 
>> I make something wrong ?
>>
>> Laurent
>>
>>
>> Martin O'Connor wrote:
>>
>>> swrlb:notEqual (like all SWRL core built-in comparison operations)
>>> applies only to datatypes - it can not be used with individuals. cf.
>>> http://www.daml.org/2004/04/swrl/builtins.html#8.1 for its 
>>> definition. I
>>> will try to throw a more intelligent exception when it is used with
>>> individuals.
>>>
>>> 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.
>>>
>>> Martin
>>>
>>> Ramnath, Vasudha wrote:
>>>
>>>  
>>>
>>>> Hi
>>>>
>>>> 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 ?
>>>>
>>>>
>>>> rgds
>>>> --Vasudha
>>>>
>>>>
>>>>
>>>> -----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 smi.stanford.edu
>>>> 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 
>>>> http://protege.stanford.edu/community/subscribe.html
>>>>
>>>>
>>>> ------------ 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 lists.stanford.edu
>>>> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>>>>
>>>>
>>>>   
>>>
>>>  
>>>
>>> ------------------------------------------------------------------------ 
>>>
>>>
>>> _______________________________________________
>>> protege-owl mailing list
>>> protege-owl at lists.stanford.edu
>>> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>>>  
>>>
>>
>
>




More information about the protege-owl mailing list