package msat
Library containing a SAT solver that can be parametrized by a theory
Install
dune-project
Dependency
Authors
Maintainers
Sources
v0.8.tar.gz
md5=fe2f507bff99166ad2004786ca1ae59b
sha512=4cd653218e1767152c1d66700ccfc421d6d2da6ddffc8af4ee9151a3b5d25920f9d735a416f962227ffe458bb56e1f1977d180dd91415d37af9e1ea41dbb1045
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 = Pervasives.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)"
>