Open VladimirAlexiev opened 1 year ago
I did not describe that in my thesis, but you are right, it would be nice to have a document about that and we need to write one.
In general: forward-rules are executed till we get the full answer to our query (starting from the facts), backward-rules are executed "on demand" when the body of a rule requires the information (in that sense starting from the query or the queries). But instead of an informal(and incomplete) text as the answer to your issue you deserve a document. I will bring that up in our next group meeting.
I understand the general principle but
are forward and backward ever interleaved? Or all forward are run first?
As far as I understand, forward rules are executed first; evaluating statements in their rule body (condition) may involve running backward rules. I.e., backward-chaining rules are executed purely "on-demand", when needed. But, @josd and @doerthe may shed more light here.
what happens if I insert a rule as part of executing another rule?
Then this rule will become part of the ruleset and will be executed as well. Try the example here: https://n3-editor.herokuapp.com/n3/editor/s/cL2VhgAd
are rules scoped?
Unsure what you mean.
@william-vw @josd @doerthe
Hybrid reasoning
forward and backward ever interleaved?
- I think what you describe matches https://jena.apache.org/documentation/inference/#RULEhybrid ?
Rule dynamics
if I insert a rule X as part of executing another rule A ?
Rule scoping
are rules scoped? For example, at https://jena.apache.org/documentation/inference/#RULEsyntax we can see:
[allID: (?C rdf:type owl:Restriction), (?C owl:onProperty ?P), (?C owl:allValuesFrom ?D) -> (?C owl:equivalentClass all(?P, ?D)) ] [all2: (?C rdfs:subClassOf all(?P, ?D)) -> print(‘Rule for ‘, ?C) [all1b: (?Y rdf:type ?D) <- (?X ?P ?Y), (?X rdf:type ?C) ] ### I mean this ]
- RULEhybrid also says "we can use the forward rules to compile a set of backward rules from the ontology information in the dataset"
- is it the same with N3?
This is how it works in EYE https://eyereasoner.github.io/eye/#architecture-and-design
https://w3c.github.io/N3/spec/#n3rulechaining:
That is fair. However, please provide some references to info about forward/backward chaining, in particular their sequencing/interaction.
eye
tests, can you give pointers?BTW change the last word "primer" -> "specification" because the doc does start with "This document defines Notation 3"