SolverEvent

data class SolverEvent<T>(val event: T, val unificator: Unificator, val operators: OperatorSet, val libraries: Runtime, val flags: FlagStore, val staticKb: Theory, val dynamicKb: Theory, val inputChannels: InputStore, val outputChannels: OutputStore) : ExecutionContextAware

The payload published by every onXxx org.reactfx.EventStream of TuPrologIDEModel: it couples a domain-specific event (e.g. a it.unibo.tuprolog.solve.Solution, a resolution counter, the current goal) with a snapshot of the solver's ExecutionContextAware state (unificator, operators, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels) taken at the time the event fired.

Bundling the context together with the event lets subscribers (namely TuPrologIDEController) refresh context-sensitive views (the operators table, the flags table, the loaded libraries tree, the static/dynamic knowledge base panes) only when something actually changed, by comparing consecutive SolverEvents.

Type Parameters

T

the type of the wrapped domain event.

Constructors

Link copied to clipboard
constructor(event: T, unificator: Unificator, operators: OperatorSet, libraries: Runtime, flags: FlagStore, staticKb: Theory, dynamicKb: Theory, inputChannels: InputStore, outputChannels: OutputStore)
constructor(event: T, other: ExecutionContextAware)

Builds a SolverEvent wrapping event, copying the it.unibo.tuprolog.solve.ExecutionContext fields from other (typically the solver instance itself); staticKb and dynamicKb are snapshotted into immutable theories so that later mutations of the live solver do not retroactively change this event.

Properties

Link copied to clipboard
open override val dynamicKb: Theory
Link copied to clipboard
val event: T
Link copied to clipboard
open override val flags: FlagStore
Link copied to clipboard
open override val inputChannels: InputStore
Link copied to clipboard
open override val libraries: Runtime
Link copied to clipboard
open override val operators: OperatorSet
Link copied to clipboard
open override val outputChannels: OutputStore
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val staticKb: Theory
Link copied to clipboard
open override val unificator: Unificator
Link copied to clipboard