arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.08509cs.DBcs.AIcs.LO
收藏

从形状到形状:为SPARQL CONSTRUCT查询结果推导SHACL形状(扩展版)

From Shapes to Shapes: Inferring SHACL Shapes for Results of SPARQL CONSTRUCT Queries (Extended Version)

University of Koblenz(科布伦茨大学);University of Stuttgart(斯图加特大学);University of Southampton(南安普顿大学)

Philipp Seifer, Daniel Hernández, Ralf Lämmel, Steffen Staab

AI总结:

该研究针对SPARQL CONSTRUCT查询输出图形状约束难预判的问题,聚焦SCCQ查询子集与Simple SHACL形状子集,形式化定义最严格输出形状推导问题,提出静态分析算法并证明其可靠性与复杂度。

摘要:

SPARQL CONSTRUCT查询可用于构建数据处理流水线,将给定的输入图转换为新的输出图。目前,通过SHACL形状对图进行约束已十分常见,用户可借此了解哪些数据符合预期、哪些不符合。然而,在不了解具体输入数据的情况下,很难预判数据处理流水线最终会生成怎样的图数据:输入图的形状约束会影响输出图,但可能无法直接原样适用,同时查询模板还可能引入新的形状约束。\n本文研究了给定SPARQL CONSTRUCT查询的所有可能输出图上均成立的形状约束的推导问题。我们假设SPARQL CONSTRUCT查询是固定的(例如作为程序的一部分),而输入图需满足输入形状约束,但除此之外可随时间变化,因此大多是未知的。我们研究了SPARQL CONSTRUCT查询的一个子集(SCCQ)和SHACL的一个子集(Simple SHACL),形式化定义了推导最严格Simple SHACL形状集合的问题:该形状集合可约束在任意满足给定Simple SHACL形状集合的输入图上执行SCCQ得到的结果。我们提出并实现了一种对输入SHACL形状和CONSTRUCT查询进行静态分析的算法,并证明了其可靠性和复杂度。

英文摘要:

SPARQL CONSTRUCT queries allow for the specification of data processing pipelines that transform given input graphs into new output graphs. It is now common to constrain graphs through SHACL shapes allowing users to understand which data they can expect and which not. However, it becomes challenging to understand what graph data can be expected at the end of a data processing pipeline without knowing the particular input data: Shape constraints on the input graph may affect the output graph, but may no longer apply literally, and new shapes may be imposed by the query template. In this paper, we study the derivation of shape constraints that hold on all possible output graphs of a given SPARQL CONSTRUCT query. We assume that the SPARQL CONSTRUCT query is fixed, e.g., being part of a program, whereas the input graphs adhere to input shape constraints but may otherwise vary over time and, thus, are mostly unknown. We study a fragment of SPARQL CONSTRUCT queries (SCCQ) and a fragment of SHACL (Simple SHACL). We formally define the problem of deriving the most restrictive set of Simple SHACL shapes that constrain the results from evaluating a SCCQ over any input graph restricted by a given set of Simple SHACL shapes. We propose and implement an algorithm that statically analyses input SHACL shapes and CONSTRUCT queries and prove its soundness and complexity.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑