W3C publishes first public draft of SHACL 1.2 Inference Rules
The draft defines a framework for using SHACL rules to derive new RDF triples from existing data, extending the language beyond data validation.
The World Wide Web Consortium (W3C) has published the first public working draft of SHACL 1.2 Inference Rules, setting out a framework for deriving new RDF data from existing triples. The draft was published on 17 September 2026 by the W3C Data Shapes Working Group.
SHACL, or Shapes Constraint Language, is primarily used to describe data structures and validate RDF graphs against defined constraints. The new inference rules specification addresses a different function: allowing systems to derive additional statements from information already contained in a data graph.
The proposed framework introduces a common structure for defining and executing rules. Rules can be associated with particular shapes and applied to their target nodes, or operate as global rules. They can also be grouped into rule sets and organised into layers and execution orders, allowing the results of one set of rules to feed into subsequent processing.
The draft defines two built-in rule types. SHACL SPARQL rules use SPARQL CONSTRUCT queries to generate inferred triples, while triple rules use SHACL node expressions to calculate the subjects, predicates and objects of new triples. The document also provides examples of rules that can calculate values such as the area of a rectangle or the number of children associated with a person.
The specification also introduces mechanisms for handling more complex rule processing. Rules can be marked to run only once, while iterative rules can continue executing until no additional triples are produced. Temporary triples can be used as intermediate results and automatically removed after the inference process, allowing complex computations to be divided across multiple rules.
Another feature allows implementations to record which rule produced an inferred triple through sh:sourceRule. The draft also provides for custom rule processors, enabling implementations to use alternative approaches for determining rule order, layers or run-once behaviour where appropriate.
The framework is designed to work alongside SHACL validation. A shapes graph can declare the sh:RulesEntailment regime, signalling that its rules should be executed before validation. The draft also specifies that inferred triples cannot modify the definitions of the rules or shapes themselves.
The W3C notes that the document is still a work in progress and does not represent endorsement by W3C or its members. It also highlights security considerations, including the potential for inference processing to consume significant computing and memory resources and, if uncontrolled, to contribute to denial-of-service risks.
The draft forms part of the broader SHACL 1.2 family, alongside specifications covering SHACL Core, Node Expressions, SPARQL-related features, profiling and user-interface generation.
