Lune

VLDB2022Top-tier venue

Magic Shapes for SHACL Validation

Shqiponja Ahmetaj, Bianca Löhnert, Magdalena Ortiz, Mantas Simkus

Abstract

A key prerequisite for the successful adoption of the Shapes Constraint Language (SHACL)---the W3C standardized constraint language for RDF graphs---is the availability of automated tools that efficiently validate targeted constraints (known as shapes graphs ) over possibly very large RDF graphs. There are already significant efforts to produce optimized engines for SHACL validation, but they focus on restricted fragments of SHACL. For unrestricted SHACL, that is SHACL with unrestricted recursion and negation, there is no validator beyond a proof-of-concept prototype, and existing techniques are inherently incompatible with the goal-driven approaches being pursued by existing validators. Instead they require a global computation on the entire data graph that is not only computationally very costly, but also brittle, and can easily result in validation failures due to conflicts that are irrelevant to the validation targets.

To address these challenges, we present a 'magic' transformation---based on Magic Sets as known from Logic Programming---that transforms a SHACL shapes graph S into a new shapes graph S' whose validation considers only the relevant neighbourhood of the targeted nodes. The new S' is equivalent to S whenever there are no conflicts between the constraints and the data, and in case the validation of S fails due to conflicts that are irrelevant to the target, S' may still admit a lazy, target-oriented validation. We implement the algorithm and run preliminary experiments, showing our approach can be a stepping stone towards validators for full SHACL, and that it can significantly improve the performance of the only prototype validator that currently supports full recursion and negation.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

1 top-tier paper has cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Trav-SHACL: Efficiently Validating Networks of SHACL Constraints cites Stable Model Semantics for Recursive SHACL
  • Extraction of Validating Shapes from very large Knowledge Graphs cites Trav-SHACL: Efficiently Validating Networks of SHACL Constraints
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers1

  1. Extraction of Validating Shapes from very large Knowledge GraphsKashif Rabbani, Matteo Lissandrini, Katja HoseVLDB 2023 · 48 citations

Builds on2

  1. Stable Model Semantics for Recursive SHACLMedina Andresel, Julien Corman, Magdalena Ortiz, Juan L. Reutter et al.WWW 2020 · 47 citations
  2. Trav-SHACL: Efficiently Validating Networks of SHACL ConstraintsMónica Figuera, Philipp D. Rohde, Maria-Esther VidalWWW 2021 · 39 citations

Related papers

  1. Efficient Validation of SHACL Shapes with ReasoningJin Ke, Zenon G. Zacouris, Maribel AcostaVLDB 2024 · 9 citations
  2. From Shapes to Shapes: Inferring SHACL Shapes for Results of SPARQL CONSTRUCT QueriesPhilipp Seifer, Daniel Hernández, Ralf Lämmel, Steffen StaabWWW 2024 · 3 citations
  3. Transforming RDF Graphs to Property Graphs using Standardized SchemasKashif Rabbani, Matteo Lissandrini, Angela Bonifati, Katja HoseSIGMOD 2025 · 13 citations
  4. Goal-Driven Reasoning in DatalogMTL with Magic SetsShaoyu Wang, Kaiyue Zhao, Dongliang Wei, Przemyslaw Andrzej Walega et al.AAAI 2025 · 2 citations
  5. Common Foundations for SHACL, ShEx, and PG-SchemaShqiponja Ahmetaj, Iovka Boneva, Jan Hidders, Katja Hose et al.WWW 2025 · 10 citations
Dusk over the sea between two cliffs drawn in fine vertical lines