Skip to content

Use rules to conveniently infer a tree of triples #227

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

Open
philharveyonline opened this issue Feb 5, 2025 · 1 comment
Open

Use rules to conveniently infer a tree of triples #227

philharveyonline opened this issue Feb 5, 2025 · 1 comment
Labels
Inferencing For SHACL 1.2 Inferencing spec. UCR Use Cases and Requirements

Comments

@philharveyonline
Copy link

We're building a system that uses SHACL-AF rules to infer triples.

We need a convenient and efficient way to infer a tree of triples.

In @HolgerKnublauch 's database example from https://github.com/w3c/data-shapes/wiki/Proposal-on-Node-Expressions-for-SHACL-Core-1.2, an edg:tableCount property is inferred. But we need to infer something analogous to this:

edg:Database1 edg:hasStatistics edg:Statisics1 .
 
edg:Statisics1           # a new IRI, probably generated from a Function using a random UUID
  edg:tableCount "2" ;   # inferred from the count of tables
  edg:userCount "42" .   # inferred from the count of users

We don't want to use SPARQL Node Expressions, for the reasons mentioned in the wiki page above and in #215.

We could achieve this using multiple runs of the SHACL Processor, firstly to generate edg:Database1 edg:hasStatistics edg:Statisics1, and secondly to generate the edg:Statisics1 xxx yyy triples. But that's too slow for our requirements.

So to make this tree of triples we need a way to use the result of a Node Expression (the one that generates egs:Statistics1 above) in multiple inferred triples, as the object of some and the subject of others.

We may invent our own new rule types and/or expression types to achieve this, but think it may be a common enough requirement to include in the Node Expression spec.

(PS I don't have permission to edit issue labels in this repo, but request that this issue to be labelled "Inferencing and "UCR" please.)

@afs afs added Inferencing For SHACL 1.2 Inferencing spec. UCR Use Cases and Requirements labels Feb 5, 2025
@ajnelson-nist
Copy link
Contributor

I suspect there's a technical challenge here with constructing inner-tree-nodes' names. I have started discussion on a potential way forward for that part in #228 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Inferencing For SHACL 1.2 Inferencing spec. UCR Use Cases and Requirements
Projects
None yet
Development

No branches or pull requests

3 participants