StatePrimitiveSelection
"Primitive Selection": inspects ConcurrentExecutionContext.currentGoal and either raises an it.unibo.tuprolog.solve.exception.error.InstantiationError/it.unibo.tuprolog.solve.exception.error.TypeError (goal is a variable or not callable), invokes the matching it.unibo.tuprolog.solve.primitive.Primitive if one is registered for the goal's signature in it.unibo.tuprolog.solve.library.Runtime, or falls through to StateRuleSelection otherwise (the goal is a user-/library-defined predicate).
When a primitive is invoked, every response it lazily produces becomes its own StatePrimitiveExecution: this is one of the two points (the other being StateRuleSelection) where a single state can fan out into many concurrently-explored successors, e.g. for a backtracking primitive like between/3 that can succeed several times.
Properties
The execution context this state operates on.
Whether this state is a terminal one for the current branch, i.e. an EndState.
Functions
This state as an EndState, or null if isEndState is false.
This state as an EndState.
Computes every state this branch may transition into from here, one per alternative (matching clause, disjunct, primitive solution, ...) available at this point; empty only for EndStates. Each element is meant to be explored independently (and, in :solve-concurrent's solver, concurrently) of the others.