Datalog-based languages are regaining popularity as a powerful abstraction for expressing recursive computations in domains such as program analysis and graph processing. However, existing systems often face a trade-off between efficiency and extensibility. Engines like Souffle achieve high efficiency through domain-specific designs, but lack general-purpose flexibility. Others, like RecStep, offer modularity by layering Datalog on traditional databases, but struggle to integrate Datalog-specific optimizations. This paper bridges this gap by presenting FlowLog, a new Datalog engine that uses an explicit relational IR per-rule to cleanly separate recursive control (e.g., semi-naive execution) from each rule's logical plan. This boundary lets us retain fine-grained, Datalog-aware optimizations at the logical layer, but also reuse off-the-shelf database primitives at execution. At the logical level (i.e. IR), we apply proven SQL optimizations, such as logic fusion and subplan reuse. To address high volatility in recursive workloads, we adopt a robustness-first approach that pairs a structural optimizer (avoiding worst-case joins) with sideways information passing (early filtering). Built atop Differential Dataflow--a mature framework for streaming analytics--FlowLog supports both batch and incremental Datalog and adds novel recursion-aware optimizations called Boolean (or algebraic) specialization. Our evaluation shows that FlowLog outperforms state-of-the-art Datalog engines and modern databases across a broad range of recursive workloads, achieving superior scalability while preserving a simple and extensible architecture.


翻译:基于Datalog的语言作为表达程序分析和图处理等领域递归计算的强大抽象正重新获得关注。然而,现有系统往往面临效率与可扩展性之间的权衡。Souffle等引擎通过领域特定设计实现高效率,但缺乏通用灵活性;RecStep等系统通过将Datalog分层于传统数据库之上提供模块化,却难以集成Datalog特有的优化技术。本文通过提出FlowLog弥合这一鸿沟——该系统采用基于规则的显式关系中间表示,清晰分离递归控制(如半朴素执行)与各规则的逻辑计划。这种边界设计使得我们既能在逻辑层保留细粒度的Datalog感知优化,又能在执行时复用成熟的数据库原语。在逻辑层(即中间表示层),我们应用了逻辑融合和子计划重用等经过验证的SQL优化技术。针对递归工作负载的高波动性,我们采用鲁棒性优先策略,将结构优化器(避免最坏情况连接)与横向信息传递(早期过滤)相结合。基于流式分析成熟框架Differential Dataflow构建的FlowLog,同时支持批处理和增量Datalog计算,并新增了称为布尔(或代数)特化的递归感知优化技术。实验评估表明,FlowLog在广泛递归工作负载中优于最先进的Datalog引擎和现代数据库系统,在保持简洁可扩展架构的同时实现了更优的可扩展性。

0
下载
关闭预览

相关内容

【KDD2024】HiGPT:异构图语言模型
专知会员服务
19+阅读 · 2024年7月9日
【NeurIPS2019】图变换网络:Graph Transformer Network
LibRec 每周算法:LDA主题模型
LibRec智能推荐
29+阅读 · 2017年12月4日
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
10+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
10+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员