SolverBuilder
A mutable, fluent builder for Solver/MutableSolver instances, as an alternative to calling SolverFactory.solverOf (and friends) with many named arguments at once.
Every piece of state exposed here is both a settable var property and a same-named fun that sets it and returns this, so calls can be chained, e.g.:
val solver =
Solver.prolog.newBuilder()
.staticKb(myTheory)
.standardOutput(OutputChannel.of { print(it) })
.build()Obtain one via SolverFactory.newBuilder; every property starts out at the originating factory's default* value.
See also
Properties
The standard-library Library the built solver will load, or null if none (see noBuiltins).
The it.unibo.tuprolog.solve.channel.InputStore the built solver will start with.
The it.unibo.tuprolog.solve.channel.OutputStore the built solver will start with.
The standard error channel within outputs.
The standard input channel within inputs.
The standard output channel within outputs.
The Unificator the built solver will use.
The warnings channel within outputs.
Functions
Builds a MutableSolver out of the current configuration of this builder.
Fluent setter for builtins.
Fluent setter for dynamicKb.
Sets dynamicKb to a Theory built out of clauses, using the current unificator.
Fluent setter for flags.
Fluent setter for inputs.
Same as library, generating an anonymous alias automatically.
Adds an anonymous (or aliased) library, assembled on the fly out of item1 and items (via it.unibo.tuprolog.solve.libraryOf), to runtime.
Sets builtins to null, so the built solver won't load any standard-library predicate.
Fluent setter for outputs.
Fluent setter for runtime.
Fluent setter for standardError.
Fluent setter for standardInput.
Fluent setter for standardOutput.
Fluent setter for staticKb.
Sets staticKb to a Theory built out of clauses, using the current unificator.
Freezes the current configuration of this builder into a SolverFactory whose defaults match it.
Fluent setter for unificator.
Fluent setter for warnings.