package batsat

  1. Overview
  2. Docs
OCaml bindings for batsat, a SAT solver in rust

Install

dune-project
 Dependency

Authors

Maintainers

Sources

0.4.tar.gz
md5=120605f7eb26f5af7430906783107a69
sha512=36d1a9d6e8302d43049094c33103bcca71f575908406315f3830c9595dfb5053d6a79034344200d53276e4e8db9bf386d693594ca4eb51a31399152cc8c6bdf8

doc/batsat/Batsat/index.html

Module BatsatSource

Bindings to Batsat

Sourcetype t

An instance of batsat (stateful)

Sourcetype 'a printer = Format.formatter -> 'a -> unit
Sourcemodule Lit : sig ... end
Sourcetype assumptions = Lit.t array
Sourceval create : unit -> t
Sourceexception Unsat
Sourceval add_clause_l : t -> Lit.t list -> unit
  • raises Unsat

    if the problem is unsat

Sourceval add_clause_a : t -> Lit.t array -> unit
  • raises Unsat

    if the problem is unsat

Sourceval pp_clause : Lit.t list printer
Sourceval simplify : t -> unit
  • raises Unsat

    if the problem is unsat

Sourceval solve : ?assumptions:assumptions -> t -> unit
  • raises Unsat

    if the problem is unsat

Sourceval n_vars : t -> int
Sourceval n_clauses : t -> int
Sourceval n_conflicts : t -> int
Sourceval n_props : t -> int

Number of SAT propagations

  • since NEXT_RELEASE
Sourceval n_decisions : t -> int

Number of SAT decisions

  • since NEXT_RELEASE
Sourceval is_in_unsat_core : t -> Lit.t -> bool

is_in_unsat_core s lit checks whether abs(lit) is part of the unsat core (if it was an assumption) precondition: last call to solve raised Unsat

Sourceval unsat_core : t -> Lit.t array

Access the whole unsat core precondition: last call to solve raised Unsat

Sourceval n_proved_lvl_0 : t -> int

Number of literals true at level0 (ie proved unconditionally). Can only grow.

Sourceval get_proved_lvl_0 : t -> int -> Lit.t

Get the n-th proved literal

Sourceval proved_lvl_0 : t -> Lit.t array

All literals currently proved at level 0

Sourcetype value =
  1. | V_undef
  2. | V_true
  3. | V_false
Sourceval pp_value : value printer
Sourceval string_of_value : value -> string
Sourceval value : t -> Lit.t -> value
Sourceval value_lvl_0 : t -> Lit.t -> value

value_lvl_0 solver lit returns the value of lit if it has this value at level 0 (proved), or V_undef otherwise