|
|||||||||
| home | hometown | racing |recent |resume |schedule |photos |
|
||||||||
|
|
|
|
|||||||
|
|
|
|
|
|
% fam.pro - A Family Tree Database % Author: William Martin bones@norhtnet.org % Date: Sept. 10 , 2000 % Modified: 10:33 PM 9/21/2000 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %--------------------------------------------- % Gender Section %--------------------------------------------- male('Bob Tull'). male('Bill Tull'). male('Bill Robinson'). male('William Martin'). male('Fred Buckey'). male('John Cooper'). male('Jeremy Cooper'). male('Dean Cooper'). male('Schyler Juneberry'). male('Chad Juneberry'). male('Pat Gustofson'). male('Brad Gustofson'). male('Ben Tull'). male('Bart Tull'). male('Harold Tull'). female('Ruby Tull'). female('Ruby Robinson'). female('Dorlene Buckey'). female('Paula Roberts'). female('Shelly Robinson'). female('Kathi Cooper'). female('Melinda Martin'). female('Ronda Ellis'). female('Shanelle Cooper'). female('Alicia Tull'). female('Jen Tull'). female('Cindy Tull'). female('Millie Tull'). %--------------------------------------------- % spouse/2 Section %--------------------------------------------- spouse('Bob Tull', 'Cindy Tull'). spouse('Bill Robinson', 'Ruby Robinson'). spouse('Harold Tull', 'Millie Tull'). spouse('Fred Buckey', 'Dorlene Buckey'). spouse('Bart Tull', 'Ruby Tull'). %--------------------------------------------- % Parent Section % % parents(child, father, mother). %--------------------------------------------- parents('Ruby Tull', 'Harold Tull', 'Millie Tull'). parents('Ruby Robinson', 'Bart Tull', 'Ruby Tull'). parents('Dorlene Buckey', 'Bart Tull', 'Ruby Tull'). parents('Paula Roberts', 'Bart Tull', 'Ruby Tull'). parents('Bob Tull', 'Bart Tull', 'Ruby Tull'). parents('Bill Tull', 'Bart Tull', 'Ruby Tull'). parents('Shelly Robinson', 'Bill Robinson', 'Ruby Robinson'). parents('William Martin', 'Fred Buckey', 'Dorlene Buckey'). parents('Kathi Cooper', 'Fred Buckey', 'Dorlene Buckey'). parents('Melinda Martin', 'William Martin', 'Ronda Ellis'). parents('Shanelle Cooper', 'John Cooper', 'Kathi Cooper'). parents('Jeremy Cooper', 'John Cooper', 'Kathi Cooper'). parents('Dean Cooper', 'John Cooper', 'Kathi Cooper'). parents('Schyler Juneberry', 'Chad Juneberry', 'Kathi Cooper'). parents('Pat Gustofson', 'Brad Gustofson', 'Paula Roberts'). parents('Jen Tull', 'Bob Tull', 'Cindy Tull'). parents('Alicia Tull', 'Bob Tull', 'Cindy Tull'). parents('Ben Tull', 'Bob Tull', 'Cindy Tull'). %--------------------------------------------- % Rules -------------------------------------- %--------------------------------------------- %------------------------------------- % sibling/2 Section - just for fun %------------------------------------- sibling(X, Y) :- brother(X, Y); sister(Y, X); brother(Y, X); sister(X, Y). %-------------------------------------- % aunt/2 Section. You are a aunt if % you are the others parent's sister or % brothers wife. %-------------------------------------- aunt(Aunt, Other) :- female(Aunt), parents(Other, X, Y), (sister(Aunt, X); sister(Aunt, Y)); (brother(bro, X), brother(bro, Y), married(bro, Aunt)). %------------------------------------ % married/2 Section %------------------------------------ married(X, Y) :- spouse(X, Y); spouse(Y, X). %------------------------------------- % nephew: % Either parent must have a parent % which is the same parents that Uncle % has. %------------------------------------- nephew(Nephew, Uncle) :- male(Nephew), % otherwise a neice male(Uncle), % otherwise a aunt parents(Uncle, GP, GM), (parents(D, GP, GM); parents(M, GP, GM)), parents(Nephew, D, M). %------------------------------------- % grandmother: % Either parent must have a mother % who will be grandma. %------------------------------------- grandmother(Grandma, Grandchild) :- parents(Grandchild, M, D), (parents(M, GF, Grandma); parents(D, GF, Grandma)). %------------------------------------- % brother and sister: % Brother or Sister if they both have % same parents but they cannot serve % as own sibling. %------------------------------------- brother(Bro, Other) :- male(Bro), parents(Bro, D, M), parents(Other, D, M), Bro \= Other. sister(Sis, Other) :- female(Sis), parents(Sis, D, M), parents(Other, D, M), Sis \= Other. %------------------------------------- % cousins: % One cousin must have one parent % that is brother or sister to the % other cousin's parent. Also a cousin % can not serve as their own cousin. %------------------------------------- cousins(Cousin1, Cousin2) :- parents(Cousin1, D1, M1), parents(Cousin2, D2, M2), (brother(D1, D2); brother(D1, M2); sister(M1, M2); sister(M1, D2)), Cousin1 \= Cousin2. %------------------------------------- % ancestor/2 : % Ancestor is by marriage and not % blood. ancestor(Ancestor, Person). %------------------------------------- ancestor(A, P) :- parents(P, A, X); parents(P, X, A). ancestor(A, P) :- (parents(P, X, Y), ancestor(A, X)); (parents(P, X, Y), ancestor(A, Y)). %------------------------------------- % decendant/2 : % Decendant is by marriage and not % blood. decendant(Decendant, Person). %------------------------------------- decendant(D, P) :- ancestor(P, D). [ t o p ] |
|
|
||
|
|
|
|
|||||||
|
|
|
||||||||
|
|
|
© Copyright 2001 William L. Martin All rights reserved. |
|
||||||