Skip to main content

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

Project description

Tests Latest Release Docker Image License: GPL v3

Python Versions Package Format Package Status Package Version

Logo

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 fast detection of invalid entities. The shape schema is validated against an RDF graph accessible via a SPARQL endpoint.

Trav-SHACL Architecture Fig. 1: The Trav-SHACL Architecture (from [1])

Fig. 1 shows the architecture of Trav-SHACL. Trav-SHACL receives a SHACL shape schema S and an RDF graph G. The output of Trav-SHACL are the entities of G that satisfy the shapes in S. The inter-shape planner uses graph metrics computed over the dependency graph of the shape schema. It orders the shapes in S in a way that invalid entities are identified as soon as possible. The intra-shape planner and execution optimizes the target and constraint queries at the time the shape schema is traversed. So-far (in)validated entities are considered to filter out entities linked to these entities; query rewriting decisions (e.g., pushing filters, partitioning of non-selective queries, and query reordering) are made based on invalid entities' cardinalities and query selectivity. The rewritten queries are executed against SPARQL endpoints. The answers of the target and constraint queries as well as the truth value assignments are exchanged during query rewriting and interleaved execution. They are utilized — in a bottom-up fashion — for constraint rule grounding and saturation. The intra-shape planner and execution component runs until a fixed-point in the truth value assignments is reached.

If you want to know more, check out the documentation. The documentation also lists the current features and limitations.

How to run Trav-SHACL?

You can use Trav-SHACL as a Python3 library or a Web-based service using Docker. The documentation includes detailed examples for both scenarios.

WWW 2021 Evaluation

Trav-SHACL is presented in [1]. If you want to reproduce the results reported in our WWW '21 paper, checkout the eval-www2021 branch.

License

Trav-SHACL is licensed under GPL-3.0.

Publications

  1. Mónica Figuera, Philipp D. Rohde, Maria-Esther Vidal. Trav-SHACL: Efficiently Validating Networks of SHACL Constraints. In Proceedings of the Web Conference 2021 (WWW '21), April 19-23, 2021, Ljubljana, Slovenia. https://doi.org/10.1145/3442381.3449877, Experiment Scripts, Preprint

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

TravSHACL-1.7.0.tar.gz (47.8 kB view details)

Uploaded Source

Built Distribution

TravSHACL-1.7.0-py3-none-any.whl (53.6 kB view details)

Uploaded Python 3

File details

Details for the file TravSHACL-1.7.0.tar.gz.

File metadata

  • Download URL: TravSHACL-1.7.0.tar.gz
  • Upload date:
  • Size: 47.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for TravSHACL-1.7.0.tar.gz
Algorithm Hash digest
SHA256 9fa12bd44eaebaad14c042ffcbee3ccf63e25f1cf62f9d85ee9bc58b8bdc7bd5
MD5 fb49dc36122a6e35a795876e1cc543f9
BLAKE2b-256 9a9ce0c3b0e83b54db7334a353260546fbde75950c045c089b91f1d2dba5e03b

See more details on using hashes here.

File details

Details for the file TravSHACL-1.7.0-py3-none-any.whl.

File metadata

  • Download URL: TravSHACL-1.7.0-py3-none-any.whl
  • Upload date:
  • Size: 53.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for TravSHACL-1.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 06c9c6bbf8f9e39f305c9ec594a7e647727eaa9584d2397b5f57403dacba56dd
MD5 8ec6bc1eab28836fac965f10067e5f75
BLAKE2b-256 fc8f341a22df40a2db79771b434dfd741e457e34b650f5832c54840ec427a59d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page