Skip to content

Issue 875: handling disallowing recursive constraints - #978

Open
nicholascar wants to merge 7 commits into
gh-pagesfrom
ISSUE-875
Open

Issue 875: handling disallowing recursive constraints#978
nicholascar wants to merge 7 commits into
gh-pagesfrom
ISSUE-875

Conversation

@nicholascar

@nicholascar nicholascar commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

@nicholascar nicholascar added the Profiles For SHACL 1.2 Profiles spec label Jul 5, 2026
Comment thread shacl12-profiling/index.html
Co-authored-by: Yousouf Taghzouti <48333491+YoucTagh@users.noreply.github.com>
@nicholascar
nicholascar requested a review from YoucTagh July 9, 2026 12:12
@nicholascar
nicholascar marked this pull request as ready for review July 9, 2026 12:13
@TallTed TallTed changed the title Issue 875 Issue 875: handling disallowing recursive constraints Jul 10, 2026
sh:targetObjectsOf sh:property ;
sh:targetObjectsOf rdf:first ;

sh:sparql nrcp:NoRecursiveShapeReferencesConstraint

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Where does nrcp come from?

</ul>
</p>
<p>
At minimum, implementations <em>MUST</em> treat the following as shape reference for conformance with

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is it valid to say "at minimum" here? Wouldn't we want this to specify a specific closed set of features to check for? If another system wanted to add additional things to check then I assume that would be treated as a different profile.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Also, I'm not sure what "treat the following as shape reference" means. Perhaps there are some missing words, or a reordering of these, that would make it more sensible?

</div>
</aside>
<h5>Recursive tree example</h5>
<aside class="example" title="Two shapes that reference each other, creating a cycle.">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This example has one shape that references itself

Comment on lines +1716 to +1717
ex:FolderA a ex:Folder ; ex:containsFolder ex:FolderB .
ex:FolderB a ex:Folder ; ex:containsFolder ex:FolderA .

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This example is only recursive because a folder can contain other folders and there exists create a loop in the folder tree. In other words, this particular case could be considered a problem because the data is constructed improperly. Is the intent for this profile to catch this case too, i.e. that it wouldn't be allowable under this profile that a folder could contain other folders?

Comment on lines +1574 to +1578
<li><code>sh:node</code></li>
<li><code>sh:property</code> (edge to the referenced property shape)</li>
<li><code>sh:qualifiedValueShape</code></li>
<li>the list members of <code>sh:and</code>, <code>sh:or</code>, and <code>sh:xone</code></li>
<li><code>sh:not</code></li>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm wondering if this is actually the full set of predicates that would be in scope, or if there are others (e.g. perhaps sh:condition, sh:expression, sh:filterShape if rules are in play?)


# Capture shapes that appear only as list members or property shapes:
sh:targetObjectsOf sh:property ;
sh:targetObjectsOf rdf:first ;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Might need to be careful with this, as it would target every list regardless of context. Maybe a SPARQL-based target would be necessary here. And if it was a SPARQL-based target, then you could filter out shapes that are deactivated (if that was desired).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Profiles For SHACL 1.2 Profiles spec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants