-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected behaviour from backward chaining rules, for blank nodes and query variables #116
Comments
For Observation 1: the conclusion must be a single triple. For Observation 2: put
in a separate query file or use
where =^ is syntactic sugar for log:query. |
Thanks for the info! In particular, for observation 2, thanks for hinting again -- I forgot it was expected to be a different one now. For observation 1: It's good to have this documented explicitly, as it's not described anywhere. In particular, N3 language spec did not say anything about a difference in the number of triples for backward chaining rules and forward chaining rules. A related question: is there a way to do something close to multiple-triples-in-backward-chaining? What I need is to circumvent a rule to be fired all the time, but only when needed from some other rules. This is because the rule would be too general on its own, and thus resulting in too many unneeded triples if not only fired in a few cases (the "other rules"). |
You can rewrite them as multiple backward rules, that is
can be rewritten as
just make sure to add So your example
could be rewritten as
and so we get
|
Thanks for the tip! It seems to be working. (But for my real code, the result is now incorrect. I'll investigate that.) However, a seeming consequence is: some other (but not all?) unnamed nodes are also assigned a |
Could you give a concrete example where you get unexpected skolem IRIs? |
Observation 1
Backward chaining rules whose conclusion contains new query variables (that do not exist in premise) result in reasoner error:
** ERROR ** gre ** error(permission_error(modify,static_procedure,(,)/2),context(system:assertz/1,_210))
.Example:
Observation 2
Backward chaining rules whose conclusion contains blank nodes seems to do nothing.
Example:
The example in #35 also does not work.
The text was updated successfully, but these errors were encountered: