commonMain.it.unibo.tuprolog.solve.SolverBuilder.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of solve-jvm Show documentation
Show all versions of solve-jvm Show documentation
Resolution-agnostic API for logic solvers
package it.unibo.tuprolog.solve
import it.unibo.tuprolog.core.Clause
import it.unibo.tuprolog.core.Term
import it.unibo.tuprolog.solve.channel.InputChannel
import it.unibo.tuprolog.solve.channel.InputStore
import it.unibo.tuprolog.solve.channel.OutputChannel
import it.unibo.tuprolog.solve.channel.OutputStore
import it.unibo.tuprolog.solve.exception.Warning
import it.unibo.tuprolog.solve.flags.FlagStore
import it.unibo.tuprolog.solve.flags.NotableFlag
import it.unibo.tuprolog.solve.library.Library
import it.unibo.tuprolog.solve.library.Runtime
import it.unibo.tuprolog.theory.Theory
import it.unibo.tuprolog.unify.Unificator
import kotlin.js.JsName
interface SolverBuilder {
@JsName("toFactory")
fun toFactory(): SolverFactory
@JsName("build")
fun build(): Solver
@JsName("buildMutable")
fun buildMutable(): MutableSolver
@JsName("unificator")
var unificator: Unificator
@JsName("setUnificator")
fun unificator(unificator: Unificator): SolverBuilder
@JsName("runtime")
var runtime: Runtime
@JsName("setRuntime")
fun runtime(runtime: Runtime): SolverBuilder
@JsName("setLibrary")
fun library(
alias: String?,
item1: AbstractWrapper<*>,
vararg items: AbstractWrapper<*>,
): SolverBuilder
@JsName("setLibraryWithDefaultAlias")
fun library(
item1: AbstractWrapper<*>,
vararg items: AbstractWrapper<*>,
): SolverBuilder
@JsName("builtins")
var builtins: Library?
@JsName("setBuiltins")
fun builtins(builtins: Library): SolverBuilder
@JsName("noBuiltins")
fun noBuiltins(): SolverBuilder
@JsName("flags")
var flags: FlagStore
@JsName("setFlags")
fun flags(flags: FlagStore): SolverBuilder
@JsName("setFlag")
fun flag(
name: String,
value: Term,
): SolverBuilder
@JsName("setFlagByPair")
fun flag(flag: Pair): SolverBuilder
@JsName("setNotableFlag")
fun flag(flag: NotableFlag): SolverBuilder
@JsName("setNotableFlagValue")
fun flag(
flag: NotableFlag,
value: Term,
): SolverBuilder
@JsName("setNotableFlagByValue")
fun flag(
flag: T,
value: T.() -> Term,
): SolverBuilder
@JsName("staticKb")
var staticKb: Theory
@JsName("setStaticKb")
fun staticKb(theory: Theory): SolverBuilder
@JsName("setStaticKbByClauses")
fun staticKb(vararg clauses: Clause): SolverBuilder
@JsName("setStaticKbByClausesIterable")
fun staticKb(clauses: Iterable): SolverBuilder
@JsName("setStaticKbByClausesSequence")
fun staticKb(clauses: Sequence): SolverBuilder
@JsName("dynamicKb")
var dynamicKb: Theory
@JsName("setDynamicKb")
fun dynamicKb(theory: Theory): SolverBuilder
@JsName("setDynamicKbByClauses")
fun dynamicKb(vararg clauses: Clause): SolverBuilder
@JsName("setDynamicKbByClausesIterable")
fun dynamicKb(clauses: Iterable): SolverBuilder
@JsName("setDynamicKbByClausesSequence")
fun dynamicKb(clauses: Sequence): SolverBuilder
@JsName("inputStore")
var inputs: InputStore
@JsName("setInputs")
fun inputs(inputs: InputStore): SolverBuilder
@JsName("setInput")
fun input(
alias: String,
channel: InputChannel,
): SolverBuilder
@JsName("standardInput")
var standardInput: InputChannel
@JsName("setStandardInput")
fun standardInput(channel: InputChannel): SolverBuilder
@JsName("outputStore")
var outputs: OutputStore
@JsName("setOutputs")
fun outputs(outputs: OutputStore): SolverBuilder
@JsName("setOutput")
fun output(
alias: String,
channel: OutputChannel,
): SolverBuilder
@JsName("standardOutput")
var standardOutput: OutputChannel
@JsName("setStandardOutput")
fun standardOutput(channel: OutputChannel): SolverBuilder
@JsName("standardError")
var standardError: OutputChannel
@JsName("setStandardError")
fun standardError(channel: OutputChannel): SolverBuilder
@JsName("warnings")
var warnings: OutputChannel
@JsName("setWarnings")
fun warnings(channel: OutputChannel): SolverBuilder
}