一句话:提出基于自顶向下小步操作语义的 Datalog 交互式调试器,支持 step-into/step-over,并适配 Soufflé 与 IncA。
Datalog 用于包含大量相互依赖谓词的复杂编程任务,但缺乏支持逐步执行与执行状态检查的交互式调试技术。本文提出遵循自顶向下求值策略(递归查询/子查询)的 Datalog 交互式调试。作者首次给出自顶向下 Datalog 的小步操作语义,将子查询表示为嵌套中间项,以支撑调试器的 step-into;并提出混合 Datalog 语义,在自顶向下语义中加入自底向上数据库,以高效实现 step-over。作者实现了 core Datalog 调试器,并说明如何适配 Soufflé 和 IncA 的前端语言。评估表明,该混合语义可用于调试具有真实负载的实际 Datalog 程序。
Datalog is used for complex programming tasks nowadays, consisting of numerous inter-dependent predicates. But Datalog lacks interactive debugging techniques that support the stepwise execution and inspection of the execution state. In this paper, we propose interactive debugging of Datalog programs following a top-down evaluation strategy called recursive query/subquery. While the recursive query/subquery approach is well-known in the literature, we are the first to provide a complete programming-language semantics based on it. Specifically, we develop the first small-step operational semantics for top-down Datalog, where subqueries occur as nested intermediate terms. The small-step semantics forms the basis of step-into interactions in the debugger. Moreover, we show how step-over interactions can be realized efficiently based on a hybrid Datalog semantics that adds a bottom-up database to our top-down operational semantics. We implemented a debugger for core Datalog following these semantics and explain how to adopt it for debugging the frontend languages of Soufflé and IncA. Our evaluation shows that our hybrid Datalog semantics can be used to debug real-world Datalog programs with realistic workloads.