commonMain.it.unibo.tuprolog.solve.SideEffectFactory.kt Maven / Gradle / Ivy
package it.unibo.tuprolog.solve
import it.unibo.tuprolog.core.Clause
import it.unibo.tuprolog.core.Term
import it.unibo.tuprolog.core.operators.Operator
import it.unibo.tuprolog.solve.channel.InputChannel
import it.unibo.tuprolog.solve.channel.OutputChannel
import it.unibo.tuprolog.solve.library.AliasedLibrary
import it.unibo.tuprolog.solve.library.Libraries
import it.unibo.tuprolog.solve.library.Library
import kotlin.js.JsName
import kotlin.jvm.JvmStatic
interface SideEffectFactory {
companion object {
@JvmStatic
@JsName("default")
val default = object : SideEffectFactory { }
}
@JsName("resetStaticKbIterable")
fun resetStaticKb(clauses: Iterable) =
SideEffect.ResetStaticKb(clauses)
@JsName("resetStaticKbSequence")
fun resetStaticKb(clauses: Sequence) =
SideEffect.ResetStaticKb(clauses)
@JsName("resetStaticKb")
fun resetStaticKb(vararg clauses: Clause) =
SideEffect.ResetStaticKb(*clauses)
@JsName("addStaticClausesIterable")
fun addStaticClauses(clauses: Iterable, onTop: Boolean = false) =
SideEffect.AddStaticClauses(clauses, onTop)
@JsName("addStaticClausesSequence")
fun addStaticClauses(clauses: Sequence, onTop: Boolean = false) =
SideEffect.AddStaticClauses(clauses, onTop)
@JsName("addStaticClauses")
fun addStaticClauses(vararg clauses: Clause, onTop: Boolean = false) =
SideEffect.AddStaticClauses(*clauses, onTop = onTop)
@JsName("removeStaticClausesIterable")
fun removeStaticClauses(clauses: Iterable) =
SideEffect.RemoveStaticClauses(clauses)
@JsName("removeStaticClausesSequence")
fun removeStaticClauses(clauses: Sequence) =
SideEffect.RemoveStaticClauses(clauses)
@JsName("removeStaticClauses")
fun removeStaticClauses(vararg clauses: Clause) =
SideEffect.RemoveStaticClauses(*clauses)
@JsName("resetDynamicKbIterable")
fun resetDynamicKb(clauses: Iterable) =
SideEffect.ResetDynamicKb(clauses)
@JsName("resetDynamicKbSequence")
fun resetDynamicKb(clauses: Sequence) =
SideEffect.ResetDynamicKb(clauses)
@JsName("resetDynamicKb")
fun resetDynamicKb(vararg clauses: Clause) =
SideEffect.ResetDynamicKb(*clauses)
@JsName("addDynamicClausesIterable")
fun addDynamicClauses(clauses: Iterable, onTop: Boolean = false) =
SideEffect.AddDynamicClauses(clauses, onTop)
@JsName("addDynamicClausesSequence")
fun addDynamicClauses(clauses: Sequence, onTop: Boolean = false) =
SideEffect.AddDynamicClauses(clauses, onTop)
@JsName("addDynamicClauses")
fun addDynamicClauses(vararg clauses: Clause, onTop: Boolean = false) =
SideEffect.AddDynamicClauses(*clauses, onTop = onTop)
@JsName("removeDynamicClausesIterable")
fun removeDynamicClauses(clauses: Iterable) =
SideEffect.RemoveDynamicClauses(clauses)
@JsName("removeDynamicClausesSequence")
fun removeDynamicClauses(clauses: Sequence) =
SideEffect.RemoveDynamicClauses(clauses)
@JsName("removeDynamicClauses")
fun removeDynamicClauses(vararg clauses: Clause) =
SideEffect.RemoveDynamicClauses(*clauses)
@JsName("setFlagsMap")
fun setFlags(flags: Map) =
SideEffect.SetFlags(flags)
@JsName("setFlags")
fun setFlags(vararg flags: Pair) =
SideEffect.SetFlags(*flags)
@JsName("setFlag")
fun setFlag(name: String, value: Term) =
SideEffect.SetFlags(name to value)
@JsName("resetFlagsMap")
fun resetFlags(flags: Map) =
SideEffect.ResetFlags(flags)
@JsName("resetFlags")
fun resetFlags(vararg flags: Pair) =
SideEffect.ResetFlags(*flags)
@JsName("clearFlagsIterable")
fun clearFlags(names: Iterable) =
SideEffect.ClearFlags(names)
@JsName("clearFlagsSequence")
fun clearFlags(names: Sequence) =
SideEffect.ClearFlags(names)
@JsName("clearFlags")
fun clearFlags(vararg names: String) =
SideEffect.ClearFlags(*names)
@JsName("loadLibrary")
fun loadLibrary(alias: String, library: Library) =
SideEffect.LoadLibrary(alias, library)
@JsName("loadAliasedLibrary")
fun loadLibrary(aliasedLibrary: AliasedLibrary) =
SideEffect.LoadLibrary(aliasedLibrary.alias, aliasedLibrary)
@JsName("unloadLibrariesIterable")
fun unloadLibraries(aliases: Iterable) =
SideEffect.UnloadLibraries(aliases)
@JsName("unloadLibrariesSequence")
fun unloadLibraries(aliases: Sequence) =
SideEffect.UnloadLibraries(aliases)
@JsName("unloadLibraries")
fun unloadLibraries(vararg aliases: String) =
SideEffect.UnloadLibraries(*aliases)
@JsName("updateLibrary")
fun updateLibrary(alias: String, library: Library) =
SideEffect.UpdateLibrary(alias, library)
@JsName("updateAliasedLibrary")
fun updateLibrary(aliasedLibrary: AliasedLibrary) =
SideEffect.UpdateLibrary(aliasedLibrary.alias, aliasedLibrary)
@JsName("resetLibraries")
fun resetLibraries(libraries: Libraries) =
SideEffect.ResetLibraries(libraries)
@JsName("resetLibrariesIterable")
fun resetLibraries(libraries: Iterable) =
SideEffect.ResetLibraries(libraries)
@JsName("resetLibrariesSequence")
fun resetLibraries(libraries: Sequence) =
SideEffect.ResetLibraries(libraries)
@JsName("resetAliasedLibrary")
fun resetLibraries(vararg libraries: AliasedLibrary) =
SideEffect.ResetLibraries(*libraries)
@JsName("addLibraries")
fun addLibraries(libraries: Libraries) =
SideEffect.AddLibraries(libraries)
@JsName("addLibrariesIterable")
fun addLibraries(libraries: Iterable) =
SideEffect.AddLibraries(libraries)
@JsName("addLibrariesSequence")
fun addLibraries(libraries: Sequence) =
SideEffect.AddLibraries(libraries)
@JsName("addAliasedLibrary")
fun addLibraries(vararg libraries: AliasedLibrary) =
SideEffect.AddLibraries(*libraries)
@JsName("setOperatorsIterable")
fun setOperators(operators: Iterable) =
SideEffect.SetOperators(operators)
@JsName("setOperatorsSequence")
fun setOperators(operators: Sequence) =
SideEffect.SetOperators(operators)
@JsName("setOperators")
fun setOperators(vararg operators: Operator) =
SideEffect.SetOperators(*operators)
@JsName("resetOperatorsIterable")
fun resetOperators(operators: Iterable) =
SideEffect.ResetOperators(operators)
@JsName("resetOperatorsSequence")
fun resetOperators(operators: Sequence) =
SideEffect.ResetOperators(operators)
@JsName("resetOperators")
fun resetOperators(vararg operators: Operator) =
SideEffect.ResetOperators(*operators)
@JsName("removeOperatorsIterable")
fun removeOperators(operators: Iterable) =
SideEffect.RemoveOperators(operators)
@JsName("removeOperatorsSequence")
fun removeOperators(operators: Sequence) =
SideEffect.RemoveOperators(operators)
@JsName("removeOperators")
fun removeOperators(vararg operators: Operator) =
SideEffect.RemoveOperators(*operators)
@JsName("openInputChannelsMap")
fun openInputChannels(inputChannels: Map>) =
SideEffect.OpenInputChannels(inputChannels)
@JsName("openInputChannels")
fun openInputChannels(vararg inputChannels: Pair>) =
SideEffect.OpenInputChannels(*inputChannels)
@JsName("openInputChannel")
fun openInputChannel(name: String, inputChannel: InputChannel<*>) =
SideEffect.OpenInputChannels(name to inputChannel)
@JsName("resetInputChannels")
fun resetInputChannels(vararg inputChannels: Pair>) =
SideEffect.ResetInputChannels(*inputChannels)
@JsName("closeInputChannelsIterable")
fun closeInputChannels(names: Iterable) =
SideEffect.CloseInputChannels(names)
@JsName("closeInputChannelsSequence")
fun closeInputChannels(names: Sequence) =
SideEffect.CloseInputChannels(names)
@JsName("closeInputChannels")
fun closeInputChannels(vararg names: String) =
SideEffect.CloseInputChannels(*names)
@JsName("openOutputChannelsMap")
fun openOutputChannels(outputChannels: Map>) =
SideEffect.OpenOutputChannels(outputChannels)
@JsName("openOutputChannels")
fun openOutputChannels(vararg outputChannels: Pair>) =
SideEffect.OpenOutputChannels(*outputChannels)
@JsName("openOutputChannel")
fun openOutputChannel(name: String, outputChannel: OutputChannel<*>) =
SideEffect.OpenOutputChannels(name to outputChannel)
@JsName("resetOutputChannelsMap")
fun resetOutputChannels(outputChannels: Map>) =
SideEffect.ResetOutputChannels(outputChannels)
@JsName("resetOutputChannels")
fun resetOutputChannels(vararg outputChannels: Pair>) =
SideEffect.ResetOutputChannels(*outputChannels)
@JsName("closeOutputChannelsIterable")
fun closeOutputChannels(names: Iterable) =
SideEffect.CloseOutputChannels(names)
@JsName("closeOutputChannelsSequence")
fun closeOutputChannels(names: Sequence) =
SideEffect.CloseOutputChannels(names)
@JsName("closeOutputChannels")
fun closeOutputChannels(vararg names: String) =
SideEffect.CloseOutputChannels(*names)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy