Trav-SHACL: Efficiently Validating Networks of SHACL Constraints

Mónica Figuera, Philipp D. Rohde, Maria-Esther Vidal
1/18/2021
cs.DB

Official code: SDM-TIB/Trav-SHACL (27 stars, Python, GPL-3.0, last commit 2026-11-17).

Abstract

Knowledge graphs have emerged as expressive data structures for Web data. Knowledge graph potential and the demand for ecosystems to facilitate their creation, curation, and understanding, is testified in diverse domains, e.g., biomedicine.

Show full abstract

The Shapes Constraint Language (SHACL) is the W3C recommendation language for integrity constraints over RDF knowledge graphs. Enabling quality assements of knowledge graphs, SHACL is rapidly gaining attention in real-world scenarios. SHACL models integrity constraints as a network of shapes, where a shape contains the constraints to be fullfiled by the same entities. The validation of a SHACL shape schema can face the issue of tractability during validation. To facilitate full adoption, efficient computational methods are required. We present Trav-SHACL, a SHACL engine capable of planning the traversal and execution of a shape schema in a way that invalid entities are detected early and needless validations are minimized. Trav-SHACL reorders the shapes in a shape schema for efficient validation and rewrites target and constraint queries for the fast detection of invalid entities. Trav-SHACL is empirically evaluated on 27 testbeds executed against knowledge graphs of up to 34M triples. Our experimental results suggest that Trav-SHACL exhibits high performance gradually and reduces validation time by a factor of up to 28.93 compared to the state of the art.

View on arXivView PDF

Code Implementations(1)

SDM-TIB/Trav-SHACLOfficial100%
GPL-3.0

A SHACL validator capable of planning the traversal and execution of the validation of a shape schema to detect violations early.

273Python, JinjaJan 18, 20212 weeks agoGPL-3.0
constraint-validationknowledge-graphsemantic-webshacl

Similar Papers

Cite this paper

@article{figuera2021travshacl,
  title  = {Trav-SHACL: Efficiently Validating Networks of SHACL Constraints},
  author = {Mónica Figuera and Philipp D. Rohde and Maria-Esther Vidal},
  year   = {2021},
  eprint = {2101.07136},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2101.07136}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2101.07136.svg)](https://codeofpaper.com/paper/2101.07136)

Discussion