Skip to content

Use rules to conveniently infer a tree of triples #227

Open
@philharveyonline

Description

@philharveyonline

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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    InferencingFor SHACL 1.2 Inferencing spec.UCRUse Cases and Requirements

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions