English

The Choice Construct in the Souffle Language

Programming Languages 2021-08-26 v1

Abstract

Datalog has become a popular implementation language for solving large-scale, real-world problems, including bug finders, network analysis tools, and disassemblers. These applications express complex behaviour with hundreds of relations and rules that often require a non-deterministic choice for tuples in relations to express worklist algorithms. This work is an experience report that describes the implementation of a choice construct in the Datalog engine Souffle. With the choice construct, we can express worklist algorithms such as spanning trees in a few lines of code. We highlight the differences between rule-based choice as described in prior work, and relation-based choice introduced by this work. We show that a choice construct enables certain worklist algorithms to be computed up to 10kx faster than having no choice construct.

Keywords

Cite

@article{arxiv.2108.11212,
  title  = {The Choice Construct in the Souffle Language},
  author = {Xiaowen Hu and Joshua Karp and David Zhao and Abdul Zreika and Xi Wu and Bernhard Scholz},
  journal= {arXiv preprint arXiv:2108.11212},
  year   = {2021}
}

Comments

This is an extended technical report of work that will be published at APLAS'21

R2 v1 2026-06-24T05:24:31.012Z