|
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
Prolog needs to
choose which goal to pursue first,
|
|
although
logically it doesn’t matter. Why?
|
|
|
l |
Treats goals in
order, leftmost first.
|
|
|
|
A :- B,C,D.
|
|
|
B :- E,F.
|
|
|
|
-? A.
|
|
|
|
ˇ |
B is tried first, then C, then D.
|
|
|
ˇ |
E and F are pushed onto the stack, before
C and D.
|
|
|
Why?
|
|
|
|