The art of Prolog advanced programming techniques - Sterling, Leon; Shapiro, Ehud (MIT Press, 1992)