Recursive queries have been traditionally studied in the framework of datalog, a language that restricts recursion to monotone queries over sets, which is guaranteed to converge in polynomial time in the size of the input. But modern big data systems require recursive computations beyond the Boolean space. In this paper we study the convergence of datalog when it is interpreted over an arbitrary semiring. We consider an ordered semiring, define the semantics of a datalog program as a least fixpoint in this semiring, and study the number of steps required to reach that fixpoint, if ever. We identify algebraic properties of the semiring that correspond to certain convergence properties of datalog programs. Finally, we describe a class of ordered semirings on which one can use the semi-naive evaluation algorithm on any datalog program.
翻译:递归查询传统上在Datalog框架中研究,该语言将递归限制为对集合的单调查询,保证在输入规模的多项式时间内收敛。但现代大数据系统需要在布尔空间之外进行递归计算。本文研究Datalog在任意半环上解释时的收敛性。我们考虑有序半环,将Datalog程序的语义定义为该半环上的最小不动点,并研究达到该不动点所需的步骤数(若存在)。我们识别出与Datalog程序特定收敛性质相对应的半环代数性质。最后,描述了一类有序半环,使得任何Datalog程序均可对其使用半朴素求值算法。