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

Stable Model Semantics for Recursive SHACL

Published:20 April 2020Publication 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.Google ScholarGoogle Scholar
  2. Serge Abiteboul, Peter Buneman, and Dan Suciu. 1999. Data on the Web: From Relations to Semistructured Data and XML. Morgan Kaufmann.Google ScholarGoogle Scholar
  3. Serge Abiteboul, Richard Hull, and Victor Vianu. 1995. Foundations of databases. Vol. 8. Addison-Wesley Reading.Google ScholarGoogle Scholar
  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.011Google ScholarGoogle Scholar
  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.Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Chitta Baral. 2003. Knowledge Representation, Reasoning and Declarative Problem Solving. Cambridge University Press. https://doi.org/10.1017/CBO9780511543357Google ScholarGoogle ScholarDigital LibraryDigital Library
  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/BF00881799Google ScholarGoogle ScholarCross RefCross Ref
  8. Iovka Boneva, Jose Emilio Labra Gayo, and Eric G Prud’hommeaux. 2017. Semantics and Validation of Shapes Schemas for RDF. In ISWC.Google ScholarGoogle Scholar
  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_19Google ScholarGoogle Scholar
  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.502810Google ScholarGoogle Scholar
  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).Google ScholarGoogle ScholarDigital LibraryDigital Library
  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=5648bd890145601e17552f9acde3d5dfGoogle ScholarGoogle ScholarDigital LibraryDigital Library
  13. Fajar J Ekaputra and Xiashuo Lin. 2016. SHACL4P: SHACL constraints validation within Protégé ontology editor. In ICoDSE.Google ScholarGoogle Scholar
  14. Wenfei Fan, Zhe Fan, Chao Tian, and Xin Luna Dong. 2015. Keys for Graphs. PVLDB 8, 12 (2015).Google ScholarGoogle Scholar
  15. Wenfei Fan, Yinghui Wu, and Jingbo Xu. 2016. Functional Dependencies for Graphs. In SIGMOD.Google ScholarGoogle Scholar
  16. Michael Gelfond and Vladimir Lifschitz. 1988. The stable model semantics for logic programming.. In ICLP/SLP, Vol. 88.Google ScholarGoogle Scholar
  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).Google ScholarGoogle Scholar
  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.pdfGoogle ScholarGoogle ScholarDigital LibraryDigital Library
  19. Peter F Patel-Schneider. 2015. Using Description Logics for RDF Constraint Checking and Closed-World Recognition.. In AAAI.Google ScholarGoogle Scholar
  20. Peter F Patel-Schneider and Enrico Franconi. 2012. Ontology constraints in incomplete and complete data. In ISWC.Google ScholarGoogle Scholar
  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.107722Google ScholarGoogle Scholar
  22. Teodor Przymusinski. 1991. Stable semantics for disjunctive programs. New Generation Computing 9, 3-4 (1991). https://doi.org/10.1007/BF03037171Google ScholarGoogle ScholarCross RefCross Ref
  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.Google ScholarGoogle Scholar
  24. Jiao Tao, Evren Sirin, Jie Bao, and Deborah L McGuinness. 2010. Integrity Constraints in OWL.. In AAAI.Google ScholarGoogle Scholar
  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.116838Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Stable Model Semantics for Recursive SHACL
              Index terms have been assigned to the content through auto-classification.

              Recommendations

              Comments

              Login options

              Check if you have access through your login credentials or your institution to get full access on this article.

              Sign in
              • Published in

                cover image ACM Conferences
                WWW '20: Proceedings of The Web Conference 2020
                April 2020
                3143 pages
                ISBN:9781450370233
                DOI:10.1145/3366423

                Copyright © 2020 ACM

                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]

                Publisher

                Association for Computing Machinery

                New York, NY, United States

                Publication History

                • Published: 20 April 2020

                Permissions

                Request permissions about this article.

                Request Permissions

                Check for updates

                Qualifiers

                • research-article
                • Research
                • Refereed limited

                Acceptance Rates

                Overall Acceptance Rate1,899of8,196submissions,23%

                Upcoming Conference

                WWW '24
                The ACM Web Conference 2024
                May 13 - 17, 2024
                Singapore , Singapore

              PDF Format

              View or Download as a PDF file.

              PDF

              eReader

              View online with eReader.

              eReader

              HTML Format

              View this article in HTML Format .

              View HTML Format