G. Salzer, S Limet: "Basic Rewriting via Logic Programming, with an Application to the Reachability Problem"; Journal of Automata, Languages and Combinatorics, 11 (2006), 1; 107 - 142.