This paper investigates regex CQs with string equalities (SERCQs), a subclass of core spanners. As
shown by Freydenberger, Kimelfeld, and Peterfreund (PODS 2018), these queries are intractable,
even if restricted to acyclic queries. This previous result defines acyclicity by treating regex formulas
as atoms. In contrast to this, we propose an alternative definition by converting SERCQs into
FC-CQs – conjunctive queries in FC, a logic that is based on word equations. We introduce a way
to decompose word equations of unbounded arity into a conjunction of binary word equations.
If the result of the decomposition is acyclic, then evaluation and enumeration of results become
tractable. The main result of this work is an algorithm that decides in polynomial time whether
an FC-CQ can be decomposed into an acyclic FC-CQ. We also give an efficient conversion from
synchronized SERCQs to FC-CQs with regular constraints. As a consequence, tractability results for
acyclic relational CQs directly translate to a large class of SERCQs.
Funding
Foundations of the Finite Model Theory of Concatenation
Engineering and Physical Sciences Research Council
This work is made available according to the conditions of the Creative Commons Attribution 4.0 International (CC BY 4.0) licence. Full details of this licence are available at: http://creativecommons.org/licenses/by/4.0/