Introduction to
Logic Programming
What
versus
How
 

Exercise 8.1 - Analysis


Suppose we were to run our top-down evaluation method on the dataset shown below and the ruleset shown on the right. How many unifications would be required to evaluate s(b) assuming relational indexing on rules and full indexing on facts.

p(a)
q(a)
r(a)
s(b) :- p(a) & q(b) & r(c)
s(b) :- p(a) & ~q(b) & ~t(c)
t(c) :- r(c)
t(c) :- r(d)
Number of unifications: