-
Notifications
You must be signed in to change notification settings - Fork 34
Initial content for 'Inference Rules' #452
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
Conversation
Great start! I am assuming there will be some (RDF) vocabulary like sh:rule that links those rules to shapes, so that the target mechanisms come into the mix? |
That's the plan - it's in gist sketch. Targets
Similarly So for regularity, maybe all targets should be "base graph only" generators of |
Following from https://gist.github.com/afs/2547eac679b1411acc078959ac2b3d31#attaching-rules-to-shapes
Not from the datagraph - the idea would just be to define what must be substituted prior to the rules being valid & executable. An implementation would then provide some mechanism to supply the arguments. In the example below I've made up sh:argument to define what needs to be substituted, and sh:argval for where it's substituted in the rule. So ex:city would need to be supplied prior to running the rule.
I believe if the params must be substituted once at the start this would be safe (?)
|
9b98eda
to
f272781
Compare
What are the plans with the existing SPARQL-based rules from SHACL-AF? We do have some users and I guess some people will find it easier to incrementally use their SPARQL strings instead of the new syntax. Related: are there any scenarios where SPARQL-based rules can express more than the new, native SHACL rules? |
Isn't that a question of what your engine chooses to support? I hope there isn't a conflict anywhere. Some AF-rules can lead to problems (e.g. a CONTRUCT can increment a number ... which, if repeated applied, is an infinite loop). I believe the best approach is to define the inf-rules then look at the where AF features fit in. Triple rules look like that can be mapped although we are now in the situation where there are multiple ways of doing that only one of which is inf-rules.
SPARQL-based rules can go bad and using order to control means its a question about current usage. I don't think that can be answered except by seeing some actual rules. Could we have issues labelled them as "UCR" and "Inference"? |
@recalcitrantsupplant - We seem to have multiple ways to achieve same/similar tasks. How do you see this fitting with |
I think I can live with just supporting them (SPARQL rules) in our platform even if the standard excludes them. I just wanted to get your opinion. No ticket needed on that. A good sample use cases for your work would be to support OWL RL... |
The rules are given: |
Yes, and I still have a SPIN version of that somewhere in the product code... Yet it would be awesome to have this as a community project. |
78ac373
to
a581f2e
Compare
@robert-david, @simonstey, @recalcitrantsupplant -- How do you want to process with this? Do you think it needs more material before becoming the initial content, especially as that's going to be editor-draft-published to |
@afs @HolgerKnublauch I'd posted #220 (well, the comment ported to that Issue) because of the ability of Rules to do inferencing. 220's about RDFS, but #219 gets into an in-common subset of inferencing specifications between RDFS and OWL-RL. 219 may be a better Issue to continue on the topic of whether there's an example RDFS or OWL-RL Rules set the working-group is interested in. Holger, I'm not sure what you meant by community project - something external to the data-shapes group, or instead produced by the data-shapes group? |
RDFS and OWL-RL are themselves defined by rules sets. There may be better ways to implement than the usual published rules as been noted. The proposed rule language has a At the moment, we don't have a document with the base fundamentals we can make an editors draft. |
I have meanwhile created a SHACL-AF version of the OWL RL rules, all in SPARQL. This is based on earlier work that I did for SPIN in TopBraid Composer. If anyone is interested I can send a copy. |
860a8f4
to
1326ce0
Compare
4.1 could be cleaned up perhaps - I'm not sure what all of the things there are referring to.
Would it be worth the editors meeting now to discuss these and any other sections? |
Given we introduced |
It would certainly benefit from at least an initial Introduction draft. Primarily, to clarify how this document relates to the other specs (core, node-expr in particular) and what it aims to achieve. Other than that, I think it's in a very good initial state and (imo) can be published as a first draft to get it into the "publishing cycle". |
Yes - introducing |
@simonstey - are you saying that an introduction is required in your opinion before merging to gh-pages? |
Made into editors notes. |
Yes - a meeting would be a good idea. |
3d98eac
to
bc6ece2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My tweaks thus far are done.
I think we'll need a better wording for exactly one of subject - predicate - object, per body of head element
, possibly starting from exactly one each of subject, predicate, and object, per body of head element
...
no, but it would certainly benefit from having one. maybe something along the lines of:
|
@simonstey - thanks - I'll put that text in. We have to find a way to position rules. For me, Core is closely tied to "constraints" (history) whereas there is a larger "shapes" concept and rules is a new area. |
Right, the positioning is important. Node expressions and sh:values in particular can also be used to derive new triples, so this is not unique for the rules spec. The core spec has this intro section on relationship to RDFS and entailment regimes, and that should certainly point at the rules work. |
9b77798
to
e0f0d02
Compare
e0f0d02
to
d5beaf1
Compare
@HolgerKnublauch - question for you. Do |
If rules can execute arbitrary node expressions then I don't see why they couldn't cover everything. In our own platform we have some algorithms that perform both types of inferences together, e.g. to assert anything implicit. The values nodes produced by sh:values and defaultValue are, however, used for constraint checking and to pre-populate forms. |
Not arbitrary node expressions in arbitrary position: ones that touch the data graph (NX style aggregates), ones that evaluate to lists with >1 member (unless used only as seeds) or whatever comes along in the future (it's a open world). |
<li>exactly one of subject - predicate - object, per body of head | ||
element</li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<li>exactly one of subject - predicate - object, per body of head | |
element</li> | |
<li>exactly one each of subject, predicate, and object, per body of head | |
element</li> |
First pass at content for SHACL rules.
While this is a draft pull request, the important concerns are structure and design.