mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-09 12:45:48 -05:00
Added dummy arguments to some functors
Some functors lacked a dummy argument, and thus could introduce some problems if duplicated (because they would share the same internal state).
This commit is contained in:
parent
a6a44445c7
commit
b6effe691c
11 changed files with 20 additions and 14 deletions
|
|
@ -23,7 +23,7 @@ as shown in the following code :
|
||||||
```ocaml
|
```ocaml
|
||||||
(* Module initialization *)
|
(* Module initialization *)
|
||||||
module F = Msat.Sat.Tseitin
|
module F = Msat.Sat.Tseitin
|
||||||
module Sat = Msat.Sat.Make(Msat.Log)
|
module Sat = Msat.Sat.Make()
|
||||||
|
|
||||||
(* We create here two distinct atoms *)
|
(* We create here two distinct atoms *)
|
||||||
let a = Sat.new_atom () (* A 'new_atom' is always distinct from any other atom *)
|
let a = Sat.new_atom () (* A 'new_atom' is always distinct from any other atom *)
|
||||||
|
|
|
||||||
8
_tags
8
_tags
|
|
@ -6,10 +6,10 @@
|
||||||
<backend/*.cmx>: for-pack(Msat)
|
<backend/*.cmx>: for-pack(Msat)
|
||||||
|
|
||||||
# enable stronger inlining everywhere
|
# enable stronger inlining everywhere
|
||||||
#<util/{vec,hashcons,hstring,iheap}.cmx>: inline(100)
|
<util/{vec,hashcons,hstring,iheap}.cmx>: inline(100)
|
||||||
#<solver/*.cmx>: inline(50)
|
<solver/*.cmx>: inline(50)
|
||||||
#<sat/**/*.cmx>: inline(100)
|
<sat/**/*.cmx>: inline(100)
|
||||||
#<smt/**/*.cmx>: inline(100)
|
<smt/**/*.cmx>: inline(100)
|
||||||
<util/log.cmx>: inline(30)
|
<util/log.cmx>: inline(30)
|
||||||
|
|
||||||
# more warnings
|
# more warnings
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ module Tseitin = Tseitin.Make(Fsat)
|
||||||
module Make(Dummy : sig end) = struct
|
module Make(Dummy : sig end) = struct
|
||||||
|
|
||||||
module Tsat = Solver.DummyTheory(Fsat)
|
module Tsat = Solver.DummyTheory(Fsat)
|
||||||
include Solver.Make(Fsat)(Tsat)
|
include Solver.Make(Fsat)(Tsat)()
|
||||||
|
|
||||||
let print_atom = Fsat.print
|
let print_atom = Fsat.print
|
||||||
let print_clause = St.print_clause
|
let print_clause = St.print_clause
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@ end
|
||||||
|
|
||||||
module Make(Dummy:sig end) = struct
|
module Make(Dummy:sig end) = struct
|
||||||
|
|
||||||
module SmtSolver = Mcsolver.Make(Fsmt)(Tsmt)
|
module SmtSolver = Mcsolver.Make(Fsmt)(Tsmt)()
|
||||||
|
|
||||||
module Proof = SmtSolver.Proof
|
module Proof = SmtSolver.Proof
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ end
|
||||||
|
|
||||||
module Make(Dummy:sig end) = struct
|
module Make(Dummy:sig end) = struct
|
||||||
|
|
||||||
include Solver.Make(Fsmt)(Tsmt)
|
include Solver.Make(Fsmt)(Tsmt)()
|
||||||
module Dot = Dot.Make(Proof)(struct
|
module Dot = Dot.Make(Proof)(struct
|
||||||
let clause_name c = St.(c.name)
|
let clause_name c = St.(c.name)
|
||||||
let print_atom = St.print_atom
|
let print_atom = St.print_atom
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ Copyright 2014 Simon Cruanes
|
||||||
module Make
|
module Make
|
||||||
(St : Solver_types.S)
|
(St : Solver_types.S)
|
||||||
(Th : Plugin_intf.S with type term = St.term and type formula = St.formula and type proof = St.proof)
|
(Th : Plugin_intf.S with type term = St.term and type formula = St.formula and type proof = St.proof)
|
||||||
|
(Dummy: sig end)
|
||||||
= struct
|
= struct
|
||||||
|
|
||||||
module Proof = Res.Make(St)
|
module Proof = Res.Make(St)
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ Copyright 2014 Simon Cruanes
|
||||||
module Make
|
module Make
|
||||||
(St : Solver_types.S)
|
(St : Solver_types.S)
|
||||||
(Th : Plugin_intf.S with type term = St.term and type formula = St.formula and type proof = St.proof)
|
(Th : Plugin_intf.S with type term = St.term and type formula = St.formula and type proof = St.proof)
|
||||||
|
(Dummy: sig end)
|
||||||
: sig
|
: sig
|
||||||
(** Functor to create a solver parametrised by the atomic formulas and a theory. *)
|
(** Functor to create a solver parametrised by the atomic formulas and a theory. *)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,12 @@ Copyright 2014 Simon Cruanes
|
||||||
*)
|
*)
|
||||||
|
|
||||||
module Make (E : Expr_intf.S)
|
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) = struct
|
(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)
|
||||||
|
|
||||||
module M = Internal.Make(St)(Th)
|
module M = Internal.Make(St)(Th)()
|
||||||
|
|
||||||
include St
|
include St
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,8 @@ Copyright 2014 Simon Cruanes
|
||||||
*)
|
*)
|
||||||
|
|
||||||
module Make (E : Expr_intf.S)
|
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) : sig
|
(Th : Plugin_intf.S with type term = E.Term.t and type formula = E.Formula.t and type proof = E.proof)
|
||||||
|
(Dummy: sig end) : sig
|
||||||
(** Functor to create a solver parametrised by the atomic formulas and a theory. *)
|
(** Functor to create a solver parametrised by the atomic formulas and a theory. *)
|
||||||
|
|
||||||
exception Unsat
|
exception Unsat
|
||||||
|
|
|
||||||
|
|
@ -99,13 +99,14 @@ end
|
||||||
|
|
||||||
|
|
||||||
module Make (E : Formula_intf.S)
|
module Make (E : Formula_intf.S)
|
||||||
(Th : Theory_intf.S with type formula = E.t and type proof = E.proof) = struct
|
(Th : Theory_intf.S with type formula = E.t and type proof = E.proof)
|
||||||
|
(Dummy: sig end) = struct
|
||||||
|
|
||||||
module P = Plugin(E)(Th)
|
module P = Plugin(E)(Th)
|
||||||
|
|
||||||
module St = Solver_types.SatMake(E)
|
module St = Solver_types.SatMake(E)
|
||||||
|
|
||||||
module S = Internal.Make(St)(P)
|
module S = Internal.Make(St)(P)()
|
||||||
|
|
||||||
module Proof = S.Proof
|
module Proof = S.Proof
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,8 @@ module DummyTheory(F : Formula_intf.S with type proof = unit) :
|
||||||
Theory_intf.S with type formula = F.t and type proof = unit
|
Theory_intf.S with type formula = F.t and type proof = unit
|
||||||
|
|
||||||
module Make (F : Formula_intf.S)
|
module Make (F : Formula_intf.S)
|
||||||
(Th : Theory_intf.S with type formula = F.t and type proof = F.proof) :
|
(Th : Theory_intf.S with type formula = F.t and type proof = F.proof)
|
||||||
|
(Dummy: sig end) :
|
||||||
S with type St.formula = F.t
|
S with type St.formula = F.t
|
||||||
and type St.proof = F.proof
|
and type St.proof = F.proof
|
||||||
(** Functor to create a SMT Solver parametrised by the atomic
|
(** Functor to create a SMT Solver parametrised by the atomic
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue