Exercises and experiments in Prolog