Introduction To Turbo Prolog By Carl Townsend Pdf -

// Define the knowledge base father(john, mary). father(john, david).

// Query the knowledge base ?- sibling(mary, X). This program defines a knowledge base that states that John is the father of Mary and David. It then defines a rule that states that two people are siblings if they have the same father. Finally, it queries the knowledge base to find out who Mary's sibling is. INTRODUCTION TO TURBO PROLOG BY CARL TOWNSEND PDF

// Define a rule sibling(X, Y) :- father(Z, X), father(Z, Y). // Define the knowledge base father(john, mary)