qinit (є) | q1 (a (X)) :- qinit (X) | |
q1 (b (X)) :- q1 (X) | qinit (X) :- q1 (X) |
To define the semantics of tree automata, the simplest is just to describe their translation to Horn clauses. Each transition again gives rise to exactly one clause:
qeven (O) | qeven (S (X)) :- qodd (X) | qodd (S (X)) :- qeven (X) |
qlist−even (cons (X, Y)) :- qeven (X), qlist−even (Y) | qlist−even (nil) |