Introduction to
Logic Programming
What
versus
How
 

Exercise 11.2 - Safety


Say whether each of the following rules is safe.

a. a(X) :: p(X,Y) & p(Y,Z) ==> p(X,Z)
b. a(X) :: p(X,Y) & ~p(Y,Z) ==> p(X,Z)
c. a(X) :: p(Y,Z) ==> p(X,Z)
d. a(X) :: p(Y,Z) ==> ~p(X,Z)
e. a(X) :: p(Y,Z) ==> p(Z,Y)