package tezos-protocol-015-PtLimaPt
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=43723d096307603703a1a89ed1b2eb202b365f5e7824b96b0cbf813b343a6cf7
sha512=b2a637f2e965000d3d49ad85277ca24d6cb07a1a7cf2bc69d296d8b03ad78c3eaa8e21e94b9162e62c2e11649cd03bc845b2a3dafe623b91065df69d47dc8e4f
doc/tezos-protocol-015-PtLimaPt.raw/Tezos_raw_protocol_015_PtLimaPt/Script_interpreter_logging/index.html
Module Tezos_raw_protocol_015_PtLimaPt.Script_interpreter_loggingSource
type ('r, 'f) ex_init_stack_ty = | 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.kinstrlog_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 ->
unitlog_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.
val log_exit :
Script_typed_ir.logger ->
Local_gas_counter.outdated_context ->
Local_gas_counter.local_gas_counter ->
Alpha_context.Script.location ->
('c, 'd, 'e, 'f) Script_typed_ir.kinstr ->
('g, 'h) Script_typed_ir.stack_ty ->
'g ->
'h ->
unitlog_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 ->
unitlog_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.
val instrument_cont :
Script_typed_ir.logger ->
('a, 'b) Script_typed_ir.stack_ty ->
('a, 'b, 'c, 'd) Script_interpreter_defs.cont_instrumentationinstrument_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.
val log_next_continuation :
Script_typed_ir.logger ->
('a, 'b) Script_typed_ir.stack_ty ->
('a, 'b, 'c, 'd) Script_typed_ir.continuation ->
('a, 'b, 'c, 'd) Script_typed_ir.continuation
Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresultlog_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.
val log_next_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
Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresultlog_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 kinstr_final_stack_type :
('a, 'b) Script_typed_ir.stack_ty ->
('a, 'b, 'c, 'd) Script_typed_ir.kinstr ->
('c, 'd) Script_typed_ir.stack_ty option
Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresultval 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.tzresultval 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_tydipn_stack_ty witness stack_ty returns the type of the stack on which instructions inside dipped block will be operating.