MinisatBasic set of OCaml bindings for the MiniSat SAT solver.
val pp_var :
Ppx_deriving_runtime.Format.formatter ->
var ->
Ppx_deriving_runtime.unitval show_var : var -> Ppx_deriving_runtime.stringval pp_lit :
Ppx_deriving_runtime.Format.formatter ->
lit ->
Ppx_deriving_runtime.unitval show_lit : lit -> Ppx_deriving_runtime.stringtype stat = {v : int;Number of variables.
*)c : int;Number of clauses.
*)mem : float;Memory used in MB.
*)cpu : float;CPU time in seconds.
*)}The type of MiniSAT solver statistics.
val create : unit -> tCreate a MiniSAT instance.
Add a clause (i.e. disjunction of literals) to the set of problem constraints. A clause is represented as a list of literals.
val add_clause_empty : t -> unitval set_verbosity : t -> int -> unitSet verbosity level (0=silent, 1=some, 2=more).
val simplify : t -> unitsimplify can be called before solve to simplify the set of problem constraints. It will first propagate all unit information and then remove all satisfied constraints.
val okay : t -> boolokay s is false if the solver has already derived a contradiction from the currently added constraints.
Note. A return value of true does not guarantee satisfiability.
Return the value associated to a variable. Note, this method can only be invoked after solve returned SAT.
Raises Invalid_argument when the input variable is not a valid index.
Return a list of valid models. Note, only true variables are included in each model. Optional argument vars is a list of variables that are banned at each iteration. If this argument is missing all variables are banned.
Return some current statistics. Note, this method can only be invoked after solve has been invoked.
Cumulative user CPU time (seconds) for the process, as measured by the solver's C layer. Monotonic; not reset per solve.
val print_stats : t -> unitPrint some current statistics to standard output. Note, this method can only be invoked after solve has been invoked.
val string_of_value : value -> stringConvert a value to a string.