Text this: Foundations of logic programming / J.W. Lloyd.