Skip to main content

A Short Introduction to SHACL for Logicians

  • Conference paper
  • First Online:
Logic, Language, Information, and Computation (WoLLIC 2023)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 13923))

  • 272 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 59.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 74.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 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. 2.

    http://dbpedia.org/.

  3. 3.

    https://yago-knowledge.org/.

  4. 4.

    Note that this monadic recursion over shape names is orthogonal to the linear recursion over properties present in the path expressions \(\rho \).

References

  1. 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)

    Google Scholar 

  2. 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

  3. Ahmetaj, S., Löhnert, B., Ortiz, M., Simkus, M.: Magic shapes for SHACL validation. Proc. VLDB Endow. 15(10), 2284–2296 (2022)

    Article  Google Scholar 

  4. 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

  5. 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

  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)

    Google Scholar 

  7. Baader, F., Horrocks, I., Lutz, C., Sattler, U.: An Introduction to Description Logic. Cambridge University Press, Cambridge (2017)

    Google Scholar 

  8. 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)

    Article  Google Scholar 

  9. Bogaerts, B., Jakubowski, M.: Fixpoint semantics for recursive SHACL. In: ICLP Technical Communications. EPTCS, vol. 345, pp. 41–47 (2021)

    Google Scholar 

  10. 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)

    Google Scholar 

  11. 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

  12. Chmurovic, A., Simkus, M.: Well-founded semantics for recursive SHACL. In: Datalog. CEUR Workshop Proceedings, vol. 3203, pp. 2–13. CEUR-WS.org (2022)

    Google Scholar 

  13. 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

    Chapter  Google Scholar 

  14. Harel, D., Kozen, D., Tiuryn, J.: Dynamic Logic. MIT Press, Cambridge (2000)

    Google Scholar 

  15. Horrocks, I., Sattler, U.: A tableau decision procedure for SHOIQ. J. Autom. Reason. 39(3), 249–276 (2007)

    Article  Google Scholar 

  16. Jakubowski, M.: Formalization of SHACL. Technical report, (unpublished) (2021). www.mjakubowski.info/files/shacl.pdf. Accessed 15 Apr 2023

  17. Kaminski, M., Smolka, G.: A goal-directed decision procedure for hybrid PDL. J. Autom. Reason. 52(4), 407–450 (2014)

    Article  Google Scholar 

  18. 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

    Chapter  Google Scholar 

  19. 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

    Chapter  Google Scholar 

  20. Ngo, N., Ortiz, M., Simkus, M.: Closed predicates in description logics: results on combined complexity. In: KR, pp. 237–246. AAAI Press (2016)

    Google Scholar 

  21. Pareti, P., Konstantinidis, G., Mogavero, F.: Satisfiability and containment of recursive SHACL. J. Web Semant. 74, 100721 (2022)

    Article  Google Scholar 

  22. 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)

    Google Scholar 

  23. Schneider, T., Simkus, M.: Ontologies and data management: a brief survey. Künstliche Intell. 34(3), 329–353 (2020)

    Article  Google Scholar 

  24. Seylan, I., Franconi, E., de Bruijn, J.: Effective query rewriting with ontologies over DBoxes. In: IJCAI, pp. 923–925 (2009)

    Google Scholar 

  25. Tobies, S.: The complexity of reasoning with cardinality restrictions and nominals in expressive description logics. J. Artif. Intell. Res. 12, 199–217 (2000)

    Article  Google Scholar 

  26. World Wide Web Consortium: OWL 2 Web Ontology Language Primer. World Wide Web Consortium (W3C) (2009). www.w3.org/TR/owl2-primer/

  27. World Wide Web Consortium: Sparql 1.1 query language (2013). www.w3.org/TR/sparql11-query/

  28. World Wide Web Consortium: RDF 1.1 Primer. World Wide Web Consortium (W3C) (2014). www.w3.org/TR/rdf11-primer/

  29. World Wide Web Consortium: Shape Constraint Language (SHACL). W3C World Wide Web Consortium (2017). www.w3.org/TR/shacl

Download references

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

Authors

Corresponding author

Correspondence to Magdalena Ortiz .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics