hw7> swipl Welcome to SWI-Prolog (Multi-threaded, 64 bits, Version 6.2.2) Copyright (c) 1990-2012 University of Amsterdam, VU Amsterdam SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. Please visit http://www.swi-prolog.org for details. For help, use ?- help(Topic). or ?- apropos(Word). ?- [hw7test]. % kinship compiled 0.00 sec, 22 clauses % myfamily compiled 0.00 sec, 28 clauses child/2: child(carol,dorothy) child(carol,tom) child(clare,william) child(cormac,jerry) child(cormac,katie) child(julia,carol) child(katie,william) child(laura,carol) child(peter,william) child(william,dorothy) child(william,tom) daughter/2: daughter(carol,dorothy) daughter(carol,tom) daughter(clare,william) daughter(katie,william) parent/2: parent(carol,julia) parent(carol,laura) parent(dorothy,carol) parent(dorothy,william) parent(jerry,cormac) parent(katie,cormac) parent(tom,carol) parent(tom,william) parent(william,clare) parent(william,katie) parent(william,peter) mother/2: mother(carol,julia) mother(carol,laura) mother(dorothy,carol) mother(dorothy,william) mother(katie,cormac) sibling/2: sibling(carol,william) sibling(clare,katie) sibling(clare,peter) sibling(julia,laura) sibling(katie,clare) sibling(katie,peter) sibling(laura,julia) sibling(peter,clare) sibling(peter,katie) sibling(william,carol) brother/2: brother(peter,clare) brother(peter,katie) brother(william,carol) grandparent/2: grandparent(dorothy,clare) grandparent(dorothy,julia) grandparent(dorothy,katie) grandparent(dorothy,laura) grandparent(dorothy,peter) grandparent(tom,clare) grandparent(tom,julia) grandparent(tom,katie) grandparent(tom,laura) grandparent(tom,peter) grandparent(william,cormac) grandmother/2: grandmother(dorothy,clare) grandmother(dorothy,julia) grandmother(dorothy,katie) grandmother(dorothy,laura) grandmother(dorothy,peter) uncle/2: uncle(bob,clare) uncle(bob,katie) uncle(bob,peter) uncle(peter,cormac) uncle(william,julia) uncle(william,laura) sister_in_law/2: sister_in_law(carol,hope) sister_in_law(clare,jerry) sister_in_law(hope,bob) sister_in_law(hope,carol) mother_in_law/2: mother_in_law(dorothy,bob) mother_in_law(dorothy,hope) spouse/2: spouse(bob,carol) spouse(carol,bob) spouse(hope,william) spouse(jerry,katie) spouse(katie,jerry) spouse(william,hope) wife/2: wife(carol,bob) wife(hope,william) wife(katie,jerry) ancestor/2: ancestor(carol,julia) ancestor(carol,laura) ancestor(dorothy,carol) ancestor(dorothy,clare) ancestor(dorothy,cormac) ancestor(dorothy,julia) ancestor(dorothy,katie) ancestor(dorothy,laura) ancestor(dorothy,peter) ancestor(dorothy,william) ancestor(jerry,cormac) ancestor(katie,cormac) ancestor(tom,carol) ancestor(tom,clare) ancestor(tom,cormac) ancestor(tom,julia) ancestor(tom,katie) ancestor(tom,laura) ancestor(tom,peter) ancestor(tom,william) ancestor(william,clare) ancestor(william,cormac) ancestor(william,katie) ancestor(william,peter) descendant/2: descendant(carol,dorothy) descendant(carol,tom) descendant(clare,dorothy) descendant(clare,tom) descendant(clare,william) descendant(cormac,dorothy) descendant(cormac,jerry) descendant(cormac,katie) descendant(cormac,tom) descendant(cormac,william) descendant(julia,carol) descendant(julia,dorothy) descendant(julia,tom) descendant(katie,dorothy) descendant(katie,tom) descendant(katie,william) descendant(laura,carol) descendant(laura,dorothy) descendant(laura,tom) descendant(peter,dorothy) descendant(peter,tom) descendant(peter,william) descendant(william,dorothy) descendant(william,tom) relative_by_blood/2: relative_by_blood(carol,clare) relative_by_blood(carol,cormac) relative_by_blood(carol,dorothy) relative_by_blood(carol,julia) relative_by_blood(carol,katie) relative_by_blood(carol,laura) relative_by_blood(carol,peter) relative_by_blood(carol,tom) relative_by_blood(carol,william) relative_by_blood(clare,carol) relative_by_blood(clare,cormac) relative_by_blood(clare,dorothy) relative_by_blood(clare,julia) relative_by_blood(clare,katie) relative_by_blood(clare,laura) relative_by_blood(clare,peter) relative_by_blood(clare,tom) relative_by_blood(clare,william) relative_by_blood(cormac,carol) relative_by_blood(cormac,clare) relative_by_blood(cormac,dorothy) relative_by_blood(cormac,jerry) relative_by_blood(cormac,julia) relative_by_blood(cormac,katie) relative_by_blood(cormac,laura) relative_by_blood(cormac,peter) relative_by_blood(cormac,tom) relative_by_blood(cormac,william) relative_by_blood(dorothy,carol) relative_by_blood(dorothy,clare) relative_by_blood(dorothy,cormac) relative_by_blood(dorothy,julia) relative_by_blood(dorothy,katie) relative_by_blood(dorothy,laura) relative_by_blood(dorothy,peter) relative_by_blood(dorothy,william) relative_by_blood(jerry,cormac) relative_by_blood(julia,carol) relative_by_blood(julia,clare) relative_by_blood(julia,cormac) relative_by_blood(julia,dorothy) relative_by_blood(julia,katie) relative_by_blood(julia,laura) relative_by_blood(julia,peter) relative_by_blood(julia,tom) relative_by_blood(julia,william) relative_by_blood(katie,carol) relative_by_blood(katie,clare) relative_by_blood(katie,cormac) relative_by_blood(katie,dorothy) relative_by_blood(katie,julia) relative_by_blood(katie,laura) relative_by_blood(katie,peter) relative_by_blood(katie,tom) relative_by_blood(katie,william) relative_by_blood(laura,carol) relative_by_blood(laura,clare) relative_by_blood(laura,cormac) relative_by_blood(laura,dorothy) relative_by_blood(laura,julia) relative_by_blood(laura,katie) relative_by_blood(laura,peter) relative_by_blood(laura,tom) relative_by_blood(laura,william) relative_by_blood(peter,carol) relative_by_blood(peter,clare) relative_by_blood(peter,cormac) relative_by_blood(peter,dorothy) relative_by_blood(peter,julia) relative_by_blood(peter,katie) relative_by_blood(peter,laura) relative_by_blood(peter,tom) relative_by_blood(peter,william) relative_by_blood(tom,carol) relative_by_blood(tom,clare) relative_by_blood(tom,cormac) relative_by_blood(tom,julia) relative_by_blood(tom,katie) relative_by_blood(tom,laura) relative_by_blood(tom,peter) relative_by_blood(tom,william) relative_by_blood(william,carol) relative_by_blood(william,clare) relative_by_blood(william,cormac) relative_by_blood(william,dorothy) relative_by_blood(william,julia) relative_by_blood(william,katie) relative_by_blood(william,laura) relative_by_blood(william,peter) relative_by_blood(william,tom) male/1: male(bob) male(cormac) male(jerry) male(peter) male(william) female/1: female(carol) female(clare) female(dorothy) female(hope) female(katie) % hw7test compiled 0.00 sec, 82 clauses true.