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)
safe
unsafe
b.
a(X) :: p(X,Y) & ~p(Y,Z) ==> p(X,Z)
safe
unsafe
c.
a(X) :: p(Y,Z) ==> p(X,Z)
safe
unsafe
d.
a(X) :: p(Y,Z) ==> ~p(X,Z)
safe
unsafe
e.
a(X) :: p(Y,Z) ==> p(Z,Y)
safe
unsafe