All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.it.unibo.tuprolog.solve.sideffects.SideEffectFactory.kt Maven / Gradle / Ivy

There is a newer version: 1.0.4
Show newest version
package it.unibo.tuprolog.solve.sideffects

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.Library
import it.unibo.tuprolog.solve.library.Runtime
import it.unibo.tuprolog.solve.sideffects.impl.DefaultSideEffectFactory
import kotlin.jvm.JvmStatic

interface SideEffectFactory {
    companion object {
        @JvmStatic
        val default: SideEffectFactory = DefaultSideEffectFactory
    }

    fun resetStaticKb(clauses: Iterable): SideEffect.ResetStaticKb

    fun resetStaticKb(clauses: Sequence): SideEffect.ResetStaticKb

    fun resetStaticKb(vararg clauses: Clause): SideEffect.ResetStaticKb

    fun addStaticClauses(
        clauses: Iterable,
        onTop: Boolean = false,
    ): SideEffect.AddStaticClauses

    fun addStaticClauses(
        clauses: Sequence,
        onTop: Boolean = false,
    ): SideEffect.AddStaticClauses

    fun addStaticClauses(
        vararg clauses: Clause,
        onTop: Boolean = false,
    ): SideEffect.AddStaticClauses

    fun removeStaticClauses(clauses: Iterable): SideEffect.RemoveStaticClauses

    fun removeStaticClauses(clauses: Sequence): SideEffect.RemoveStaticClauses

    fun removeStaticClauses(vararg clauses: Clause): SideEffect.RemoveStaticClauses

    fun resetDynamicKb(clauses: Iterable): SideEffect.ResetDynamicKb

    fun resetDynamicKb(clauses: Sequence): SideEffect.ResetDynamicKb

    fun resetDynamicKb(vararg clauses: Clause): SideEffect.ResetDynamicKb

    fun addDynamicClauses(
        clauses: Iterable,
        onTop: Boolean = false,
    ): SideEffect.AddDynamicClauses

    fun addDynamicClauses(
        clauses: Sequence,
        onTop: Boolean = false,
    ): SideEffect.AddDynamicClauses

    fun addDynamicClauses(
        vararg clauses: Clause,
        onTop: Boolean = false,
    ): SideEffect.AddDynamicClauses

    fun removeDynamicClauses(clauses: Iterable): SideEffect.RemoveDynamicClauses

    fun removeDynamicClauses(clauses: Sequence): SideEffect.RemoveDynamicClauses

    fun removeDynamicClauses(vararg clauses: Clause): SideEffect.RemoveDynamicClauses

    fun setFlags(flags: Map): SideEffect.SetFlags

    fun setFlags(vararg flags: Pair): SideEffect.SetFlags

    fun setFlag(
        name: String,
        value: Term,
    ): SideEffect.SetFlags

    fun resetFlags(flags: Map): SideEffect.ResetFlags

    fun resetFlags(vararg flags: Pair): SideEffect.ResetFlags

    fun clearFlags(names: Iterable): SideEffect.ClearFlags

    fun clearFlags(names: Sequence): SideEffect.ClearFlags

    fun clearFlags(vararg names: String): SideEffect.ClearFlags

    fun loadLibrary(library: Library): SideEffect.LoadLibrary

    fun unloadLibraries(aliases: Iterable): SideEffect.UnloadLibraries

    fun unloadLibraries(aliases: Sequence): SideEffect.UnloadLibraries

    fun unloadLibraries(vararg aliases: String): SideEffect.UnloadLibraries

    fun updateLibrary(library: Library): SideEffect.UpdateLibrary

    fun resetRuntime(libraries: Runtime): SideEffect.ResetRuntime

    fun resetRuntime(libraries: Iterable): SideEffect.ResetRuntime

    fun resetRuntime(libraries: Sequence): SideEffect.ResetRuntime

    fun resetRuntime(vararg libraries: Library): SideEffect.ResetRuntime

    fun addLibraries(libraries: Runtime): SideEffect.AddLibraries

    fun addLibraries(libraries: Iterable): SideEffect.AddLibraries

    fun addLibraries(libraries: Sequence): SideEffect.AddLibraries

    fun addLibraries(vararg libraries: Library): SideEffect.AddLibraries

    fun setOperators(operators: Iterable): SideEffect.SetOperators

    fun setOperators(operators: Sequence): SideEffect.SetOperators

    fun setOperators(vararg operators: Operator): SideEffect.SetOperators

    fun resetOperators(operators: Iterable): SideEffect.ResetOperators

    fun resetOperators(operators: Sequence): SideEffect.ResetOperators

    fun resetOperators(vararg operators: Operator): SideEffect.ResetOperators

    fun removeOperators(operators: Iterable): SideEffect.RemoveOperators

    fun removeOperators(operators: Sequence): SideEffect.RemoveOperators

    fun removeOperators(vararg operators: Operator): SideEffect.RemoveOperators

    fun openInputChannels(inputChannels: Map>): SideEffect.OpenInputChannels

    fun openInputChannels(vararg inputChannels: Pair>): SideEffect.OpenInputChannels

    fun openInputChannel(
        name: String,
        inputChannel: InputChannel,
    ): SideEffect.OpenInputChannels

    fun resetInputChannels(vararg inputChannels: Pair>): SideEffect.ResetInputChannels

    fun resetInputChannels(inputChannels: Iterable>>): SideEffect.ResetInputChannels

    fun resetInputChannels(inputChannels: Sequence>>): SideEffect.ResetInputChannels

    fun resetInputChannels(inputChannels: Map>): SideEffect.ResetInputChannels

    fun closeInputChannels(names: Iterable): SideEffect.CloseInputChannels

    fun closeInputChannels(names: Sequence): SideEffect.CloseInputChannels

    fun closeInputChannels(vararg names: String): SideEffect.CloseInputChannels

    fun openOutputChannels(outputChannels: Map>): SideEffect.OpenOutputChannels

    fun openOutputChannels(vararg outputChannels: Pair>): SideEffect.OpenOutputChannels

    fun openOutputChannel(
        name: String,
        outputChannel: OutputChannel,
    ): SideEffect.OpenOutputChannels

    fun resetOutputChannels(
        outputChannels: Iterable>>,
    ): SideEffect.ResetOutputChannels

    fun resetOutputChannels(
        outputChannels: Sequence>>,
    ): SideEffect.ResetOutputChannels

    fun resetOutputChannels(outputChannels: Map>): SideEffect.ResetOutputChannels

    fun resetOutputChannels(vararg outputChannels: Pair>): SideEffect.ResetOutputChannels

    fun closeOutputChannels(names: Iterable): SideEffect.CloseOutputChannels

    fun closeOutputChannels(names: Sequence): SideEffect.CloseOutputChannels

    fun closeOutputChannels(vararg names: String): SideEffect.CloseOutputChannels

    fun addEphemeralData(
        key: String,
        value: Any,
    ): SideEffect.SetEphemeralData

    fun  addEphemeralData(data: Map): SideEffect.SetEphemeralData

    fun  addEphemeralData(vararg data: Pair): SideEffect.SetEphemeralData

    fun setEphemeralData(
        key: String,
        value: Any,
    ): SideEffect.SetEphemeralData

    fun  setEphemeralData(data: Map): SideEffect.SetEphemeralData

    fun  setEphemeralData(vararg data: Pair): SideEffect.SetEphemeralData

    fun addDurableData(
        key: String,
        value: Any,
    ): SideEffect.SetDurableData

    fun  addDurableData(data: Map): SideEffect.SetDurableData

    fun  addDurableData(vararg data: Pair): SideEffect.SetDurableData

    fun setDurableData(
        key: String,
        value: Any,
    ): SideEffect.SetDurableData

    fun  setDurableData(data: Map): SideEffect.SetDurableData

    fun  setDurableData(vararg data: Pair): SideEffect.SetDurableData

    fun addPersistentData(
        key: String,
        value: Any,
    ): SideEffect.SetPersistentData

    fun  addPersistentData(data: Map): SideEffect.SetPersistentData

    fun  addPersistentData(vararg data: Pair): SideEffect.SetPersistentData

    fun setPersistentData(
        key: String,
        value: Any,
    ): SideEffect.SetPersistentData

    fun  setPersistentData(data: Map): SideEffect.SetPersistentData

    fun  setPersistentData(vararg data: Pair): SideEffect.SetPersistentData
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy