StateRuleSelection
"Rule Selection", the clause-resolution counterpart of StatePrimitiveSelection: true/false succeed/fail without touching the knowledge base at all; goals that don't exist anywhere end the branch as a failure or move it to StateException, depending on the Unknown flag (error/fail/warning); otherwise every clause in the static/dynamic knowledge bases and libraries whose head matches the current goal is freshCopy()'d (to rename variables apart) and turned into its own StateRuleExecution.
As with StatePrimitiveSelection, this is the other point where a single state fans out into many successors: every matching clause becomes an independent StateRuleExecution, each one explored concurrently by :solve-concurrent's solver -- this is what "concurrently tries alternative clauses" concretely means in this module.
Cut caveat: unlike :solve-classic, there is no choice-point stack to prune here. ! is registered as an ordinary rule (it.unibo.tuprolog.solve.concurrent.stdlib.rule.Cut, resolved through this very state like any other goal) whose body is the inherited RuleWrapper default of true -- i.e. ! currently succeeds without pruning any alternative branch. Sibling branches that ISO Prolog's cut would have discarded keep running concurrently and may still contribute solutions. This is a known, intentional-for-now simplification (see the // convert into primitive in case smarter behaviour is needed comment on Cut's registration in it.unibo.tuprolog.solve.concurrent.stdlib.DefaultBuiltins), not a supported cut implementation.
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.