I have a question about exercise 2.2 in LPN!. In particular, it appears to be the case that GProlog returns different results than does SWI-Prolog on question 5 in exercise 2.2.
I acknowledge this to be a very low-importance issue. Text of the exercise is at the bottom of this message. SWI-Prolog 7.2.2 returns: ?- magic(Hermoine). Hermoine = dobby ; Hermoine = hermoine ; Hermoine = 'McGonagall' ; Hermoine = rita_skeeter . GProlog 1.4.4 returns ?- magic(Hermoine). Hermoine = dobby ? ; uncaught exception: error(existence_error(procedure,wizard/1),magic/1) I understand SWI-Prolog's results, but don't understand why GProlog stops when it hits the rule "magic(X):- wizard(X)." Any pointers are terrifically appreciated! Text of the exercise follows: Exercise 2.2 We are working with the following knowledge base: house_elf(dobby). witch(hermoine). witch('McGonagall'). witch(rita_skeeter). magic(X):- house_elf(X). magic(X):- wizard(X). magic(X):- witch(X). Which of the following queries are satisfied?... 1. magic(housde_elf). 2. wizard(harry). 3. magic(wizard). 4. magic('McGonagall'). 5. magic(Hermoine). _don
_______________________________________________ Users-prolog mailing list Users-prolog@gnu.org https://lists.gnu.org/mailman/listinfo/users-prolog