Reasoning with SWRL Rules - missing results

Hello Stardog Community,

I have encountered some unexpected behaviour when attempting some reasoning with a SWRL rule in Stardog. I have a rule that looks like this:

:transitive_indicatessubroleof a tag:stardog:api:rule:SPARQLRule ;
tag:stardog:api:rule:content """IF {
?x http://ontology.eil.utoronto.ca/FAMO/famo/indicatesSubRoleOf ?y .
?y http://ontology.eil.utoronto.ca/FAMO/famo/hasEntityNumber ?y_enum .
?desc_y http://ontology.eil.utoronto.ca/FAMO/famo/indicatesHasEntityNumber ?y_enum .
?desc_y http://ontology.eil.utoronto.ca/FAMO/famo/indicatesSubRoleOf ?z .
}
THEN {
?x http://ontology.eil.utoronto.ca/FAMO/famo/indicatesSubRoleOf ?z.
}
""" .

When reasoning with this rule is applied against my dataset, the expectation is that it will expand the results of a simple query such as:

PREFIX famo: http://ontology.eil.utoronto.ca/FAMO/famo/

SELECT ?role_enum ?r0_enum FROM NAMED stardog:context:all {
GRAPH ?g {
?desc famo:indicatesHasEntityNumber ?role_enum.
?desc famo:indicatesSubRoleOf ?r0.
?r0 famo:hasEntityNumber ?r0_enum.
}
}

I have confirmed that conditions that satisfy the head exist in the data as when I run the following query, it retrieves (a subset of) expected results:

SELECT ?x_enum ?z_enum FROM NAMED stardog:context:all {
GRAPH ?g {
?x http://ontology.eil.utoronto.ca/FAMO/famo/indicatesHasEntityNumber ?x_enum .
?x http://ontology.eil.utoronto.ca/FAMO/famo/indicatesSubRoleOf ?y .
?y http://ontology.eil.utoronto.ca/FAMO/famo/hasEntityNumber ?y_enum .
?desc_y http://ontology.eil.utoronto.ca/FAMO/famo/indicatesHasEntityNumber ?y_enum .

?desc_y <http://ontology.eil.utoronto.ca/FAMO/famo/indicatesSubRoleOf> ?z .
?z <http://ontology.eil.utoronto.ca/FAMO/famo/hasEntityNumber> ?z_enum .
}

}

However, when I attempt the simple query (above) with reasoning turned on, using a schema that includes only the above rule, the results are no different from running the query without reasoning. I've reviewed the documentation on limitations of user-defined rules but cannot see any issues with the form of the specified rule. Any possible explanation as to why this might be happening?

I am running 7.6.4 and have successfully tested a simple transitive rule example with the same set-up.

Thanks in advance!
Megan

Hi Megan,

Can you please restart your Stardog instance, run the query and check for any new entry in stardog.log?