Did you know ... Search Documentation:
Predicate solve/4
 solve(+Chunk, +Template, :Goal, +ID) is det[private]
Solve Goal. Note that because we can ask for a new goal in state `6', we must provide for an ancesteral cut (prolog_cut_to/1). We need to be sure to have a choice point before we can call prolog_current_choice/1. This is the reason why this predicate has two clauses.