Sourse Code for FAMILY Example
DATABASE - tmp
son(STRING,STRING)
sister(STRING,STRING)
brother(STRING,STRING)
married(STRING,STRING)
CLAUSES
son("John", "Dan").
sister("Mary","Suzan").
brother("Harold", "Larry").
married("John", "Mary").
married("Larry", "Sue").
PREDICATES
father(STRING father,STRING child)
grandfather(STRING grandfather,STRING grandchild)
sister_in_law(STRING,STRING)
CLAUSES
father(A,B):-son(B,A).
grandfather(A,B):-father(A,C), father(C,B).
sister_in_law(A,B):-married(A,C), sister(C,B).
sister_in_law(A,B):-brother(A,C), married(C,B).
GOAL sister_in_law("John",Z).