Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Magic shapes for SHACL validation

Published: 01 June 2022 Publication History

Abstract

A key prerequisite for the successful adoption of the Shapes Constraint Language (SHACL)---the W3C standardized constraint language for RDF graphs---is the availability of automated tools that efficiently validate targeted constraints (known as shapes graphs) over possibly very large RDF graphs. There are already significant efforts to produce optimized engines for SHACL validation, but they focus on restricted fragments of SHACL. For unrestricted SHACL, that is SHACL with unrestricted recursion and negation, there is no validator beyond a proof-of-concept prototype, and existing techniques are inherently incompatible with the goal-driven approaches being pursued by existing validators. Instead they require a global computation on the entire data graph that is not only computationally very costly, but also brittle, and can easily result in validation failures due to conflicts that are irrelevant to the validation targets.
To address these challenges, we present a 'magic' transformation---based on Magic Sets as known from Logic Programming---that transforms a SHACL shapes graph S into a new shapes graph S' whose validation considers only the relevant neighbourhood of the targeted nodes. The new S' is equivalent to S whenever there are no conflicts between the constraints and the data, and in case the validation of S fails due to conflicts that are irrelevant to the target, S' may still admit a lazy, target-oriented validation. We implement the algorithm and run preliminary experiments, showing our approach can be a stepping stone towards validators for full SHACL, and that it can significantly improve the performance of the only prototype validator that currently supports full recursion and negation.

References

[1]
Weronika T. Adrian, Mario Alviano, Francesco Calimeri, Bernardo Cuteri, Carmine Dodaro, Wolfgang Faber, Davide Fuscà, Nicola Leone, Marco Manna, Simona Perri, Francesco Ricca, Pierfrancesco Veltri, and Jessica Zangari. 2018. The ASP System DLV: Advancements and Applications. Künstliche Intell. 32, 2-3 (2018), 177--179.
[2]
Mario Alviano and Wolfgang Faber. 2011. Dynamic magic sets and super-coherent answer set programs. AI Communications 24, 2 (2011), 125--145.
[3]
Mario Alviano, Wolfgang Faber, Gianluigi Greco, and Nicola Leone. 2012. Magic sets for disjunctive datalog programs. Artificial Intelligence 187 (2012), 156--192.
[4]
Medina Andresel, Julien Corman, Magdalena Ortiz, Juan L. Reutter, Ognjen Savkovic, and Mantas Šimkus. 2020. Stable Model Semantics for Recursive SHACL. In Proc. of The Web Conference 2020. ACM, 1570--1580.
[5]
Franz Baader, Ian Horrocks, Carsten Lutz, and Ulrike Sattler. 2017. An Introduction to Description Logic. Cambridge University Press. http://www.cambridge.org/de/academic/subjects/computer-science/knowledge-management-databases-and-data-mining/introduction-description-logic?format=PB#17zVGeWD2TZUeu6s.97
[6]
F. Bancilhon, D. Maier, Y. Sagiv, and J. Ullman. 1985. Magic sets and other strange ways to implement logic programs (extended abstract). In PODS '86.
[7]
Julien Corman, Fernando Florenzano, Juan L. Reutter, and Ognjen Savkovic. 2019. Validating Shacl Constraints over a Sparql Endpoint. In ISWC. Springer.
[8]
Julien Corman, Juan L. Reutter, and Ognjen Savkovic. 2018. Semantics and Validation of Recursive SHACL. In Proc. of ISWC'18. Springer.
[9]
Chiara Cumbo, Wolfgang Faber, Gianluigi Greco, and Nicola Leone. 2004. Enhancing the Magic-Set Method for Disjunctive Datalog Programs. In Logic Programming, 20th International Conference, ICLP (Lecture Notes in Computer Science), Bart Demoen and Vladimir Lifschitz (Eds.). Springer.
[10]
Phan Minh Dung. 1992. On the Relations between Stable and Well-Founded Semantics of Logic Programs. Theor. Comput. Sci. 105, 1 (1992), 7--25.
[11]
Thomas Eiter, Georg Gottlob, and Heikki Mannila. 1997. Disjunctive Datalog. 22, 3 (1997), 364--418.
[12]
Thomas Eiter, Giovambattista Ianni, and Thomas Krennwallner. 2009. Answer Set Programming: A Primer. In Reasoning Web. Semantic Technologies for Information Systems, 5th International Summer School 2009, Brixen-Bressanone, Italy, August 30 - September 4, 2009, Tutorial Lectures (Lecture Notes in Computer Science), Vol. 5689. Springer, 40--110.
[13]
Wolfgang Faber, Gianluigi Greco, and Nicola Leone. 2007. Magic Sets and their application to data integration. J. Comput. Syst. Sci. (2007), 584--609.
[14]
Mónica Figuera, Philipp D. Rohde, and Maria-Esther Vidal. 2021. Trav-SHACL: Efficiently Validating Networks of SHACL Constraints. In WWW. ACM / IW3C2, 3337--3348.
[15]
José Emilio Labra Gayo, Eric Prud'hommeaux, Iovka Boneva, and Dimitris Kontokostas. 2017. Validating RDF Data. Morgan & Claypool Publishers.
[16]
Martin Leinberger, Philipp Seifer, Tjitze Rienstra, Ralf Lämmel, and Steffen Staab. 2020. Deciding SHACL Shape Containment Through Description Logics Reasoning. In Proc. of ISWC 2020 (Lecture Notes in Computer Science), Vol. 12506. Springer, 366--383.
[17]
Vladimir Lifschitz and Hudson Turner. 1999. Splitting a Logic Program. (01 1999).
[18]
Inderpal Singh Mumick, Sheldon J. Finkelstein, Hamid Pirahesh, and Raghu Ramakrishnan. 1990. Magic is Relevant. In Proceedings of the 1990 ACM SIGMOD International Conference on Management of Data, Hector Garcia-Molina and H. V. Jagadish (Eds.). ACM Press, 247--258.
[19]
Christos H. Papadimitriou and Mihalis Yannakakis. 1997. Tie-Breaking Semantics and Structural Totality. J. Comput. Syst. Sci. 54 (1997), 48--60.
[20]
Paolo Pareti, George Konstantinidis, Fabio Mogavero, and Timothy J. Norman. 2020. SHACL Satisfiability and Containment. In Proc. of ISWC 2020. Springer.
[21]
Kenneth A. Ross. 1994. Modular Stratification and Magic Sets for Datalog Programs with Negation. J. ACM 41, 6 (1994).

Cited By

View all
  1. Magic shapes for SHACL validation

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image Proceedings of the VLDB Endowment
    Proceedings of the VLDB Endowment  Volume 15, Issue 10
    June 2022
    319 pages
    ISSN:2150-8097
    Issue’s Table of Contents

    Publisher

    VLDB Endowment

    Publication History

    Published: 01 June 2022
    Published in PVLDB Volume 15, Issue 10

    Badges

    Qualifiers

    • Research-article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)16
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 25 Feb 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)SHACL validation under the well-founded semanticsProceedings of the 21st International Conference on Principles of Knowledge Representation and Reasoning10.24963/kr.2024/52(553-562)Online publication date: 2-Nov-2024
    • (2024)Compiling SHACL Into SQLThe Semantic Web – ISWC 202410.1007/978-3-031-77850-6_4(59-77)Online publication date: 11-Nov-2024
    • (2023)Extraction of Validating Shapes from Very Large Knowledge GraphsProceedings of the VLDB Endowment10.14778/3579075.357907816:5(1023-1032)Online publication date: 1-Jan-2023
    • (2023)A Short Introduction to SHACL for LogiciansLogic, Language, Information, and Computation10.1007/978-3-031-39784-4_2(19-32)Online publication date: 11-Jul-2023

    View Options

    Login options

    Full Access

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media