ClassicExecutionContext

data class ClassicExecutionContext: ExecutionContext, Any

Fields

Name Description
val isRoot: Boolean
val hasOpenAlternatives: Boolean
val isActivationRecord: Boolean
val pathToRoot: Sequence<ClassicExecutionContext>
val currentGoal: Term?
val interestingVariables: Set<Var>
val logicStackTrace: List<Struct>

The Prolog call stacktrace till this ExecutionContext

val procedure: Struct?

The current procedure being executed

val libraries: Libraries

Loaded libraries

val flags: FlagStore

Enabled flags

val staticKb: Theory

Static Knowledge-base, that is a KB that can't change executing goals

val dynamicKb: MutableTheory

Dynamic Knowledge-base, that is a KB that can change executing goals

val operators: OperatorSet

Loaded operators

val inputChannels: InputStore

The currently open input channels

val outputChannels: OutputStore

The currently open output channels

val customData: CustomDataStore
val substitution: Unifier

The set of current substitution till this context

val query: Struct
val goals: Cursor<Term>
val rules: Cursor<Rule>
val primitives: Cursor<Response>
val startTime: TimeInstant
val maxDuration: TimeDuration
val choicePoints: ChoicePointContext?
val parent: ClassicExecutionContext?
val depth: Int
val step: Long

Constructors

<init>

constructor(procedure: Struct?, libraries: Libraries, flags: FlagStore, staticKb: Theory, dynamicKb: MutableTheory, operators: OperatorSet, inputChannels: InputStore, outputChannels: OutputStore, customData: CustomDataStore, substitution: Unifier, query: Struct, goals: Cursor<Term>, rules: Cursor<Rule>, primitives: Cursor<Response>, startTime: TimeInstant, maxDuration: TimeDuration, choicePoints: ChoicePointContext?, parent: ClassicExecutionContext?, depth: Int, step: Long)

Parameters

Name Description
procedure: Struct?
libraries: Libraries
flags: FlagStore
staticKb: Theory
dynamicKb: MutableTheory
operators: OperatorSet
inputChannels: InputStore
outputChannels: OutputStore
customData: CustomDataStore
substitution: Unifier
query: Struct
goals: Cursor<Term>
rules: Cursor<Rule>
primitives: Cursor<Response>
startTime: TimeInstant
maxDuration: TimeDuration
choicePoints: ChoicePointContext?
parent: ClassicExecutionContext?
depth: Int
step: Long

Methods

createSolver

fun createSolver(libraries: Libraries, flags: FlagStore, staticKb: Theory, dynamicKb: Theory, inputChannels: InputStore, outputChannels: OutputStore): Solver

Parameters

Name Description
libraries: Libraries
flags: FlagStore
staticKb: Theory
dynamicKb: Theory
inputChannels: InputStore
outputChannels: OutputStore

ReturnValue

Name Description
Solver

createMutableSolver

fun createMutableSolver(libraries: Libraries, flags: FlagStore, staticKb: Theory, dynamicKb: Theory, inputChannels: InputStore, outputChannels: OutputStore): MutableSolver

Parameters

Name Description
libraries: Libraries
flags: FlagStore
staticKb: Theory
dynamicKb: Theory
inputChannels: InputStore
outputChannels: OutputStore

ReturnValue

Name Description
MutableSolver

update

fun update(libraries: Libraries, flags: FlagStore, staticKb: Theory, dynamicKb: Theory, operators: OperatorSet, inputChannels: InputStore, outputChannels: OutputStore, customData: CustomDataStore): ClassicExecutionContext

Parameters

Name Description
libraries: Libraries
flags: FlagStore
staticKb: Theory
dynamicKb: Theory
operators: OperatorSet
inputChannels: InputStore
outputChannels: OutputStore
customData: CustomDataStore

ReturnValue

Name Description
ClassicExecutionContext

apply

fun apply(sideEffect: SideEffect): ClassicExecutionContext

Parameters

Name Description
sideEffect: SideEffect

ReturnValue

Name Description
ClassicExecutionContext

apply

fun apply(sideEffects: Iterable<SideEffect>): ClassicExecutionContext

Parameters

Name Description
sideEffects: Iterable<SideEffect>

ReturnValue

Name Description
ClassicExecutionContext

apply

fun apply(sideEffects: Sequence<SideEffect>): ClassicExecutionContext

Parameters

Name Description
sideEffects: Sequence<SideEffect>

ReturnValue

Name Description
ClassicExecutionContext

toString

fun toString(): String

ReturnValue

Name Description
String

Extensions

createChild

fun ClassicExecutionContext.createChild(inferProcedureFromGoals: Boolean): ClassicExecutionContext

Receiver

Name Description
ClassicExecutionContext

Parameters

Name Description
inferProcedureFromGoals: Boolean

ReturnValue

Name Description
ClassicExecutionContext

replaceWithChild

fun ClassicExecutionContext.replaceWithChild(inferProcedureFromGoals: Boolean): ClassicExecutionContext

Receiver

Name Description
ClassicExecutionContext

Parameters

Name Description
inferProcedureFromGoals: Boolean

ReturnValue

Name Description
ClassicExecutionContext

appendRulesAndChoicePoints

fun ClassicExecutionContext.appendRulesAndChoicePoints(rules: Cursor<Rule>): ClassicExecutionContext

Receiver

Name Description
ClassicExecutionContext

Parameters

Name Description
rules: Cursor<Rule>

ReturnValue

Name Description
ClassicExecutionContext

appendPrimitivesAndChoicePoints

fun ClassicExecutionContext.appendPrimitivesAndChoicePoints(primitiveExecutions: Cursor<Response>): ClassicExecutionContext

Receiver

Name Description
ClassicExecutionContext

Parameters

Name Description
primitiveExecutions: Cursor<Response>

ReturnValue

Name Description
ClassicExecutionContext

createChildAppendingRulesAndChoicePoints

fun ClassicExecutionContext.createChildAppendingRulesAndChoicePoints(rules: Cursor<Rule>, inferProcedureFromGoals: Boolean): ClassicExecutionContext

Receiver

Name Description
ClassicExecutionContext

Parameters

Name Description
rules: Cursor<Rule>
inferProcedureFromGoals: Boolean

ReturnValue

Name Description
ClassicExecutionContext

replaceWithChildAppendingRulesAndChoicePoints

fun ClassicExecutionContext.replaceWithChildAppendingRulesAndChoicePoints(rules: Cursor<Rule>, inferProcedureFromGoals: Boolean): ClassicExecutionContext

Receiver

Name Description
ClassicExecutionContext

Parameters

Name Description
rules: Cursor<Rule>
inferProcedureFromGoals: Boolean

ReturnValue

Name Description
ClassicExecutionContext

createChildAppendingPrimitivesAndChoicePoints

fun ClassicExecutionContext.createChildAppendingPrimitivesAndChoicePoints(primitiveExecutions: Cursor<Response>, inferProcedureFromGoals: Boolean): ClassicExecutionContext

Receiver

Name Description
ClassicExecutionContext

Parameters

Name Description
primitiveExecutions: Cursor<Response>
inferProcedureFromGoals: Boolean

ReturnValue

Name Description
ClassicExecutionContext

toRequest

fun ClassicExecutionContext.toRequest(goal: Struct, signature: Signature): Request<ClassicExecutionContext>

Receiver

Name Description
ClassicExecutionContext

Parameters

Name Description
goal: Struct
signature: Signature

ReturnValue

Name Description
Request<ClassicExecutionContext>