module Solver:sig..end
Solvers
type solver
type status =
| |
UNSATISFIABLE |
| |
UNKNOWN |
| |
SATISFIABLE |
val string_of_status : status -> string
val get_help : solver -> stringA string that describes all available solver parameters.
val set_parameters : solver -> Params.params -> unitSets the solver parameters.
val get_param_descrs : solver -> Params.ParamDescrs.param_descrsRetrieves parameter descriptions for solver.
val get_num_scopes : solver -> intThe current number of backtracking points (scopes).
Solver.pop
Solver.push
val push : solver -> unitCreates a backtracking point.
Solver.pop
val pop : solver -> int -> unitBacktracks a number of backtracking points.
Note that an exception is thrown if the integer is not smaller than Solver.get_num_scopes
Solver.push
val reset : solver -> unitResets the Solver. This removes all assertions from the solver.
val add : solver -> Expr.expr list -> unitAssert a constraint (or multiple) into the solver.
val assert_and_track_l : solver -> Expr.expr list -> Expr.expr list -> unitAssert multiple constraints (cs) into the solver, and track them (in the unsat) core using the Boolean constants in ps.
This API is an alternative to Solver.check with assumptions for extracting unsat cores.
Both APIs can be used in the same solver. The unsat core will contain a combination
of the Boolean variables provided using Solver.assert_and_track and the Boolean literals
provided using Solver.check with assumptions.
val assert_and_track : solver -> Expr.expr -> Expr.expr -> unitAssert a constraint (c) into the solver, and track it (in the unsat) core using the Boolean constant p.
This API is an alternative to Solver.check with assumptions for extracting unsat cores.
Both APIs can be used in the same solver. The unsat core will contain a combination
of the Boolean variables provided using Solver.assert_and_track and the Boolean literals
provided using Solver.check with assumptions.
val get_num_assertions : solver -> intThe number of assertions in the solver.
val get_assertions : solver -> Expr.expr listThe set of asserted formulas.
val check : solver -> Expr.expr list -> statusChecks whether the assertions in the solver are consistent or not.
val get_model : solver -> Model.model optionThe model of the last Check.
The result is None if Check was not invoked before,
if its results was not SATISFIABLE, or if model production is not enabled.
val get_proof : solver -> Expr.expr optionThe proof of the last Check.
The result is null if Check was not invoked before,
if its results was not UNSATISFIABLE, or if proof production is disabled.
val get_unsat_core : solver -> Expr.expr listThe unsat core of the last Check.
The unsat core is a subset of Assertions
The result is empty if Check was not invoked before,
if its results was not UNSATISFIABLE, or if core production is disabled.
val get_reason_unknown : solver -> stringA brief justification of why the last call to Check returned UNKNOWN.
val get_statistics : solver -> Statistics.statisticsSolver statistics.
val mk_solver : context -> Symbol.symbol option -> solverCreates a new (incremental) solver.
This solver also uses a set of builtin tactics for handling the first check-sat command, and check-sat commands that take more than a given number of milliseconds to be solved.
val mk_solver_s : context -> string -> solverCreates a new (incremental) solver.
Solver.mk_solver
val mk_simple_solver : context -> solverCreates a new (incremental) solver.
val mk_solver_t : context -> Tactic.tactic -> solverCreates a solver that is implemented using the given tactic.
The solver supports the commands Push and Pop, but it
will always solve each check from scratch.
val add_simplifier : context ->
solver -> Simplifier.simplifier -> solverCreate a solver with simplifying pre-processing *
val translate : solver -> context -> solverCreate a clone of the current solver with respect to a context.
val to_string : solver -> stringA string representation of the solver.
val interrupt : context -> solver -> unitSolver local interrupt.
Normally you should use Z3_interrupt to cancel solvers because only one solver is enabled concurrently per context. However, per GitHub issue #1006, there are use cases where it is more convenient to cancel a specific solver. Solvers that are not selected for interrupts are left alone.