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

Go to download

Experimental, state-machine-based implementation of an OR-Concurrent, Prolog-like logic solver, based on Kotlin coroutines

There is a newer version: 1.0.4
Show newest version
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