mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-11 13:38:43 -05:00
refactor: move Hash to util/; fix some warnings
This commit is contained in:
parent
b8fd24ea7b
commit
128e7dceb8
4 changed files with 1 additions and 10 deletions
|
|
@ -31,8 +31,6 @@ module Make(A : ARG)
|
||||||
let[@inline] sign t = t.lit_sign
|
let[@inline] sign t = t.lit_sign
|
||||||
let[@inline] term (t:t): term = t.lit_term
|
let[@inline] term (t:t): term = t.lit_term
|
||||||
|
|
||||||
let[@inline] abs t: t = {t with lit_sign=true}
|
|
||||||
|
|
||||||
let make ~sign t = {lit_sign=sign; lit_term=t}
|
let make ~sign t = {lit_sign=sign; lit_term=t}
|
||||||
|
|
||||||
let atom tst ?(sign=true) (t:term) : t =
|
let atom tst ?(sign=true) (t:term) : t =
|
||||||
|
|
@ -40,8 +38,6 @@ module Make(A : ARG)
|
||||||
let sign = if not sign' then not sign else sign in
|
let sign = if not sign' then not sign else sign in
|
||||||
make ~sign t
|
make ~sign t
|
||||||
|
|
||||||
let[@inline] as_atom (lit:t) = lit.lit_term, lit.lit_sign
|
|
||||||
|
|
||||||
let equal a b =
|
let equal a b =
|
||||||
a.lit_sign = b.lit_sign &&
|
a.lit_sign = b.lit_sign &&
|
||||||
T.equal a.lit_term b.lit_term
|
T.equal a.lit_term b.lit_term
|
||||||
|
|
@ -54,8 +50,6 @@ module Make(A : ARG)
|
||||||
if l.lit_sign then T.pp out l.lit_term
|
if l.lit_sign then T.pp out l.lit_term
|
||||||
else Format.fprintf out "(@[@<1>¬@ %a@])" T.pp l.lit_term
|
else Format.fprintf out "(@[@<1>¬@ %a@])" T.pp l.lit_term
|
||||||
|
|
||||||
let print = pp
|
|
||||||
|
|
||||||
let apply_sign t s = if s then t else neg t
|
let apply_sign t s = if s then t else neg t
|
||||||
let norm_sign l = if l.lit_sign then l, true else neg l, false
|
let norm_sign l = if l.lit_sign then l, true else neg l, false
|
||||||
let norm l = let l, sign = norm_sign l in l, if sign then Msat.Same_sign else Msat.Negated
|
let norm l = let l, sign = norm_sign l in l, if sign then Msat.Same_sign else Msat.Negated
|
||||||
|
|
@ -365,9 +359,6 @@ module Make(A : ARG)
|
||||||
(** the parametrized SAT Solver *)
|
(** the parametrized SAT Solver *)
|
||||||
module Sat_solver = Msat.Make_cdcl_t(Solver_internal)
|
module Sat_solver = Msat.Make_cdcl_t(Solver_internal)
|
||||||
|
|
||||||
let[@inline] clause_of_mclause (c:Sat_solver.clause): Lit.t IArray.t =
|
|
||||||
Sat_solver.Clause.atoms c |> Array.map Sat_solver.Atom.formula |> IArray.of_array_unsafe
|
|
||||||
|
|
||||||
module Atom = Sat_solver.Atom
|
module Atom = Sat_solver.Atom
|
||||||
module Proof = struct
|
module Proof = struct
|
||||||
include Sat_solver.Proof
|
include Sat_solver.Proof
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
(* re-exports *)
|
(* re-exports *)
|
||||||
module Fmt = CCFormat
|
module Fmt = CCFormat
|
||||||
module Vec = Msat.Vec
|
module Vec = Msat.Vec
|
||||||
|
|
@ -11,3 +10,4 @@ module IArray = IArray
|
||||||
module Intf = Intf
|
module Intf = Intf
|
||||||
module Bag = Bag
|
module Bag = Bag
|
||||||
module Stat = Stat
|
module Stat = Stat
|
||||||
|
module Hash = Hash
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue