From 154cb373fcddb8e4124bd7ac937e8bbb819f293e Mon Sep 17 00:00:00 2001 From: Guillaume Bury Date: Mon, 27 Mar 2017 16:32:25 +0200 Subject: [PATCH] Add generativity of Dimacs functor Since the dimacs functor has an internal state (relating to the output in iCNF format), it is desirable to have a generative functor, inc as esomeone wants to output select parts of a problem to two distinct iCNF files). --- src/backend/dimacs.ml | 2 +- src/backend/dimacs.mli | 2 +- src/core/external.ml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backend/dimacs.ml b/src/backend/dimacs.ml index 922e44ed..202392e1 100644 --- a/src/backend/dimacs.ml +++ b/src/backend/dimacs.ml @@ -30,7 +30,7 @@ module type S = sig end -module Make(St : Solver_types.S) = struct +module Make(St : Solver_types.S)(Dummy: sig end) = struct (* Dimacs & iCNF export *) let export_vec name fmt vec = diff --git a/src/backend/dimacs.mli b/src/backend/dimacs.mli index b352d062..0bb18a94 100644 --- a/src/backend/dimacs.mli +++ b/src/backend/dimacs.mli @@ -40,6 +40,6 @@ module type S = sig end -module Make(St: Solver_types.S) : S with type clause := St.clause +module Make(St: Solver_types.S)(Dummy: sig end) : S with type clause := St.clause (** Functor to create a module for exporting probems to the dimacs (& iCNF) formats. *) diff --git a/src/core/external.ml b/src/core/external.ml index fa8175fe..fb5e03d1 100644 --- a/src/core/external.ml +++ b/src/core/external.ml @@ -120,7 +120,7 @@ module Make let new_atom = S.new_atom (* Dimacs & iCNF export *) - module D = Dimacs.Make(St) + module D = Dimacs.Make(St)(struct end) let export_dimacs fmt () = let hyps = S.hyps () in