Prolog source
ancestor_of(X, Y) :- parent_of(X, Y). ancestor_of(X, Z) :- parent_of(X, Y), ancestor_of(Y, Z). parent_of(X, Y) :- father_of(X, Y). parent_of(X, Y) :- mother_of(X, Y). mother_of(trude, sally). father_of(tom, sally). father_of(tom, erica). father_of(mike, tom).
Query
Control
First
Next
Stop
Abort
Clear output
Output