Skip to content

Conversation

afs
Copy link
Contributor

@afs afs commented Aug 31, 2025

This is a sketch for discussion and refinement; do not merge.

Editors noted added at section 6.

@afs afs added the Rules For SHACL 1.2 Rules spec. label Aug 31, 2025
@afs
Copy link
Contributor Author

afs commented Aug 31, 2025

@afs afs changed the title Content planning SHACL Rule - content planning Sep 1, 2025
@afs afs changed the title SHACL Rule - content planning SHACL Rules - content planning Sep 1, 2025
<p>
See SHACL AF <a href="https://www.w3.org/TR/shacl-af/#rules-syntax">`sh:rule`</a>,
which describes <a href="https://w3c.github.io/shacl/shacl-af/index.html#TripleRule">triple rules</a>,
with a special case of <a href="https://w3c.github.io/shacl/shacl-af/index.html#PropertyValueRule"> property value rules</a>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
with a special case of <a href="https://w3c.github.io/shacl/shacl-af/index.html#PropertyValueRule"> property value rules</a>
with special cases
of <a href="https://w3c.github.io/shacl/shacl-af/index.html#PropertyValueRule"> property value rules</a>

Comment on lines +1176 to +1179
At one level, nothing needs top done because they have separate evaluation
and it is only a matter of whether an engine supports them or not.
It might be helpful to say when they happen (before 1.2 Rules - seea also defaul values)
and can infer if they generate infered triple.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
At one level, nothing needs top done because they have separate evaluation
and it is only a matter of whether an engine supports them or not.
It might be helpful to say when they happen (before 1.2 Rules - seea also defaul values)
and can infer if they generate infered triple.
At one level, nothing needs to be done because they have separate evaluation
and it is only a matter of whether an engine supports them or not.
It might be helpful to say when they happen (before 1.2 Rules — see also default values)
and can infer whether they generate inferred triple.

<p>@@ Discussion</p>
<p> Define a new rule that is another rule with some variables already set</p>
<ul>
<li>Where do the setting come from?</li>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<li>Where do the setting come from?</li>
<li>Where do the settings come from?</li>

<h2>More on evaluation</h2>
<div class="ednote">
<p>@@ Discussion</p>
<p>The main evaluatiuon description creates all inferred triple using
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<p>The main evaluatiuon description creates all inferred triple using
<p>The main evaluation description creates all inferred triples using

Comment on lines +1217 to +1220
<p>Negation (e.g. via SPARQL `NOT EXISTS`/`EXISTS`) can allowed if
the pattern is executed only one the base data graph, not including the
inferred graph. i.e. inferred triples are not seen.
Or stratification - not seeing inferred tripels from the current stratum.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<p>Negation (e.g. via SPARQL `NOT EXISTS`/`EXISTS`) can allowed if
the pattern is executed only one the base data graph, not including the
inferred graph. i.e. inferred triples are not seen.
Or stratification - not seeing inferred tripels from the current stratum.
<p>Negation (e.g., via SPARQL `NOT EXISTS`/`EXISTS`) can be allowed if
the pattern is executed only on the base data graph, not including the
inferred graph, i.e., inferred triples are not seen.
Or stratification not seeing inferred triples from the current stratum.

Comment on lines +1231 to +1233
Assignment takes the rule lanuage outside datalog.
Can we define when it is "safe"? (e.g. triples involving the assignment
are not mentioned in the body of any other rule).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Assignment takes the rule lanuage outside datalog.
Can we define when it is "safe"? (e.g. triples involving the assignment
are not mentioned in the body of any other rule).
Assignment takes the rule language outside datalog.
Can we define when it is "safe" (e.g., triples involving the assignment
are not mentioned in the body of any other rule)?

Comment on lines +1243 to +1247
Currently, SHACL Rules is, in datatlog-speak, only unnamed 3-tuples.
To support "programming" in rules, should we allow transient (not part of the output,
only during rulset evaluation) named n-tuples? <br/>
e.g. <code>name(termOrVar, ...)</code>, possibly with a unique marker e.g. <code>`</code>
giving <code>`name(termOrVar, ...)</code>.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Currently, SHACL Rules is, in datatlog-speak, only unnamed 3-tuples.
To support "programming" in rules, should we allow transient (not part of the output,
only during rulset evaluation) named n-tuples? <br/>
e.g. <code>name(termOrVar, ...)</code>, possibly with a unique marker e.g. <code>`</code>
giving <code>`name(termOrVar, ...)</code>.
Currently, SHACL Rules are, in datatlog-speak, only unnamed 3-tuples.
To support "programming" in rules, should we allow transient (not part of the output,
only during rulset evaluation) named n-tuples? <br/>
e.g., <code>name(termOrVar, ...)</code>, possibly with a unique marker, e.g.,
<span class="codepoint" translate="no"><bdi lang="en">&#x0060;</bdi>
<code class="uname">U+0060 grave accent</code></span>
giving <code>`name(termOrVar, ...)</code>.

<pre class="example-rules">
PREFIX : &lt;http://example/&gt;
PREFIX rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;
PREFIX shr &lt;http://www.w3.org/ns/shacl-rules#&gt;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so is this now shr or slr?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rules For SHACL 1.2 Rules spec.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants