next up previous contents
Next: Queries and Disjunctions Up: Prolog Programming A Previous: What You Should

Prolog's Search Strategy

 

Search is a major issue. There are many ways to search for the solution to a problem and it is necessary to learn suitable algorithms that are efficient. Prolog provides a single method of search for free. This method is known as depth first search.

You should find that Prolog enables the programmer to implement other search methods quite easily.

Prolog's basic search strategy is now going to be outlined. To do this we need to consider something about the Prolog system.

Prolog is an interactive system. The interactions between the programmer and the Prolog system can be thought of as a conversation. When the Prolog system is entered we are at top level. The system is waiting for us to initiate a `conversation'.





Paul Brna
Mon May 24 20:14:48 BST 1999