[bugfix/minor] Ensure generativity of solver_types

This ensures that the same solver_types module is not reused
for two different solvers, which would be problematic.
Marked minor because of the low use of multiple instances of a solver.
This commit is contained in:
Guillaume Bury 2016-04-15 13:30:46 +02:00
parent dcde8de10d
commit f88a5dd514
4 changed files with 7 additions and 7 deletions

View file

@ -8,7 +8,7 @@ module Make (E : Expr_intf.S)
(Th : Plugin_intf.S with type term = E.Term.t and type formula = E.Formula.t and type proof = E.proof)
(Dummy: sig end) = struct
module St = Solver_types.McMake(E)
module St = Solver_types.McMake(E)(struct end)
module M = Internal.Make(St)(Th)(struct end)

View file

@ -104,7 +104,7 @@ module Make (E : Formula_intf.S)
module P = Plugin(E)(Th)
module St = Solver_types.SatMake(E)
module St = Solver_types.SatMake(E)(struct end)
module S = Internal.Make(St)(P)(struct end)

View file

@ -18,7 +18,7 @@ module type S = Solver_types_intf.S
(* Solver types for McSat Solving *)
(* ************************************************************************ *)
module McMake (E : Expr_intf.S) = struct
module McMake (E : Expr_intf.S)(Dummy : sig end) = struct
(* Flag for Mcsat v.s Pure Sat *)
let mcsat = true
@ -297,12 +297,12 @@ end
(* Solver types for pure SAT Solving *)
(* ************************************************************************ *)
module SatMake (E : Formula_intf.S) = struct
module SatMake (E : Formula_intf.S)(Dummy : sig end) = struct
include McMake(struct
include E
module Term = E
module Formula = E
end)
end)(struct end)
let mcsat = false
end

View file

@ -14,12 +14,12 @@
module type S = Solver_types_intf.S
module McMake :
functor (E : Expr_intf.S) ->
functor (E : Expr_intf.S)(Dummy : sig end) ->
S with type term = E.Term.t and type formula = E.Formula.t and type proof = E.proof
(** Functor to instantiate the types of clauses for a solver. *)
module SatMake :
functor (E : Formula_intf.S) ->
functor (E : Formula_intf.S)(Dummy : sig end) ->
S with type term = E.t and type formula = E.t and type proof = E.proof
(** Functor to instantiate the types of clauses for a solver. *)