T. Eiter, A. Polleres: "Towards Automated Integration of Guess and Check Programs in Answer Set Programming: A Meta-Interpreter and Applications"; 2004.
http://www.kr.tuwien.ac.at/research/reports/rr0401.ps.gz