Deductive Databases

Syntax

Say whether each of the following expressions is a syntactically legal rule.

a. r(X,Y) :- p(X,Y) & q()
b. r(X,Y) :- p(X,Y) & ~q(Y,X)
c. ~r(X,Y) :- p(X,Y) & q(Y,X)
d. p(X,Y) & q(Y,X) :- r(X,Y)
e. p(X,Y) & ~q(Y,X) :- r(X,Y)