A Typed Multi-level Datalog IR and Its Compiler Framework

被引:0
作者
Klopp, David [1 ]
Erdweg, Sebastian [1 ]
Pacak, Andre [1 ]
机构
[1] JGU Mainz, Mainz, Germany
来源
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL | 2024年 / 8卷 / OOPSLA2期
基金
欧洲研究理事会;
关键词
Datalog; type system; multi-level IR; compiler framework;
D O I
10.1145/3689767
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
The resurgence of Datalog in the last two decades has led to a multitude of new Datalog systems. These systems explore novel ideas for improving Datalog's programmability and performance, making important contributions to the fi eld. Unfortunately, the individual systems progress at a much slower pace than the overall fi eld, because improvements in one system are rarely ported to other systems. The reason for this rift is that each system provides its own Datalog dialect with specific notation, language features, and invariants, enabling specific optimization and execution strategies. This paper presents the fi rst compiler framework for Datalog that can be used to support any Datalog frontend language and to target any Datalog backend. The centerpiece of our framework is a novel typed multi-level Datalog IR that supports IR extensions and guarantees executability. Existing Datalog systems can provide a compiler frontend that translates their Datalog dialect to the extended IR. The IR is then progressively lowered toward core Datalog, allowing optimizations at each level. At last, compiler backends can target different Datalog solvers. We have implemented the compiler framework and integrated 4 Datalog frontends and 3 Datalog backends, using 16 IR extensions. We also formalize the IR's fl exible type system, which bidirectional, fl ow-sensitive, bipolar, and uses three-valued typing contexts. The type system simultaneously validates type compatibility and precisely tracks bindings of logic variables while permitting IR extensions.
引用
收藏
页数:29
相关论文
共 3 条
  • [1] A new compiler framework based on superword level parallel
    Guo Z.
    Liu H.
    International Journal of Performability Engineering, 2018, 14 (10) : 2511 - 2521
  • [2] Towards a compiler framework for thread-level speculation
    Aldea, Sergio
    Llanos, Diego R.
    Gonzalez-Escribano, Arturo
    PROCEEDINGS OF THE 19TH INTERNATIONAL EUROMICRO CONFERENCE ON PARALLEL, DISTRIBUTED, AND NETWORK-BASED PROCESSING, 2011, : 267 - 271
  • [3] Evaluating DeepTelos for ConceptBase A Contribution to the Multi-Level Process Challenge
    Jeusfeld, Manfred A.
    ENTERPRISE MODELLING AND INFORMATION SYSTEMS ARCHITECTURES-AN INTERNATIONAL JOURNAL, 2022, 17 : 1 - 25