Repairing SHACL Constraint Violations Using Answer Set Programming

2Citations
Citations of this article
5Readers
Mendeley users who have this article in their library.
Get full text

Abstract

The Shapes Constraint Language (SHACL) is a recent W3C recommendation for validating RDF graphs against shape constraints to be checked on target nodes of the data graph. The standard also describes the notion of validation reports for data graphs that violate given constraints, which aims to provide feedback on how the data graph can be fixed to satisfy the constraints. Since the specification left it open to SHACL processors to define such explanations, a recent work proposed the use of explanations in the style of database repairs, where a repair is a set of additions to or deletions from the data graph so that the resulting graph validates against the constraints. In this paper, we study such repairs for non-recursive SHACL, the largest fragment of SHACL that is fully defined in the specification. We propose an algorithm to compute repairs by encoding the explanation problem – using Answer Set Programming (ASP) – into a logic program, the answer sets of which correspond to (minimal) repairs. We then study a scenario where it is not possible to simultaneously repair all the targets, which may be often the case due to overall unsatisfiability or conflicting constraints. We introduce a relaxed notion of validation, which allows to validate a (maximal) subset of the targets and adapt the ASP translation to take into account this relaxation. Our implementation in Clingo is – to the best of our knowledge – the first implementation of a repair generator for SHACL.

Cite

CITATION STYLE

APA

Ahmetaj, S., David, R., Polleres, A., & Šimkus, M. (2022). Repairing SHACL Constraint Violations Using Answer Set Programming. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 13489 LNCS, pp. 375–391). Springer Science and Business Media Deutschland GmbH. https://doi.org/10.1007/978-3-031-19433-7_22

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free