Clause and Effect: Prolog Programming for the Working Programmer