% A sample database. % marks comments % in file family.P % FACTS male(bob). % bob is male parent(jill, bill). % jill is parent of bill parent(bob, bill). % RULES father(TheDad, TheChild) :- parent(TheDad, TheChild), male(TheDad). % TheDad is the father of TheChild % if TheDad is the parent of TheChild and TheDad is male % Use meaningful variable names: % father(X, Y) :- parent(X, Y), male(X). % X is the father of Y if X is the parent of Y % and X is male % ":-" read as "if" % "," read as "and"