ChoicePointContext
One node of the :solve-classic choice-point queue: a saved point in the proof search that it.unibo.tuprolog.solve.classic.fsm.StateBacktracking can resume from, chained to its parent to form the full lineage of choice points recorded since the query started (see pathToRoot).
Crucially, a choice point is not a single alternative goal to retry: alternatives is a lazy Cursor over all remaining alternatives (primitive responses, for Primitives; candidate clauses, for Rules) at that point, and only one is ever consumed per resolution step -- the rest stay in the cursor to be pulled later on backtracking. Every ChoicePointContext also captures the executionContext active when it was recorded, which is what makes it possible to resume an entirely different branch of the proof tree on backtrack: not just "try the next alternative", but "restore the whole saved execution-context lineage, then try the next alternative". Primitives and Rules are otherwise structurally identical, reflecting how both primitives and rules are modelled uniformly as producers of lazy streams of alternatives.
See also
Inheritors
Types
A choice point recording the remaining it.unibo.tuprolog.solve.primitive.Solve.Response alternatives of a primitive call.
A choice point recording the remaining candidate Rules of a clause resolution attempt.
Properties
Shorthand for executionContext's ClassicExecutionContext.depth, or null if executionContext is null.
Shorthand for executionContext's ClassicExecutionContext.procedure, or null if executionContext is null.
Whether this choice point, or any of its ancestors along pathToRoot, still has an alternative to try.
This choice point and all its ancestors, from here up to (and including) the root, in that order.
Functions
Chains a new ChoicePointContext.Primitives recording alternatives onto this (null meaning "the root").
Chains a new ChoicePointContext.Rules recording alternatives onto this (null meaning "the root").
Resumes this choice point: restores its saved executionContext (carrying over context's current step counter, flags and knowledge bases), advances alternatives to the next one, and returns the resulting ClassicExecutionContext, ready to be handed to it.unibo.tuprolog.solve.classic.fsm.StatePrimitiveExecution or it.unibo.tuprolog.solve.classic.fsm.StateRuleExecution depending on the concrete subtype.
The ChoicePointContext.depth a new choice point chained onto this one (or null, for the root) would have.