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.
翻译:逻辑规则能够轻松表达复杂关系的分析,特别是在关键应用中的传递关系。然而,即使是最简单的规则,面对不同类型的输入数据,理解和预测不同推理方法的效率仍然具有挑战性。本文首次针对传递图关系的分析,对所有三类知名推理方法——查询驱动、先置底再求解以及事实驱动——及其各自的优化策略进行了效率分析,并与最优复杂度进行了比较。我们还对普遍认为性能最佳的规则系统进行了实验。我们分析了所有已知的规则变体以及差异极大的输入图。研究结果包括精确计算的最优时间复杂度;不同推理方法、规则变体及图类型之间的比较分析;通过性能实验进行的验证;以及发现了一个性能缺陷。