package tezos-protocol-010-PtGRANAD

  1. Overview
  2. Docs
Tezos/Protocol: economic-protocol definition

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-16.1.tar.gz
sha256=43723d096307603703a1a89ed1b2eb202b365f5e7824b96b0cbf813b343a6cf7
sha512=b2a637f2e965000d3d49ad85277ca24d6cb07a1a7cf2bc69d296d8b03ad78c3eaa8e21e94b9162e62c2e11649cd03bc845b2a3dafe623b91065df69d47dc8e4f

doc/tezos-protocol-010-PtGRANAD.raw/Tezos_raw_protocol_010_PtGRANAD/Script_ir_translator/index.html

Module Tezos_raw_protocol_010_PtGRANAD.Script_ir_translatorSource

Sourcetype ('ta, 'tb) eq =
  1. | Eq : ('same, 'same) eq
Sourcetype ex_comparable_ty =
  1. | Ex_comparable_ty : 'a Script_typed_ir.comparable_ty -> ex_comparable_ty
Sourcetype ex_ty =
  1. | Ex_ty : 'a Script_typed_ir.ty -> ex_ty
Sourcetype ex_stack_ty =
  1. | Ex_stack_ty : ('a, 's) Script_typed_ir.stack_ty -> ex_stack_ty
Sourcetype ex_script =
  1. | Ex_script : ('a, 'b) Script_typed_ir.script -> ex_script
Sourcetype ('arg, 'storage) code = {
  1. code : (('arg, 'storage) Script_typed_ir.pair, (Script_typed_ir.operation Script_typed_ir.boxed_list, 'storage) Script_typed_ir.pair) Script_typed_ir.lambda;
  2. arg_type : 'arg Script_typed_ir.ty;
  3. storage_type : 'storage Script_typed_ir.ty;
  4. root_name : Script_typed_ir.field_annot option;
}
Sourcetype ex_code =
  1. | Ex_code : ('a, 'c) code -> ex_code
Sourcetype ('a, 's, 'b, 'u) cinstr = {
  1. apply : 'r 'f. ('a, 's) Script_typed_ir.kinfo -> ('b, 'u, 'r, 'f) Script_typed_ir.kinstr -> ('a, 's, 'r, 'f) Script_typed_ir.kinstr;
}
Sourcetype ('a, 's, 'b, 'u) descr = {
  1. loc : Alpha_context.Script.location;
  2. bef : ('a, 's) Script_typed_ir.stack_ty;
  3. aft : ('b, 'u) Script_typed_ir.stack_ty;
  4. instr : ('a, 's, 'b, 'u) cinstr;
}
Sourcetype tc_context =
  1. | Lambda : tc_context
  2. | Dip : ('a, 's) Script_typed_ir.stack_ty * tc_context -> tc_context
  3. | Toplevel : {
    1. storage_type : 'sto Script_typed_ir.ty;
    2. param_type : 'param Script_typed_ir.ty;
    3. root_name : Script_typed_ir.field_annot option;
    4. legacy_create_contract_literal : bool;
    } -> tc_context
Sourcetype ('a, 's) judgement =
  1. | Typed : ('a, 's, 'b, 'u) descr -> ('a, 's) judgement
  2. | Failed : {
    1. descr : 'b 'u. ('b, 'u) Script_typed_ir.stack_ty -> ('a, 's, 'b, 'u) descr;
    } -> ('a, 's) judgement
Sourcetype unparsing_mode =
  1. | Optimized
  2. | Readable
  3. | Optimized_legacy
Sourceval set_fold : ('elt -> 'acc -> 'acc) -> 'elt Script_typed_ir.set -> 'acc -> 'acc
Sourceval set_update : 'a -> bool -> 'a Script_typed_ir.set -> 'a Script_typed_ir.set
Sourceval set_mem : 'elt -> 'elt Script_typed_ir.set -> bool
Sourceval map_fold : ('key -> 'value -> 'acc -> 'acc) -> ('key, 'value) Script_typed_ir.map -> 'acc -> 'acc
Sourceval map_update : 'a -> 'b option -> ('a, 'b) Script_typed_ir.map -> ('a, 'b) Script_typed_ir.map
Sourceval map_mem : 'key -> ('key, 'value) Script_typed_ir.map -> bool
Sourceval map_get : 'key -> ('key, 'value) Script_typed_ir.map -> 'value option
Sourceval compare_comparable : 'a Script_typed_ir.comparable_ty -> 'a -> 'a -> int

parse_ty specialized for the right-hand side part of a big map type, i.e. the `value` in `big_map key value`.

parse_ty allowing big_map values, operations, contract and tickets.

Sourceval parse_ty : Alpha_context.context -> legacy:bool -> allow_lazy_storage:bool -> allow_operation:bool -> allow_contract:bool -> allow_ticket:bool -> Alpha_context.Script.node -> (ex_ty * Alpha_context.context) Tezos_protocol_environment_010_PtGRANAD.Error_monad.tzresult

We expose parse_ty for convenience to external tools. Please use specialized versions such as parse_packable_ty, parse_parameter_ty, parse_comparable_ty, or parse_big_map_value_ty if possible.

Sourceval ty_of_comparable_ty : 'a Script_typed_ir.comparable_ty -> 'a Script_typed_ir.ty
Sourceval deduce_type_size : remaining:int -> 't Script_typed_ir.ty -> int

deduce_type_size ~remaining ty returns remaining minus the size of type ty or any negative value if that result would be negative. It is guaranteed to not grow the stack by more than remaining non-tail calls.

check_comparable_type_size ~legacy ctxt ~loc ty checks that the size of type ty is not larger than the constant maximum_type_size from the context ctxt. If the check fails, an error Type_too_large is returned. If legacy is true, there is no check at all and ok_unit is returned directly.

It is guaranteed to not grow the stack by more than maximum_type_size non-tail calls.

Combines parse_code and parse_storage

Sourcetype lazy_storage_ids
Sourceval no_lazy_storage_id : lazy_storage_ids
Sourceval list_of_big_map_ids : lazy_storage_ids -> Alpha_context.Big_map.Id.t list
OCaml

Innovation. Community. Security.