commonMain.it.unibo.tuprolog.solve.concurrent.fsm.StateHalt.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of solve-concurrent-jvm Show documentation
Show all versions of solve-concurrent-jvm Show documentation
Experimental, state-machine-based implementation of an OR-Concurrent, Prolog-like logic solver, based on Kotlin coroutines
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
) : ExceptionalState, EndState {
override val solution: Solution = Solution.halt(context.query, exception)
override fun next(): Iterable = throw NoSuchElementException()
override fun clone(context: ConcurrentExecutionContext): State = copy(exception = exception, context = context)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy