skip to main content
10.1145/3366423.3380229acmconferencesArticle/Chapter ViewAbstractPublication PagesthewebconfConference Proceedingsconference-collections
research-article

Stable Model Semantics for Recursive SHACL

Published: 20 April 2020 Publication History

Abstract

SHACL (SHape Constraint Language) is a W3C recommendation for validating graph-based data against a set of constraints (called shapes). Importantly, SHACL allows to define recursive shapes, i.e. a shape may refer to itself, directly of indirectly. The recommendation left open the semantics of recursive shapes, but proposals have emerged recently to extend the official semantics to support recursion. These proposals are based on the principle of possibility (or non-contradiction): a graph is considered valid against a schema if one can assign shapes to nodes in such a way that all constraints are satisfied. This semantics is not constructive, as it does not provide guidelines about how to obtain such an assignment, and it may lead to unfounded assignments, where the only reason to assign a shape to a node is that it allows validating the graph.
In contrast, we propose in this paper a stricter, more constructive semantics for SHACL, based on stable models, which are well-known in Answer Set Programming (ASP). This semantics additionally requires a shape assignment to be properly justified by the input constraints. We further exploit the connection to logic programming, and show that SHACL constraints can be naturally represented as logic programs, and that the validation problem for a graph and a SHACL schema can be encoded as an ASP reasoning task. The proposed semantics also enjoys computationally tractable validation in the presence of constraints with stratified negation (as opposed to the previous semantics). We also extend our semantics to 3-valued stable models, which yields a more relaxed notion of validation, tolerant to certain faults in the schema or data. By exploiting a connection between 3-valued stable model semantics and the well-founded semantics for logic programs, we can use our translation into ASP to show another tractability result. Finally, we provide a preliminary evaluation of the approach, which leverages an ASP solver to perform graph validation.

References

[1]
2017. Shapes constraint language (SHACL). Technical Report. W3C. https://www.w3.org/TR/shacl/ https://www.w3.org/TR/shacl.
[2]
Serge Abiteboul, Peter Buneman, and Dan Suciu. 1999. Data on the Web: From Relations to Semistructured Data and XML. Morgan Kaufmann.
[3]
Serge Abiteboul, Richard Hull, and Victor Vianu. 1995. Foundations of databases. Vol. 8. Addison-Wesley Reading.
[4]
Giovanni Amendola, Thomas Eiter, Michael Fink, Nicola Leone, and João Moura. 2016. Semi-equilibrium models for paracoherent answer set programs. Artificial Intelligence 234 (2016). https://doi.org/10.1016/j.artint.2016.01.011
[5]
Franz Baader, Diego Calvanese, Deborah McGuinness, Daniele Nardi, and Peter Patel-Schneider. 2003. The description logic handbook: theory, implementation and applications. Cambridge university press.
[6]
Chitta Baral. 2003. Knowledge Representation, Reasoning and Declarative Problem Solving. Cambridge University Press. https://doi.org/10.1017/CBO9780511543357
[7]
Chitta R. Baral and V. S. Subrahmanian. 1993. Dualities between alternative semantics for logic programming and nonmonotonic reasoning. Journal of Automated Reasoning 10, 3 (1993). https://doi.org/10.1007/BF00881799
[8]
Iovka Boneva, Jose Emilio Labra Gayo, and Eric G Prud’hommeaux. 2017. Semantics and Validation of Shapes Schemas for RDF. In ISWC.
[9]
Julien Corman, Juan L. Reutter, and Ognjen Savkovic. 2018. Semantics and Validation of Recursive SHACL. In ISWC. https://doi.org/10.1007/978-3-030-00671-6_19
[10]
Evgeny Dantsin, Thomas Eiter, Georg Gottlob, and Andrei Voronkov. 2001. Complexity and Expressive Power of Logic Programming. ACM Comput. Surv. 33, 3 (2001). https://doi.org/10.1145/502807.502810
[11]
Francesco M Donini, Daniele Nardi, and Riccardo Rosati. 2002. Description logics of minimal knowledge and negation as failure. ACM Transactions on Computational Logic (TOCL) 3, 2 (2002).
[12]
T. Eiter, N. Leone, and D. Saccà. 1997. On the partial semantics for disjunctive deductive databases. Annals of Mathematics and Artificial Intelligence 19, 1-2(1997). https://www.scopus.com/inward/record.uri?eid=2-s2.0-0031507404&partnerID=40&md5=5648bd890145601e17552f9acde3d5df
[13]
Fajar J Ekaputra and Xiashuo Lin. 2016. SHACL4P: SHACL constraints validation within Protégé ontology editor. In ICoDSE.
[14]
Wenfei Fan, Zhe Fan, Chao Tian, and Xin Luna Dong. 2015. Keys for Graphs. PVLDB 8, 12 (2015).
[15]
Wenfei Fan, Yinghui Wu, and Jingbo Xu. 2016. Functional Dependencies for Graphs. In SIGMOD.
[16]
Michael Gelfond and Vladimir Lifschitz. 1988. The stable model semantics for logic programming. In ICLP/SLP, Vol. 88.
[17]
Boris Motik, Ian Horrocks, and Ulrike Sattler. 2009. Bridging the gap between OWL and relational databases. Web Semantics: Science, Services and Agents on the World Wide Web 7, 2(2009).
[18]
Mauricio Osorio Galindo, José R. Arrazola Ramírez, and José Luis Carballido. 2008. Logical Weak Completions of Paraconsistent Logics. Journal of Logic and Computation 18, 6 (2008). https://doi.org/10.1093/logcom/exn015 arXiv:http://oup.prod.sis.lan/logcom/article-pdf/18/6/913/6273876/exn015.pdf
[19]
Peter F Patel-Schneider. 2015. Using Description Logics for RDF Constraint Checking and Closed-World Recognition. In AAAI.
[20]
Peter F Patel-Schneider and Enrico Franconi. 2012. Ontology constraints in incomplete and complete data. In ISWC.
[21]
Teodor Przymusinski. 1990. Well-founded Semantics Coincides with Three-valued Stable Semantics. Fundamenta Informaticae 13, 4 (1990). http://dl.acm.org/citation.cfm?id=107720.107722
[22]
Teodor Przymusinski. 1991. Stable semantics for disjunctive programs. New Generation Computing 9, 3-4 (1991). https://doi.org/10.1007/BF03037171
[23]
Slawek Staworko, Iovka Boneva, Jose Emilio Labra Gayo, Samuel Hym, Eric G Prud’hommeaux, and Harold Solbrig. 2015. Complexity and Expressiveness of ShEx for RDF. In ICDT.
[24]
Jiao Tao, Evren Sirin, Jie Bao, and Deborah L McGuinness. 2010. Integrity Constraints in OWL. In AAAI.
[25]
Allen Van Gelder, Kenneth A. Ross, and John S. Schlipf. 1991. The Well-founded Semantics for General Logic Programs. J. ACM 38, 3 (1991). https://doi.org/10.1145/116825.116838

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
WWW '20: Proceedings of The Web Conference 2020
April 2020
3143 pages
ISBN:9781450370233
DOI:10.1145/3366423
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 20 April 2020

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. SHACL
  2. answer set programming
  3. graph-structured data

Qualifiers

  • Research-article
  • Research
  • Refereed limited

Conference

WWW '20
Sponsor:
WWW '20: The Web Conference 2020
April 20 - 24, 2020
Taipei, Taiwan

Acceptance Rates

Overall Acceptance Rate 1,899 of 8,196 submissions, 23%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)93
  • Downloads (Last 6 weeks)5
Reflects downloads up to 05 Jan 2025

Other Metrics

Citations

Cited By

View all

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

HTML Format

View this article in HTML Format.

HTML Format

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media