Request

data class Request<out C : ExecutionContext>(    val signature: Signature,     val arguments: List<<ERROR CLASS>>,     val context: C,     val requestIssuingInstant: TimeInstant = currentTimeInstant(),     val executionMaxDuration: TimeDuration = TimeDuration.MAX_VALUE) : Solve

Class representing a Request to be full-filled by the Solver

Constructors

Link copied to clipboard
fun <out C : ExecutionContext> Request(    signature: Signature,     arguments: List<<ERROR CLASS>>,     context: C,     requestIssuingInstant: TimeInstant = currentTimeInstant(),     executionMaxDuration: TimeDuration = TimeDuration.MAX_VALUE)

Functions

Link copied to clipboard
fun replyException(    exception: ResolutionException,     sideEffectManager: SideEffectManager? = null,     vararg sideEffects: SideEffect): Solve.Response
fun replyException(    exception: ResolutionException,     sideEffectManager: SideEffectManager? = null,     buildSideEffects: SideEffectsBuilder.() -> Unit): Solve.Response

Creates a new halt Response to this Request, with cause exception

Link copied to clipboard
fun replyFail(sideEffectManager: SideEffectManager? = null, vararg sideEffects: SideEffect): Solve.Response
fun replyFail(sideEffectManager: SideEffectManager? = null, buildSideEffects: SideEffectsBuilder.() -> Unit): Solve.Response

Creates a new failed Response to this Request

Link copied to clipboard
fun replySuccess(    substitution: <ERROR CLASS> = Substitution.empty(),     sideEffectManager: SideEffectManager? = null,     vararg sideEffects: SideEffect): Solve.Response
fun replySuccess(    substitution: <ERROR CLASS> = Substitution.empty(),     sideEffectManager: SideEffectManager? = null,     buildSideEffects: SideEffectsBuilder.() -> Unit): Solve.Response

Creates a new successful Response to this Request, with substitution

Link copied to clipboard
fun replyWith(    substitution: <ERROR CLASS>,     sideEffectManager: SideEffectManager? = null,     vararg sideEffects: SideEffect): Solve.Response
fun replyWith(    substitution: <ERROR CLASS>,     sideEffectManager: SideEffectManager? = null,     buildSideEffects: SideEffectsBuilder.() -> Unit): Solve.Response
fun replyWith(    solution: Solution,     sideEffectManager: SideEffectManager? = null,     vararg sideEffects: SideEffect): Solve.Response
fun replyWith(    solution: Solution,     sideEffectManager: SideEffectManager? = null,     buildSideEffects: SideEffectsBuilder.() -> Unit): Solve.Response

Creates a new Response to this Request

fun replyWith(    condition: Boolean,     sideEffectManager: SideEffectManager? = null,     vararg sideEffects: SideEffect): Solve.Response
fun replyWith(    condition: Boolean,     sideEffectManager: SideEffectManager? = null,     buildSideEffects: SideEffectsBuilder.() -> Unit): Solve.Response

Creates a new successful or failed Response depending on condition; to be used when the substitution doesn't change

Link copied to clipboard
fun solve(goal: <ERROR CLASS>, maxDuration: TimeDuration = TimeDuration.MAX_VALUE): Sequence<Solution>
Link copied to clipboard
fun subSolver(): Solver

Properties

Link copied to clipboard
val arguments: List<<ERROR CLASS>>

Arguments with which the goal is invoked in this Request

Link copied to clipboard
val context: C

The context that's current at Request making

Link copied to clipboard
val executionMaxDuration: TimeDuration

The execution max duration after which the computation should end, because no more useful

Link copied to clipboard
val query: <ERROR CLASS>

The current query Struct of this request

Link copied to clipboard
val requestIssuingInstant: TimeInstant

The time instant when the request was submitted for resolution

Link copied to clipboard
val signature: Signature

Signature of the goal to be solved in this Request

Extensions

Link copied to clipboard
fun <C : ExecutionContext> Solve.Request<C>.checkTermIsRecursivelyCallable(term: <ERROR CLASS>): TypeError?
Link copied to clipboard
open override fun Solve.Request<ExecutionContext>.ensureType(context: ExecutionContext, term: <ERROR CLASS>)
Link copied to clipboard

Utility function to ensure that all arguments of Solve.Request are instantiated and not (still) Variables

Link copied to clipboard
fun <C : ExecutionContext> Solve.Request<C>.ensuringArgumentIsArity(index: Int): Solve.Request<C>
Link copied to clipboard
fun <C : ExecutionContext> Solve.Request<C>.ensuringArgumentIsAtom(index: Int): Solve.Request<C>
Link copied to clipboard
Link copied to clipboard
fun <C : ExecutionContext> Solve.Request<C>.ensuringArgumentIsChar(index: Int): Solve.Request<C>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <C : ExecutionContext> Solve.Request<C>.ensuringArgumentIsGround(index: Int): Solve.Request<C>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <C : ExecutionContext> Solve.Request<C>.ensuringArgumentIsList(index: Int): Solve.Request<C>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <C : ExecutionContext> Solve.Request<C>.ensuringArgumentIsStruct(index: Int): Solve.Request<C>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <C : ExecutionContext> Solve.Request<C>.ensuringClauseProcedureHasPermission(clause: <ERROR CLASS>, operation: PermissionError.Operation): Solve.Request<C>
Link copied to clipboard
Link copied to clipboard
fun <C : ExecutionContext> Solve.Request<C>.ensuringTermIsCharCode(term: <ERROR CLASS>): Solve.Request<C>
Link copied to clipboard
fun <C : ExecutionContext> Solve.Request<C>.ensuringTermIsWellFormedList(term: <ERROR CLASS>): Solve.Request<C>
Link copied to clipboard
fun <C : ExecutionContext> Solve.Request<C>.notImplemented(message: String = "Primitive for "): Solve.Response
Link copied to clipboard
fun <C : ExecutionContext> Solve.Request<C>.notSupported(message: String = "Operation "): Solve.Response