Re: [stardog-users] swrl

4 views
Skip to first unread message

Héctor Pérez-Urbina

unread,
Apr 25, 2013, 12:48:12 PM4/25/13
to stardog
Dear Laurent,

Thank you for your email. 

I couldn't reproduce the issue here. Please find enclosed the ontology and query that I used. Would you mind trying these on your end?

Also, what version of Stardog are you using?

Best,
Héctor 



On Thu, Apr 25, 2013 at 11:47 AM, <lolost...@gmail.com> wrote:
Hi,

A strange behaviour appeared when using swrl rules. Simplifying the problem I isolated this (with a stupid rule) :




Declaration(DataProperty(:f1))
DataPropertyRange(:f1 xsd:float)
Declaration(DataProperty(:f2))
DataPropertyRange(:f2 xsd:float)
Declaration(NamedIndividual(:a))
ClassAssertion(owl:Thing :a)
DataPropertyAssertion(:f1 :a "10.0"^^xsd:float)

DLSafeRule(
Body(
DataPropertyAtom(:f1 Variable(<urn:swrl#x>) Variable(<urn:swrl#v>))
)
Head(
DataPropertyAtom(:f2 Variable(<urn:swrl#x>) Variable(<urn:swrl#v>))
)
)
)

when I query with :

./stardog query  "testRulesDB;reasoning=QL" "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT  ?x  ?z
WHERE { ?x :f2 ?z }"

I get :

{
  "head" : {
    "vars" : [ "x", "z" ]
  },
  "results" : {
    "bindings" : [ {
      "x" : {
        "type" : "uri",
      }
    } ]
  }
}

It seems that there is a data property with no value ...

Cheers

Laurent

--
-- --
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
query.sparql
SWRLBug.ttl

Laurent Pierre

unread,
Apr 25, 2013, 1:03:50 PM4/25/13
to sta...@clarkparsia.com
Dear Hector,

Your ontology works … strange as it seems to be the same (except for the uri). I use 1.2.

Cheers

Laurent

Le 25 avr. 2013 à 18:48, Héctor Pérez-Urbina <hec...@clarkparsia.com> a écrit :

> <query.sparql>

Mike Grove

unread,
Apr 25, 2013, 1:05:57 PM4/25/13
to stardog
On Thu, Apr 25, 2013 at 1:03 PM, Laurent Pierre <lolost...@gmail.com> wrote:
Dear Hector,

Your ontology works … strange as it seems to be the same (except for the uri).  I use 1.2.

Then I suspect you did not capture your input accurately; we don't support the syntax you provided, so we created the input by hand (in Protege).  It's possible when transcribing to that format you missed something.  So you might double check what's actually in the database to confirm.  And if that data looks correct, send us the input and we can try again to reproduce.

Cheers,

Mike
 

Cheers

Laurent

Le 25 avr. 2013 à 18:48, Héctor Pérez-Urbina <hec...@clarkparsia.com> a écrit :

> <query.sparql>

Laurent Pierre

unread,
Apr 25, 2013, 1:20:01 PM4/25/13
to sta...@clarkparsia.com
I join the owl and turtle file saved by Protege.  The funny thing is that it works with the ttl file but not with the owl one …

Cheers

Laurent
rules.owl
rulesBug.ttl

Mike Grove

unread,
Apr 25, 2013, 3:49:16 PM4/25/13
to stardog
On Thu, Apr 25, 2013 at 1:20 PM, Laurent Pierre <lolost...@gmail.com> wrote:
I join the owl and turtle file saved by Protege.  The funny thing is that it works with the ttl file but not with the owl one …

That's because those files do not contain the same rule.

What's happening in the case where it's failing is there are multiple body atoms using builtins in your rule.  In these cases we have to select the correct execution ordering to guarantee that variables are bound in the correct order to come up with the right answer, and obviously there's a bug in the code that determines the execution ordering.

Thanks for reporting this, we're working on resolving the bug.

Cheers,

Mike

 

Cheers

Laurent

Laurent Pierre

unread,
Apr 26, 2013, 8:47:37 AM4/26/13
to sta...@clarkparsia.com
Thanks,

I'm eager to have the fix.

Cheers

Laurent

Kendall Clark

unread,
Apr 26, 2013, 9:48:51 AM4/26/13
to stardog
1.2.1 should be out this next week, including the SWRL fix.

Cheers,
Kendall
Reply all
Reply to author
Forward
0 new messages