SideEffect
A state change to be applied to an ExecutionContext after a it.unibo.tuprolog.solve.primitive.Primitive has run, rather than mutated directly by the primitive itself. Primitives attach zero or more SideEffects to their it.unibo.tuprolog.solve.primitive.Solve.Response (see it.unibo.tuprolog.solve.primitive.Solve.Request.replyWith), and the resolution strategy folds them, in order, over the context via ExecutionContext.apply -- each applyTo call producing a new, immutable ExecutionContext rather than mutating the one it receives.
Every concrete SideEffect subtype nested here covers one specific piece of mutable state a solver carries (clauses in either knowledge base, flags, libraries, operators, I/O channels, custom data), typically in both a "reset to" and "alter by adding/removing" flavour. SideEffectFactory/SideEffectsBuilder are the ergonomic way to construct these without naming each subtype explicitly.
See also
Inheritors
Types
Base class for AlterRuntime side effects expressible as a Runtime (a set of aliased Librarys).
Base class for side effects altering the I/O channel stores.
Base class for AlterChannels side effects addressing channels by names only (e.g. to close them).
Base class for side effects altering one it.unibo.tuprolog.solve.data.CustomDataStore tier with data, either merging it in, or replacing the tier outright if reset.
Base class for side effects altering the FlagStore.
Base class for AlterFlags side effects carrying explicit name-value flags entries.
Base class for AlterFlags side effects addressing flags by names only (e.g. to clear them).
Base class for AlterChannels side effects carrying named inputChannels to add/set.
Base class for AlterRuntime side effects addressing libraries by aliases only.
Base class for AlterRuntime side effects concerning a single library.
Base class for side effects altering the declared OperatorSet.
Base class for AlterChannels side effects carrying named outputChannels to add/set.
Base class for side effects altering the loaded Runtime of libraries.
Closes/removes the input channels named in names.
Closes/removes the output channels named in names.
Adds inputChannels to the input channel store (see it.unibo.tuprolog.solve.channel.InputStore).
Adds outputChannels to the output channel store (see it.unibo.tuprolog.solve.channel.OutputStore).
Base class for side effects removing clauses from a knowledge base.
Removes clauses from the dynamic knowledge base.
Removes operators from the current OperatorSet.
Removes clauses from the static knowledge base.
Replaces the dynamic knowledge base with a MutableTheory built out of clauses.
Replaces the whole input channel store with inputChannels.
Nominally replaces the whole OperatorSet with operators.
Replaces the whole output channel store with outputChannels.
Base class for side effects computing a Theory (or MutableTheory) out of clauses, for either knowledge base.
Alters the it.unibo.tuprolog.solve.data.CustomDataStore.durable tier with data.
Alters the it.unibo.tuprolog.solve.data.CustomDataStore.ephemeral tier with data.
Merges operators into the current OperatorSet.
Alters the it.unibo.tuprolog.solve.data.CustomDataStore.persistent tier with data.
Functions
Produces the ExecutionContext resulting from applying this side effect to context.