Of course, there's nothing to stop you sticking any old integer as a frame or choice point - but if you do that then some really weird things can start to happen.
|Did you know ...||Search Documentation:|
|Examining the Environment Stack|
trueif Frame still is a candidate for backtracking;
<module>:<goal>. Do not instantiate variables in this goal unless you know what you are doing! Note that the returned term may contain references to the frame and should be discarded before the frame terminates.233The returned term is actually an illegal Prolog term that may hold references from the global to the local stack to preserve the variable names.
goal, but only returning the [<module>:]<name>/<arity> term describing the term, not the actual arguments. It avoids creating an illegal term as
goaland is used by the library
trueif Frame is the top Prolog goal from a recursive call back from the foreign language;
trueif the frame is hidden from the user, either because a parent has the hide-childs attribute (all system predicates), or the system has no trace-me attribute.
trueif this frame was skipped in the debugger.
clause(the goal has alternative clauses),
foreign(non-deterministic foreign predicate),
jump(clause internal choice point),
top(first dummy choice point),
catch(catch/3 to allow for undo),
debug(help the debugger), or
none(has been deleted).
This predicate is used for the graphical debugger to show the choice point stack.
trueif no choice point exists that is more recent than the entry of the clause in which it appears. There are few realistic situations for using this predicate. It is used by the prolog/0 top level to check whether Prolog should prompt the user for alternatives. Similar results can be achieved in a more portable fashion using call_cleanup/2.