Skip to content

Commit 723f7f7

Browse files
committed
Adds S_with_fresh
1 parent 4bb20f0 commit 723f7f7

File tree

8 files changed

+22
-11
lines changed

8 files changed

+22
-11
lines changed

bin/main.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ let prove_mode_conv =
3434

3535
let parse_cmdline =
3636
let aux files solver prover_mode debug print_statistics =
37-
let module Mappings = (val mappings_of_solver solver : Mappings_intf.S) in
37+
let module Mappings =
38+
(val mappings_of_solver solver : Mappings_intf.S_with_fresh)
39+
in
3840
Mappings.set_debug debug;
3941
let module Solver =
4042
( val match prover_mode with

lib/bitwuzla_mappings.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
(***************************************************************************)
1818

1919
(** @inline *)
20-
include Mappings_intf.S
20+
include Mappings_intf.S_with_fresh

lib/colibri2_mappings.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
(* along with this program. If not, see <https://www.gnu.org/licenses/>. *)
1818
(***************************************************************************)
1919

20-
include Mappings_intf.S
20+
include Mappings_intf.S_with_fresh

lib/cvc5_mappings.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
(***************************************************************************)
1818

1919
(** @inline *)
20-
include Mappings_intf.S
20+
include Mappings_intf.S_with_fresh

lib/mappings.nop.ml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,4 +369,8 @@ end
369369

370370
module Impl' : M = Impl
371371

372-
include Mappings.Make (Impl)
372+
module Fresh = struct
373+
module Make () = Mappings.Make (Impl)
374+
end
375+
376+
include Fresh.Make ()

lib/mappings_intf.ml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,3 +447,11 @@ module type S = sig
447447
val pp_statistics : Format.formatter -> optimize -> unit
448448
end
449449
end
450+
451+
module type S_with_fresh = sig
452+
module Fresh : sig
453+
module Make () : S
454+
end
455+
456+
include S
457+
end

lib/solver_dispatcher.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ type solver_type =
55
| Colibri2_solver
66
| Bitwuzla_solver
77

8-
let mappings_of_solver : solver_type -> (module Mappings_intf.S) = function
8+
let mappings_of_solver : solver_type -> (module Mappings_intf.S_with_fresh) =
9+
function
910
| Z3_solver -> (module Z3_mappings)
1011
| Cvc5_solver -> (module Cvc5_mappings)
1112
| Colibri2_solver -> (module Colibri2_mappings)

lib/z3_mappings.mli

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,5 @@
1616
(* along with this program. If not, see <https://www.gnu.org/licenses/>. *)
1717
(***************************************************************************)
1818

19-
module Fresh : sig
20-
module Make () : Mappings_intf.S
21-
end
22-
2319
(** @inline *)
24-
include Mappings_intf.S
20+
include Mappings_intf.S_with_fresh

0 commit comments

Comments
 (0)