Process.Solvermodule T : Sidekick_core.TERM with type Term.t = Sidekick_base.Term.t with type Term.store = Sidekick_base.Term.store with type Ty.t = Sidekick_base.Ty.t with type Ty.store = Sidekick_base.Ty.storemodule Lit : Sidekick_core.LIT with module T = Ttype proof = Sidekick_base.Proof.tmodule P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type proof_step = proof_step and type term = T.Term.tmodule Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step and module P = PInternal solver, available to theories.
type solver = ttype term = T.Term.ttype ty = T.Ty.ttype lit = Lit.tmodule type THEORY = sig ... endtype theory = (module THEORY)A theory that can be used for this particular solver.
A theory that can be used for this particular solver, with state of type 'a.
val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) ->
?push_level:('th -> unit) -> ?pop_levels:('th -> int -> unit) -> unit -> theoryHelper to create a theory.
module Model : sig ... endModels
module Unknown : sig ... endval stats : t -> Sidekick_util.Stat.tval tst : t -> T.Term.storeval ty_st : t -> T.Ty.storeval create : ?stat:Sidekick_util.Stat.t -> ?size:[ `Big | `Tiny | `Small ] -> proof:proof -> theories:theory list ->
T.Term.store -> T.Ty.store -> unit -> tCreate a new solver.
It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.
Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).
mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.
The proof of |- lit = lit' is directly added to the solver's proof.
val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unitadd_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.
val add_clause_l : t -> lit list -> proof_step -> unitAdd a clause to the solver, given as a list.
Helper that turns each term into an atom, before adding the result to the solver as an assertion
Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion
type res = | Sat of Model.t | (* Satisfiable *) | ||||
| Unsat of {
} | (* Unsatisfiable *) | ||||
| Unknown of Unknown.t | (* Unknown, obtained after a timeout, memory limit, etc. *) |
Result of solving for the current set of clauses
val solve : ?on_exit:(unit -> unit) list -> ?check:bool -> ?on_progress:(t -> unit) ->
?should_stop:(t -> int -> bool) -> assumptions:lit list -> t -> ressolve s checks the satisfiability of the clauses added so far to s.
Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.
val pop_assumptions : t -> int -> unitpop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions. Note that check_sat_propagations_only can call this if it meets a conflict.
type propagation_result = | PR_sat | |
| PR_conflict of {
} | |
| PR_unsat of {
} |
val check_sat_propagations_only : assumptions:lit list -> t -> propagation_resultcheck_sat_propagations_only solver uses assumptions (including the assumptions parameter, and atoms previously added via push_assumptions) and boolean+theory propagation to quickly assess satisfiability. It is not complete; calling solve is required to get an accurate result.
val pp_stats : t CCFormat.printerPrint some statistics. What it prints exactly is unspecified.