Containment of Monadic Datalog Programs via Bounded Clique-Width

Containment of monadic datalog programs over data trees labelled trees with an equivalence relation is undecidable. Recently, decidability was shown for two incomparable fragments: downward programs, which never move up from visited tree nodes, and linear child-only programs, which have at most one intensional predicate per rule and do not use descendant relation. As different as the fragments are, the decidability proofs hinted at an analogy. As it turns out, the common denominator is admitting bounded clique-width counter-examples to containment. This observation immediately leads to stronger decidability results with more elegant proofs, via decidability of monadic second order logic over structures of bounded clique-width. An argument based on two-way alternating tree automata gives a tighter upper bound for linear child-only programs, closing the complexity gap: the problem is $$2\textsc {-ExpTime}$$-complete. As a step towards these goals, complexity of containment over arbitrary structures of bounded clique-width is analysed: satisfiability and containment of monadic programs with stratified negation is in $$3\textsc {-ExpTime}$$, and containment of a linear monadic program in a monadic program is in $$2\textsc {-ExpTime}$$.

[1]  James W. Thatcher,et al.  Generalized finite automata theory with an application to a decision problem of second-order logic , 1968, Mathematical systems theory.

[2]  Bruno Courcelle,et al.  Linear Time Solvable Optimization Problems on Graphs of Bounded Clique-Width , 2000, Theory of Computing Systems.

[3]  Haim Gaifman,et al.  Decidable optimization problems for database logic programs , 1988, STOC '88.

[4]  Bruno Courcelle,et al.  Upper bounds to the clique width of graphs , 2000, Discret. Appl. Math..

[5]  Martin Grohe,et al.  Learnability and Definability in Trees and Similar Structures , 2003, Theory of Computing Systems.

[6]  Thomas Schwentick,et al.  Optimizing Conjunctive Queries over Trees Using Schema Information , 2008, MFCS.

[7]  Thomas Schwentick,et al.  On the complexity of XPath containment in the presence of disjunction, DTDs, and variables , 2006, Log. Methods Comput. Sci..

[8]  Serge Abiteboul,et al.  Recursive queries on trees and data trees , 2013, ICDT '13.

[9]  Ashok K. Chandra,et al.  Optimal implementation of conjunctive queries in relational data bases , 1977, STOC '77.

[10]  Haim Gaifman,et al.  Decidable Optimization Problems for Database Logic Programs (Preliminary Report) , 1988, STOC 1988.

[11]  Bruno Courcelle,et al.  Recursive Queries and Context-free Graph Grammars , 1991, Theor. Comput. Sci..

[12]  Diego Figueira,et al.  Satisfiability of downward XPath with data equality tests , 2009, PODS.

[13]  Oded Shmueli,et al.  Equivalence of DATALOG Queries is Undecidable , 1993, J. Log. Program..

[14]  Petr Hliněný,et al.  Finding branch-decomposition and rank-decomposition , 2008 .

[15]  Georg Gottlob,et al.  Monadic datalog and the expressive power of languages for web information extraction , 2002, JACM.

[16]  Serge Abiteboul,et al.  Foundations of Databases , 1994 .

[17]  Moshe Y. Vardi Reasoning about The Past with Two-Way Automata , 1998, ICALP.

[18]  Filip Murlak,et al.  Monadic Datalog and Regular Tree Pattern Queries , 2014, MFCS.

[19]  Georg Gottlob,et al.  Monadic datalog over finite structures of bounded treewidth , 2010, TOCL.

[20]  Letizia Tanca,et al.  Logic Programming and Databases , 1990, Surveys in Computer Science.

[21]  Hans L. Bodlaender,et al.  A linear time algorithm for finding tree-decompositions of small treewidth , 1993, STOC.

[22]  John Doner,et al.  Tree Acceptors and Some of Their Applications , 1970, J. Comput. Syst. Sci..