mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-06 11:15:43 -05:00
Cleaned up map module in formulas
Removed a warning in explanation.ml
This commit is contained in:
parent
854c7e3f6e
commit
722cdc7d6d
4 changed files with 3 additions and 18 deletions
|
|
@ -28,7 +28,7 @@ module Make(Stypes : Solver_types.S) = struct
|
||||||
| Atom _, Fresh _ -> -1
|
| Atom _, Fresh _ -> -1
|
||||||
| Fresh _, Atom _ -> 1
|
| Fresh _, Atom _ -> 1
|
||||||
| Fresh i1, Fresh i2 -> i1 - i2
|
| Fresh i1, Fresh i2 -> i1 - i2
|
||||||
| Atom a, Atom b -> a.aid - b.aid
|
| Atom a, Atom b -> Stypes.(a.aid - b.aid)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
type t = S.t
|
type t = S.t
|
||||||
|
|
|
||||||
|
|
@ -34,8 +34,5 @@ module type S = sig
|
||||||
val add_label : Hstring.t -> t -> unit
|
val add_label : Hstring.t -> t -> unit
|
||||||
|
|
||||||
val print : Format.formatter -> t -> unit
|
val print : Format.formatter -> t -> unit
|
||||||
|
|
||||||
module Map : Map.S with type key = t
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -951,3 +951,4 @@ module Make (F : Formula_intf.S)
|
||||||
if negated then not truth else truth
|
if negated then not truth else truth
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ module Make (F : Formula_intf.S) = struct
|
||||||
learnt = false;
|
learnt = false;
|
||||||
cpremise = [] }
|
cpremise = [] }
|
||||||
|
|
||||||
module MA = F.Map
|
module MA = Map.Make(F)
|
||||||
type varmap = var MA.t
|
type varmap = var MA.t
|
||||||
|
|
||||||
let ale = Hstring.make "<="
|
let ale = Hstring.make "<="
|
||||||
|
|
@ -158,19 +158,6 @@ module Make (F : Formula_intf.S) = struct
|
||||||
let cpt = ref 0 in
|
let cpt = ref 0 in
|
||||||
fun () -> incr cpt; "C" ^ (string_of_int !cpt)
|
fun () -> incr cpt; "C" ^ (string_of_int !cpt)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
module Clause = struct
|
|
||||||
|
|
||||||
let size c = Vec.size c.atoms
|
|
||||||
let pop c = Vec.pop c.atoms
|
|
||||||
let shrink c i = Vec.shrink c.atoms i
|
|
||||||
let last c = Vec.last c.atoms
|
|
||||||
let get c i = Vec.get c.atoms i
|
|
||||||
let set c i v = Vec.set c.atoms i v
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
let to_float i = float_of_int i
|
let to_float i = float_of_int i
|
||||||
|
|
||||||
let to_int f = int_of_float f
|
let to_int f = int_of_float f
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue