Inferensys

Glossary

Deontic SHACL

An extension of the Shapes Constraint Language (SHACL) that validates RDF graphs against deontic rules—obligations, permissions, and prohibitions—to detect normative violations in knowledge graph representations of legal and regulatory data.
Knowledge manager reviewing enterprise knowledge management system on laptop, document library visible, casual office.
NORMATIVE GRAPH VALIDATION

What is Deontic SHACL?

Deontic SHACL extends the W3C Shapes Constraint Language to validate RDF knowledge graphs against normative rules, enabling the detection of obligation violations and permission conflicts in legal data representations.

Deontic SHACL is an extension of the Shapes Constraint Language (SHACL) that validates RDF graphs against deontic rules—obligations, permissions, and prohibitions—rather than purely structural constraints. It enables the algorithmic detection of normative violations in knowledge graph representations of legal and regulatory data.

By defining deontic shapes that specify what agents must, may, or must not do, Deontic SHACL transforms a standard graph validation engine into a normative compliance checker. This bridges the gap between formal deontic logic and practical semantic web technologies, allowing legal reasoning systems to verify that a set of facts satisfies an encoded regulatory framework.

NORMATIVE GRAPH VALIDATION

Core Characteristics of Deontic SHACL

Deontic SHACL extends the W3C Shapes Constraint Language to validate RDF graphs against normative rules, enabling the detection of obligations, permissions, and prohibitions within knowledge graph representations of legal and compliance data.

01

Deontic Target Declaration

Extends standard SHACL target declarations with deontic modalities. A shape can target nodes not just for structural validation, but to assert that certain triples must exist (obligation), may exist (permission), or must not exist (prohibition). This is achieved through custom SHACL parameter declarations or SPARQL-based constraint components that evaluate the deontic status of a graph pattern rather than simple conformance.

02

Violation vs. Non-Compliance Detection

Distinguishes between two distinct failure modes critical for legal reasoning systems:

  • Structural Violation: A standard SHACL constraint failure indicating malformed data
  • Normative Non-Compliance: A deontic failure indicating a breach of an obligation or a prohibited state exists

This separation allows compliance engines to generate audit trails that differentiate between data quality issues and actual regulatory breaches, each triggering different remediation workflows.

03

Contrary-to-Duty Reasoning Support

Integrates with contrary-to-duty (CTD) obligation modeling by allowing shapes to define primary obligations and their corresponding fallback rules. When a primary obligation shape reports a violation, secondary CTD shapes are automatically activated to validate whether the appropriate remedial obligations have been fulfilled. This prevents the logical paradoxes that arise when a violation of a primary norm is treated as a simple constraint failure with no normative consequence.

04

Normative Severity Levels

Assigns severity classifications to deontic constraint violations beyond standard SHACL severity levels:

  • Prohibition violations: Critical severity, indicating forbidden states
  • Obligation violations: High severity, indicating unfulfilled duties
  • Permission boundary warnings: Informational, indicating states approaching prohibition thresholds

These levels integrate with compliance dashboards to prioritize remediation actions based on normative weight rather than technical severity alone.

05

Temporal Deontic Validation

Extends SHACL's validation scope to include temporal operators that evaluate deontic compliance over time windows. Shapes can assert that:

  • An obligation must be fulfilled within 30 days of a triggering event
  • A prohibition applies only during a specified regulatory period
  • A permission expires after a deadline

This temporal awareness is essential for modeling real-world legal obligations that have activation, fulfillment, and expiration lifecycles.

06

Normative Conflict Reporting

Detects and reports normative conflicts where two applicable shapes prescribe incompatible deontic conclusions for the same target node. For example, one regulation may obligate data retention while another prohibits it. The conflict report includes:

  • The conflicting shape identifiers and their source authority
  • The specific triples in conflict
  • Suggested resolution strategies based on lex superior, lex specialis, or lex posterior principles

This transforms SHACL from a passive validator into an active normative reasoning engine.

NORMATIVE VALIDATION COMPARISON

Deontic SHACL vs. Standard SHACL

A feature-level comparison of the Shapes Constraint Language extension for deontic rule validation against the standard W3C SHACL specification.

FeatureStandard SHACLDeontic SHACL

Primary Validation Target

Structural conformance and data integrity

Normative compliance and deontic rule adherence

Constraint Type

Descriptive (what is)

Prescriptive (what ought to be)

Violation Semantics

Data error or shape mismatch

Normative violation (breach of obligation, prohibition, or permission)

Deontic Modalities

Obligation Modeling

Permission Modeling

Prohibition Modeling

Contrary-to-Duty Reasoning

DEONTIC SHACL

Frequently Asked Questions

Clear answers to common questions about using SHACL to validate normative rules and detect deontic violations in legal knowledge graphs.

Deontic SHACL is an extension of the W3C Shapes Constraint Language (SHACL) that validates RDF graphs against deontic rules—formal representations of obligations, permissions, and prohibitions. While standard SHACL checks whether data conforms to structural shapes, Deontic SHACL evaluates whether an agent's actions or a state of affairs comply with a normative framework. It works by defining deontic shapes that specify what must be true (obligation), what may be true (permission), or what must not be true (prohibition) within a knowledge graph. When a graph node violates a deontic shape, the engine generates a sh:Violation report that includes the specific norm breached, the violating entity, and the context of the infraction. This enables legal reasoning systems to programmatically detect non-compliance in representations of contracts, regulations, or corporate policies.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.