Abstract
The Shapes Constraint Language (SHACL) was recommended by the W3C in 2017 for describing constraints on web data (specifically, on the so-called RDF graphs) and validating them. At first glance, it may not seem to be a topic for logicians, but as it turns out, SHACL can be approached as a formal logic, and actually quite an interesting one. In this paper, we give a brief introduction to SHACL tailored towards logicians and frame key uses of SHACL as familiar logic reasoning tasks. We discuss how SHACL relates to description logics, which are the basis of the OWL Web Ontology Languages, a related yet orthogonal standard for web data. Finally, we summarize some of our recent work in the SHACL world, hoping that this may shed light on how ideas, results, and techniques from well-established areas of logic can advance the state of the art in this emerging field.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
In RDF, properties are not necessarily disjoint from the nodes, which can be either web identifiers called IRIs, data values given as literals, and the so-called blank nodes; we omit RDF details from here and refer to [28].
- 2.
- 3.
- 4.
Note that this monadic recursion over shape names is orthogonal to the linear recursion over properties present in the path expressions \(\rho \).
References
Ahmetaj, S., David, R., Ortiz, M., Polleres, A., Shehu, B., Simkus, M.: Reasoning about explanations for non-validation in SHACL. In: KR, pp. 12–21 (2021)
Ahmetaj, S., David, R., Polleres, A., Simkus, M.: Repairing SHACL constraint violations using answer set programming. In: Sattler, U., et al. (eds.) The Semantic Web – ISWC 2022. ISWC 2022. LNCS, vol. 13489, pp. 375–391. Springer, Cham (2022). https://doi.org/10.1007/978-3-031-19433-7_22
Ahmetaj, S., Löhnert, B., Ortiz, M., Simkus, M.: Magic shapes for SHACL validation. Proc. VLDB Endow. 15(10), 2284–2296 (2022)
Andresel, M., Corman, J., Ortiz, M., Reutter, J.L., Savkovic, O., Šimkus, M.: Stable model semantics for recursive SHACL. In: Proceedings of the Web Conference 2020, pp. 1570–1580. ACM (2020). https://doi.org/10.1145/3366423.3380229
Areces, C., ten Cate, B.: Hybrid logics. In: Blackburn, P., van Benthem, J.F.A.K., Wolter, F. (eds.) Handbook of Modal Logic, Studies in Logic and Practical Reasoning, vol. 3, pp. 821–868. North-Holland (2007). https://doi.org/10.1016/s1570-2464(07)80017-6
Baader, F., Calvanese, D., McGuinness, D.L., Nardi, D., Patel-Schneider, P.F. (eds.): The Description Logic Handbook: Theory, Implementation, and Applications. Cambridge University Press, Cambridge (2003)
Baader, F., Horrocks, I., Lutz, C., Sattler, U.: An Introduction to Description Logic. Cambridge University Press, Cambridge (2017)
Baader, F., Théron, C.: Role-value maps and general concept inclusions in the minimal description logic with value restrictions or revisiting old skeletons in the DL cupboard. Künstliche Intell. 34(3), 291–301 (2020)
Bogaerts, B., Jakubowski, M.: Fixpoint semantics for recursive SHACL. In: ICLP Technical Communications. EPTCS, vol. 345, pp. 41–47 (2021)
Bogaerts, B., Jakubowski, M., den Bussche, J.V.: Expressiveness of SHACL features. In: ICDT. LIPIcs, vol. 220, pp. 15:1–15:16. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2022)
Bogaerts, B., Jakubowski, M., den Bussche, J.V.: SHACL: a description logic in disguise. In: Gottlob, G., Inclezan, D., Maratea, M. (eds.) Logic Programming and Nonmonotonic Reasoning. LPNMR 2022. LNCS, vol. 13416, pp. 75–88. Springer, Cham (2022). https://doi.org/10.1007/978-3-031-15707-3_7
Chmurovic, A., Simkus, M.: Well-founded semantics for recursive SHACL. In: Datalog. CEUR Workshop Proceedings, vol. 3203, pp. 2–13. CEUR-WS.org (2022)
Corman, J., Reutter, J.L., Savković, O.: Semantics and validation of recursive SHACL. In: Vrandečić, D., et al. (eds.) ISWC 2018. LNCS, vol. 11136, pp. 318–336. Springer, Cham (2018). https://doi.org/10.1007/978-3-030-00671-6_19
Harel, D., Kozen, D., Tiuryn, J.: Dynamic Logic. MIT Press, Cambridge (2000)
Horrocks, I., Sattler, U.: A tableau decision procedure for SHOIQ. J. Autom. Reason. 39(3), 249–276 (2007)
Jakubowski, M.: Formalization of SHACL. Technical report, (unpublished) (2021). www.mjakubowski.info/files/shacl.pdf. Accessed 15 Apr 2023
Kaminski, M., Smolka, G.: A goal-directed decision procedure for hybrid PDL. J. Autom. Reason. 52(4), 407–450 (2014)
Kazakov, Y., Sattler, U., Zolin, E.: How many legs do i have? Non-simple roles in number restrictions revisited. In: Dershowitz, N., Voronkov, A. (eds.) LPAR 2007. LNCS (LNAI), vol. 4790, pp. 303–317. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-75560-9_23
Leinberger, M., Seifer, P., Rienstra, T., Lämmel, R., Staab, S.: Deciding SHACL shape containment through description logics reasoning. In: Pan, J.Z., et al. (eds.) ISWC 2020. LNCS, vol. 12506, pp. 366–383. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-62419-4_21
Ngo, N., Ortiz, M., Simkus, M.: Closed predicates in description logics: results on combined complexity. In: KR, pp. 237–246. AAAI Press (2016)
Pareti, P., Konstantinidis, G., Mogavero, F.: Satisfiability and containment of recursive SHACL. J. Web Semant. 74, 100721 (2022)
Schmidt-Schauß, M.: Subsumption in KL-ONE is undecidable. In: Brachman, R.J., Levesque, H.J., Reiter, R. (eds.) Proceedings of the 1st International Conference on Principles of Knowledge Representation and Reasoning (KR’89). Toronto, Canada, 15–18 May 1989, pp. 421–431. Morgan Kaufmann (1989)
Schneider, T., Simkus, M.: Ontologies and data management: a brief survey. Künstliche Intell. 34(3), 329–353 (2020)
Seylan, I., Franconi, E., de Bruijn, J.: Effective query rewriting with ontologies over DBoxes. In: IJCAI, pp. 923–925 (2009)
Tobies, S.: The complexity of reasoning with cardinality restrictions and nominals in expressive description logics. J. Artif. Intell. Res. 12, 199–217 (2000)
World Wide Web Consortium: OWL 2 Web Ontology Language Primer. World Wide Web Consortium (W3C) (2009). www.w3.org/TR/owl2-primer/
World Wide Web Consortium: Sparql 1.1 query language (2013). www.w3.org/TR/sparql11-query/
World Wide Web Consortium: RDF 1.1 Primer. World Wide Web Consortium (W3C) (2014). www.w3.org/TR/rdf11-primer/
World Wide Web Consortium: Shape Constraint Language (SHACL). W3C World Wide Web Consortium (2017). www.w3.org/TR/shacl
Acknowledgments
The work summarized here has been carried out with many collaborators, to whom I want to express my sincere thanks. I want to thank in particular the current and former members of our team Mantas Šimkus, Shqiponja Ahmetaj, Anouk Oudshoorn, Medina Andresel and Bianca Löhnert. Thank you also to Juan Reutter and Julien Corman. This work was partially supported by the Wallenberg AI, Autonomous Systems and Software Program (WASP) funded by the Knut and Alice Wallenberg Foundation. It was also partially supported by the Austrian Science Fund (FWF) projects P30360 and P30873.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Ortiz, M. (2023). A Short Introduction to SHACL for Logicians. In: Hansen, H.H., Scedrov, A., de Queiroz, R.J. (eds) Logic, Language, Information, and Computation. WoLLIC 2023. Lecture Notes in Computer Science, vol 13923. Springer, Cham. https://doi.org/10.1007/978-3-031-39784-4_2
Download citation
DOI: https://doi.org/10.1007/978-3-031-39784-4_2
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-39783-7
Online ISBN: 978-3-031-39784-4
eBook Packages: Computer ScienceComputer Science (R0)