From what i know, conjunction has greater precedence than disjunction.
We have the following knowledge base:
a(1).
a(2,3).
a(3,2).
a(4,5,3).
b.
b(1,2).
b(3).
c.
Our goal is:
?- a(X,Y);b(Z),c,fail,d.
So here's the problem: My teacher says that the goal gets broken into 4 subgoals, connected by conjunction:
(a(X,Y);b(Z)),
c,
fail,
d.
and that i shouldn't get no results when executing this query. But conjunction has greater precedence, right? Isn't the goal supposed to be broken into two subgoals(not four), connected by disjunction:
a(X,Y);
b(Z),c,fail,d.
So now I'm wondering who's right and who's wrong. Can somebody explain?
**I'm actually getting results when i execute the query.