Next: Forcing Backtracking
Up: No Title
Previous: The ladder rule
- Put all goals in the query into a list of goals to be satisfied
- When all goals are satisfied, execution stops
- Take first goal (left most), and search program in a top-down manner
until a clause whose head matches the goal is satisfied
- If such a clause exists :
Make a variant of the clause
Match the head of the variant with the goal
Put Goals from the body of the variant at the beginning of the list of
goals to be satisfied - go to 3
- If such a clause does not exist :
Uninstantiate all the variables that were instantiated in the last matching
Return to the last successfully matched goal (climbing up the ladder)
Search for another clause whose head matches the goal and go to 4
If the no previously matched goals criteria in (4) above can be
satisfied, then the goals in question cannot be satisfied, and execution
stops
Omer F Rana
Thu Feb 13 19:58:14 GMT 1997