Recursive Query Processing: The Power of Logic