text
stringlengths
0
601k
let check_protocol_activation ~ migrate_from ~ migrate_to ~ block client = let * migration_block = RPC . get_block_metadata ~ block client in let protocol = JSON . ( migration_block |-> " protocol " |> as_string ) in Check . ( ( protocol = Protocol . hash migrate_from ) string ~ error_msg " : expected protocol = % R , ...
let wait_for_protocol_table_update node = let filter json = let proto_hash = JSON . ( json |-> " proto_hash " |> as_string_opt ) in let block_hash = JSON . ( json |-> " block_hash " |> as_string_opt ) in match ( proto_hash , block_hash ) with | ( Some ph , Some bh ) -> Some ( ph , bh ) | _ -> None in let * activation_b...
let test_protocol_table_update ~ migrate_from ~ migrate_to = Test . register ~ __FILE__ ~ title " : protocol activation " ~ tags [ " : protocol " ; " table " ; " update " ] @@ fun ( ) -> let node_1 = Node . create [ Synchronisation_threshold 0 ] in let node_2 = Node . create [ Synchronisation_threshold 0 ] in let migra...
let register ~ migrate_from ~ migrate_to = test_protocol_table_update ~ migrate_from ~ migrate_to
type t = { db : Distributed_db . t ; mutable worker : unit Lwt . t ; request : unit Lwt_condition . t ; mutable pending : ( Protocol . t * Registered_protocol . t tzresult Lwt . t * Registered_protocol . t tzresult Lwt . u ) Protocol_hash . Map . t ; canceler : Lwt_canceler . t ; }
let rec worker_loop bv = ( match Protocol_hash . Map . choose bv . pending with | None -> Lwt_condition . wait bv . request >>= return | Some ( hash , ( protocol , _ , wakener ) ) -> bv . pending <- Protocol_hash . Map . remove hash bv . pending ; Updater . compile hash protocol >>= fun valid -> if valid then ( Distrib...
let create db = let canceler = Lwt_canceler . create ( ) in let pending = Protocol_hash . Map . empty in let request = Lwt_condition . create ( ) in let bv = { canceler ; pending ; request ; db ; worker = Lwt . return_unit } in Lwt_canceler . on_cancel bv . canceler ( fun ( ) -> Protocol_hash . Map . iter ( fun _ ( _ ,...
let shutdown { canceler ; worker ; _ } = Error_monad . cancel_with_exceptions canceler >>= fun ( ) -> worker
let validate state hash protocol = match Registered_protocol . get hash with | Some protocol -> Protocol_validator_event . ( emit previously_validated_protocol ) hash >>= fun ( ) -> return protocol | None -> ( Protocol_validator_event . ( emit pushing_protocol_validation ) hash >>= fun ( ) -> match Protocol_hash . Map ...
let fetch_and_compile_protocol pv ? peer ? timeout hash = match Registered_protocol . get hash with | Some proto -> return proto | None -> ( Distributed_db . Protocol . read_opt pv . db hash >>= function | Some protocol -> return protocol | None -> Event . ( emit fetching_protocol ) ( hash , peer ) >>= fun ( ) -> Distr...
let fetch_and_compile_protocols pv ? peer ? timeout ( block : Store . Block . t ) = let protocol_level = Store . Block . proto_level block in let hash = Store . Block . hash block in let state = Distributed_db . store pv . db in Store . all_chain_stores state >>= fun chain_stores -> Lwt_utils . find_map_s ( fun chain_s...
let section = [ " node " ; " validator " ]
let validator_terminated = declare_0 ~ section ~ name " : validator_terminated " ~ msg " : validator terminated " ~ level : Notice ( )
let unexpected_worker_error = declare_1 ~ section ~ name " : unexpected_worker_error " ~ msg " : unexpected worker error : { trace } " ~ level : Notice ~ pp1 : pp_print_top_error_of_trace ( " trace " , trace_encoding )
let previously_validated_protocol = declare_1 ~ section ~ name " : previously_validated_protocol " ~ msg " : protocol { hash } already validated , ignoring " ~ level : Debug ( " hash " , Protocol_hash . encoding )
let pushing_protocol_validation = declare_1 ~ section ~ name " : pushing_protocol_validation " ~ msg " : pushing validation request for protocol { hash } " ~ level : Debug ( " hash " , Protocol_hash . encoding )
let fetching_protocol = declare_2 ~ section ~ name " : fetching_protocol " ~ msg " : fetching protocol { hash } " ~ level : Notice ( " hash " , Protocol_hash . encoding ) ( " source " , Data_encoding . option P2p_peer . Id . encoding )
module Stable = struct module V1 = struct type t = { major : int ; minor : int ; patch : int } [ @@ deriving compare , sexp , yojson ] yojson let to_latest = Fn . id end end ] end
let ( current_protocol_version : t option ref ) ref = ref None
let ( proposed_protocol_version_opt : t option ref ) ref = ref None
let set_current t = current_protocol_version := Some t
let set_proposed_opt t_opt = proposed_protocol_version_opt := t_opt
let get_current ( ) = Option . value_exn ! current_protocol_version
let get_proposed_opt ( ) = ! proposed_protocol_version_opt
let create_exn ~ major ~ minor ~ patch = if major < 0 || minor < 0 || patch < 0 then failwith " Protocol_version . create : major , minor , and patch must be nonnegative " ; { major ; minor ; patch }
let create_opt ~ major ~ minor ~ patch = try Some ( create_exn ~ major ~ minor ~ patch ) patch with _ -> None
let zero = create_exn ~ major : 0 ~ minor : 0 ~ patch : 0
let compatible_with_daemon current_protocol_version = Int . equal current_protocol_version . major ( get_current ( ) ) . major
let to_string t = sprintf " % u . % u . % u " t . major t . minor t . patch
let is_digit_string s = String . fold s ~ init : true ~ f ( : fun accum c -> accum && Char . is_digit c ) c
let of_string_exn s = match String . split s ~ on : ' . ' with | [ major ; minor ; patch ] -> if not ( is_digit_string major && is_digit_string minor && is_digit_string patch ) then failwith " Protocol_version . of_string_exn : unexpected nondigits in input " ; { major = Int . of_string major ; minor = Int . of_string ...
let of_string_opt s = try Some ( of_string_exn s ) s with _ -> None
let is_valid t = t . major >= 0 && t . minor >= 0 && t . patch >= 0
module Bounded_list_in_case_someone_sends_garbage_on_the_wire = List_with_max_len . Make ( struct let max_len = 100 let context = Info . of_string " Protocol_version_header " end )
type t = int Bounded_list_in_case_someone_sends_garbage_on_the_wire . t
let create_exn ~ protocol ~ supported_versions = Known_protocol . magic_number protocol :: supported_versions |> Bounded_list_in_case_someone_sends_garbage_on_the_wire . of_list_exn ; ;
let get_protocol ( t : t ) = let protocols , versions = List . partition_map ( t :> int list ) ~ f ( : fun v -> match Map . find Known_protocol . by_magic_number v with | Some p -> First p | None -> Second v ) in match protocols with | [ ] -> Ok ( None , Int . Set . of_list versions ) | [ p ] -> Ok ( Some p , Int . Set...
let negotiate ~ allow_legacy_peer ( ~ us : t ) ( ~ peer : t ) = let open Or_error . Let_syntax in let % bind us_protocol , us_versions = get_protocol us in let % bind peer_protocol , peer_versions = get_protocol peer in let % bind us_protocol = match us_protocol with | Some x -> return x | None -> error_s [ % message "...
let matches_magic_prefix ( t : t ) ~ protocol = let magic_number = Known_protocol . magic_number protocol in List . mem ~ equal : Int . equal ( t :> int list ) magic_number ; ;
let contains_magic_prefix ~ protocol = Bin_prot . Type_class . cnv_reader ( matches_magic_prefix ~ protocol ) bin_t . reader ; ;
let any_magic_prefix = let f t = List . find Known_protocol . all ~ f ( : fun protocol -> matches_magic_prefix ~ protocol t ) in Bin_prot . Type_class . cnv_reader f bin_t . reader ; ;
module For_test = struct module Make_list_with_max_len = List_with_max_len . Make end
module type TRANSPORT = sig end
let from_opt ~ default = function Some v -> v | None -> default
let opt_map f = function Some v -> Some ( f v ) | None -> None
let rassoc y l = fst ( List . find ( fun ( _ , y ' ) -> y = y ' ) l )
module Types_ = struct module DescriptorProto = ( val Pb . message " DescriptorProto " ) module ServiceOptions = ( val Pb . message " ServiceOptions " ) module Location = ( val Pb . message " Location " ) module File = ( val Pb . message " File " ) module FileDescriptorSet = ( val Pb . message " FileDescriptorSet " ) m...
module DescriptorProto = struct include Types_ . Fields__DescriptorProto type s = Types_ . s_DescriptorProto = { reserved_name : string list ; reserved_range : Types_ . s_ReservedRange list ; options : Types_ . s_MessageOptions option ; oneof_decl : Types_ . s_OneofDescriptorProto list ; extension_range : Types_ . s_Ex...
module ServiceOptions = struct include Types_ . Fields__ServiceOptions type s = Types_ . s_ServiceOptions = { uninterpreted_option : Types_ . s_UninterpretedOption list ; deprecated : bool ; } let extract = Types_ . extract_ServiceOptions let mk ~ uninterpreted_option : _local0 ? deprecated : _local1 ( ) = let _msg = P...
module Location = struct include Types_ . Fields__Location type s = Types_ . s_Location = { leading_detached_comments : string list ; trailing_comments : string option ; leading_comments : string option ; span : int32 list ; path : int32 list ; } let extract = Types_ . extract_Location let mk ~ leading_detached_comment...
module File = struct include Types_ . Fields__File type s = Types_ . s_File = { content : string option ; insertion_point : string option ; name : string option ; } let extract = Types_ . extract_File let mk ? content : _local0 ? insertion_point : _local1 ? name : _local2 ( ) = let _msg = Pb . create T . t in Pb . setf...
module FileDescriptorSet = struct include Types_ . Fields__FileDescriptorSet type s = Types_ . s_FileDescriptorSet = { file : Types_ . s_FileDescriptorProto list ; } let extract = Types_ . extract_FileDescriptorSet let mk ~ file : _local0 ( ) = let _msg = Pb . create T . t in Pb . setf _msg file _local0 ; _msg end
module EnumOptions = struct include Types_ . Fields__EnumOptions type s = Types_ . s_EnumOptions = { uninterpreted_option : Types_ . s_UninterpretedOption list ; deprecated : bool ; allow_alias : bool option ; } let extract = Types_ . extract_EnumOptions let mk ~ uninterpreted_option : _local0 ? deprecated : _local1 ? ...
module MethodDescriptorProto = struct include Types_ . Fields__MethodDescriptorProto type s = Types_ . s_MethodDescriptorProto = { server_streaming : bool ; client_streaming : bool ; options : Types_ . s_MethodOptions option ; output_type : string option ; input_type : string option ; name : string option ; } let extra...
module ServiceDescriptorProto = struct include Types_ . Fields__ServiceDescriptorProto type s = Types_ . s_ServiceDescriptorProto = { options : Types_ . s_ServiceOptions option ; method_ : Types_ . s_MethodDescriptorProto list ; name : string option ; } let extract = Types_ . extract_ServiceDescriptorProto let mk ? opt...
module ReservedRange = struct include Types_ . Fields__ReservedRange type s = Types_ . s_ReservedRange = { end_ : int32 option ; start : int32 option ; } let extract = Types_ . extract_ReservedRange let mk ? end_ : _local0 ? start : _local1 ( ) = let _msg = Pb . create T . t in Pb . setf _msg end_ _local0 ; Pb . setf _...
module OneofOptions = struct include Types_ . Fields__OneofOptions type s = Types_ . s_OneofOptions = { uninterpreted_option : Types_ . s_UninterpretedOption list ; } let extract = Types_ . extract_OneofOptions let mk ~ uninterpreted_option : _local0 ( ) = let _msg = Pb . create T . t in Pb . setf _msg uninterpreted_op...
module CodeGeneratorResponse = struct include Types_ . Fields__CodeGeneratorResponse type s = Types_ . s_CodeGeneratorResponse = { file : Types_ . s_File list ; error : string option ; } let extract = Types_ . extract_CodeGeneratorResponse let mk ~ file : _local0 ? error : _local1 ( ) = let _msg = Pb . create T . t in ...
module GeneratedCodeInfo = struct include Types_ . Fields__GeneratedCodeInfo type s = Types_ . s_GeneratedCodeInfo = { annotation : Types_ . s_Annotation list ; } let extract = Types_ . extract_GeneratedCodeInfo let mk ~ annotation : _local0 ( ) = let _msg = Pb . create T . t in Pb . setf _msg annotation _local0 ; _msg...
module CodeGeneratorRequest = struct include Types_ . Fields__CodeGeneratorRequest type s = Types_ . s_CodeGeneratorRequest = { compiler_version : Types_ . s_Version option ; proto_file : Types_ . s_FileDescriptorProto list ; parameter : string option ; file_to_generate : string list ; } let extract = Types_ . extract_...
module EnumDescriptorProto = struct include Types_ . Fields__EnumDescriptorProto type s = Types_ . s_EnumDescriptorProto = { options : Types_ . s_EnumOptions option ; value : Types_ . s_EnumValueDescriptorProto list ; name : string option ; } let extract = Types_ . extract_EnumDescriptorProto let mk ? options : _local0...
module FileOptions = struct include Types_ . Fields__FileOptions type s = Types_ . s_FileOptions = { uninterpreted_option : Types_ . s_UninterpretedOption list ; swift_prefix : string option ; csharp_namespace : string option ; objc_class_prefix : string option ; cc_enable_arenas : bool ; deprecated : bool ; py_generic...
module Annotation = struct include Types_ . Fields__Annotation type s = Types_ . s_Annotation = { end_ : int32 option ; begin_ : int32 option ; source_file : string option ; path : int32 list ; } let extract = Types_ . extract_Annotation let mk ? end_ : _local0 ? begin_ : _local1 ? source_file : _local2 ~ path : _local...
module OneofDescriptorProto = struct include Types_ . Fields__OneofDescriptorProto type s = Types_ . s_OneofDescriptorProto = { options : Types_ . s_OneofOptions option ; name : string option ; } let extract = Types_ . extract_OneofDescriptorProto let mk ? options : _local0 ? name : _local1 ( ) = let _msg = Pb . create...
module EnumValueDescriptorProto = struct include Types_ . Fields__EnumValueDescriptorProto type s = Types_ . s_EnumValueDescriptorProto = { options : Types_ . s_EnumValueOptions option ; number : int32 option ; name : string option ; } let extract = Types_ . extract_EnumValueDescriptorProto let mk ? options : _local0 ?...
module FieldDescriptorProto = struct include Types_ . Fields__FieldDescriptorProto type s = Types_ . s_FieldDescriptorProto = { options : Types_ . s_FieldOptions option ; json_name : string option ; oneof_index : int32 option ; default_value : string option ; extendee : string option ; type_name : string option ; type_...
module SourceCodeInfo = struct include Types_ . Fields__SourceCodeInfo type s = Types_ . s_SourceCodeInfo = { location : Types_ . s_Location list ; } let extract = Types_ . extract_SourceCodeInfo let mk ~ location : _local0 ( ) = let _msg = Pb . create T . t in Pb . setf _msg location _local0 ; _msg end
module FieldOptions = struct include Types_ . Fields__FieldOptions type s = Types_ . s_FieldOptions = { uninterpreted_option : Types_ . s_UninterpretedOption list ; weak : bool ; deprecated : bool ; lazy_ : bool ; jstype : Types_ . JSType . e Pb . enum ; packed : bool option ; ctype : Types_ . CType . e Pb . enum ; } l...
module EnumValueOptions = struct include Types_ . Fields__EnumValueOptions type s = Types_ . s_EnumValueOptions = { uninterpreted_option : Types_ . s_UninterpretedOption list ; deprecated : bool ; } let extract = Types_ . extract_EnumValueOptions let mk ~ uninterpreted_option : _local0 ? deprecated : _local1 ( ) = let ...
module UninterpretedOption = struct include Types_ . Fields__UninterpretedOption type s = Types_ . s_UninterpretedOption = { aggregate_value : string option ; string_value : Bytes . t option ; double_value : double option ; negative_int_value : int64 option ; positive_int_value : uint64 option ; identifier_value : stri...
module ExtensionRange = struct include Types_ . Fields__ExtensionRange type s = Types_ . s_ExtensionRange = { end_ : int32 option ; start : int32 option ; } let extract = Types_ . extract_ExtensionRange let mk ? end_ : _local0 ? start : _local1 ( ) = let _msg = Pb . create T . t in Pb . setf _msg end_ _local0 ; Pb . se...
module MessageOptions = struct include Types_ . Fields__MessageOptions type s = Types_ . s_MessageOptions = { uninterpreted_option : Types_ . s_UninterpretedOption list ; map_entry : bool option ; deprecated : bool ; no_standard_descriptor_accessor : bool ; message_set_wire_format : bool ; } let extract = Types_ . extr...
module MethodOptions = struct include Types_ . Fields__MethodOptions type s = Types_ . s_MethodOptions = { uninterpreted_option : Types_ . s_UninterpretedOption list ; idempotency_level : Types_ . IdempotencyLevel . e Pb . enum ; deprecated : bool ; } let extract = Types_ . extract_MethodOptions let mk ~ uninterpreted_...
module FileDescriptorProto = struct include Types_ . Fields__FileDescriptorProto type s = Types_ . s_FileDescriptorProto = { syntax : string option ; source_code_info : Types_ . s_SourceCodeInfo option ; options : Types_ . s_FileOptions option ; extension : Types_ . s_FieldDescriptorProto list ; service : Types_ . s_Se...
module NamePart = struct include Types_ . Fields__NamePart type s = Types_ . s_NamePart = { is_extension : bool ; name_part : string ; } let extract = Types_ . extract_NamePart let mk ~ is_extension : _local0 ~ name_part : _local1 ( ) = let _msg = Pb . create T . t in Pb . setf _msg is_extension _local0 ; Pb . setf _ms...
module Version = struct include Types_ . Fields__Version type s = Types_ . s_Version = { suffix : string option ; patch : int32 option ; minor : int32 option ; major : int32 option ; } let extract = Types_ . extract_Version let mk ? suffix : _local0 ? patch : _local1 ? minor : _local2 ? major : _local3 ( ) = let _msg =...
module OptimizeMode = struct module T = struct type e = Types_ . OptimizeMode . e let __map = [ 1l , ` SPEED ; 2l , ` CODE_SIZE ; 3l , ` LITE_RUNTIME ; ] let of_value x = List . assoc x __map let to_value x = rassoc x __map end include Types_ . OptimizeMode__constants end
module Label = struct module T = struct type e = Types_ . Label . e let __map = [ 1l , ` LABEL_OPTIONAL ; 2l , ` LABEL_REQUIRED ; 3l , ` LABEL_REPEATED ; ] let of_value x = List . assoc x __map let to_value x = rassoc x __map end include Types_ . Label__constants end
module Type = struct module T = struct type e = Types_ . Type . e let __map = [ 1l , ` TYPE_DOUBLE ; 2l , ` TYPE_FLOAT ; 3l , ` TYPE_INT64 ; 4l , ` TYPE_UINT64 ; 5l , ` TYPE_INT32 ; 6l , ` TYPE_FIXED64 ; 7l , ` TYPE_FIXED32 ; 8l , ` TYPE_BOOL ; 9l , ` TYPE_STRING ; 10l , ` TYPE_GROUP ; 11l , ` TYPE_MESSAGE ; 12l , ` TY...
module JSType = struct module T = struct type e = Types_ . JSType . e let __map = [ 0l , ` JS_NORMAL ; 1l , ` JS_STRING ; 2l , ` JS_NUMBER ; ] let of_value x = List . assoc x __map let to_value x = rassoc x __map end include Types_ . JSType__constants end
module IdempotencyLevel = struct module T = struct type e = Types_ . IdempotencyLevel . e let __map = [ 0l , ` IDEMPOTENCY_UNKNOWN ; 1l , ` NO_SIDE_EFFECTS ; 2l , ` IDEMPOTENT ; ] let of_value x = List . assoc x __map let to_value x = rassoc x __map end include Types_ . IdempotencyLevel__constants end
module CType = struct module T = struct type e = Types_ . CType . e let __map = [ 0l , ` STRING ; 1l , ` CORD ; 2l , ` STRING_PIECE ; ] let of_value x = List . assoc x __map let to_value x = rassoc x __map end include Types_ . CType__constants end
type m1 = { f1 : bool [ @ key 1 ] ; f2 : int [ @ key 2 ] [ @ encoding ` varint ] ; f3 : int [ @ key 3 ] [ @ encoding ` zigzag ] ; f4 : int [ @ key 4 ] [ @ encoding ` bits32 ] ; f5 : int [ @ key 5 ] [ @ encoding ` bits64 ] ; f6 : Int32 . t [ @ key 6 ] [ @ encoding ` varint ] ; f7 : Int32 . t [ @ key 7 ] [ @ encoding ` z...
type m4 = { f1 : m3 [ @ key 1 ] ; f2 : m3 [ @ key 2 ] [ @ bare ] ; f3 : [ ` A [ @ key 1 ] ] [ @ key 3 ] ; f4 : [ ` A [ @ key 1 ] ] [ @ key 4 ] [ @ bare ] ; }
type m5 = { f1 : bool [ @ key 1 ] [ @ default true ] ; f2 : bool [ @ key 2 ] [ @ default false ] ; f3 : int [ @ key 3 ] [ @ default 42 ] ; f4 : string [ @ key 4 ] [ @ default " foo " \\ nй " ] ; f5 : bytes [ @ key 5 ] [ @ default Bytes . of_string " foo " \\ nй " ] ; f6 : [ ` A [ @ key 1 ] ] [ @ key 6 ] [ @ default ` A...
module Mod = struct type foo = int [ @@ deriving protobuf { protoc } ] end
type t = IncrA | IncrB | Transfer of Int32 . t
let encoding = let open Data_encoding in let casea = let dest = function IncrA -> Some ( ) | _ -> None in let const ( ) = IncrA in case ~ title " : IncrA " ( Tag 0 ) ( obj1 ( req " IncrA " empty ) ) dest const in let caseb = let dest = function IncrB -> Some ( ) | _ -> None in let const ( ) = IncrB in case ~ title " : ...
let to_pii t = match t with IncrA -> ( 0l , 0l ) | IncrB -> ( 1l , 0l ) | Transfer i -> ( 2l , i )
let compare x y = let ( a , b ) = to_pii x in let ( u , v ) = to_pii y in let open Compare . Int32 in if a = u then compare b v else compare a u
let test msg expr val_expected var_expected = let ( var_prov , val_prov ) = provenance_of_expr ( parse_calc expr ) in ( log_list_test ( " Provenance Value ( " ^ msg " ^ ) " ) ( fun ( vn , vp ) -> vn " " ( ^->^ string_of_provenance vp ) ) ( ( " [ value ] " , val_prov ) :: ( List . map ( fun ( ( vn , _ ) , vp ) -> ( vn ,...
module Impl = Snarky . Snark . Make ( Snarky . Backends . Mnt4 . Default )
module A = struct let x = 15 let y = 20 include struct let a = true let b = false end end
let z = A . x + A . y let z = A . a && A . b end
let ( z : int Snarky . As_prover . Ref . t ) = let x = A . x in let y = A . y in let typ = Snarky . Typ . Internal . ref ( ) in Snarky . exists typ ~ compute : ( let open As_prover in fun ( ) -> if A . a && A . b then x else y )
let ( z : boolean ) = let typ = Typ . boolean in Snarky . exists typ ~ compute : ( let open As_prover in fun ( ) -> A . a && A . b ) type nonrec var = { a : field_var ; b : boolean } and t = { a : field ; b : bool } let typ = { Snarky . Types . Typ . store = ( fun { a ; b } -> Snarky . Typ_monads . Store . bind ( Typ ....
let ( failwith_field : string -> field_var ) = failwith let field_plus ( _ : field ) = ( let typ = Typ . fn { Snarky . Types . Typ . store = ( fun x -> Snarky . Typ_monads . Store . return x ) ; Snarky . Types . Typ . read = ( fun x -> Snarky . Typ_monads . Read . return x ) ; Snarky . Types . Typ . alloc = ( let open ...
let in_out __implicit2__ ( x : var ) = let typ = typ in Snarky . exists typ ~ compute : ( let open As_prover in fun ( ) -> let { a ; b ; _ } = let typ = typ in As_prover . read typ x in { a = field_plus __implicit2__ a ; b = not b } )
let a __implicit4__ __implicit3__ a b = let typ = typ in Snarky . exists typ ~ compute : ( let open As_prover in fun ( ) -> { a = ( let typ x___2 = x___2 in As_prover . read ( typ __implicit3__ ) a ) ; b = ( let typ x___3 = x___3 in As_prover . read ( typ __implicit4__ ) b ) } )
let a_1 ( x : field_var ) ( b : boolean ) = a Typ . boolean Typ . field x b