Datalog-Expressibility for Monadic and Guarded Second-Order Logic

  • Abstract
  • Literature Map
  • Similar Papers
Abstract
Translate article icon Translate Article Star icon
Take notes icon Take Notes

We characterise the sentences in Monadic Second-Order Logic (MSO) that are over finite structures equivalent to a Datalog program, in terms of an existential pebble game. We also show that for every class \({\mathcal{C}}\) of finite structures that can be expressed in MSO and is closed under homomorphisms, and for all \(\ell,k\in{\mathbb{N}}\) , there exists a canonical Datalog program \(\Pi\) of width \((\ell,k)\) in the sense of Feder and Vardi. The same characterisations also hold for Guarded Second-Order Logic (GSO), which properly extends MSO. To prove our results, we show that every class \({\mathcal{C}}\) in GSO whose complement is closed under homomorphisms is a finite union of Constraint Satisfaction Problems (CSPs) of \(\omega\) -categorical structures. The intersection of MSO and Datalog is known to contain the class of nested monadically defined queries (Nemodeq) ; likewise, we show that the intersection of GSO and Datalog contains all problems that can be expressed by the more expressive language of nested guarded queries (GQ \({}^{+}\) ) . Yet, by exploiting our results, we can show that neither of the two query languages can serve as a characterisation, as we exhibit a CSP whose complement corresponds to a query in the intersection of MSO and Datalog that is not expressible in GQ \({}^{+}\) .

Similar Papers
  • Research Article
  • Cite Count Icon 21
  • 10.1145/1838552.1838555
Monadic datalog over finite structures of bounded treewidth
  • Oct 1, 2010
  • ACM Transactions on Computational Logic
  • Georg Gottlob + 2 more

Bounded treewidth and monadic second-order (MSO) logic have proved to be key concepts in establishing fixed-parameter tractability results. Indeed, by Courcelle's Theorem we know that any property of finite structures, which is expressible by an MSO sentence, can be decided in linear time (data complexity) if the structures have bounded treewidth. In principle, Courcelle's Theorem can be applied directly to construct concrete algorithms by transforming the MSO evaluation problem into a tree language recognition problem. The latter can then be solved via a finite tree automaton (FTA). However, this approach has turned out to be problematical, since even relatively simple MSO formulae may lead to a “state explosion” of the FTA. In this work we propose monadic datalog (i.e., datalog where all intentional predicate symbols are unary) as an alternative method to tackle this class of fixed-parameter tractable problems. We show that if some property of finite structures is expressible in MSO then this property can also be expressed by means of a monadic datalog program over the decomposed structure : we mean by this that the original structure is augmented with new elements and new relations that encode one of its tree decompositions. In the first place, we thus compare the expressive power of two query languages. However, we also show that the resulting fragment of datalog can be evaluated in linear time (both with respect to the program size and with respect to the data size). Hence, our transformation of an MSO query into a monadic datalog program yields an alternative proof of Courcelle's Theorem. In order to actually construct efficient algorithms for problems whose tractability is due to Courcelle's Theorem, we propose to use a fragment of full (i.e., not necessarily monadic) datalog which allows for a succinct representation of the corresponding monadic datalog programs and for an efficient execution. This new approach is put to work by devising datalog programs for the 3-Colorability problem of graphs and for the PRIMALITY problem of relational schemas (i.e., testing if some attribute in a relational schema is part of a key). We also report on experimental results with a prototype implementation.

  • Research Article
  • 10.23638/lmcs-16(4:6)2020
A Functional (Monadic) Second-Order Theory of Infinite Trees
  • Oct 23, 2020
  • Logical Methods in Computer Science
  • Anupam Das + 1 more

This paper presents a complete axiomatization of Monadic Second-Order Logic (MSO) over infinite trees. MSO on infinite trees is a rich system, and its decidability ("Rabin's Tree Theorem") is one of the most powerful known results concerning the decidability of logics. By a complete axiomatization we mean a complete deduction system with a polynomial-time recognizable set of axioms. By naive enumeration of formal derivations, this formally gives a proof of Rabin's Tree Theorem. The deduction system consists of the usual rules for second-order logic seen as two-sorted first-order logic, together with the natural adaptation In addition, it contains an axiom scheme expressing the (positional) determinacy of certain parity games. The main difficulty resides in the limited expressive power of the language of MSO. We actually devise an extension of MSO, called Functional (Monadic) Second-Order Logic (FSO), which allows us to uniformly manipulate (hereditarily) finite sets and corresponding labeled trees, and whose language allows for higher abstraction than that of MSO.

  • Conference Article
  • 10.4230/lipics.csl.2016.13
Monadic Second Order Finite Satisfiability and Unbounded Tree-Width
  • Jan 1, 2016
  • Tomer Kotek + 2 more

The finite satisfiability problem of monadic second order logic is decidable only on classes of structures of bounded tree-width by the classic result of Seese. We prove that the following problem is decidable: Input: (i) A monadic second order logic sentence alpha, and (ii) a sentence beta in the two-variable fragment of first order logic extended with counting quantifiers. The vocabularies of alpha and beta may intersect. Output: Is there a finite structure which satisfies alpha and beta such that the restriction of the structure to the vocabulary of alpha has bounded tree-width? (The tree-width of the desired structure is not bounded.) As a consequence, we prove the decidability of the satisfiability problem by a finite structure of bounded tree-width of a logic MS^{exists card} extending monadic second order logic with linear cardinality constraints of the form |X_{1}|+...+|X_{r}| < |Y_{1}|+...+|Y_{s}| on the variables X_i, Y_j of the outer-most quantifier block. We prove the decidability of a similar extension of WS1S.

  • Research Article
  • Cite Count Icon 21
  • 10.1145/331605.331609
Existential second-order logic over strings
  • Jan 1, 2000
  • Journal of the ACM
  • Thomas Eiter + 2 more

Existential second-order logic (ESO) and monadic second-order logic(MSO) have attracted much interest in logic and computer science. ESO is a much expressive logic over successor structures than MSO. However, little was known about the relationship between MSOand syntatic fragments of ESO. We shed light on this issue by completely characterizing this relationship for the prefix classes of ESO over strings, (i.e., finite successor structures). Moreover, we determine the complexity of model checking over strings, for all ESO-prefix classes. Let ESO( Q ) denote the prefix class containing all sentences of the shape ∃ R Q 4 , where R is a list of predicate variables, Q is a first-order predicate qualifier from the prefix set Q and 4 is quantifier-free. We show that ESO( ∃ * ∀∃∃∃ * ) and ESO( ∃ * ∀∀ ) are the maximal standard ESO-prefix classes contained in MSO, thus expressing only regular languages. We further prove the following dichotomy theorem: An ESO prefix-class either expresses only regular languages (and is thus in MSO), or it expresses some NP-complete languages. We also give a precise characterization of those ESO-prefix classes that are equivalent to MSO over strings, and of the ESO-prefix classes which are closed under complementation on strings.

  • Book Chapter
  • Cite Count Icon 2
  • 10.1007/3-540-61422-2_129
Vertex partitioning problems on partial k-trees
  • Jan 1, 1996
  • Arvind Gupta + 3 more

We describe a general approach to obtain polynomial-time algorithms over partial k-trees for graph problems in which the vertex set is to be partitioned in some way. We encode these problems with formulae of the Extended Monadic Second-order (or EMS) logic. Such a formula can be translated into a polynomial-time algorithm automatically. We focus on the problem of partitioning a partial k-tree into induced subgraphs isomorphic to a fixed pattern graph; a distinct algorithm is derived for each pattern graph and each value of k. We use a “pumping lemma” to show that (for some pattern graphs) this problem cannot be encoded in the “ordinary” Monadic Second-order logic—from which a linear-time algorithm over partial k-trees would be obtained. Hence, an EMS formula is in some sense the strongest possible. As a further application of our general approach, we derive a polynomial-time algorithm to determine the maximum number of co-dominating sets into which the vertices of a partial k-tree can be partitioned. (A co-dominating set of a graph is a dominating set of its complement graph).

  • Research Article
  • Cite Count Icon 28
  • 10.1016/j.cosrev.2014.08.001
Practical algorithms for MSO model-checking on tree-decomposable graphs
  • Sep 18, 2014
  • Computer Science Review
  • Alexander Langer + 3 more

Practical algorithms for MSO model-checking on tree-decomposable graphs

  • Research Article
  • Cite Count Icon 30
  • 10.1007/s10009-011-0212-z
Regular model checking for LTL(MSO)
  • Aug 25, 2011
  • International Journal on Software Tools for Technology Transfer
  • Parosh Aziz Abdulla + 4 more

Regular model checking is a form of symbolic model checking for parameterized and infinite-state systems whose states can be represented as words of arbitrary length over a finite alphabet, in which regular sets of words are used to represent sets of states. We present LTL(MSO), a combination of the logics monadic second-order logic (MSO) and LTL as a natural logic for expressing the temporal properties to be verified in regular model checking. In other words, LTL(MSO) is a natural specification language for both the system and the property under consideration. LTL(MSO) is a two-dimensional modal logic, where MSO is used for specifying properties of system states and transitions, and LTL is used for specifying temporal properties. In addition, the first-order quantification in MSO can be used to express properties parameterized on a position or process. We give a technique for model checking LTL(MSO), which is adapted from the automata-theoretic approach: a formula is translated to a buchi regular transition system with a regular set of accepting states, and regular model checking techniques are used to search for models. We have implemented the technique, and show its application to a number of parameterized algorithms from the literature.

  • Conference Article
  • Cite Count Icon 6
  • 10.1109/lics.1998.705640
Existential second-order logic over strings
  • Jun 21, 1998
  • T Eiter + 2 more

Existential second-order logic (ESO) and monadic second-order logic (MSO) have attracted much interest in logic and computer science. ESO is a much more expressive logic over word structures than MSO. However, little was known about the relationship between MSO and syntactic fragments of ESO. We shed light on this issue by completely characterizing this relationship for the prefix classes of ESO over strings, (i.e., finite word structures). Moreover, we determine the complexity of model checking over strings, for all ESO-prefix classes. We also give a precise characterization of those ESO-prefix classes which are equivalent to MSO over strings, and of the ESO-prefix classes which are closed under complementation on strings.

  • Conference Instance
  • 10.4230/lipics.fsttcs.2014.625
Parameterized Communicating Automata: Complementation and Model Checking
  • Jul 22, 2014
  • Benedikt Bollig + 2 more

We study the language-theoretical aspects of parameterized communicating automata (PCAs), in which processes communicate via rendez-vous. A given PCA can be run on any topology of bounded degree such as pipelines, rings, ranked trees, and grids. We show that, under a context bound, which restricts the local behavior of each process, PCAs are effectively complementable. Complementability is considered a key aspect of robust automata models and can, in particular, be exploited for verification. In this paper, we use it to obtain a characterization of context-bounded PCAs in terms of monadic second-order (MSO) logic. As the emptiness problem for context-bounded PCAs is decidable for the classes of pipelines, rings, and trees, their model-checking problem wrt. MSO properties also becomes decidable. While previous work on model checking parameterized systems typically uses temporal logics without next operator, our MSO logic allows one to express several natural next modalities.

  • Book Chapter
  • Cite Count Icon 22
  • 10.1007/978-3-642-28729-9_26
Model Checking Languages of Data Words
  • Jan 1, 2012
  • Benedikt Bollig + 3 more

We consider the model-checking problem for data multi-pushdown automata (DMPA). DMPA generate data words, i.e, strings enriched with values from an infinite domain. The latter can be used to represent an unbounded number of process identifiers so that DMPA are suitable to model concurrent programs with dynamic process creation. To specify properties of data words, we use monadic second-order (MSO) logic, which comes with a predicate to test two word positions for data equality. While satisfiability for MSO logic is undecidable (even for weaker fragments such as first-order logic), our main result states that one can decide if all words generated by a DMPA satisfy a given formula from the full MSO logic.

  • Book Chapter
  • Cite Count Icon 27
  • 10.1007/978-3-540-45138-9_41
On Matroid Properties Definable in the MSO Logic
  • Jan 1, 2003
  • Petr Hliněný

It has been proved by the author that all matroid properties definable in the monadic second-order (MSO) logic can be recognized in polynomial time for matroids of bounded branch-width which are represented by matrices over finite fields. (This result extends so called “MS 2-theorem” of graphs by Courcelle and others.) In this work we review the MSO theory of finite matroids and show some interesting matroid properties which are MSO-definable. In particular, all minor-closed properties are recognizable in such way.

  • Conference Article
  • Cite Count Icon 9
  • 10.1145/1265530.1265554
Monadic datalog over finite structures with bounded treewidth
  • Jun 11, 2007
  • Georg Gottlob + 2 more

Bounded treewidth and Monadic Second Order (MSO) logic have proved to be key concepts in establishing fixed-para-meter tractability results. Indeed, by Courcelle's Theorem we know: Any property of finite structures, which is expressible by an MSO sentence, can be decided in linear time (data complexity) if the structures have bounded treewidth.

  • Book Chapter
  • Cite Count Icon 2
  • 10.1007/3-540-36387-4_14
Expressive Power of Monadic Second-Order Logic and Modal μ-Calculus
  • Jan 1, 2002
  • Philipp Rohde

We consider monadic second order logic (MSO) and the modal μ-calculus (Lμ) over transition systems (Kripke structures). It is well known that every class of transition systems which is definable by a sentence of Lμ is definable by a sentence of MSO as well. It will be shown that the converse is also true for an important fragment of MSO: every class of transition systems which is MSO-definable and which is closed under bisimulation - i.e., the sentence does not distinguish between bisimilar models - is also Lμ-definable. Hence we obtain the following expressive completeness result: the bisimulation invariant fragment of MSO and Lμ are equivalent. The result was proved by David Janin and Igor Walukiewicz. Our presentation is based on their article [91]. The main step is the development of automata-based characterizations of Lμ over arbitrary transition systems and of MSO over transition trees (see also Chapter 16). It turns out that there is a general notion of automaton subsuming both characterizations, so we obtain a common ground to compare these two logics. Moreover we need the notion of the ω-unravelling for a transition system, on the one hand to obtain a bisimilar transition tree and on the other hand to increase the possibilities of choosing successors.

  • Research Article
  • Cite Count Icon 4
  • 10.23638/lmcs-15(4:12)2019
Simplified Algorithmic Metatheorems Beyond MSO: Treewidth and Neighborhood Diversity
  • Dec 4, 2019
  • Logical Methods in Computer Science
  • Dušan Knop + 3 more

This paper settles the computational complexity of model checking of several extensions of the monadic second order (MSO) logic on two classes of graphs: graphs of bounded treewidth and graphs of bounded neighborhood diversity. A classical theorem of Courcelle states that any graph property definable in MSO is decidable in linear time on graphs of bounded treewidth. Algorithmic metatheorems like Courcelle's serve to generalize known positive results on various graph classes. We explore and extend three previously studied MSO extensions: global and local cardinality constraints (CardMSO and MSO-LCC) and optimizing the fair objective function (fairMSO). First, we show how these extensions of MSO relate to each other in their expressive power. Furthermore, we highlight a certain &amp;quot;linearity&amp;quot; of some of the newly introduced extensions which turns out to play an important role. Second, we provide parameterized algorithm for the aforementioned structural parameters. On the side of neighborhood diversity, we show that combining the linear variants of local and global cardinality constraints is possible while keeping the linear (FPT) runtime but removing linearity of either makes this impossible. Moreover, we provide a polynomial time (XP) algorithm for the most powerful of studied extensions, i.e. the combination of global and local constraints. Furthermore, we show a polynomial time (XP) algorithm on graphs of bounded treewidth for the same extension. In addition, we propose a general procedure of deriving XP algorithms on graphs on bounded treewidth via formulation as Constraint Satisfaction Problems (CSP). This shows an alternate approach as compared to standard dynamic programming formulations.Comment: An extended abstract appeared in Proceedings of WG 2017

  • Conference Article
  • Cite Count Icon 6
  • 10.4230/lipics.fsttcs.2013.103
Evaluation is MSOL compatible
  • Jan 11, 2013
  • Sylvain Salvati + 1 more

We consider simply-typed lambda calculus with fixpoint operators. Evaluation of a term gives as a result the Bohm tree of the term. We show that evaluation is compatible with monadic second-order logic (MSOL). This means that for a fixed finite vocabulary of terms, the MSOL properties of Bohm trees of terms are effectively MSOL properties of terms themselves. Theorems of this kind have been known for some graph operations: unfolding, and Muchnik iteration. Similarly to those results, our main theorem has diverse applications. It can be used to show decidability results, to construct classes of graphs with decidable MSOL theory, or to obtain MSOL formulas expressing behavioral properties of terms. Another application is decidability of a control-flow synthesis problem.

Save Icon
Up Arrow
Open/Close
  • Ask R Discovery Star icon
  • Chat PDF Star icon

AI summaries and top papers from 250M+ research sources.