Flan: An Expressive and Efficient Datalog Compiler for Program Analysis
summary
Flan compiles a high‑level Datalog interpreter written in Scala via Lightweight Modular Staging to generate specialized C code, keeping the interpreter’s productivity while removing interpretive overhead. It embeds Datalog in Scala to allow user‑defined lattices, aggregates, and functions, multiple join strategies and specialized indexes, and produces whole‑program compiled engines. Benchmarks show 1.4×–12.5× speedups (examples: 7.5× vs Soufflé, 2.1× vs another system) and compile times under ~100s.
AI-written summary · about
chapters (15)
- 0:00Introduction to Flan
- 0:24What is Datalog
- 2:33Advantages of Datalog
- 3:58Limitations of Datalog compilers
- 5:23High-level Datalog interpreter
- 6:52Interpreter vs compiler performance
- 7:57Specializing interpreter with LMS
- 9:22Generating specialized code
- 10:25Performance optimizations in Flan
- 11:06Embedding Datalog in Scala
- 12:51Flan performance and flexibility
- 13:12Performance evaluation
- 14:40Conclusion and future work
- 15:46Q&A: Compile times
- 17:35Q&A: Garbage collector
