Counting in trees 5
tion of this notion by means of feature automata. No counting constraints
are considered. A detailed study of automata over unranked trees has been
initiated by Br¨uggeman-Klein, Murata and Wood [3].
Query languages for unordered trees have been proposed by Cardelli and
Ghelli [5, 4, 6, 7] (and their co-workers). Their approach is based on first-
order logic and fixpoint operators. An extension to numerical constraints
has been proposed by Dal Zilio et al. [9]. Kupferman, Sattler and Vardi
study a µ-calculus with graded modalities where one can express, e.g., that
a node has at least nsuccessors satisfying a given property [18]. The num-
bers nthere, however, are hard-coded into the formula. Orderings on the
successors is not considered. Klaedtke and Ruess consider automata on the
unlabeled infinite binary tree, which have an accepting condition depending
on a global Presburger constraint [17].
Our notion of tree automata with combined Presburger and regular con-
straints has been introduced independently by Dal Zilio and Lugiez in [21].
In the latter paper, the authors also propose a modal logic for XML doc-
uments, called Sheaves logic. This logic allows to reason about numerical
properties of the contents of elements but still lacks recursion, i.e., fixpoint
operators. On the automata side they obtain comparable results concern-
ing closure properties, membership tests and decidability of emptiness. Al-
though no precise characterization is given, the Sheaves logic is strictly less
powerful than the automata model. Recently, Demri and Lugiez proposed
the extended modal logic EXML, which uses regular and Presburger con-
straints on the sequence of children (still without recursion) [10]. The logic
EXML is shown to contain the Sheaves logic and to have an EXPSPACE
satisfiability problem.
2 Preliminaries on Presburger Logic
Presburger logic is first-order logic with addition and the ordering relation
over N. It can express various decision questions such as solvability of sys-
tems of linear equations, integer programming, or verification questions.
The decidability of Presburger logic was established by Presburger [33] by
quantifier elimination. A doubly exponential non-deterministic lower bound
was shown in [12]. Later, the precise complexity was shown to be LinA-
TIME 22O(n), namely doubly exponential alternating time with a linear
number of alternations, [1]. A long line of research was devoted to the
analysis of various decision procedures for this logic, based on quantifier
elimination and automata. For instance, from a formula in prenex normal
form one can construct automata of triply exponential size [16].
For complexity reasons it is quite common to consider either quantifier-
free or existential Presburger formulas, since their satisfiability is in NP.
Both use linear terms with integer coefficients, i.e., built according to the