callsWithVariablesTheory

a(A) :- b(A), d(Z). b(B) :- c(B), d(W). d(_). c(1).