Is there a way of querying a prolog knowledge base dynamically?
I have the prolog logic in a file family.pl (an example that I found here http://www.techytalk.info/prolog-programming-gprolog-linux/). Here is its content:
mother_child(trude, sally).
father_child(tom, sally).
father_child(tom, erica).
father_child(mike, tom).
sibling(X, Y) :- parent_child(Z, X), parent_child(Z, Y).
parent_child(X, Y) :- father_child(X, Y).
parent_child(X, Y) :- mother_child(X, Y).
I want to be able to make queries without getting inside the prolog interpreter.
This command does not work for me:
swipl -f family.pl -g "father_child(Father, Child)"
Thanks