it.unibo.tuprolog.solve.streams.solver

package it.unibo.tuprolog.solve.streams.solver

Subpackages

Methods

isWellFormed

fun Term.isWellFormed(): Boolean

Check whether the receiver term is a well-formed predication

Receiver

Name Description
Term

ReturnValue

Name Description
Boolean

prepareForExecutionAsGoal

fun Term.prepareForExecutionAsGoal(): Struct

Prepares the receiver Goal for execution

For example, the goal A is transformed, after preparation for execution, as the Term: call(A)

Receiver

Name Description
Term

ReturnValue

Name Description
Struct

orderWithStrategy

fun <E> Sequence<E>.orderWithStrategy(context: ExecutionContext, selectionStrategy: (Sequence<E>, ExecutionContext)->E): Sequence<E>

Computes the ordered selection of elements, lazily, according to provided selection strategy

Receiver

Name Description
Sequence<E>

Parameters

Name Description
context: ExecutionContext
selectionStrategy: (Sequence<E>, ExecutionContext)->E

ReturnValue

Name Description
Sequence<E>

moreThanOne

fun moreThanOne(elements: Sequence<*><>): Boolean

Checks if this sequence of elements holds more than one element, lazily

Parameters

Name Description
elements: Sequence<*><>

ReturnValue

Name Description
Boolean

replyWith

fun Request<ExecutionContext>.replyWith(otherResponse: Response): Response

Responds to this solve request forwarding the provided otherResponse data

Receiver

Name Description
Request<ExecutionContext>

Parameters

Name Description
otherResponse: Response

ReturnValue

Name Description
Response

addWithNoDuplicates

fun List<SideEffect>.addWithNoDuplicates(toAddSideEffects: List<SideEffect>): List<SideEffect>

Utility function to add side effects without duplicating them

Receiver

Name Description
List<SideEffect>

Parameters

Name Description
toAddSideEffects: List<SideEffect>

ReturnValue

Name Description
List<SideEffect>