Magic sets and other strange ways to implement logic programs