17 Mar 2005
CS 3243 - Logical Inference
72
Prolog Execution
l
Prolog also needs to choose which clause to
pursue first.
l
l
Treats clauses in order, top-most first.
¡
G.
¡
A :- B,C,D.
¡
B :- E,F.
¡
B :- G.
¡
¡
To satisfy goal B, prolog tries E,F before G.
4 clauses in
example