[Stardog 2.x] Problem with exactly keyword in SWRL Rules

0 views
Skip to first unread message

Florian Orpeliere

unread,
Oct 23, 2013, 3:50:22 AM10/23/13
to sta...@clarkparsia.com

Hello everyone,


We have a problem with reasoning with SWRL rules.

Indeed, we write the following swrl rule :

Person(?x), (not (personHaveAnimal min 1 Cat))(?x) -> personHaveAnimal(?x, SuperCat)

Or

Person(?x),  (personHaveAnimal exactly 0 Cat))(?x) -> personHaveAnimal(?x, SuperCat)


We created two individuals for the Person class: Toto and Titi

Titi personHaveAnimal StarCat.

Toto nothing.


In Stardog, when we execute a SPARQL query, we obtain : 

K:\Projets\stardog-2.0.1\bin>stardog query "exactly;reasoning=SL" "Select ?x ?y {?x test:personHaveAnimal ?y.}"


+---------------+----------------+

|     x         |        y       |

+---------------+----------------+

| test:Titi     | test:SuperCat  |

| test:Titi     | test:StarCat   |

| test:Toto     | test:SuperCat  |

+---------------+----------------+


While, we expect : 

+---------------+----------------+

|     x         |        y       |

+---------------+----------------+

| test:Titi     | test:StarCat   |

| test:Toto     | test:SuperCat  |

+---------------+----------------+

This problem is perhaps a Pellet problem and in this case, I will remove this post for the Pellet Forum.


Thanks in advance for your help.

Sincerely,


Florian 
Engineer 
Checksem Team 
LE2I laboratory 
University of Burgundy 
France 
http://checksem.u-bourgogne.fr/www/index.php?lang=en


PS: Sorry for my bad english

Héctor Pérez-Urbina

unread,
Oct 23, 2013, 9:59:20 AM10/23/13
to stardog
Hi Florian,

Could you please send us your ontology?


--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en



--
Best,
Héctor

Florian Orpeliere

unread,
Oct 23, 2013, 10:28:23 AM10/23/13
to
Hi Hector,

No problem, I forgot to attach, sorry.

Sincerely,

Florian 
exactlyTest.owl

Héctor Pérez-Urbina

unread,
Oct 23, 2013, 2:53:46 PM10/23/13
to stardog
Florian,

The extra inference was caused by an incorrect parsing of SWRL rules. The issue has been fixed and will be included in the next release. However, note that Stardog does not support the use of non-atomic classes (e.g., not (personHaveAnimal min 1 Cat)) in SWRL rules. Therefore, the fix will remove the erroneous inference, but your rules will be ignored.


Sincerely,

Florian 

--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en



--
Best,
Héctor

Florian Orpeliere

unread,
Oct 24, 2013, 3:40:18 AM10/24/13
to sta...@clarkparsia.com
Héctor,

Thank you for your help and quick response.
I would find another way to model such rules if possible.

Thank you again.

Sincerely,

Florian

Le mercredi 23 octobre 2013 09:50:22 UTC+2, Florian Orpeliere a écrit :

Florian Orpeliere

unread,
Oct 25, 2013, 6:11:21 PM10/25/13
to sta...@clarkparsia.com
Hi Héctor,

I have an other question.
I understand that (not (personHaveAnimal min 1 Cat)) it's an non-atomic class.
But, why a rule that uses exactly keyword does not work. Such as : 

Person(?x), (personHaveAnimal exactly 0 Cat))(?x) -> personHaveAnimal(?x, SuperCat)

This rule created the same problem as the other, ie an extra inference.

Thanks in advance.

Florian




Le mercredi 23 octobre 2013 09:50:22 UTC+2, Florian Orpeliere a écrit :

Héctor Pérez-Urbina

unread,
Oct 28, 2013, 9:59:17 AM10/28/13
to stardog
Hi Florian, 

Atomic classes are named classes; i.e., the classes that appear in the class hierarchy in Protégé. In this case, 'personHaveAnimal exactly 0 Cat' is a non-atomic class.


--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en



--
Best,
Héctor

Florian Orpeliere

unread,
Oct 28, 2013, 10:07:46 AM10/28/13
to sta...@clarkparsia.com
Hi Héctor,

Thanks for you help.
I really understood the concept of non-atomic class.

Sorry for the lack of knowledge.

Sinceraly,

Florian

Le mercredi 23 octobre 2013 09:50:22 UTC+2, Florian Orpeliere a écrit :
Reply all
Reply to author
Forward
0 new messages