On the Count of Trees

Regular tree grammars and regular path expressions constitute core constructs widely used in programming languages and type systems. Nevertheless, there has been little research so far on frameworks for reasoning about path expressions where node cardinality constraints occur along a path in a tree. We present a logic capable of expressing deep counting along paths which may include arbitrary recursive forward and backward navigation. The counting extensions can be seen as a generalization of graded modalities that count immediate successor nodes. While the combination of graded modalities, nominals, and inverse modalities yields undecidable logics over graphs, we show that these features can be combined in a decidable tree logic whose main features can be decided in exponential time. Our logic being closed under negation, it may be used to decide typical problems on XPath queries such as satisfiability, type checking with relation to regular types, containment, or equivalence.

[1]  Steven J. DeRose,et al.  XML Path Language (XPath) Version 1.0 , 1999 .

[2]  Dexter Kozen,et al.  Results on the Propositional µ-Calculus , 1982, ICALP.

[3]  Maarten Marx,et al.  Axiomatizing the Logical Core of XPath 2.0 , 2008, Theory of Computing Systems.

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

[5]  Dario Colazzo,et al.  Efficient asymmetric inclusion between regular expression types , 2009, ICDT '09.

[6]  Ulrike Sattler,et al.  The Hybrid µ-Calculus , 2001, IJCAR.

[7]  Henny B. Sipma,et al.  Verifying Balanced Trees , 2007, LFCS.

[8]  Tomás Vojnar,et al.  Automata-based verification of programs with tree updates , 2009, Acta Informatica.

[9]  A. Tarski A LATTICE-THEORETICAL FIXPOINT THEOREM AND ITS APPLICATIONS , 1955 .

[10]  Stéphane Demri,et al.  Presburger Modal Logic Is PSPACE-Complete , 2006, IJCAR.

[11]  Murali Mani,et al.  Taxonomy of XML schema languages using formal language theory , 2005, TOIT.

[12]  Maarten Marx,et al.  Conditional XPath , 2005, TODS.

[13]  Pierre Genevès,et al.  Efficient static analysis of XML paths and types , 2007, PLDI '07.

[14]  Silvano Dal-Zilio,et al.  A logic you can count on , 2004, POPL.

[15]  Marc Gyssens,et al.  Regular Expressions with Counting: Weak versus Strong Determinism , 2009, SIAM J. Comput..

[16]  Pierre Genevès,et al.  Compiling XPath for streaming access policy , 2005, DocEng '05.

[17]  Albert R. Meyer,et al.  The Equivalence Problem for Regular Expressions with Squaring Requires Exponential Space , 1972, SWAT.

[18]  Thomas Schwentick,et al.  Counting in Trees for Free , 2004, ICALP.

[19]  Pekka Kilpeläinen,et al.  One-unambiguity of regular expressions with numeric occurrence indicators , 2007, Inf. Comput..

[20]  Ulrike Sattler,et al.  The Complexity of the Graded µ-Calculus , 2002, CADE.

[21]  Frank Neven,et al.  Optimizing Schema Languages for XML: Numerical Constraints and Interleaving , 2009, SIAM J. Comput..

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

[23]  Aniello Murano,et al.  Graded Computation Tree Logic , 2009, LICS.

[24]  Viktor Kuncak,et al.  Full functional verification of linked data structures , 2008, PLDI '08.

[25]  Benjamin C. Pierce,et al.  Regular expression types for XML , 2000, TOPL.

[26]  Aniello Murano,et al.  The Complexity of Enriched µ-Calculi , 2006, ICALP.

[27]  Wouter Gelade Succinctness of regular expressions with interleaving, intersection and counting , 2010, Theor. Comput. Sci..

[28]  Felix Klaedtke,et al.  Monadic Second-Order Logics with Cardinalities , 2003, ICALP.

[29]  Nils Klarlund,et al.  MONA Version 1.4 - User Manual , 2001 .

[30]  Nils Klarlund,et al.  Mona: Monadic Second-Order Logic in Practice , 1995, TACAS.