-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
The file src/tesdata.ts is a collected base case usage of TL-B, but not all of it works in the current implementation
$ git clone [email protected]:ton-community/tlb-runtime.git
$ cd tlb-runtime
$ yarn install --frozen-lockfileDeserialize/Serialize
$ yarn test --verbose src/TLBRuntime.spec.ts
Tests: 65 failed, 117 passed, 182 total-
_ x:# = OneNatParam -
_ x:# y:# = TowNatParam -
_ x:^Cell = ParamCell; _ x:^ParamCell = UseParamCell -
_ x:^Cell = ParamCell; _ x:^ParamCell = UseParamCell -
a$0 x:# y:# = MultiConstructor; b$1 x:# = MultiConstructor -
a$0 x:# y:# = MultiConstructor; b$1 x:# = MultiConstructor -
_ x:(## 5) = LimitNat; _ x:LimitNat y:# = UseLimitNat -
_ x:(## 5) = LimitNat; _ x:LimitNat y:# = UseLimitNat -
_ {n:#} x:(## n) = ParamType n; _#de x:(ParamType 4) = UseParamType -
_ {n:#} x:(## n) = ExprType (2 + n); _ x:(ExprType 6) = UseExprType; _#de x:^UseExprType = CellUseExprType -
_ {n:#} x:(## n) = ExprType (2 + n); _ x:(ExprType 6) = UseExprType; _#de x:^UseExprType = CellUseExprType -
_ x:(#< 4) y:(#<= 4) = LessThan -
a$0 {n:#} = ParamConstructor n; b$1 {n:#} = ParamConstructor (n + 1) -
_ (## 1) = AnonymousData -
a#a value:int257 = IntType; b#b value:uint256 = UintType -
a#a value:int257 = IntType; b#b value:uint256 = UintType -
_ const:# = CheckKeyword -
unit$_ = Unit -
bool_false$0 = Bool; bool_true$1 = Bool; _ x:Bool = BoolUser -
unary_zero$0 = Unary ~0; unary_succ$1 {n:#} x:(Unary ~n) = Unary ~(n + 1) -
nothing$0 {X:Type} = Maybe X; just$1 {X:Type} value:X = Maybe X; _ x:Nat2 y:# = A; _ x:(## 2) = Nat2; _ x:(Maybe A) = OptionType -
nothing$0 {X:Type} = Maybe X; just$1 {X:Type} value:X = Maybe X; bit$_ (## 1) = Bit;unary_zero$0 = Unary ~0; unary_succ$1 {n:#} x:(Unary ~n) = Unary ~(n + 1);hml_short$0 {m:#} {n:#} len:(Unary ~n) {n <= m} s:(n * Bit) = HmLabel ~n m; hml_long$10 {m:#} n:(#<= m) s:(n * Bit) = HmLabel ~n m; hml_same$11 {m:#} v:Bit n:(#<= m) = HmLabel ~n m;hm_edge#_ {n:#} {X:Type} {l:#} {m:#} label:(HmLabel ~l n) {n = (~m) + l} node:(HashmapNode m X) = Hashmap n X; hmn_leaf#_ {X:Type} value:X = HashmapNode 0 X; hmn_fork#_ {n:#} {X:Type} left:^(Hashmap n X) right:^(Hashmap n X) = HashmapNode (n + 1) X; hme_empty$0 {n:#} {X:Type} = HashmapE n X; hme_root$1 {n:#} {X:Type} root:^(Hashmap n X) = HashmapE n X; _ x:(## 2) = Nat2; _ x:(Maybe Nat2) = OptionType; _ x:(HashmapE 100 ^OptionType) = HashmapOptionType -
bit$_ (## 1) = Bit;unary_zero$0 = Unary ~0; unary_succ$1 {n:#} x:(Unary ~n) = Unary ~(n + 1);hml_short$0 {m:#} {n:#} len:(Unary ~n) {n <= m} s:(n * Bit) = HmLabel ~n m; hml_long$10 {m:#} n:(#<= m) s:(n * Bit) = HmLabel ~n m; hml_same$11 {m:#} v:Bit n:(#<= m) = HmLabel ~n m;hm_edge#_ {n:#} {X:Type} {l:#} {m:#} label:(HmLabel ~l n) {n = (~m) + l} node:(HashmapNode m X) = Hashmap n X; hmn_leaf#_ {X:Type} value:X = HashmapNode 0 X; hmn_fork#_ {n:#} {X:Type} left:^(Hashmap n X) right:^(Hashmap n X) = HashmapNode (n + 1) X; hme_empty$0 {n:#} {X:Type} = HashmapE n X; hme_root$1 {n:#} {X:Type} root:^(Hashmap n X) = HashmapE n X; a$_ {n:#} x:(HashmapE n uint5) = HashmapVarKey n; a$_ x:(HashmapVarKey 5) = HashmapVarKeyUser -
var_uint$_ {n:#} len:(#< n) value:(uint (len * 8)) = VarUInteger n;nanograms$_ amount:(VarUInteger 16) = Grams; bit$_ (## 1) = Bit;unary_zero$0 = Unary ~0; unary_succ$1 {n:#} x:(Unary ~n) = Unary ~(n + 1);hml_short$0 {m:#} {n:#} len:(Unary ~n) {n <= m} s:(n * Bit) = HmLabel ~n m; hml_long$10 {m:#} n:(#<= m) s:(n * Bit) = HmLabel ~n m; hml_same$11 {m:#} v:Bit n:(#<= m) = HmLabel ~n m;ahm_edge#_ {n:#} {X:Type} {Y:Type} {l:#} {m:#} label:(HmLabel ~l n) {n = (~m) + l} node:(HashmapAugNode m X Y) = HashmapAug n X Y; ahmn_leaf#_ {X:Type} {Y:Type} extra:Y value:X = HashmapAugNode 0 X Y; ahmn_fork#_ {n:#} {X:Type} {Y:Type} left:^(HashmapAug n X Y) right:^(HashmapAug n X Y) extra:Y = HashmapAugNode (n + 1) X Y; ahme_empty$0 {n:#} {X:Type} {Y:Type} extra:Y = HashmapAugE n X Y; ahme_root$1 {n:#} {X:Type} {Y:Type} root:^(HashmapAug n X Y) extra:Y = HashmapAugE n X Y; fip$_ y:(## 5) = FixedIntParam; _$_ x:(HashmapAugE 16 Grams FixedIntParam) = HashmapAugEUser -
nothing$0 {X:Type} = Maybe X; just$1 {X:Type} value:X = Maybe X;addr_none$00 = MsgAddressExt; addr_extern$01 len:(## 9) external_address:(bits len) = MsgAddressExt; anycast_info$_ depth:(#<= 30) { depth >= 1 } rewrite_pfx:(bits depth) = Anycast; addr_std$10 anycast:(Maybe Anycast) workchain_id:int8 address:bits256 = MsgAddressInt; addr_var$11 anycast:(Maybe Anycast) addr_len:(## 9) workchain_id:int32 address:(bits addr_len) = MsgAddressInt; _ _:MsgAddressInt = MsgAddress; _ _:MsgAddressExt = MsgAddress; _ x:MsgAddress = AnyAddressUser -
bit$_ (## 1) = Bit; a#a x:Bit = BitUser -
var_uint$_ {n:#} len:(#< n) value:(uint (len * 8)) = VarUInteger n;nanograms$_ amount:(VarUInteger 16) = Grams; _ x: Grams = GramsUser -
nothing$0 {X:Type} = Maybe X; just$1 {X:Type} value:X = Maybe X;addr_none$00 = MsgAddressExt; addr_extern$01 len:(## 9) external_address:(bits len) = MsgAddressExt; anycast_info$_ depth:(#<= 30) { depth >= 1 } rewrite_pfx:(bits depth) = Anycast; addr_std$10 anycast:(Maybe Anycast) workchain_id:int8 address:bits256 = MsgAddressInt; addr_var$11 anycast:(Maybe Anycast) addr_len:(## 9) workchain_id:int32 address:(bits addr_len) = MsgAddressInt; _ _:MsgAddressInt = MsgAddress; _ _:MsgAddressExt = MsgAddress; _ x: MsgAddressExt = ExtAddressUser -
nothing$0 {X:Type} = Maybe X; just$1 {X:Type} value:X = Maybe X;addr_none$00 = MsgAddressExt; addr_extern$01 len:(## 9) external_address:(bits len) = MsgAddressExt; anycast_info$_ depth:(#<= 30) { depth >= 1 } rewrite_pfx:(bits depth) = Anycast; addr_std$10 anycast:(Maybe Anycast) workchain_id:int8 address:bits256 = MsgAddressInt; addr_var$11 anycast:(Maybe Anycast) addr_len:(## 9) workchain_id:int32 address:(bits addr_len) = MsgAddressInt; _ _:MsgAddressInt = MsgAddress; _ _:MsgAddressExt = MsgAddress; _ x: MsgAddressExt = ExtAddressUser -
var_int$_ {n:#} len:(#< n) value:(int (len * 8)) = VarInteger n; var_uint$_ {n:#} len:(#< n) value:(uint (len * 8)) = VarUInteger n; _ v:(VarUInteger 5) = VarUIntegerUser; _ v:(VarInteger 5) = VarIntegerUser -
var_int$_ {n:#} len:(#< n) value:(int (len * 8)) = VarInteger n; var_uint$_ {n:#} len:(#< n) value:(uint (len * 8)) = VarUInteger n; _ v:(VarUInteger 5) = VarUIntegerUser; _ v:(VarInteger 5) = VarIntegerUser -
bit$_ (## 1) = Bit;unary_zero$0 = Unary ~0; unary_succ$1 {n:#} x:(Unary ~n) = Unary ~(n + 1);hml_short$0 {m:#} {n:#} len:(Unary ~n) {n <= m} s:(n * Bit) = HmLabel ~n m; hml_long$10 {m:#} n:(#<= m) s:(n * Bit) = HmLabel ~n m; hml_same$11 {m:#} v:Bit n:(#<= m) = HmLabel ~n m;hm_edge#_ {n:#} {X:Type} {l:#} {m:#} label:(HmLabel ~l n) {n = (~m) + l} node:(HashmapNode m X) = Hashmap n X; hmn_leaf#_ {X:Type} value:X = HashmapNode 0 X; hmn_fork#_ {n:#} {X:Type} left:^(Hashmap n X) right:^(Hashmap n X) = HashmapNode (n + 1) X; hme_empty$0 {n:#} {X:Type} = HashmapE n X; hme_root$1 {n:#} {X:Type} root:^(Hashmap n X) = HashmapE n X; _ x:(HashmapE 8 uint16) = HashmapEUser -
nothing$0 {X:Type} = Maybe X; just$1 {X:Type} value:X = Maybe X;bit$_ (## 1) = Bit;unary_zero$0 = Unary ~0; unary_succ$1 {n:#} x:(Unary ~n) = Unary ~(n + 1);hml_short$0 {m:#} {n:#} len:(Unary ~n) {n <= m} s:(n * Bit) = HmLabel ~n m; hml_long$10 {m:#} n:(#<= m) s:(n * Bit) = HmLabel ~n m; hml_same$11 {m:#} v:Bit n:(#<= m) = HmLabel ~n m;hm_edge#_ {n:#} {X:Type} {l:#} {m:#} label:(HmLabel ~l n) {n = (~m) + l} node:(HashmapNode m X) = Hashmap n X; hmn_leaf#_ {X:Type} value:X = HashmapNode 0 X; hmn_fork#_ {n:#} {X:Type} left:^(Hashmap n X) right:^(Hashmap n X) = HashmapNode (n + 1) X; hme_empty$0 {n:#} {X:Type} = HashmapE n X; hme_root$1 {n:#} {X:Type} root:^(Hashmap n X) = HashmapE n X;vm_stk_null#00 = VmStackValue; vm_stk_tinyint#01 value:int64 = VmStackValue; vm_stk_int#0201_ value:int257 = VmStackValue; vm_stk_nan#02ff = VmStackValue; vm_stk_cell#03 cell:^Cell = VmStackValue; _ cell:^Cell st_bits:(## 10) end_bits:(## 10) { st_bits <= end_bits } st_ref:(#<= 4) end_ref:(#<= 4) { st_ref <= end_ref } = VmCellSlice; vm_stk_slice#04 _:VmCellSlice = VmStackValue; vm_stk_builder#05 cell:^Cell = VmStackValue; vm_stk_cont#06 cont:VmCont = VmStackValue; vm_tupref_nil$_ = VmTupleRef 0; vm_tupref_single$_ entry:^VmStackValue = VmTupleRef 1; vm_tupref_any$_ {n:#} ref:^(VmTuple (n + 2)) = VmTupleRef (n + 2); vm_tuple_nil$_ = VmTuple 0; vm_tuple_tcons$_ {n:#} head:(VmTupleRef n) tail:^VmStackValue = VmTuple (n + 1); vm_stk_tuple#07 len:(## 16) data:(VmTuple len) = VmStackValue; vm_stack#_ depth:(## 24) stack:(VmStackList depth) = VmStack; vm_stk_cons#_ {n:#} rest:^(VmStackList n) tos:VmStackValue = VmStackList (n + 1); vm_stk_nil#_ = VmStackList 0; _ cregs:(HashmapE 4 VmStackValue) = VmSaveList; gas_limits#_ remaining:int64 _:^[ max_limit:int64 cur_limit:int64 credit:int64 ] = VmGasLimits; _ libraries:(HashmapE 256 ^Cell) = VmLibraries; vm_ctl_data$_ nargs:(Maybe uint13) stack:(Maybe VmStack) save:VmSaveList cp:(Maybe int16) = VmControlData; vmc_std$00 cdata:VmControlData code:VmCellSlice = VmCont; vmc_envelope$01 cdata:VmControlData next:^VmCont = VmCont; vmc_quit$1000 exit_code:int32 = VmCont; vmc_quit_exc$1001 = VmCont; vmc_repeat$10100 count:uint63 body:^VmCont after:^VmCont = VmCont; vmc_until$110000 body:^VmCont after:^VmCont = VmCont; vmc_again$110001 body:^VmCont = VmCont; vmc_while_cond$110010 cond:^VmCont body:^VmCont after:^VmCont = VmCont; vmc_while_body$110011 cond:^VmCont body:^VmCont after:^VmCont = VmCont; vmc_pushint$1111 value:int32 next:^VmCont = VmCont; _ t:VmStack = VMStackUser -
_ {A:Type} t:# x:A = OneComb A; _ y:(OneComb(OneComb(OneComb int3))) = ManyComb -
nothing$0 {X:Type} = Maybe X; just$1 {X:Type} value:X = Maybe X; left$0 {X:Type} {Y:Type} value:X = Either X Y; right$1 {X:Type} {Y:Type} value:Y = Either X Y; a$_ {A:Type} t:# x:A = OneComb A;a$_ {X:Type} info:int32 init:(Maybe (Either X ^int22)) other:(Either X ^(OneComb X)) body:(Either X ^X) = CombArgCellRef X; a$_ x:(CombArgCellRef int12) = CombArgCellRefUser -
_ {x:#} value:(## x) = BitLenArg x; _ {n:#} ref:^(BitLenArg (n + 2)) = MathExprAsCombArg (n + 2) -
nothing$0 {X:Type} = Maybe X; just$1 {X:Type} value:X = Maybe X; a$_ msg:^(Maybe Any) = RefCombinatorAny -
nothing$0 {X:Type} = Maybe X; just$1 {X:Type} value:X = Maybe X; a$_ {X:Type} t:# y:(Maybe ^X) = RefCombinatorInRefHelper X;a$_ msg:^(RefCombinatorInRefHelper Any) = RefCombinatorInRef -
_ x:(## 3) = EmptyConstructor 0; _ x:(## 16) = EmptyConstructor 1; _ x:# = EmptyConstructor 2; _ a:(EmptyConstructor 0) b:(EmptyConstructor 1) c:(EmptyConstructor 2) = UseEmptyConstructor -
message#_ len:(## 7) { len <= 127 } text:(bits (len * 8)) = Message -
_ a:(3 * uint4) b:(3 * int4) = TupleCheck -
_ a:(3 * uint4) b:(3 * int4) = TupleCheck -
_ a:(## 1) b:a?(## 32) = ConditionalField -
_ a:(## 1) b:a?(## 32) = ConditionalField -
_ a:(## 6) b:(a . 2)?(## 32) = BitSelection -
_ a:(## 6) b:(a . 2)?(## 32) = BitSelection -
_ a:# b:# = Simple; _ x:(## 1) y:x?^Simple = ConditionalRef -
_ a:# b:# = Simple; _ x:(## 1) y:x?^Simple = ConditionalRef -
_ n:# { 5 + n = 7 } = EqualityExpression -
_ flags:(## 10) { flags <= 100 } = ImplicitCondition -
s$_ a:# b:# = Simple; _$_ x:(## 1) y:x?^Simple = ConditionalRef -
_ y:(## 5) = FixedIntParam;tmpd#_ y:FixedIntParam c:# = SharpConstructor -
_ a:# = EmptyTag -
a#f4 x:# = SharpTag -
a$1011 x:# = DollarTag -
_ a:# b:# = Simple; b$1 Simple = ConstructorOrder; a$0 a:Simple = ConstructorOrder -
a a:# = CheckCrc32;b b:# c:# = CheckCrc32 -
a a:# = CheckCrc32;b b:# c:# = CheckCrc32 -
a$_ n:# = ParamConst 1 1; b$01 m:# k:# = ParamConst 2 1; c$01 n:# m:# k:# = ParamConst 3 3; d$_ n:# m:# k:# l:# = ParamConst 4 2 -
a$0 = ParamDifNames 2 ~1; b$1 = ParamDifNames 3 ~1; c$1 {n:#} x:(ParamDifNames 2 ~n) = ParamDifNames 2 ~(n + 1); d$0 {m:#} x:(ParamDifNames 3 ~m) = ParamDifNames 3 ~(m * 2) -
b$1 {y:#} t:# z:# { t = (~y) * 2} = NegationFromImplicit ~(y + 1) -
unary_zero$0 = Unary ~0; unary_succ$1 {n:#} x:(Unary ~n) = Unary ~(n + 1); hm_edge#_ {l:#} {m:#} label:(Unary ~l) {7 = (~m) + l} = UnaryUserCheckOrder -
block_info#9bc7a987 seq_no:# { prev_seq_no:# } { ~prev_seq_no + 1 = seq_no } = LoadFromNegationOutsideExpr -
a$_ {e:#} h:(int (e * 8)) f:(uint (7 * e)) i:(bits (5 + e)) j:(int 5) k:(uint e) tc:Cell = IntBitsParametrized e; a$_ {x:#} a:(IntBitsParametrized x) = IntBitsParametrizedInside x; a$_ x:(IntBitsParametrizedInside 5) = IntBitsParametrizedOutside -
a$_ t:# ^[ q:# ] ^[ a:(## 32) ^[ e:# ] ^[ b:(## 32) d:# ^[ c:(## 32) ] ] ] = CellsSimple -
b$_ d:int11 g:bits2 {Arg:Type} arg:Arg x:Any = IntBits Arg; a$_ {x:#} a:(IntBits (int (1 + x))) = IntBitsInside (x * 2); a$_ x:(IntBitsInside 6) = IntBitsOutside -
_#0201_ = LeastSignificantBitRemoved -
a a:# = CheckCrc32;b b:# c:# = CheckCrc32 -
tag seq_no:# seq_no_2:# { prev_seq_no:# } { 2 + ~prev_seq_no + 1 = 2 + seq_no + 2 } { prev_seq_no_2:# } { ~prev_seq_no_2 = 100 + seq_no_2 * 8 * 7 } = ComplexCrc32
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed