/* File: family.P /* Author: Ned Okie /* Date: 8/25/2001 /* Purpose: To illustrate basic xsb rules and syntax /* To invoke prolog compiler: /software/unix/XSB/emu/xsb -i /* To compile this file: [family]. /* ^ DON'T FORGET THE PERIOD! /* To exit the compiler: halt. /* ^ DON'T FORGET THE PERIOD! */ male(bob). parent(jill, bill). parent(bob, bill). father(TheDad, TheChild) :- parent(TheDad, TheChild), male(TheDad). grandparent(TheGP) :- parent(TheGP, AParent), parent(AParent, _ ).