I’m trying to build a Stardog rule which makes use of inferred triples by another rule. Apparently the rule does not match. I know that Stardog does not materialize inferred triples but I thought that when using SWRL syntax rules using inferred triples did work.
It should. Can you share your data, rules, ontology, query that isn’t working, what you expected, what you got, how you loaded the data, database options, and the version of Stardog you’re using?
Hi,
Thanks for your reply. Sharing my data / ontology is a litle difficult due to privacy. If we can’t find the issue with the info below I’ll have to create a testcase.
As rule 1 and rule 2 are working (I can select ?foi that have the hasTemperature and HasHumidity predicates with the correct values, the issue should be in rule 3.
I haven’t had a chance to look at what you sent yet but I forgot to ask if there were any errors or warnings in the log. I suspect that the most likely thing you’ll find are warnings about cycles in your rules but that’s a guess at this point.
Glad to hear you got it working. So what exactly was the problem with your rule construction? Was it the use of equality in the filter? Would it have worked if you had used the sameterm function?
Not sure. I’m just trying to understand why your first try wouldn’t work and learn from your experience. I’m not sure that using sameTerm would actually work but it might be interesting to give it a try and if it works look at any differences in the query plan. Now that I think about it I"m not sure if using sameTerm to compare a uri’s is any different from simple equality.