Category : Miscellaneous Language Source Code
Archive   : PROLOG19.ZIP
Filename : FAMILY.PRO

 
Output of file : FAMILY.PRO contained in archive : PROLOG19.ZIP
/* To analyze the family structure of the family of Queen Victoria.
English friend of mine notes there wasn't a Harry. I put him in.

Answers the compelling question: Who is X the sister of?

Ask: ?-sisterof( alice, X ). or ?-sisterof( alice, harry ).

or ?-sisterof( alice, X ), loves( X, wine ). as an example of a
complex question.

or even:

sisterof( alice, X ), loves( X, wine ), loves( alice, wine ).

*/

sisterof( X, Y ) :- parents( X, M, F ),
female( X ),
parents( Y, M, F ).

parents( edward, victoria, albert ).
parents( harry, victoria, albert ).
parents( alice, victoria, albert ).
female( alice ).

loves( harry, wine ).
loves( alice, wine ).


  3 Responses to “Category : Miscellaneous Language Source Code
Archive   : PROLOG19.ZIP
Filename : FAMILY.PRO

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/