Deciding Equivalence of Separated Nonnested Attribute Systems in Polynomial Time
Abstract
In 1982, Courcelle and FranchiZannettacci showed that the equivalence problem of separated nonnested attribute systems can be reduced to the equivalence problem of total deterministic separated basic macro tree transducers. They also gave a procedure for deciding equivalence of transducer in the latter class. Here, we reconsider this equivalence problem. We present a new alternative decision procedure and prove that it runs in polynomial time. We also consider extensions of this result to partial transducers and to the case where parameters of transducers accumulate strings instead of trees.
1 Introduction
Attribute grammars are a wellestablished formalism for realizing computations on syntax trees [20, 21], and implementations are available for various programming languages, see, e.g. [12, 28, 29]. A fundamental question for any such specification formalism is whether two specifications are semantically equivalent. As a particular case, attribute grammars have been considered which compute uninterpreted trees. Such devices that translate input trees (viz. the parse trees of a contextfree grammar) into output trees, have also been studied under the name “attributed tree transducer” [14] (see also [15]). In 1982, Courcelle and FranchiZannettacci showed that the equivalence problem for (strongly noncircular) attribute systems reduces to the equivalence problem for primitive recursive schemes with parameters [3]; the latter model is also known under the name macro tree transducer [9]. Whether or not equivalence of attributed tree transducers (ATTs) or of (deterministic) macro tree transducers (MTTs) is decidable remain two intriguing (and very difficult) open problems.
Our polynomial time decision procedure works in two phases: first, the transducer is converted into an “earliest” normal form. In this form, output symbols that are not produced within parameter positions are produced as early as possible. In particular it means that the root output symbols of the righthand sides of rules for one state must differ. For instance, our transducer \(M_{\text {tern}}\) is not earliest, because all three rrules produce the same output root symbol (\(*\)). Intuitively, this symbol should be produced earlier, e.g., at the place when the state r is called. The earliest form is a common technique used for normal forms and equivalence testing of different kinds of tree transducers [8, 13, 22]. We show that equivalent states of a transducer in this earliest form produce their stateoutput exactly in the same way. This means especially that the output of parameters is produced in the same places. It is therefore left to check, in the second phase, that also these parameter outputs are equivalent. To this end, we build an equivalence relation on states of earliest transducers that combines the two equivalence tests described before. Technically speaking, the equivalence relation is tested by constructing sets of Herbrand equalities. From these equalities, a fixed point algorithm can, after polynomially many iterations, produce a stable set of equalities.
The proofs of Lemmata 1 and 2 can be found in the appendix of an extended version at http://arxiv.org/abs/1902.03858.
2 Separated Basic Macro Tree Transducers
Let \(\varSigma \) be a ranked alphabet, i.e., every symbol of the finite set \(\varSigma \) has associated with it a fixed rank \(k \in \mathbb {N}\). Generally, we assume that the input alphabet \(\varSigma \) is nontrivial, i.e., \(\varSigma \) has cardinality at least 2, and contains at least one symbol of rank 0 and at least one symbol of rank \(>0\). The set \(\mathcal {T}_\varSigma \) is the set of all (finite, ordered, rooted) trees over the alphabet \(\varSigma \). We denote a tree as a string over \(\varSigma \) and parenthesis and commas, i.e., f(a, f(a, b)) is a tree over \(\varSigma \), where f is of rank 2 and a, b are of rank zero. We use Dewey dotted decimal notation to refer to a node of a tree: The root node is denoted \(\varepsilon \), and for a node u, its ith child is denoted by u.i. For instance, in the tree f(a, f(a, b)) the bnode is at position 2.2. A pattern (or kpattern) (over \(\varDelta \)) is a tree \(p\in \mathcal {T}_{\varDelta \cup \{\top \}}\) over a ranked alphabet \(\varDelta \) and a disjoint symbol \(\top \) (with exactly k occurrences of the symbol \(\top \)). The occurrences of the dedicated symbol \(\top \) serve as place holders for other patterns. Assume that p is a kpattern and that \(p_1,\dots ,p_k\) are patterns; then \(p[p_1,\ldots ,p_k]\) denotes the pattern obtained from p by replacing, for \(i=1,\ldots ,k\), the ith occurrence (from lefttoright) of \(\top \) by the pattern \(p_i\).
The MTT M is basic, if each argument tree \(T_j\) of a subtree \(q'(x_i,T_1,\ldots ,T_n)\) of righthand sides T of rules (1) may not contain further occurrences of states, i.e., is in \(\mathcal {T}_{\varDelta \cup Y}\). The MTT M is separated basic, if M is basic, and \(\varDelta \) is the disjoint union of ranked alphabets \(\varDelta _{out}\) and \(\varDelta _{in}\) so that the argument trees \(T_j\) of subtrees \(q'(x_i,T_1,\ldots ,T_n)\) are in \(\mathcal {T}_{\varDelta _{in}\cup Y}\), while the output symbols a outside of such subtrees are from \(\varDelta _{out}\). The same must hold for the axiom. Thus, letters directly produced by a state call are in \(\varDelta _{out}\) while letters produced in the parameters are in \(\varDelta _{in}\). The MTT \(M_{\text {tern}}\) from the Introduction is separated basic with \(\varDelta _{out}=\{0, 1, 2, 3, *, +, \text {EXP}\}\) and \(\varDelta _{in}=\{p,s,z\}\).
Note that equivalence of nondeterministic transducers is undecidable (even already for very small subclasses of transductions [18]). Therefore, we assume for the rest of the paper that all MTTs are deterministic and separated basic. We will also assume that all MTTs are total, with the exception of Sect. 5 where we also consider partial MTTs.
Example 1
We restricted ourselves to total separated basic MTTs. However, we would like to be able to decide equivalence for partial transducers as well. For this reason we define now topdown tree automata, and will then decide equivalence of MTTs relative to some given DTA D. A deterministic topdown tree automaton (DTA) D is a tuple \((B, \varSigma , b_0, \delta _D)\) where B is a finite set of states, \(\varSigma \) is a ranked alphabet of input symbols, \(b_0\in B\) is the initial state, and \(\delta _D\) is the partial transition function with rules of the form \(b(f(x_1,\ldots , x_k)) \rightarrow (b_1(x_1),\ldots , b_k(x_k))\), where \(b,b_1,\dots ,b_k\in B\) and \(f\in \varSigma \) of rank k. W.l.o.g. we always assume that all states b of a DTA are productive, i.e., \(\mathsf{dom}(b)\ne \emptyset \). If we consider a MTT M relative to a DTA D we implicitly assume a mapping \(\pi : Q \rightarrow B\), that maps each state of M to a state of D, then we consider for q only input trees in \(\mathsf{dom}(\pi (q))\).
3 TopDown Normalization of Transducers
In this section we show that each total deterministic basic separated MTT can be put into an “earliest” normal form relative to a fixed DTA D. Intuitively, state output (in \(\varDelta _{out}\)) is produced as early as possible for a transducer in the normal form. It can then be shown that two equivalent transducers in normal form produce their state output in exactly the same way.
Recall the definition of patterns as trees over \(\mathcal {T}_{\varDelta \cup \{\top \}}\). Substitution of \(\top \)symbols by other patterns induces a partial ordering \(\sqsubseteq \) over patterns by \(p\sqsubseteq p'\) if and only if \(p = p'[p_1,\ldots ,p_m]\) for some patterns \(p_1,\ldots ,p_m\). W.r.t. this ordering, \(\top \) is the largest element, while all patterns without occurrences of \(\top \) are minimal. By adding an artificial least element \(\bot \), the resulting partial ordering is in fact a complete lattice. Let us denote this complete lattice by \(\mathcal {P}_\varDelta \).
Let \(\varDelta =\varDelta _{in}\cup \varDelta _{out}\). For \(T\in \mathcal {T}_{\varDelta \cup Y}\), we define the \(\varDelta _{out}\)prefix as the pattern \(p\in \mathcal {T}_{\varDelta _{out}\cup \{\top \}}\) as follows. Assume that \(T = a(T_1,\ldots ,T_m)\).

If \(a\in \varDelta _{out}\), then \(p = a(p_1,\ldots ,p_m)\) where for \(j=1,\ldots ,m\), \(p_j\) is the \(\varDelta _{out}\)prefix of \(T_j\).

If \(a\in \varDelta _{in}\cup Y\), then \(p = \top \).
By this definition, each tree \(t\in \mathcal {T}_{\varDelta \cup Y}\) can be uniquely decomposed into a \(\varDelta _{out}\)prefix p and subtrees \(t_1,\ldots ,t_m\) whose root symbols all are contained in \(\varDelta _{in}\cup Y\) such that \(t = p[t_1,\ldots ,t_m]\).
Let M be a total separated basic MTT M, D be a given DTA. We define the \(\varDelta _{out}\)prefix of a state q of M relative to D as the minimal pattern \(p\in \mathcal {T}_{\varDelta _{out}\cup \{\top \}}\) so that each tree Open image in new window is of the form \(p[T_1,\ldots ,T_m]\) for some sequence of subtrees \(T_1,\ldots ,T_m \in \mathcal {T}_{\varDelta }\). Let us denote this unique pattern p by \(\mathsf{pref}_o(q)\). If \(q(f, y_1,\ldots , y_l) \rightarrow T\) is a rule of a separated basic MTT and there is an input tree \(f(t_1,\ldots , t_k) \in \mathsf{dom}(\pi (q))\) then \(\mathsf{pref}_o(q) \le T\).
Lemma 1
Let M be a total separated basic MTT and D a given DTA. Let \(t\in \mathsf{dom}(\pi (q))\) be a smallest input tree of a state q of M. The \(\varDelta _{out}\)prefix of every state q of M relative to D can be computed in time \(\mathcal {O}(t\cdot M)\).
The proof is similar to the one of [8, Theorem 8] for topdown tree transducers. This construction can be carried over as, for the computation of \(\varDelta _{out}\)prefixes, the precise contents of the output parameters \(y_j\) can be ignored.
Example 2
We compute the \(\varDelta _{out}\)prefix of the MTT M from Example 1. We consider M relative to the trivial DTA D that consists only of one state b with \(dom(b) = \mathcal {T}_\varSigma \). We therefore omit D in our example. We get the following system of inequations: from the rules of state r we obtain \(Y_r \sqsubseteq *(i,\text {EXP}(3,\top ))\) with \(i \in \{0,1,2\}\). From the rules of state q we obtain \(Y_q \sqsubseteq +(Y_q,Y_{q'})\), \(Y_q \sqsubseteq +(Y_r,Y_{q})\) and \(Y_q \sqsubseteq *(i,\text {EXP}(3,\top ))\) with \(i \in \{0,1,2\}\). From the rules of state \(q'\) we obtain \(Y_{q'} \sqsubseteq +(*(0,\text {EXP}(3,\top )),*(0,\text {EXP}(3,\top )))\), \(Y_{q'} \sqsubseteq +(Y_r,Y_{q'})\) and \(Y_{q'} \sqsubseteq *(i,\text {EXP}(3,\top ))\) with \(i \in \{0,1,2\}\). For the fixpoint iteration we initialize \(Y_r^{(0)}\), \(Y_q^{(0)}\), \(Y_{q'}^{(0)}\) with \(\bot \) each. Then \(Y_r^{(1)} = *(\top ,\text {EXP}(3,\top )) = Y_r^{(2)}\) and \(Y_q^{(1)} = \top \), \(Y_{q'}^{(1)} = \top \). Thus, the fixpoint iteration ends after two rounds with the solution \(\mathsf{pref}_o(q) = \top \). \(\square \)
Let M be a separated basic MTT M and D be a given DTA D. M is called Dearliest if for every state \(q \in Q\) the \(\varDelta _{out}\)prefix with respect to \(\pi (q)\) is \(\top \).
Lemma 2
For every pair (M, A) consisting of a total separated basic MTT M and axiom A and a given DTA D, an equivalent pair \((M',A')\) can be constructed so that \(M'\) is a total separated basic MTT that is Dearliest. Let t be an output tree of (M, A) for a smallest input tree \(t' \in \mathsf{dom}(\pi (q))\) where q is the state occurring in A. Then the construction runs in time \(\mathcal {O}(t\cdot (M,A))\).
The construction follows the same line as the one for the earliest form of topdown tree transducer, cf. [8, Theorem 11]. Note that for partial separated basic MTTs the size of the \(\varDelta _{out}\)prefixes is at most exponential in the size of the transducer. However for total transducer that we consider here the \(\varDelta _{out}\)prefixes are linear in the size of the transducer and can be computed in quadratic time, cf. [8].
Corollary 1
For (M, A) consisting of a total deterministic separated basic MTT M and axiom A and the trivial DTA D accepting \(\mathcal {T}_\varSigma \) an equivalent pair \((M',A')\) can be constructed in quadratic time such that \(M'\) is an Dearliest total deterministic separated basic MTT.
Example 3

if \(t_i\) and \(t'_i\) are both recursive calls to the same subtree, i.e., \(t_i = q_i(x_{j_i},\underline{T_i})\), \(t'_i = q'_i(x_{j'_i},\underline{T'_i})\) and \(j_i = j'_i\), then \((q_i,\underline{T_i})[\underline{T}/\underline{y}] \cong ^h_{b_{j_i}} (q'_i,\underline{T'_i})[\underline{T'}/\underline{y'}]\)

if \(t_i\) and \(t'_i\) are both recursive calls but on different subtrees, i.e., \(t_i = q_i(x_{j_i},\underline{T_i})\), \(t'_i = q'_i(x_{j'_i},\underline{T'_i})\) and \(j_i \ne j'_i\), then Open image in new window for some \(s \in \varSigma ^{(0)}\) and \((q_i,\underline{T_i})[\underline{T}/\underline{y}] \cong ^{(h)}_{b_{j_i}} \hat{t} \cong ^{(h)}_{b_{j'_i}} (q'_i,\underline{T'_i})[\underline{T}/\underline{y}]\)

if \(t_i\) and \(t'_i\) are both parameter calls, i.e., \(t_i = y_{j_i}\) and \(t'_{i} = y'_{j'_i}\), then \(T_{j_i} = T'_{j'_i}\)

if \(t_i\) is a parameter call and \(t'_i\) a recursive call, i.e., \(t_i = y_{j_i}\) and \(t'_i = q'_i(x_{j'_i},\underline{T'_i})\), then \(T_{j_i} \cong ^{(h)}_{b_{j'_i}} (q'_i,\underline{T'_i})[\underline{T'}/\underline{y'}]\)

(symmetric to the latter case) if \(t_i\) is a recursive call and \(t'_i\) a parameter call, i.e., \(t_i = q_i(x_{j_i},\underline{T_i})\) and \(t'_i = y'_{j'_i}\), then \((q_i,\underline{T_i})[\underline{T}/\underline{y}] \cong ^{(h)}_{b_{j_i}} T'_{j'_i}\).

if \(t' = y_j\) then \(T = T'_j\)

if \(t' = q'_1(x_i,\underline{T'_1})\) then \(T \cong ^{(h)}_{b_i} (q'_1,\underline{T'_1})[\underline{T'}/\underline{y'}]\).
Intuitively, \((q,\underline{T}) \cong ^{h}_b (q',\underline{T'})\) if for all input trees \(t \in \mathsf{dom}(b)\) of height h, Open image in new window . Then \((q,\underline{T}) \cong _b (q',\underline{T'})\) if for all input trees \(t \in \mathsf{dom}(b)\) (independent of the height), Open image in new window .
Theorem 1
For a given DTA D with initial state b, let \(M, M'\) be Dearliest total deterministic separated basic MTTs with axioms A and \(A'\), respectively. Then (M, A) is equivalent to \((M',A')\) relative to D, iff there is a pattern p such that \(A=p[q_1(x_1,\underline{T_1}),\ldots , q_m(x_1,\underline{T_m})]\), and \(A'=p[q'_1(x_1,\underline{T'_1}),\ldots , q'_m(x_1,\underline{T'_m})]\) and for \(j=1,\ldots ,m\), \((q_j,\underline{T_j}) \cong _b (q'_j,\underline{T'_j})\), i.e., \(q_j\) and \(q'_j\) are equivalent on the values of output parameters \(\underline{T}_j\) and \(\underline{T}'_j\).
Proof
Let \(\varDelta \) be the output alphabet of M and \(M'\). Assume that \((M,A) \cong _b (M',A')\). As M and \(M'\) are earliest, the \(\varDelta _{out}\)prefix of Open image in new window and Open image in new window , for \(t \in \mathsf{dom}(b)\) is the same pattern p and therefore \(A=p[q_1(x_1,\underline{T_1}),\ldots , q_m(x_1,\underline{T_m})]\) and \(A'=p[q'_1(x_1,\underline{T'_1}),\ldots , q'_m(x_1,\underline{T'_m})]\). To show that \((q_i,\underline{T_i}) \cong _{b} (q'_i,\underline{T'_i})\) let \(u_i\) be the position of the ith \(\top \)node in the pattern p. For some \(t\in \mathsf{dom}(b)\) and \(\underline{T}\in \mathcal {T}_{\varDelta _{in}}\) let \(t_i\) and \(t'_i\) be the subtree of Open image in new window and Open image in new window , respectively. Then \(t_i = t'_i\) and therefore \((q_i,\underline{T_i}) \cong _b (q'_i,\underline{T'_i})\).
4 Polynomial Time
In this section we prove the main result of this paper, namely, that for each fixed DTA D, equivalence of total deterministic basic separated MTTs (relative to D) can be decided in polynomial time. This is achieved by taking as input two Dearliest such transducers, and then collecting conditions on the parameters of pairs of states of the respective transducers for their produced outputs to be equal.
Example 4
Example 5
Lemma 3
\(\varPhi _{b,(q,q')}^{(h)}\) is a conjunction of equations of the form \(y_i \doteq y_j\), \(y_i \doteq t\) with \(t \in \varDelta _{in}\). Every satisfiable conjunction of equalities is equivalent to a (possible empty) finite conjunction of equations of the form \(y_{i} \doteq t_{ i}\), \(t_i\in \mathcal {T}_{\varDelta _{in}\cup Y}\) where the \(y_{i}\) are distinct and no equation is of the form \(y_j\doteq y_j\). We call such conjunctions reduced. If we have two inequivalent reduced conjunctions \(\phi _1\) and \(\phi _2\) with \(\phi _1 \Rightarrow \phi _2\) then \(\phi _1\) contains strictly more equations. From that follows that for every sequence \(\phi _0 \Rightarrow \ldots \phi _m\) of pairwise inequivalent reduced conjunctions \(\phi _j\) with k variables, \(m \le k+1\) holds. This observation is crucial for the termination of the fixpoint iteration we will use to compute \(\varPhi _{b,(q,q')}^{(h)}\).
Lemma 4
For a DTA D, states \(q, q'\) of Dearliest separated basic MTTs \(M,M'\) and states b of D, the formula \(\varPhi _{b,(q,q')}\) can be computed in time polynomial in the sizes of M and \(M'\).
Proof
We successively compute the conjunctions \(\varPsi _{b,q}^{(h)}(z), \varPsi _{b,q'}^{(h)}(z), \varPhi _{b,(q,q')}^{(h)},\) \(h\ge 0\), for all states \(b,q,q'\). As discussed before, some \(h\le n^2(2l+1)\) exists such that the conjunctions for \(h+1\) are equivalent to the corresponding conjunctions for h—in which case, we terminate. It remains to prove that the conjunctions for h can be computed from the conjunctions for \(h1\) in polynomial time. For that, it is crucial that we maintain reduced conjunctions. Nonetheless, the sizes of occurring righthand sides of equalities may be quite large. Consider for example the conjunction \(x_1 \doteq a \wedge x_2 \doteq f(x_1,x_1) \wedge \ldots \wedge x_n \doteq f(x_{n1},x_{n1})\). The corresponding reduced conjunction is then given by \(x_1 \doteq a\wedge x_2 \doteq f(a,a)\wedge \ldots \wedge x_n \doteq f(f(f(\ldots (f(a,a))\ldots )\) where the sizes of righthand sides grow exponentially. In order to arrive at a polynomialsize representation, we therefore rely on compact representations where isomorphic subtrees are represented only once. W.r.t. this representation, reduction of a nonreduced conjunction, implications between reduced conjunctions as well as substitution of variables in conjunctions can all be realized in polynomial time. From that, the assertion of the lemma follows.
Example 6
In summary, we obtain the main theorem of our paper.
Theorem 2
Let (M, A) and \((M',A')\) be pairs consisting of total deterministic separated basic MTTs M, \(M'\) and corresponding axioms A, \(A'\) and D a DTA. Then the equivalence of (M, A) and \((M',A')\) relative to D is decidable. If D accepts all input trees, equivalence can be decided in polynomial time.
Proof

\(p = p'\), \(k = k'\) and

for all \(j = 1,\ldots , k\), \(\varPhi _{b,(q_j,q'_j)}[\underline{T_j}/\underline{y},\underline{T_j}/\underline{y'}]\) is equivalent to \(\mathsf{true}\).
By Lemma 4 we can decide the second statements in time polynomial in the sizes of \(M_1\) and \(M'_1\).
5 Applications
In this section we show several applications of our equivalence result. First, we consider partial transductions of separated basic MTTs. To decide the equivalence of partial transductions we need to decide (a) whether the domain of two given MTTs is the same and if so, (b) whether the transductions on this domain are the same. How the second part of the decision procedure is done was shown in detail in this paper if the domain is given by a DTA. It therefore remains to discuss how this DTA can be obtained. It was shown in [4, Theorem 3.1] that the domain of every topdown tree transducer T can be accepted by some DTA \(B_T\) and this automaton can be constructed from T in exponential time. This construction can easily be extended to basic MTTs. The decidability of equivalence of DTAs is wellknown and can be done in polynomial time [16, 17]. To obtain a total transducer we add for each pair (q, f), \(q \in Q\) and \(f \in \varSigma \) that has no rule a new rule \(q(f(\underline{x}),\underline{y}) \rightarrow \bot \), where \(\bot \) is an arbitrary symbol in \(\varDelta _{out}\) of rank zero.
Example 7
In Example 1 we discussed how to adjust the transducer from the introduction to our formal definition. We therefore had to introduce additional rules to obtain a total transducer. Now we still add rules for the same pairs (q, f) but only with righthand sides \(\bot \). Therefore the original domain of the transducer is given by a DTA \(D = (R,\varSigma ,r_0,\delta _D)\) with the rules \(r_0(g(x_1,x_2)) \rightarrow (r(x_1), r(x_2))\), \(r(f(x_1,x_2)) \rightarrow (r(x_1),r(x_2))\) and \(r(i) \rightarrow (\ )\) for \(i = 1,2,3\). \(\square \)
Corollary 2
The equivalence of deterministic separated basic MTTs with a partial transition function is decidable.
Corollary 3
The equivalence of total separated basic MTTs with regular lookahead is decidable in polynomial time.
Last, we consider separated basic MTTs that concatenate strings instead of trees in the parameters. We abbreviate this class of transducers by \(\text {MTT}^\text {yp}\). Thus, the alphabet \(\varDelta _{in}\) is not longer a ranked alphabet but a unranked alphabet which elements/letters can be concatenated to words. The procedure to decide equivalence of \(\text {MTT}^\text {yp}\) is essentially the same as we discussed in this paper but instead of conjunctions of equations of trees over \(\varDelta _{in}\cup Y\) we obtain conjunctions equations of words. Equations of words is a well studied problem [23, 24, 26]. In particular, the confirmed Ehrenfeucht conjecture states that each conjunction of a set of word equations over a finite alphabet and using a finite number of variables, is equivalent to the conjunction of a finite subset of word equations [19]. Accordingly, by a similar argument as in Sect. 4, the sequences of conjunctions \(\varPsi _{b,q}^{(h)}(z),{\varPsi '}_{b,q'}^{(h)}(z),\varPhi _{b,(q,q')}^{(h)},h\ge 0\), are ultimately stable. Using an encoding of words by integer matrices and applying techniques as in [19], we obtain:
Theorem 3
The equivalence of total separated basic MTTs that concatenate words instead of trees in the parameters (\(\varDelta _{in}\) is unranked) is decidable.
6 Related Work
For deterministic topdown tree transducers, equivalence can be decided in EXPSPACE, and in NLOGSPACE if the transducers are total [25]. For the latter class of transducers, one can decide equivalence in polynomial time by transforming the transducer into a canonical normal form (called “earliest normal form”) and then checking isomorphism of the resulting transducers [8]. In terms of hardness, we know that equivalence of deterministic topdown tree transducers is EXPTIMEhard. For linear size increase deterministic macro tree transducers the precise complexity is not known (but is at least NPhard). More complexity results are known for other models of tree transducers such as streaming tree transducers [1], see [25] for a summary.
7 Conclusion
We have proved that the equivalence problem for separated nonnested attribute systems can be decided in polynomial time. In fact, we have shown a stronger statement, namely that in polynomial time equivalence of separated basic total deterministic macro tree transducers can be decided. To see that the latter is a strict superclass of the former, consider the translation that takes a binary tree as input, and outputs the same tree, but under each leaf a new monadic tree is output which represents the inverse Dewey path of that node. For instance, the tree f(f(a, a), a) is translated into the tree f(f(a(1(1(e))), a(2(1(e)))), a(2(e))). A macro tree transducer of the desired class can easily realize this translation using a rule of the form \(q(f(x_1,_2),y)\rightarrow f(q(x_1,1(y)),q(x_2,2(y)))\). In contrast, no attribute system can realize this translation. The reason is that for every attribute system, the number of distinct output subtrees is linearly bounded by the size of the input tree. For the given translation there is no linear such bound (it is bounded by \(s\log (s)\)).
The idea of “separated” to use different output alphabets, is related to the idea of transducers “with origin” [2, 11]. In future work we would like to define adequate notions of origin for macro tree transducer, and prove that equivalence of such (deterministic) transducers with origin is decidable.
References
 1.Alur, R., D’Antoni, L.: Streaming tree transducers. J. ACM 64(5):31:1–31:55 (2017)Google Scholar
 2.Bojańczyk, M.: Transducers with origin information. In: Esparza, J., Fraigniaud, P., Husfeldt, T., Koutsoupias, E. (eds.) ICALP 2014, Part II. LNCS, vol. 8573, pp. 26–37. Springer, Heidelberg (2014). https://doi.org/10.1007/9783662439517_3CrossRefGoogle Scholar
 3.Courcelle, B., FranchiZannettacci, P.: Attribute grammars and recursive program schemes I. Theor. Comput. Sci. 17(2), 163–191 (1982)MathSciNetCrossRefGoogle Scholar
 4.Engelfriet, J.: Topdown tree transducers with regular lookahead. Math. Syst. Theory 10, 289–303 (1977)MathSciNetCrossRefGoogle Scholar
 5.Engelfriet, J.: Some open questions and recent results on tree transducers and tree languages. In: Formal Language Theory, pp. 241–286. Elsevier (1980)Google Scholar
 6.Engelfriet, J., Maneth, S.: Macro tree translations of linear size increase are MSO definable. SIAM J. Comput. 32(4), 950–1006 (2003)MathSciNetCrossRefGoogle Scholar
 7.Engelfriet, J., Maneth, S.: The equivalence problem for deterministic MSO tree transducers is decidable. Inf. Process. Lett. 100(5), 206–212 (2006)MathSciNetCrossRefGoogle Scholar
 8.Engelfriet, J., Maneth, S., Seidl, H.: Deciding equivalence of topdown XML transformations in polynomial time. J. Comput. Syst. Sci. 75(5), 271–286 (2009)MathSciNetCrossRefGoogle Scholar
 9.Engelfriet, J., Vogler, H.: Macro tree transducers. J. Comput. Syst. Sci. 31(1), 71–146 (1985)MathSciNetCrossRefGoogle Scholar
 10.Ésik, Z.: Decidability results concerning tree transducers I. Acta Cybern. 5(1), 1–20 (1980)MathSciNetzbMATHGoogle Scholar
 11.Filiot, E., Maneth, S., Reynier, P., Talbot, J.: Decision problems of tree transducers with origin. Inf. Comput. 261(Part), 311–335 (2018)Google Scholar
 12.Fors, N., Cedersjö, G., Hedin, G.: JavaRAG: a Java library for reference attribute grammars. In: Proceedings of the 14th International Conference on Modularity, MODULARITY 2015, pp. 55–67. ACM, New York (2015)Google Scholar
 13.Friese, S., Seidl, H., Maneth, S.: Earliest normal form and minimization for bottomup tree transducers. Int. J. Found. Comput. Sci. 22(7), 1607–1623 (2011)MathSciNetCrossRefGoogle Scholar
 14.Fülöp, Z.: On attributed tree transducers. Acta Cybern. 5(3), 261–279 (1981)MathSciNetzbMATHGoogle Scholar
 15.Fülöp, Z., Vogler, H.: SyntaxDirected Semantics  Formal Models Based on Tree Transducers. Monographs in Theoretical Computer Science. An EATCS Series. Springer, Heidelberg (1998). https://doi.org/10.1007/9783642722486CrossRefzbMATHGoogle Scholar
 16.Gécseg, F., Steinby, M.: Minimal ascending tree automata. Acta Cybern. 4(1), 37–44 (1978)MathSciNetzbMATHGoogle Scholar
 17.Gécseg, F., Steinby, M.: Tree Automata. Akadéniai Kiadó, Budapest (1984)zbMATHGoogle Scholar
 18.Griffiths, T.V.: The unsolvability of the equivalence problem for lambdafree nondeterministic generalized machines. J. ACM 15(3), 409–413 (1968)CrossRefGoogle Scholar
 19.Honkala, J.: A short solution for the HDT0L sequence equivalence problem. Theor. Comput. Sci. 244(1–2), 267–270 (2000)MathSciNetCrossRefGoogle Scholar
 20.Knuth, D.E.: Semantics of contextfree languages. Math. Syst. Theory 2(2), 127–145 (1968)MathSciNetCrossRefGoogle Scholar
 21.Knuth, D.E.: Correction: semantics of contextfree languages. Math. Syst. Theory 5(1), 95–96 (1971)CrossRefGoogle Scholar
 22.Laurence, G., Lemay, A., Niehren, J., Staworko, S., Tommasi, M.: Normalization of sequential topdown treetoword transducers. In: Dediu, A.H., Inenaga, S., MartínVide, C. (eds.) LATA 2011. LNCS, vol. 6638, pp. 354–365. Springer, Heidelberg (2011). https://doi.org/10.1007/9783642212543_28CrossRefGoogle Scholar
 23.Lothaire, M.: Algebraic Combinatorics on Words. Cambridge University Press, Cambridge (2002)CrossRefGoogle Scholar
 24.Makanin, G.S.: The problem of solvability of equations in a free semigroup. Math. USSRSb. 32(2), 129 (1977)MathSciNetCrossRefGoogle Scholar
 25.Maneth, S.: A survey on decidable equivalence problems for tree transducers. Int. J. Found. Comput. Sci. 26(8), 1069–1100 (2015)MathSciNetCrossRefGoogle Scholar
 26.Plandowski, W.: Satisfiability of word equations with constants is in PSPACE. In: 40th Annual Symposium on Foundations of Computer Science, FOCS 1999, New York, NY, USA, 17–18 October 1999, pp. 495–500. IEEE Computer Society (1999)Google Scholar
 27.Seidl, H., Maneth, S., Kemper, G.: Equivalence of deterministic topdown treetostring transducers is decidable. J. ACM 65(4), 21:1–21:30 (2018)Google Scholar
 28.Sloane, A.M., Kats, L.C., Visser, E.: A pure embedding of attribute grammars. Sci. Comput. Program. 78(10), 1752–1769 (2013). Special Section on Language Descriptions Tools and Applications (LDTA 2008 and 2009) & Special Section on Software Engineering Aspects of Ubiquitous Computing and Ambient Intelligence (UCAm I 2011)Google Scholar
 29.Van Wyk, E., Bodin, D., Gao, J., Krishnan, L.: Silver: an extensible attribute grammar system. Sci. Comput. Program. 75(1–2), 39–54 (2010)MathSciNetzbMATHGoogle Scholar
Copyright information
Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.