一句话:提出可扩展的自底向上 Datalog 溯源调试策略与定点语义,并集成到 Soufflé 高效实现。
Datalog 作为 DSL 被广泛用于静态程序分析与网络分析,其大规模逻辑规约包含数百万元组和数百条递归规则,调试十分困难,而现有数据库溯源技术在此类分析问题上难以扩展。本文提出一种新的自底向上 Datalog 评估策略:引入包含证明注解的 provenance lattice,并为 semi-naïve evaluation 给出新的定点语义;调试查询机制可回答任意溯源查询,以最小高度构造元组的部分证明树。该技术集成到将 Datalog 编译为 C++ 的 Soufflé 引擎中,并利用专用并行数据结构获得高性能。实验在 DOOP/DaCapo 上为数千万输出元组生成证明注解,平均运行时开销为 1.31×,且比现有先进技术更灵活。
Logic programming languages such as Datalog have become popular as Domain Specific Languages (DSLs) for solving large-scale, real-world problems, in particular, static program analysis and network analysis. The logic specifications that model analysis problems process millions of tuples of data and contain hundreds of highly recursive rules. As a result, they are notoriously difficult to debug. While the database community has proposed several data provenance techniques that address the Declarative Debugging Challenge for Databases, in the cases of analysis problems, these state-of-the-art techniques do not scale. In this article, we introduce a novel bottom-up Datalog evaluation strategy for debugging: Our provenance evaluation strategy relies on a new provenance lattice that includes proof annotations and a new fixed-point semantics for semi-naïve evaluation. A debugging query mechanism allows arbitrary provenance queries, constructing partial proof trees of tuples with minimal height. We integrate our technique into Soufflé, a Datalog engine that synthesizes C++ code, and achieve high performance by using specialized parallel data structures. Experiments are conducted with D OOP /DaCapo, producing proof annotations for tens of millions of output tuples. We show that our method has a runtime overhead of 1.31× on average while being more flexible than existing state-of-the-art techniques.