arXivDaily arXiv每日学术速递 周一至周五更新
北美退伍军人节(Veterans Day),12 日无更新
arXiv 2408.07525cs.DBcs.SE
收藏

Dinkel:用于验证图数据库的状态感知细粒度框架

Dinkel: State-Aware and Granular Framework for Validating Graph Databases

Celine Wüst, Zu-Ming Jiang, Zhendong Su

AI总结:

本文提出 Dinkel 框架,通过状态感知的逐子句查询生成与保持语义的细粒度查询变换,验证任意 Cypher 查询结果,并在三个 GDBMS 中发现大量真实缺陷。

摘要:

图数据库管理系统(GDBMS)一直在为众多数据驱动应用提供支撑。为确保 GDBMS 的可靠性,研究人员已提出若干测试方法。然而,这些方法都存在两个关键局限:(1)对生成复杂且有效的查询以深入执行 GDBMS 深层代码的支持不足;(2)缺乏可用于验证任意查询执行正确性的通用 oracle。本文提出一种新颖且实用的方法 Dinkel,以全面测试 GDBMS。该方法包含两项核心技术。首先,为生成复杂且有效的查询,我们对两类图状态进行建模,即查询上下文和图模式,用于描述 Cypher 变量以及被操作的图标签和属性。我们逐个子句生成查询,并在运行过程中即时修改图状态,以确保每个子句引用正确的状态信息。其次,为通用地验证查询结果,我们引入两种细粒度查询变换:子句级变换和表达式级变换。这些变换可作用于任意查询,同时保持其语义不变。Dinkel 通过检查变换后的查询是否产生与原始查询相同的结果来验证 GDBMS。我们在三个知名 GDBMS 上评估了 Dinkel。总共发现 127 个 bug,其中 113 个已确认、84 个已修复、33 个为逻辑 bug。与现有方法相比,在 48 小时测试活动中,Dinkel 能够多覆盖超过 70% 的代码,并发现显著更多的 bug。我们期望 Dinkel 强大的 bug 检测能力为 GDBMS 测试奠定实用基础。

英文摘要:

Graph database management systems (GDBMSs) have been powering many data-driven applications. To ensure GDBMS reliability, several testing approaches have been proposed. However, they all suffer from two key limitations: (1) insufficient support for generating complex and valid queries to exercise deep GDBMS code, and (2) lack of general oracles to validate the execution correctness of arbitrary queries. In this paper, we propose a novel and practical approach Dinkel, to thoroughly test GDBMSs. Our approach consists of two core techniques. First, to generate complex and valid queries, we model two kinds of graph state, query context and graph schema, to describe the Cypher variables and the manipulated graph labels and properties. We generate queries clause-by-clause, and modify the graph states on the fly to ensure each clause references the correct state information. Second, to generally validate query results, we introduce two fine-grained query transformations: clause-level and expression-level transformations. These transformations can operate on arbitrary queries while preserving their semantics. Dinkel validates GDBMSs by checking whether the transformed query produces the same results as the original. We evaluated Dinkel on three well-known GDBMSs. In total, we found 127 bugs, among which 113 were confirmed, 84 were fixed, and 33 were logic bugs. Compared to existing approaches, Dinkel can cover over 70% more code and find substantially more bugs within a 48-hour testing campaign. We expect Dinkel's powerful bug detection to lay a practical foundation for GDBMS testing.

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

↑