commonMain.it.unibo.tuprolog.solve.streams.solver.fsm.State.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of solve-streams-jvm Show documentation
Show all versions of solve-streams-jvm Show documentation
Experimental, functional-programming-based implementation of Prolog's SLDNF resolution principle
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
}