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.
翻译:数据仪已成为解决大规模现实世界问题的流行执行语言, 包括错误查找器、 网络分析工具和拆解器。 这些应用显示了数百种关系和规则的复杂行为, 往往要求 Tuples 在表达工作列表算法时作出非决定性的选择。 这份工作是一份经验报告, 描述了在 Datalog 引擎 Soffle 中实施选择结构的情况。 在选择结构中, 我们可以用几行代码来表达工作列表算法, 比如在树上划线。 我们强调了先前工作中描述的基于规则的选择与这项工作引入的基于关系的选择之间的差异。 我们显示, 选择结构可以使某些工作列表算法的计算速度比没有选择的构建速度快到 10 kx 。