Skip to main content
Top

2019 | OriginalPaper | Chapter

Validating Shacl Constraints over a Sparql Endpoint

Authors : Julien Corman, Fernando Florenzano, Juan L. Reutter, Ognjen Savković

Published in: The Semantic Web – ISWC 2019

Publisher: Springer International Publishing

Activate our intelligent search to find suitable subject content or patents.

search-config
loading …

Abstract

shacl (Shapes Constraint Language) is a specification for describing and validating RDF graphs that has recently become a W3C recommendation. While the language is gaining traction in the industry, algorithms for shacl constraint validation are still at an early stage. A first challenge comes from the fact that RDF graphs are often exposed as sparql endpoints, and therefore only accessible via queries. Another difficulty is the absence of guidelines about the way recursive constraints should be handled. In this paper, we provide algorithms for validating a graph against a shacl schema, which can be executed over a sparql endpoint. We first investigate the possibility of validating a graph through a single query for non-recursive constraints. Then for the recursive case, since the problem has been shown to be NP-hard, we propose a strategy that consists in evaluating a small number of sparql queries over the endpoint, and using the answers to build a set of propositional formulas that are passed to a SAT solver. Finally, we show that the process can be optimized when dealing with recursive but tractable fragments of shacl, without the need for an external solver. We also present a proof-of-concept evaluation of this last approach.

Dont have a licence yet? Then find out more about our products and how to get one now:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Footnotes
3
with the exception of Shaclex [4], which can handle recursion, but not recursion and negation together in a principled way.
 
4
More exactly, I is an abstraction, standing for any syntactic constraint over an rdf term: exact value, datatype, regex, etc.
 
5
shacl paths are built like sparql property paths, but without the NegatedPropertySet operator.
 
6
We omit the trivial FILTER (?y1 = ?y1 AND ?y2 = ?y2) for readability.
 
7
For some normalized schemas, it could happen that \([\![q_{{{\,\mathrm{def}\,}}(s)} ]\!]^{\mathcal {G}}\) always retrieves all nodes from \(\mathcal {G} \). This would be the case for example if \({{\,\mathrm{def}\,}}(s) = s_1 \wedge s_2\). A simple optimization technique here consists in not executing such queries, and instantiate instead the rule pattern \(p_{{{\,\mathrm{def}\,}}(s)}\) with all nodes retrieved by all other queries (and bound to variable ?x).
 
Literature
9.
go back to reference Boneva, I., Labra Gayo, J.E., Prud’hommeaux, E.G.: Semantics and validation of shapes schemas for RDF. In: ISWC 2017 Boneva, I., Labra Gayo, J.E., Prud’hommeaux, E.G.: Semantics and validation of shapes schemas for RDF. In: ISWC 2017
10.
12.
go back to reference Corman, J., Reutter, J.L., Savković, O.: A tractable notion of stratification for SHACL. In: ISWC 2018 Corman, J., Reutter, J.L., Savković, O.: A tractable notion of stratification for SHACL. In: ISWC 2018
13.
go back to reference Kontokostas, D., et al.: Test-driven evaluation of linked data quality. In: WWW (2014) Kontokostas, D., et al.: Test-driven evaluation of linked data quality. In: WWW (2014)
14.
go back to reference Motik, B., Horrocks, I., Sattler, U.: Bridging the gap between OWL and relational databases. Web Semant.: Sci. Serv. Agents World Wide Web 7(2), 74–89 (2009)CrossRef Motik, B., Horrocks, I., Sattler, U.: Bridging the gap between OWL and relational databases. Web Semant.: Sci. Serv. Agents World Wide Web 7(2), 74–89 (2009)CrossRef
16.
go back to reference Staworko, S., Boneva, I., Labra Gayo, J.E., Hym, S., Prud’hommeaux, E.G., Solbrig, H.: Complexity and expressiveness of ShEx for RDF. In: ICDT (2015) Staworko, S., Boneva, I., Labra Gayo, J.E., Hym, S., Prud’hommeaux, E.G., Solbrig, H.: Complexity and expressiveness of ShEx for RDF. In: ICDT (2015)
17.
go back to reference Tao, J., Sirin, E., Bao, J., McGuinness, D.L.: Integrity constraints in owl. In: AAAI (2010) Tao, J., Sirin, E., Bao, J., McGuinness, D.L.: Integrity constraints in owl. In: AAAI (2010)
Metadata
Title
Validating Shacl Constraints over a Sparql Endpoint
Authors
Julien Corman
Fernando Florenzano
Juan L. Reutter
Ognjen Savković
Copyright Year
2019
DOI
https://doi.org/10.1007/978-3-030-30793-6_9

Premium Partner