diff --git a/src/base/backend_intf.ml b/src/base/backend_intf.ml index bd80cb798..55eab5e8d 100644 --- a/src/base/backend_intf.ml +++ b/src/base/backend_intf.ml @@ -23,6 +23,10 @@ module type Constraint_system_intf = sig val get_public_input_size : t -> int Core_kernel.Set_once.t val get_rows_len : t -> int + + val num_constraints : t -> int + + val to_asm : t -> string end module type S = sig diff --git a/src/base/snark0.ml b/src/base/snark0.ml index 11ffde363..7da2996a4 100644 --- a/src/base/snark0.ml +++ b/src/base/snark0.ml @@ -645,7 +645,7 @@ struct end end -(** The main functor for the monadic interface. +(** The main functor for the monadic interface. See [Run.Make] for the same thing but for the imperative interface. *) module Make (Backend : Backend_intf.S) = struct module Backend_extended = Backend_extended.Make (Backend) @@ -1263,8 +1263,8 @@ module Run = struct let inject_wrapper ~f x = f x in inject_wrapper ~f (x a) - (** Caches the global [state] before running [f]. - It is expected that [f] will reset the global state for its own use only, + (** Caches the global [state] before running [f]. + It is expected that [f] will reset the global state for its own use only, hence why we need to reset it after running [f].*) let finalize_is_running f = let cached_state = !state in diff --git a/src/base/snark_intf.ml b/src/base/snark_intf.ml index 465daf208..0f53bd386 100644 --- a/src/base/snark_intf.ml +++ b/src/base/snark_intf.ml @@ -1117,6 +1117,10 @@ module type Run_basic = sig val get_public_input_size : t -> int Core_kernel.Set_once.t val get_rows_len : t -> int + + val num_constraints : t -> int + + val to_asm : t -> string end (** The finite field over which the R1CS operates. *)