package tezos-protocol-015-PtLimaPt

  1. Overview
  2. Docs
type ('r, 'f) ex_init_stack_ty =
  1. | Ex_init_stack_ty : ('a, 's) Script_typed_ir.stack_ty * ('a, 's, 'r, 'f) Script_typed_ir.kinstr -> ('r, 'f) ex_init_stack_ty

An existential container for an instruction paired with its initial stack type. This is used internally to pack together execution branches with different initial stack types but the same final stack type (which we want to compute).

val log_kinstr : Script_typed_ir.logger -> ('a, 'b) Script_typed_ir.stack_ty -> ('a, 'b, 'c, 'd) Script_typed_ir.kinstr -> ('a, 'b, 'c, 'd) Script_typed_ir.kinstr

log_kinstr logger sty instr returns instr prefixed by an ILog instruction to log the first instruction in instr. Note that logger value is only available when logging is enables, so the type system protects us from calling this by mistake.

val log_entry : Script_typed_ir.logger -> Local_gas_counter.outdated_context -> Local_gas_counter.local_gas_counter -> ('a, 'b, 'c, 'd) Script_typed_ir.kinstr -> ('a, 'b) Script_typed_ir.stack_ty -> 'a -> 'b -> unit

log_entry logger ctxt gas instr sty accu stack simply calls logger.log_entry function with the appropriate arguments. Note that logger value is only available when logging is enables, so the type system protects us from calling this by mistake.

log_exit logger ctxt gas loc instr sty accu stack simply calls logger.log_exit function with the appropriate arguments. Note that logger value is only available when logging is enables, so the type system protects us from calling this by mistake.

val log_control : Script_typed_ir.logger -> ('a, 'b, 'c, 'd) Script_typed_ir.continuation -> unit

log_control logger continuation simply calls logger.log_control function with the appropriate arguments. Note that logger value is only available when logging is enables, so the type system protects us from calling this by mistake.

instrument_cont logger sty creates a function instrumenting continuations starting from the stack type described by sty. Instrumentation consists in wrapping inner continuations in KLog continuation so that logging continues.

log_next_continuation logger sty cont instruments the next continuation in cont with KLog continuations to ensure logging.

This instrumentation has a performance cost, but importantly, it is only ever paid when logging is enabled. Otherwise, the possibility to instrument the script is costless. Note also that logger value is only available when logging is enabled, so the type system protects us from calling this by mistake.

log_next_kinstr logger sty instr instruments the next instruction in instr with ILog instructions to make sure it will be logged. This instrumentation has a performance cost, but importantly, it is only ever paid when logging is enabled. Otherwise, the possibility to instrument the script is costless. Note also that logger value is only available when logging is enables, so the type system protects us from calling this by mistake.

val branched_final_stack_type : ('r, 'f) ex_init_stack_ty list -> ('r, 'f) Script_typed_ir.stack_ty option Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
val dipn_stack_ty : ('a, 's, 'e, 'z, 'c, 'u, 'd, 'w) Script_typed_ir.stack_prefix_preservation_witness -> ('c, 'u) Script_typed_ir.stack_ty -> ('a, 's) Script_typed_ir.stack_ty

dipn_stack_ty witness stack_ty returns the type of the stack on which instructions inside dipped block will be operating.

OCaml

Innovation. Community. Security.