commonMain.it.unibo.tuprolog.solve.SolverExtensions.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of solve-streams-jvm Show documentation
Show all versions of solve-streams-jvm Show documentation
Experimental, functional-programming-based implementation of Prolog's SLDNF resolution principle
@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.jvm.JvmName
fun Solver.Companion.streams(
libraries: Libraries = Libraries(),
flags: PrologFlags = emptyMap(),
staticKb: Theory = Theory.empty(),
dynamicKb: Theory = Theory.empty(),
stdIn: InputChannel = InputChannel.stdIn(),
stdOut: OutputChannel = OutputChannel.stdOut(),
stdErr: OutputChannel = OutputChannel.stdOut(),
warnings: OutputChannel = OutputChannel.stdOut()
): Solver =
StreamsSolverFactory.solverOf(libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings)
fun Solver.Companion.streamsWithDefaultBuiltins(
libraries: Libraries = Libraries(),
flags: PrologFlags = emptyMap(),
staticKb: Theory = Theory.empty(),
dynamicKb: Theory = Theory.empty(),
stdIn: InputChannel = InputChannel.stdIn(),
stdOut: OutputChannel = OutputChannel.stdOut(),
stdErr: OutputChannel = OutputChannel.stdOut(),
warnings: OutputChannel = OutputChannel.stdOut()
): Solver =
StreamsSolverFactory.solverWithDefaultBuiltins(libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings)
fun MutableSolver.Companion.streams(
libraries: Libraries = Libraries(),
flags: PrologFlags = emptyMap(),
staticKb: Theory = Theory.empty(),
dynamicKb: Theory = Theory.empty(),
stdIn: InputChannel = InputChannel.stdIn(),
stdOut: OutputChannel = OutputChannel.stdOut(),
stdErr: OutputChannel = OutputChannel.stdOut(),
warnings: OutputChannel = OutputChannel.stdOut()
): MutableSolver =
StreamsSolverFactory.mutableSolverOf(libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings)
fun MutableSolver.Companion.streamsWithDefaultBuiltins(
libraries: Libraries = Libraries(),
flags: PrologFlags = emptyMap(),
staticKb: Theory = Theory.empty(),
dynamicKb: Theory = Theory.empty(),
stdIn: InputChannel = InputChannel.stdIn(),
stdOut: OutputChannel = OutputChannel.stdOut(),
stdErr: OutputChannel = OutputChannel.stdOut(),
warnings: OutputChannel = OutputChannel.stdOut()
): MutableSolver =
StreamsSolverFactory.mutableSolverWithDefaultBuiltins(libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy