Algorithmic Debugging and Testing of Prolog Programs.