Extending magic sets techniques to deductive databases with uncertainty