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

commonMain.it.unibo.tuprolog.solve.SolverExtensions.kt Maven / Gradle / Ivy

There is a newer version: 0.17.4
Show newest version
@file:JvmName("SolverExtensions")

package it.unibo.tuprolog.solve

import it.unibo.tuprolog.solve.channel.InputChannel
import it.unibo.tuprolog.solve.channel.OutputChannel
import it.unibo.tuprolog.solve.exception.PrologWarning
import it.unibo.tuprolog.solve.library.Libraries
import it.unibo.tuprolog.theory.Theory
import kotlin.js.JsName
import kotlin.jvm.JvmName

@JsName("classicSolver")
fun Solver.Companion.classic(
    libraries: Libraries = ClassicSolverFactory.defaultLibraries,
    flags: FlagStore = ClassicSolverFactory.defaultFlags,
    staticKb: Theory = ClassicSolverFactory.defaultDynamicKb,
    dynamicKb: Theory = ClassicSolverFactory.defaultDynamicKb,
    stdIn: InputChannel = ClassicSolverFactory.defaultInputChannel,
    stdOut: OutputChannel = ClassicSolverFactory.defaultOutputChannel,
    stdErr: OutputChannel = ClassicSolverFactory.defaultErrorChannel,
    warnings: OutputChannel = ClassicSolverFactory.defaultWarningsChannel
): Solver =
    ClassicSolverFactory.solverOf(libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings)

@JsName("classicSolverWithDefaultBuiltins")
fun Solver.Companion.classicWithDefaultBuiltins(
    libraries: Libraries = ClassicSolverFactory.defaultLibraries,
    flags: FlagStore = ClassicSolverFactory.defaultFlags,
    staticKb: Theory = ClassicSolverFactory.defaultStaticKb,
    dynamicKb: Theory = ClassicSolverFactory.defaultDynamicKb,
    stdIn: InputChannel = ClassicSolverFactory.defaultInputChannel,
    stdOut: OutputChannel = ClassicSolverFactory.defaultOutputChannel,
    stdErr: OutputChannel = ClassicSolverFactory.defaultErrorChannel,
    warnings: OutputChannel = ClassicSolverFactory.defaultWarningsChannel
): Solver =
    ClassicSolverFactory.solverWithDefaultBuiltins(libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings)

@JsName("classicMutableSolver")
fun MutableSolver.Companion.classic(
    libraries: Libraries = ClassicSolverFactory.defaultLibraries,
    flags: FlagStore = ClassicSolverFactory.defaultFlags,
    staticKb: Theory = ClassicSolverFactory.defaultStaticKb,
    dynamicKb: Theory = ClassicSolverFactory.defaultDynamicKb,
    stdIn: InputChannel = ClassicSolverFactory.defaultInputChannel,
    stdOut: OutputChannel = ClassicSolverFactory.defaultOutputChannel,
    stdErr: OutputChannel = ClassicSolverFactory.defaultErrorChannel,
    warnings: OutputChannel = ClassicSolverFactory.defaultWarningsChannel
): MutableSolver =
    ClassicSolverFactory.mutableSolverOf(libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings)

@JsName("classicMutableSolverWithDefaultBuiltins")
fun MutableSolver.Companion.classicWithDefaultBuiltins(
    libraries: Libraries = ClassicSolverFactory.defaultLibraries,
    flags: FlagStore = ClassicSolverFactory.defaultFlags,
    staticKb: Theory = ClassicSolverFactory.defaultStaticKb,
    dynamicKb: Theory = ClassicSolverFactory.defaultDynamicKb,
    stdIn: InputChannel = ClassicSolverFactory.defaultInputChannel,
    stdOut: OutputChannel = ClassicSolverFactory.defaultOutputChannel,
    stdErr: OutputChannel = ClassicSolverFactory.defaultErrorChannel,
    warnings: OutputChannel = ClassicSolverFactory.defaultWarningsChannel
): MutableSolver =
    ClassicSolverFactory.mutableSolverWithDefaultBuiltins(libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy