arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1907.00855cs.PL
收藏

使用SHACL(扩展版)的类型检查程序代码

Type Checking Program Code using SHACL (Extended Version)

Martin Leinberger, Philipp Seifer, Claudia Schon, Ralf Lämmel, Steffen Staab

摘要:

基于图的数据格式(如RDF)的一个优点是它们在表示数据方面非常灵活。为了避免运行时错误,处理高度灵活的数据表示的程序代码表现出的困难是,它必须始终包括最一般的情况下,属性可能是设置值或可能不可用。已经设计了对随机数据结构实施约束的随机约束语言(SHACL)。我们提出了我们的方法,类型检查使用SHACL(TyCuS),查询RDF数据图验证的SHACL形状图的类型检查代码。为此,我们从查询中获得SHACL形状,并将数据形状和查询形状作为类型集成到$λ$ -演算中。我们为TyCuS提供了正式的基础和类型安全的证明。程序员可以使用我们的方法来处理RDF数据,简化,类型检查代码不会遇到运行时错误(通常的例外情况是类型检查不能防止访问空列表)。

英文摘要:

It is a strength of graph-based data formats, like RDF, that they are very flexible with representing data. To avoid run-time errors, program code that processes highly-flexible data representations exhibits the difficulty that it must always include the most general case, in which attributes might be set-valued or possibly not available. The Shapes Constraint Language (SHACL) has been devised to enforce constraints on otherwise random data structures. We present our approach, Type checking using SHACL (TyCuS), for type checking code that queries RDF data graphs validated by a SHACL shape graph. To this end, we derive SHACL shapes from queries and integrate data shapes and query shapes as types into a $λ$-calculus. We provide the formal underpinnings and a proof of type safety for TyCuS. A programmer can use our method in order to process RDF data with simplified, type checked code that will not encounter run-time errors (with usual exceptions as type checking cannot prevent accessing empty lists).

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

↑