All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.it.unibo.tuprolog.solve.concurrent.fsm.StateHalt.kt Maven / Gradle / Ivy

package it.unibo.tuprolog.solve.concurrent.fsm

import it.unibo.tuprolog.solve.Solution
import it.unibo.tuprolog.solve.concurrent.ConcurrentExecutionContext
import it.unibo.tuprolog.solve.exception.ResolutionException

data class StateHalt(
    override val exception: ResolutionException,
    override val context: ConcurrentExecutionContext,
) : AbstractState(context), ExceptionalState, EndState {
    override val solution: Solution = Solution.halt(context.query, exception)

    override fun next(): Iterable = super.next()

    override fun computeNext(): Iterable = throw NoSuchElementException()

    override fun clone(context: ConcurrentExecutionContext): StateHalt = copy(exception = exception, context = context)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy