[w3ctag/design-reviews] WG New Spec: SHACL 1.2 Inference Rules (Issue #1294)

nicholascar created an issue (w3ctag/design-reviews#1294)

### Specification

https://w3c.github.io/data-shapes/shacl12-inference-rules/

### Explainer

https://w3c.github.io/data-shapes/shacl12-inference-rules/#abstract

### Links

- The WG's request for this TAG review: https://www.w3.org/2026/10/26-data-shapes-minutes.html#fee4

- Previous early design review, if any: N/A

- An introduction to the feature, aimed at unfamiliar audiences: 

SHACL defines an RDF vocabulary to describe shapes - collections of constraints that apply to a set of nodes. Shapes can be associated with nodes using a flexible target mechanism, e.g. for all instances of a class. One focus area of SHACL is data validation. However, the same principles of describing data patterns in shapes can also be exploited for other purposes. SHACL inference rules build on SHACL to form a light-weight RDF vocabulary for the exchange of rules that can be used to derive inferred RDF triples from existing asserted triples.

The SHACL rules feature defined in this document includes a general framework using the properties such as sh:rule and sh:condition, plus an extension mechanism for specific rule types. This document defines two such rule types: SHACL SPARQL rules and triple rules. This document also defines a declarative mechanism for SPARQL rule templates. 

- A description of the problems that end-users were facing before this proposal: 

SHACL has long been used for generating new triples, principally via the mechanisms described in 2017's [SHACL Advanced Features](https://www.w3.org/TR/shacl-af/#rules) Working Group Note. This specification improves on, slightly extends and formalises SHACL AF.

- Alternatives considered: 

To do nothing and keep using SHACL AF. This was deemed unacceptable since we have had innovation in the area of additional rule types that can be used with SHACL, e.g. [SPARQL RL](https://www.w3.org/TR/sparql-rl/). We needed to ensure that SHACL reasoning and SPARQL RL etc. were compatible.

- Examples of how to use the proposal to solve the end-users' problems: 

1. query targetting

Use a SPARQL CONSTRUCT query like this to generate the area of a rectangle:

```sparql
CONSTRUCT {
 $this ex:area ?area .
}
WHERE {
 $this ex:width ?width .
 $this ex:height ?height .
 BIND (?width * ?height AS ?area) .
}
```

Wrap that SPARQL query in logic that refines the targetting of only particular rectangles using SHACL.

2. Rule ordering / once

Wrap a SPARQL CONSTRUCT statement in a `sh:SPARQLRule` statement that allows it to be run only once by setting `sh:runOnce true`.

- What do the end-users experience with this proposal: 

An extension to the SPARQL vocabulary allowing for the expression of simple triple-pattern rules, SPARQL rules or other kinds of rules such as SPARQL RL rules.

- User research you did to validate the problem and/or design, if any: 

We formalised the approach taken in SHACL Advanced Features and considered what the inclusion of other forms of rules would require, not just the triple patter and SPARQL rules provided for directly in the document. This was forced by the creation of SPARQL RL but the approach taken will allow other forms of rules too, such as N3.

- Web Platform Tests:  N/A


### The specification

- [ ] Follows the [Web Platform Design Principles](https://www.w3.org/TR/design-principles/).
- [x] Includes Security and Privacy Considerations sections based on answers to the [Security/Privacy Questionnaire](https://www.w3.org/TR/security-privacy-questionnaire/).

### Where and by whom is the work is being done?

- GitHub repo: https://github.com/w3c/data-shapes/
- Primary contacts:
  - Holger Knublauch @HolgerKnublauch, Top Quadrant, lead editor
  - Nicholas Car @nicholascar, KurrawongAI, WG co-chair
  - Matt Goldberg @mgberg, Corning, editor
  - Scott Henninger @scotthenninger, JPMorgan Chase & Co., editor
  - Livio Robaldo @liviorobaldo, Swansea University, editor
  - Simon Steyskal @simonstey, Siemens AG, editor
- Organization/project driving the specification: editors' organizations
- This work is being funded by: -
- Primary standards group developing this feature: [Data Shapes WG](https://www.w3.org/groups/wg/data-shapes/)
- Incubation and standards groups that have discussed the design: only Data Shapes WG. Review by RDF WG has been asked for


### Feedback so far

- Active horizontal reviews: https://github.com/w3c/data-shapes/issues/1314
- Multi-stakeholder feedback: N/A (not relevant to browsers
- Major unresolved issues with or opposition to this specification: None
- Status/issue trackers for implementations: https://github.com/w3c/data-shapes/tree/gh-pages/shacl12-test-suite


### You should also know that...

_No response_

<!-- Content below this is maintained by @w3c-tag-bot -->
---

Track conversations at https://tag-github-bot.w3.org/gh/w3ctag/design-reviews/1294


-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/1294
You are receiving this because you are subscribed to this thread.

Message ID: <w3ctag/design-reviews/issues/1294@github.com>

Received on Tuesday, 27 October 2026 02:42:15 UTC