Logic rules allow analysis of complex relationships to be expressed easily, especially for transitive relations in critical applications. However, understanding and predicting the efficiency of different inference methods remain challenging, even for simplest rules given different kinds of input data. This paper analyzes the efficiency of all three types of well-known inference methods -- query-driven, ground-and-solve, and fact-driven -- along with their respective optimizations, and compares with optimal complexities for the first time, for analyzing transitive graph relations. We also experiment with rule systems widely considered to have the best performance. We analyze all well-known rule variants and widely varying input graphs. The results include precisely calculated optimal time complexities; comparative analysis across different inference methods, rule variants, and graph types; confirmation with performance experiments; as well as discovery of a performance bug.
翻译:逻辑规则使得复杂关系的分析能够被简洁表达,尤其在关键应用中处理传递关系时。然而,即使对于给定不同类型输入数据的最简单规则,理解和预测不同推理方法的效率仍具挑战性。本文首次针对传递图关系分析,系统研究了三种著名推理方法——查询驱动、基础求解与事实驱动——及其各自优化策略的效率,并与最优复杂度进行了比较。我们还对当前公认性能最优的规则系统进行了实验验证。研究涵盖了所有已知规则变体及多样化的输入图类型。研究成果包括:精确计算的最优时间复杂度;跨不同推理方法、规则变体及图类型的对比分析;通过性能实验验证的结论;以及一项性能缺陷的发现。