The art of prolog: advanced programming techniques - Sterling, Leon (MIT Press, 1994)