SLIDE 16 Derivation tree: example
P: P (X.L) ← P (L), R(X) P (nil) ← R(a) ← R(c) ←
?P(X.Y) s ❄ ?P(Y), R(X)
(1), {X1/X, L1/Y }
s
❅ ❅ ❅ ❘ s s ?P(L2), R(X2), R(X) ?R(X)
(1), {Y/X2.L2} (2), {Y/nil}
❄ ✏ ✏ ✏ ✏ ✏ ✏ ✏ ✏ ✏ ✏ ✮ ❄ ❅ ❅ ❅ ❘ s s s s ?R(X2), R(X) ?P(L3), R(X3), R(X2), R(X) ? ?
(2), {L2/nil} (1), {L2/X3.L3} (3), {X/a} (4), {X/c}
✏ ✏ ✏ ✏ ✏ ✏ ✏ ✏ ✮ ❄
❅ ❅ ❅ ❘ s s s ?R(X3), R(X2), R(X) ∞ ?R(X) ?R(X)
(3), {X1/a} (3), {X1/a} (2), {L3/nil}
❄ ❅ ❅ ❅ ❘ s s ? ?
(3), {X/a} (4), {X/c}
❄ ❅ ❅ ❅ ❘ s s ? ?
(3), {X/a} (4), {X/c}
How to search derivation trees: breadth-first? depth-first? some other way? Standard (compromise) strategy:
depth-first with backtracking
it is effective, but incomplete! (because termination is not guaranteed) The order of clauses in programs matters!
Logic, Resolution and Prolog (5) 11