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

commonMain.it.unibo.tuprolog.solve.streams.solver.fsm.State.kt Maven / Gradle / Ivy

Go to download

Experimental, functional-programming-based implementation of Prolog's SLDNF resolution principle

There is a newer version: 1.0.4
Show newest version
package it.unibo.tuprolog.solve.streams.solver.fsm

import it.unibo.tuprolog.solve.primitive.Solve
import it.unibo.tuprolog.solve.streams.solver.StreamsExecutionContext

/**
 * Represents a State of Prolog solver state-machine
 *
 * @author Enrico
 */
internal interface State {

    /** The [Solve.Request] or [Solve.Response] that this state carries with it */
    val solve: Solve

    /** Makes the state behave and lazily returns next states */
    fun behave(): Sequence

    /** A flag signaling if this [State.behave] has been called */
    val hasBehaved: Boolean

    /** The state machine execution context in this state */
    val context: StreamsExecutionContext
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy