Tree automata on Compositional Data Types