package msat
Library containing a SAT solver that can be parametrized by a theory
Install
Dune Dependency
Authors
Maintainers
Sources
v0.8.2.tar.gz
md5=c02d63bf45357aa1d1b85846da373f48
sha512=e6f0d7f6e4fe69938ec2cc3233b0cb72dd577bfb4cc4824afe8247f5db0b6ffea2d38d73a65e7ede500d21ff8db27ed12f2c4f3245df4451d02864260ae2ddaf
doc/src/msat.sat/Int_lit.ml.html
Source file Int_lit.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
exception Bad_atom (** Exception raised if an atom cannot be created *) type t = int (** Atoms are represented as integers. [-i] begin the negation of [i]. Additionally, since we nee dot be able to create fresh atoms, we use even integers for user-created atoms, and odd integers for the fresh atoms. *) let max_lit = max_int (* Counters *) let max_index = ref 0 let max_fresh = ref (-1) (** Internal function for creating atoms. Updates the internal counters *) let _make i = if i <> 0 && (abs i) < max_lit then begin max_index := max !max_index (abs i); i end else raise Bad_atom let to_int i = i (** *) let neg a = - a let norm a = abs a, if a < 0 then Solver_intf.Negated else Solver_intf.Same_sign let abs = abs let sign i = i > 0 let apply_sign b i = if b then i else neg i let set_sign b i = if b then abs i else neg (abs i) let hash (a:int) = a land max_int let equal (a:int) b = a=b let compare (a:int) b = compare a b let make i = _make (2 * i) let fresh () = incr max_fresh; _make (2 * !max_fresh + 1) (* let iter: (t -> unit) -> unit = fun f -> for j = 1 to !max_index do f j done *) let pp fmt a = Format.fprintf fmt "%s%s%d" (if a < 0 then "~" else "") (if a mod 2 = 0 then "v" else "f") ((abs a) / 2)
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>