mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-06 03:05:31 -05:00
[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:
parent
dcde8de10d
commit
f88a5dd514
4 changed files with 7 additions and 7 deletions
|
|
@ -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)
|
(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
|
(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)
|
module M = Internal.Make(St)(Th)(struct end)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ module Make (E : Formula_intf.S)
|
||||||
|
|
||||||
module P = Plugin(E)(Th)
|
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)
|
module S = Internal.Make(St)(P)(struct end)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ module type S = Solver_types_intf.S
|
||||||
(* Solver types for McSat Solving *)
|
(* 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 *)
|
(* Flag for Mcsat v.s Pure Sat *)
|
||||||
let mcsat = true
|
let mcsat = true
|
||||||
|
|
@ -297,12 +297,12 @@ end
|
||||||
(* Solver types for pure SAT Solving *)
|
(* 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 McMake(struct
|
||||||
include E
|
include E
|
||||||
module Term = E
|
module Term = E
|
||||||
module Formula = E
|
module Formula = E
|
||||||
end)
|
end)(struct end)
|
||||||
|
|
||||||
let mcsat = false
|
let mcsat = false
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -14,12 +14,12 @@
|
||||||
module type S = Solver_types_intf.S
|
module type S = Solver_types_intf.S
|
||||||
|
|
||||||
module McMake :
|
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
|
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. *)
|
(** Functor to instantiate the types of clauses for a solver. *)
|
||||||
|
|
||||||
module SatMake :
|
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
|
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. *)
|
(** Functor to instantiate the types of clauses for a solver. *)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue