Next: Lists and Cuts
Up: No Title
Previous: Example 2
Consider the following clause :
H :- B1, B2, ..., Bm, !, Bn.
- Assume clause invoked by a goal G that matched H
- When cut encountered in the definition of H - the system has
satisfied B1 to Bm
- The current solution to B1 to Bm is frozen, and all possible
remaining alternatives are discarded
- The goal G becomes committed to this clause
- Any attempts to match G with the head of some other
clause is precluded
C :- P, Q, R, !, S, T, U.
C :- V.
A :- B, C, D.
- Backtracking is possible within the goal list P,Q,R - BUT - as
soon as the cut is reached, all alternate solutions of the goal list
P,Q,R are suppressed
- The second C clause is also discarded
- Backtracking is however possible within S,T,U
- Cut is invisible from A - and only affects C
Omer F Rana
Sun Feb 16 21:01:24 GMT 1997