StateHalt

"Halt": the one true sink of the state machine, reached only via an uncaught exception (no catch/3 matched it all the way up to the root context, or a timeout occurred). Unlike StateEnd, there is no transition back out of it -- resolution truly stops here, with Solution.halt wrapping exception.

Constructors

Link copied to clipboard
constructor(exception: ResolutionException, context: ClassicExecutionContext)

Properties

Link copied to clipboard
open override val context: ClassicExecutionContext

The execution context this state operates on.

Link copied to clipboard
open override val exception: ResolutionException

The exception that led to this state.

Link copied to clipboard

Whether asking for another solution after this one would resume resolution (via backtracking) rather than truly stop.

Link copied to clipboard
open override val isEndState: Boolean

Whether this state is a terminal one for the current resolution step, i.e. an EndState.

Link copied to clipboard
open override val solution: Solution

The solution emitted by reaching this state.

Functions

Link copied to clipboard
open override fun asEndState(): EndState

This state as an EndState, or null if isEndState is false.

Link copied to clipboard

This state as an EndState.

Link copied to clipboard
open override fun clone(context: ClassicExecutionContext = this.context): StateHalt

Returns a copy of this state, replacing context with the given one (defaulting to the current context).

Link copied to clipboard
open override fun next(): State

Computes the state the machine transitions into from here -- a pure function of context.