Weakly-Sticky(WS) Datalog+/- is an expressive member of the family of Datalog+/- program classes that is defined on the basis of the conditions of stickiness and weak-acyclicity. Conjunctive query answering (QA) over the WS programs has been investigated, and its tractability in data complexity has been established. However, the design and implementation of practical QA algorithms and their optimizations have been open. In order to fill this gap, we first study Sticky and WS programs from the point of view of the behavior of the chase procedure. We extend the stickiness property of the chase to that of generalized stickiness of the chase (GSCh) modulo an oracle that selects (and provides) the predicate positions where finitely values appear during the chase. Stickiness modulo a selection function S that provides only a subset of those positions defines sch(S), a semantic subclass of GSCh. Program classes with selection functions include Sticky and WS, and another syntactic class that we introduce and characterize, namely JWS, of jointly-weakly-sticky programs, which contains WS. The selection functions for these last three classes are computable, and no external, possibly non-computable oracle is needed. We propose a bottom-up QA algorithm for programs in the class sch(S), for a general selection S.As a particular case, we obtain a polynomial-time QA algorithm for JWS and weakly-sticky programs. Unlike WS, JWS turns out to be closed under magic-sets query optimization. As a consequence, both the generic polynomial-time QA algorithm and its magic-set optimization can be particularized and applied to WS.
翻译:Qlog+ / - 是Datalog+/ 程序组中一个表达性成员,该组是根据粘性条件和微弱周期性条件定义的,“数据”+/- 是“数据”+/(Datalog+/-) 程序组中一个表达性成员。已经调查了对 WAS 程序进行连接问答的回答(QA), 并建立了数据复杂性的可移植性。 但是, 实际的 QA 算法的设计和实施及其优化是开放的。 为了填补这一空白, 我们首先从追逐程序行为的角度研究“粘性”和“系统”程序组。 我们把追逐的“粘性”和“系统”程序组的粘性属性扩大到“一般粘性” 和“系统”的粘性属性。 在追逐过程中选择( GS) 的“ 摩度回答( QCH) 解算法( QCH) 和“ 软性” 程序组是“ 软性” 。 在“ JWS ” 程序组中, “ 软性” 和“ 软性” 软性” 等程序是“ 。