ConcurrentSolverFactory

The SolverFactory for :solve-concurrent, backing it.unibo.tuprolog.solve.Solver.concurrent: every Solver/MutableSolver it produces is a ConcurrentSolver that resolves goals by running the alternatives of the search tree (matching clauses, disjunction branches, backtracking primitive solutions) as concurrent Kotlin coroutines rather than one at a time -- see ConcurrentSolver for the resulting caveats around solution ordering and concurrent knowledge-base mutation.

val solver = ConcurrentSolverFactory.solverWithDefaultBuiltins(staticKb = theory)
val solution = solver.solveOnce(query)

See also

Properties

Link copied to clipboard
open override val defaultBuiltins: Library

The standard-library predicates and rules of :solve-concurrent (see it.unibo.tuprolog.solve.concurrent.stdlib.DefaultBuiltins).

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun mutableSolverOf(unificator: Unificator, libraries: Runtime, flags: FlagStore, staticKb: Theory, dynamicKb: Theory, inputs: InputStore, outputs: OutputStore): MutableSolver
open override fun mutableSolverOf(unificator: Unificator, libraries: Runtime, flags: FlagStore, staticKb: Theory, dynamicKb: Theory, stdIn: InputChannel<String>, stdOut: OutputChannel<String>, stdErr: OutputChannel<String>, warnings: OutputChannel<Warning>): MutableSolver
Link copied to clipboard
open fun mutableSolverWithDefaultBuiltins(unificator: Unificator, otherLibraries: Runtime, flags: FlagStore, staticKb: Theory, dynamicKb: Theory, stdIn: InputChannel<String>, stdOut: OutputChannel<String>, stdErr: OutputChannel<String>, warnings: OutputChannel<Warning>): MutableSolver
Link copied to clipboard
Link copied to clipboard
open override fun solverOf(unificator: Unificator, libraries: Runtime, flags: FlagStore, staticKb: Theory, dynamicKb: Theory, inputs: InputStore, outputs: OutputStore): Solver
open override fun solverOf(unificator: Unificator, libraries: Runtime, flags: FlagStore, staticKb: Theory, dynamicKb: Theory, stdIn: InputChannel<String>, stdOut: OutputChannel<String>, stdErr: OutputChannel<String>, warnings: OutputChannel<Warning>): Solver
Link copied to clipboard
open fun solverWithDefaultBuiltins(unificator: Unificator, otherLibraries: Runtime, flags: FlagStore, staticKb: Theory, dynamicKb: Theory, stdIn: InputChannel<String>, stdOut: OutputChannel<String>, stdErr: OutputChannel<String>, warnings: OutputChannel<Warning>): Solver