Programming in Prolog (2nd ed.)