We describe a datalog query evaluation approach based on efficient and composable boolean matrix manipulation modules. We first define an overarching problem, Boolean Matrix Logic Programming (BMLP), which uses boolean matrices as an alternative computation to evaluate datalog programs. We develop two novel BMLP modules for bottom-up inferences on linear dyadic recursive datalog programs, and show how additional modules can extend this capability to compute both linear and non-linear recursive datalog programs of arity two. Our empirical results demonstrate that these modules outperform general-purpose and specialised systems by factors of 30x and 9x, respectively, when evaluating large programs with millions of facts. This boolean matrix approach significantly enhances the efficiency of datalog querying to support logic programming techniques.
翻译:我们提出了一种基于高效可组合布尔矩阵操作模块的datalog查询评估方法。首先定义了一个总体性问题——布尔矩阵逻辑程序设计(BMLP),该方法使用布尔矩阵作为评估datalog程序的替代计算范式。针对线性二元递归datalog程序的自底向上推理,我们开发了两个创新的BMLP模块,并展示了如何通过扩展模块实现二元线性和非线性递归datalog程序的计算。实验结果表明,在评估包含数百万事实的大型程序时,这些模块分别比通用系统和专用系统的性能提升30倍和9倍。这种布尔矩阵方法显著提升了datalog查询效率,为逻辑编程技术提供了有力支持。