Orderings, AC-Theories and Symbolic Constraint SolvingSequentiality, second order monadic logic and tree automata