- From: Andy Seaborne via GitHub <noreply@w3.org>
- Date: Wed, 11 Feb 2026 14:58:18 +0000
- To: public-shacl@w3.org
afs has just created a new issue for https://github.com/w3c/data-shapes:
== Abbreviations : `TRANSITIVE`, `SYMMETRIC`, `INVERSE` ==
The `TRANSITIVE`, `SYMMETRIC` `INVERSE` abbreviations in SHACL Rules give a way to write certain patterns in an immediate and direct and clear way.
`TRANSITIVE` -- this is also useful because it is possible to implement more efficiently than simply following the rule definition shown below.
More efficient rule-based expression requires e.g. matching for direct property relationship. If built-in this isn't necessary, and the direct triples do not appear in the output graph.
It can also be a useful for caching across rule evaluation. e.g. `rdfs:subClassOf`, `rdfs:subPropertyOf`.
The `SYMMETRIC` and `INVERSE` abbreviations, when used with care, can help declaring expressivity. However, they can generate large numbers of triples if used with common properties.
See also
* https://www.oreilly.com/library/view/semantic-web-for/9780123735560/OEBPS/09_chapter07.htm
* http://mlwiki.org/index.php/RDFS-Plus
* #351
----
Illustration - simple implementations:
`TRANSITIVE(:property)`
```
RULE { ?x :property ?z } WHERE { ?x :property ?y . ?y :property ?z }
```
or
```
RULE { ?x :property ?z } WHERE { ?x :property/:property ?z }
```
`SYMMETRIC(:property)`
```
RULE { ?b :property ?a } WHERE { ?a :property?b }
```
`INVERSE(:property1, :property2)`
```
RULE { ?b :property2 ?a } WHERE { ?a :property1 ?b }
RULE { ?b :property1 ?a } WHERE { ?a :property2 ?b }
```
Please view or discuss this issue at https://github.com/w3c/data-shapes/issues/779 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 11 February 2026 14:58:19 UTC