Run.Makemodule Backend : Snarky_backendless.Backend_intf.Sinclude Snarky_backendless.Snark_intf.Run_basic
with type field = Backend.Field.t
with type Bigint.t = Backend.Bigint.t
with type R1CS_constraint_system.t = Backend.R1CS_constraint_system.t
with type Field.Constant.Vector.t = Backend.Field.Vector.tmodule R1CS_constraint_system : sig ... endThe rank-1 constraint system used by this instance. See Backend_intf.S.R1CS_constraint_system.
type field = Backend.Field.tThe finite field over which the R1CS operates.
module Bigint : sig ... endmodule Constraint :
Snarky_backendless.Snark_intf.Constraint_intf
with type field := Field.Constant.t
and type field_var := Field.tRank-1 constraints over Field.ts.
module Typ :
Snarky_backendless.Snark_intf.Typ_intf
with type field := Field.Constant.t
and type field_var := Field.t
and type checked_unit := unit Internal_Basic.Checked.t
and type _ checked := unit
and type ('a, 'b, 'c, 'd) data_spec :=
( 'a, 'b, 'c, 'd, field, unit Internal_Basic.Checked.t )
Snarky_backendless.Snark_intf.Typ0.Data_spec0.data_spec
and type 'a prover_ref := 'a As_prover.Ref.tMappings from OCaml types to R1CS variables and constraints.
module Boolean :
Snarky_backendless.Snark_intf.Boolean_intf
with type var = Field.t Snarky_backendless.Snark_intf.Boolean0.t
and type field_var := Field.t
and type 'a checked := 'a
and type ('var, 'value) typ := ( 'var, 'value ) Typ.tRepresentation of booleans within a field.
module Field : sig ... endmodule As_prover : sig ... endThe functions in this module may only be run as the prover; trying to run them outside of functions that refer to As_prover.t will result in a runtime error.
module Proof_inputs : sig ... endmodule Internal_Basic :
Snarky_backendless.Snark_intf.Basic
with type field = field
and type 'a Checked.t =
( 'a, field ) Snarky_backendless.Checked_runner.Simple.t
and type 'a As_prover.Ref.t = 'a As_prover.Ref.tmodule Bitstring_checked : sig ... endmodule Handle : sig ... endtype response = Snarky_backendless.Request.responseval unhandled : responsetype request = Snarky_backendless.Request.request = | With : {
} -> request |
module Handler : sig ... endval assert_ : ?label:string -> Constraint.t -> unitval assert_all : ?label:string -> Constraint.t list -> unitval as_prover : ( unit -> unit ) As_prover.t -> unitval request_witness :
( 'var, 'value ) Typ.t ->
( unit -> 'value Snarky_backendless.Request.t ) As_prover.t ->
'varval perform : ( unit -> unit Snarky_backendless.Request.t ) As_prover.t -> unitval request :
?such_that:( 'var -> unit ) ->
( 'var, 'value ) Typ.t ->
'value Snarky_backendless.Request.t ->
'varTODO: Come up with a better name for this in relation to the above
val exists :
?request:( unit -> 'value Snarky_backendless.Request.t ) As_prover.t ->
?compute:( unit -> 'value ) As_prover.t ->
( 'var, 'value ) Typ.t ->
'varval exists_handle :
?request:( unit -> 'value Snarky_backendless.Request.t ) As_prover.t ->
?compute:( unit -> 'value ) As_prover.t ->
( 'var, 'value ) Typ.t ->
( 'var, 'value ) Handle.tval handle : ( unit -> 'a ) -> Handler.t -> 'aval handle_as_prover :
( unit -> 'a ) ->
( unit -> Handler.t As_prover.t ) ->
'aval if_ :
Boolean.var ->
typ:( 'var, _ ) Typ.t ->
then_:'var ->
else_:'var ->
'varif_ b ~then_ ~else_ returns then_ if b is true, or else_ otherwise.
WARNING: The Typ.t's read field must be able to construct values from a series of field zeros.
val make_checked : ( unit -> 'a ) -> 'a Internal_Basic.Checked.tval constraint_system :
input_typ:( 'input_var, 'input_value ) Typ.t ->
return_typ:( 'a, _ ) Typ.t ->
( 'input_var -> unit -> 'a ) ->
R1CS_constraint_system.tval generate_witness :
input_typ:( 'input_var, 'input_value ) Typ.t ->
return_typ:( 'a, _ ) Typ.t ->
( 'input_var -> unit -> 'a ) ->
'input_value ->
Proof_inputs.tval generate_public_input :
( 'input_var, 'input_value ) Typ.t ->
'input_value ->
Field.Constant.Vector.tGenerate the public input vector for a given statement.
val generate_witness_conv :
f:( Proof_inputs.t -> 'r_value -> 'out ) ->
input_typ:( 'input_var, 'input_value ) Typ.t ->
return_typ:( 'r_var, 'r_value ) Typ.t ->
( 'input_var -> unit -> 'r_var ) ->
'input_value ->
'outval run_and_check :
( unit -> ( unit -> 'a ) As_prover.t ) ->
'a Core_kernel.Or_error.tmodule Run_and_check_deferred (M : sig ... end) : sig ... endval constraint_count :
?weight:( Constraint.t -> int ) ->
?log:( ?start:bool -> string -> int -> unit ) ->
( unit -> 'a ) ->
intval set_constraint_logger :
( ?at_label_boundary:([ `Start | `End ] * string) ->
Constraint.t option ->
unit ) ->
unitval constant : ( 'var, 'value ) Typ.t -> 'value -> 'varReturn a constraint system constant representing the given value.
val run_checked : 'a Internal_Basic.Checked.t -> 'amodule Number :
Snarky_backendless.Number_intf.Run
with type field := field
and type field_var := Field.t
and type bool_var := Boolean.varmodule Enumerable
(M : sig ... end) :
Snarky_backendless.Enumerable_intf.Run
with type ('a, 'b) typ := ( 'a, 'b ) Typ.t
and type bool_var := Boolean.var
and type var = Field.t
and type t := M.t