Problem with data properties and reasoning

0 views
Skip to first unread message

boot...@gmail.com

unread,
Apr 17, 2015, 8:38:57 AM4/17/15
to sta...@clarkparsia.com
I am trying to reason using several rules. When executing the following query, 35 results are returned:
stardog query test --reasoning "SELECT ? activity WHERE { ?activity a :Instructioning . }"

However, when executing the following query (with the data property :performedBy), 0 results are returned:
stardog query test --reasoning "SELECT ? activity ?performedBy WHERE { ?activity a :Instructioning ; :performedBy ?performedBy . }"

So, I guess something is going wrong with the rule assigning values to data properties. Does anyone have some insights on this?

Thanks in advance.

Included is an export of the database. For clarity the rule is included below:
PREFIX : <http://test.com/ontologies/activities.owl#>
PREFIX temporal
: <http://swrl.stanford.edu/ontologies/built-ins/3.3/temporal.owl#>
IF
{
   
# Request.
   
?action1 a :Talking ;
       
:performedBy ?human1 ;
       
:performedWith ?human2 ;
        temporal
:hasStartTime ?startTime1 ;
        temporal
:hasFinishTime ?finishTime1 .

   
# Response.
   
?action2 a :Talking ;
       
:performedBy ?human2 ;
       
:performedWith ?human1 ;
        temporal
:hasStartTime ?startTime2 ;
        temporal
:hasFinishTime ?finishTime2 .
   
?human2 :hasRole :TeamLeader .

    BIND
(CONCAT("Instructioning", "+", STR(?action1), "+", STR(?action2)) AS ?activity) .
}
THEN
{
   
?activity a :Instructioning ;
       
:performedBy ?human2 ;
       
:performedWith ?human1 ;
        temporal
:hasStartTime ?startTime1 ;
        temporal
:hasFinishTime ?finishTime2 .
}




test.ttl

Evren Sirin

unread,
Apr 17, 2015, 9:28:38 AM4/17/15
to Stardog
There are at least two problems with your rule. First, you are trying
to infer the existence of a new instance (?acitivity) with multiple
properties but that is not supported by Stardog. See this section in
the docs [1] for a discussion on this topic. The other problem is you
are creating a literal value with string concatenation and then trying
to use this as the subject of a triple which is not allowed in RDF.
Stardog is being too relaxed in this case and returning some values
but this would cause various problems in other places and we will be
more strict about this in the future.

Best,
Evren

[1] http://docs.stardog.com/#_new_individuals_with_swrl
> --
> -- --
> 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

boot...@gmail.com

unread,
Apr 18, 2015, 1:19:54 PM4/18/15
to sta...@clarkparsia.com, boot...@gmail.com
Thanks for your answer Evren.
Reply all
Reply to author
Forward
0 new messages