In theoretical computer science and formal language theory, a tree transducer (TT) is an abstract machine taking as input a tree, and generating output – generally other trees, but models producing words or other structures exist. Roughly speaking, tree transducers extend tree automata in the same way that word transducers extend word automata. Manipulating tree structures instead of words enable TT to model syntax-directed transformations of formal or natural languages. However, TT are not as well-behaved as their word counterparts in terms of algorithmic complexity, closure properties, etcetera. In particular, most of the main classes are not closed under composition. The main classes of tree transducers are: Top-Down Tree Transducers (TOP) A TOP T is a tuple (Q, Σ, Γ, I, δ) such that: Q is a finite set, the set of states; Σ is a finite ranked alphabet, called the input alphabet; Γ is a finite ranked alphabet, called the output alphabet; I is a subset of Q, the set of initial states; and is a set of rules of the form , where f is a symbol of Σ, n is the arity of f, q is a state, and u is a tree on Γ and , such pairs being nullary. Examples of rules and intuitions on semantics For instance, is a rule – one customarily writes instead of the pair – and its intuitive semantics is that, under the action of q, a tree with f at the root and three children is transformed into where, recursively, and are replaced, respectively, with the application of on the first child and with the application of on the third. Semantics as term rewriting The semantics of each state of the transducer T, and of T itself, is a binary relation between input trees (on Σ) and output trees (on Γ). A way of defining the semantics formally is to see as a term rewriting system, provided that in the right-hand sides the calls are written in the form , where states q are unary symbols. Then the semantics of a state q is given by The semantics of T is then defined as the union of the semantics of its initial states: Determinism and domain As with tree automata, a TOP is said to be deterministic (abbreviated DTOP) if no two rules of δ share the same left-hand side, and there is at most one initial state. In