From cf33c35ac00e78105551d478271e6a4782988d61 Mon Sep 17 00:00:00 2001 From: Mehdi Bouaziz Date: Mon, 11 Jan 2021 11:48:48 +0100 Subject: [PATCH 01/17] Proto/Michelson: remove var_annot from Pair_t and from `pair_t` too --- .../lib_protocol/script_interpreter.ml | 4 +- .../lib_protocol/script_interpreter_defs.ml | 2 +- .../lib_protocol/script_ir_translator.ml | 166 +++++++----------- .../lib_protocol/script_typed_ir.ml | 36 ++-- .../lib_protocol/script_typed_ir.mli | 8 +- .../lib_protocol/script_typed_ir_size.ml | 2 +- .../lib_protocol/ticket_scanner.ml | 4 +- 7 files changed, 91 insertions(+), 131 deletions(-) diff --git a/src/proto_alpha/lib_protocol/script_interpreter.ml b/src/proto_alpha/lib_protocol/script_interpreter.ml index 46622fb6c5b9..a8a9e8d476d8 100644 --- a/src/proto_alpha/lib_protocol/script_interpreter.ml +++ b/src/proto_alpha/lib_protocol/script_interpreter.ml @@ -1075,8 +1075,8 @@ and step : type a s b t r f. (a, s, b, t, r, f) step_type = _script_view ) -> ( pair_t kloc - (input_ty, None, None) - (storage_type, None, None) + (input_ty, None) + (storage_type, None) ~annot:None >>?= fun pair_ty -> let open Gas_monad in diff --git a/src/proto_alpha/lib_protocol/script_interpreter_defs.ml b/src/proto_alpha/lib_protocol/script_interpreter_defs.ml index 0e139df04683..4963601dadc0 100644 --- a/src/proto_alpha/lib_protocol/script_interpreter_defs.ml +++ b/src/proto_alpha/lib_protocol/script_interpreter_defs.ml @@ -462,7 +462,7 @@ let apply ctxt gas capture_ty capture lam = let loc = Micheline.dummy_location in unparse_ty ~loc ctxt capture_ty >>?= fun (ty_expr, ctxt) -> match full_arg_ty with - | Pair_t ((capture_ty, _, _), (arg_ty, _, _), _) -> + | Pair_t ((capture_ty, _), (arg_ty, _), _) -> let arg_stack_ty = Item_t (arg_ty, Bot_t) in let full_descr = { diff --git a/src/proto_alpha/lib_protocol/script_ir_translator.ml b/src/proto_alpha/lib_protocol/script_ir_translator.ml index fdf22faecf2b..9970a14c426e 100644 --- a/src/proto_alpha/lib_protocol/script_ir_translator.ml +++ b/src/proto_alpha/lib_protocol/script_ir_translator.ml @@ -173,10 +173,7 @@ let rec ty_of_comparable_ty : type a. a comparable_ty -> a ty = function | Address_key tname -> Address_t tname | Chain_id_key tname -> Chain_id_t tname | Pair_key ((l, al), (r, ar), tname) -> - Pair_t - ( (ty_of_comparable_ty l, al, None), - (ty_of_comparable_ty r, ar, None), - tname ) + Pair_t ((ty_of_comparable_ty l, al), (ty_of_comparable_ty r, ar), tname) | Union_key ((l, al), (r, ar), tname) -> Union_t ((ty_of_comparable_ty l, al), (ty_of_comparable_ty r, ar), tname) | Option_key (t, tname) -> Option_t (ty_of_comparable_ty t, tname) @@ -270,12 +267,12 @@ let rec unparse_ty_uncarbonated : | Contract_t (ut, meta) -> let t = unparse_ty_uncarbonated ~loc ut in prim (T_contract, [t], unparse_type_annot meta.annot) - | Pair_t ((utl, l_field, l_var), (utr, r_field, r_var), meta) -> + | Pair_t ((utl, l_field), (utr, r_field), meta) -> let annot = unparse_type_annot meta.annot in let utl = unparse_ty_uncarbonated ~loc utl in - let tl = add_field_annot l_field l_var utl in + let tl = add_field_annot l_field None utl in let utr = unparse_ty_uncarbonated ~loc utr in - let tr = add_field_annot r_field r_var utr in + let tr = add_field_annot r_field None utr in (* Fold [pair a1 (pair ... (pair an-1 an))] into [pair a1 ... an] *) (* Note that the folding does not happen if the pair on the right has an annotation because this annotation would be lost *) @@ -376,7 +373,7 @@ let[@coq_axiom_with_reason "gadt"] rec comparable_ty_of_ty : | Timestamp_t tname -> ok (Timestamp_key tname, ctxt) | Address_t tname -> ok (Address_key tname, ctxt) | Chain_id_t tname -> ok (Chain_id_key tname, ctxt) - | Pair_t ((l, al, _), (r, ar, _), pname) -> + | Pair_t ((l, al), (r, ar), pname) -> comparable_ty_of_ty ctxt loc l >>? fun (lty, ctxt) -> comparable_ty_of_ty ctxt loc r >|? fun (rty, ctxt) -> (Pair_key ((lty, al), (rty, ar), pname), ctxt) @@ -737,7 +734,7 @@ let rec check_dupable_ty : | Chest_t _ -> ok ctxt | Chest_key_t _ -> ok ctxt | Ticket_t _ -> error (Unexpected_ticket loc) - | Pair_t ((ty_a, _, _), (ty_b, _, _), _) -> + | Pair_t ((ty_a, _), (ty_b, _), _) -> check_dupable_ty ctxt loc ty_a >>? fun ctxt -> check_dupable_ty ctxt loc ty_b | Union_t ((ty_a, _), (ty_b, _), _) -> @@ -1026,18 +1023,17 @@ let merge_types : merge_type_metadata tn1 tn2 >>$ fun tname -> merge_comparable_types ~legacy ~error_details ea eb >|$ fun (Eq, e) -> ((Eq : (ta ty, tb ty) eq), Ticket_t (e, tname)) - | ( Pair_t ((tal, l_field1, l_var1), (tar, r_field1, r_var1), tn1), - Pair_t ((tbl, l_field2, l_var2), (tbr, r_field2, r_var2), tn2) ) -> + | ( Pair_t ((tal, l_field1), (tar, r_field1), tn1), + Pair_t ((tbl, l_field2), (tbr, r_field2), tn2) ) -> merge_type_metadata tn1 tn2 >>$ fun tname -> merge_field_annot ~legacy l_field1 l_field2 >>$ fun l_field -> merge_field_annot ~legacy r_field1 r_field2 >>$ fun r_field -> - let l_var = merge_var_annot l_var1 l_var2 in - let r_var = merge_var_annot r_var1 r_var2 in + let _l_var = merge_var_annot None None in + let _r_var = merge_var_annot None None in help tal tbl >>$ fun (Eq, left_ty) -> help tar tbr >|$ fun (Eq, right_ty) -> ( (Eq : (ta ty, tb ty) eq), - Pair_t ((left_ty, l_field, l_var), (right_ty, r_field, r_var), tname) - ) + Pair_t ((left_ty, l_field), (right_ty, r_field), tname) ) | ( Union_t ((tal, tal_annot), (tar, tar_annot), tn1), Union_t ((tbl, tbl_annot), (tbr, tbr_annot), tn2) ) -> merge_type_metadata tn1 tn2 >>$ fun tname -> @@ -1562,8 +1558,8 @@ and[@coq_axiom_with_reason "complex mutually recursive definition"] parse_ty : utr >>? fun (Ex_ty tr, ctxt) -> parse_type_annot loc annot >>? fun annot -> - pair_t loc (tl, left_field, None) (tr, right_field, None) ~annot - >|? fun ty -> (Ex_ty ty, ctxt) + pair_t loc (tl, left_field) (tr, right_field) ~annot >|? fun ty -> + (Ex_ty ty, ctxt) | Prim (loc, T_or, [utl; utr], annot) -> extract_field_annot utl >>? fun (utl, left_constr) -> extract_field_annot utr >>? fun (utr, right_constr) -> @@ -1797,8 +1793,8 @@ let parse_storage_ty : >>? fun (annot, map_field, storage_field) -> pair_t loc - (big_map_ty, map_field, None) - (remaining_storage, storage_field, None) + (big_map_ty, map_field) + (remaining_storage, storage_field) ~annot >|? fun ty -> (Ex_ty ty, ctxt)) | _ -> (parse_normal_storage_ty [@tailcall]) ctxt ~stack_depth ~legacy node @@ -1830,8 +1826,7 @@ let check_packable ~legacy loc root = | Bls12_381_g1_t _ -> Result.return_unit | Bls12_381_g2_t _ -> Result.return_unit | Bls12_381_fr_t _ -> Result.return_unit - | Pair_t ((l_ty, _, _), (r_ty, _, _), _) -> - check l_ty >>? fun () -> check r_ty + | Pair_t ((l_ty, _), (r_ty, _), _) -> check l_ty >>? fun () -> check r_ty | Union_t ((l_ty, _), (r_ty, _), _) -> check l_ty >>? fun () -> check r_ty | Option_t (v_ty, _) -> check v_ty | List_t (elt_ty, _) -> check elt_ty @@ -2610,7 +2605,7 @@ let[@coq_axiom_with_reason "gadt"] rec parse_data : ~entrypoint:address.entrypoint >|=? fun (ctxt, _) -> ({arg_ty; address}, ctxt) ) (* Pairs *) - | (Pair_t ((tl, _, _), (tr, _, _), _), expr) -> + | (Pair_t ((tl, _), (tr, _), _), expr) -> let r_witness = comb_witness1 tr in let parse_l ctxt v = non_terminal_recursion ?type_logger ctxt ~legacy tl v @@ -2865,11 +2860,7 @@ and parse_view_returning : (Some "return of view", strip_locations output_ty, output_ty_loc)) (parse_view_output_ty ctxt ~stack_depth:0 ~legacy output_ty) >>?= fun (Ex_ty output_ty', ctxt) -> - pair_t - input_ty_loc - (input_ty', None, None) - (storage_type, None, None) - ~annot:None + pair_t input_ty_loc (input_ty', None) (storage_type, None) ~annot:None >>?= fun pair_ty -> parse_instr ?type_logger @@ -3249,8 +3240,7 @@ and[@coq_axiom_with_reason "gadt"] parse_instr : (* pairs *) | (Prim (loc, I_PAIR, [], annot), Item_t (a, Item_t (b, rest))) -> parse_constr_annot loc annot >>?= fun (ty_name, l_field, r_field) -> - pair_t loc (a, l_field, None) (b, r_field, None) ~annot:ty_name - >>?= fun ty -> + pair_t loc (a, l_field) (b, r_field) ~annot:ty_name >>?= fun ty -> let stack_ty = Item_t (ty, rest) in let cons_pair = {apply = (fun kinfo k -> ICons_pair (kinfo, k))} in typed ctxt loc cons_pair stack_ty @@ -3267,8 +3257,7 @@ and[@coq_axiom_with_reason "gadt"] parse_instr : make_proof_argument (n - 1) tl_ty >>? fun (Comb_proof_argument (comb_witness, Item_t (b_ty, tl_ty'))) -> - pair_t loc (a_ty, None, None) (b_ty, None, None) ~annot:None - >|? fun pair_t -> + pair_t loc (a_ty, None) (b_ty, None) ~annot:None >|? fun pair_t -> Comb_proof_argument (Comb_succ comb_witness, Item_t (pair_t, tl_ty')) | _ -> let whole_stack = serialize_stack_for_error ctxt stack_ty in @@ -3291,7 +3280,7 @@ and[@coq_axiom_with_reason "gadt"] parse_instr : match (n, stack_ty) with | (1, Item_t (a_ty, tl_ty)) -> ok @@ Uncomb_proof_argument (Uncomb_one, Item_t (a_ty, tl_ty)) - | (n, Item_t (Pair_t ((a_ty, _, _), (b_ty, _, _), _), tl_ty)) -> + | (n, Item_t (Pair_t ((a_ty, _), (b_ty, _), _), tl_ty)) -> make_proof_argument (n - 1) (Item_t (b_ty, tl_ty)) >|? fun (Uncomb_proof_argument (uncomb_witness, after_ty)) -> Uncomb_proof_argument @@ -3316,9 +3305,9 @@ and[@coq_axiom_with_reason "gadt"] parse_instr : match (n, ty) with | (0, value_ty) -> ok @@ Comb_get_proof_argument (Comb_get_zero, value_ty) - | (1, Pair_t ((hd_ty, _at1, _at2), _, _annot)) -> + | (1, Pair_t ((hd_ty, _at1), _, _annot)) -> ok @@ Comb_get_proof_argument (Comb_get_one, hd_ty) - | (n, Pair_t (_, (tl_ty, _bt1, _bt2), _annot)) -> + | (n, Pair_t (_, (tl_ty, _bt1), _annot)) -> make_proof_argument (n - 2) tl_ty >|? fun (Comb_get_proof_argument (comb_get_left_witness, ty')) -> Comb_get_proof_argument @@ -3348,14 +3337,13 @@ and[@coq_axiom_with_reason "gadt"] parse_instr : fun n value_ty ty -> match (n, ty) with | (0, _) -> ok @@ Comb_set_proof_argument (Comb_set_zero, value_ty) - | (1, Pair_t ((_hd_ty, at1, at2), (tl_ty, bt1, bt2), {annot; _})) -> - pair_t loc (value_ty, at1, at2) (tl_ty, bt1, bt2) ~annot - >|? fun after_ty -> Comb_set_proof_argument (Comb_set_one, after_ty) - | (n, Pair_t ((hd_ty, at1, at2), (tl_ty, bt1, bt2), {annot; _})) -> + | (1, Pair_t ((_hd_ty, at1), (tl_ty, bt1), {annot; _})) -> + pair_t loc (value_ty, at1) (tl_ty, bt1) ~annot >|? fun after_ty -> + Comb_set_proof_argument (Comb_set_one, after_ty) + | (n, Pair_t ((hd_ty, at1), (tl_ty, bt1), {annot; _})) -> make_proof_argument (n - 2) value_ty tl_ty >>? fun (Comb_set_proof_argument (comb_set_left_witness, tl_ty')) -> - pair_t loc (hd_ty, at1, at2) (tl_ty', bt1, bt2) ~annot - >|? fun after_ty -> + pair_t loc (hd_ty, at1) (tl_ty', bt1) ~annot >|? fun after_ty -> Comb_set_proof_argument (Comb_set_plus_two comb_set_left_witness, after_ty) | _ -> @@ -3373,10 +3361,7 @@ and[@coq_axiom_with_reason "gadt"] parse_instr : typed ctxt loc comb_set after_stack_ty | ( Prim (loc, I_UNPAIR, [], annot), Item_t - ( Pair_t - ( (a, expected_field_annot_a, _a_annot), - (b, expected_field_annot_b, _b_annot), - _ ), + ( Pair_t ((a, expected_field_annot_a), (b, expected_field_annot_b), _), rest ) ) -> parse_unpair_annot loc annot >>?= fun (field_a, field_b) -> check_correct_field field_a expected_field_annot_a >>?= fun () -> @@ -3384,13 +3369,13 @@ and[@coq_axiom_with_reason "gadt"] parse_instr : let unpair = {apply = (fun kinfo k -> IUnpair (kinfo, k))} in typed ctxt loc unpair (Item_t (a, Item_t (b, rest))) | ( Prim (loc, I_CAR, [], annot), - Item_t (Pair_t ((a, expected_field_annot, _a_annot), _, _), rest) ) -> + Item_t (Pair_t ((a, expected_field_annot), _, _), rest) ) -> parse_destr_annot loc annot >>?= fun field_annot -> check_correct_field field_annot expected_field_annot >>?= fun () -> let car = {apply = (fun kinfo k -> ICar (kinfo, k))} in typed ctxt loc car (Item_t (a, rest)) | ( Prim (loc, I_CDR, [], annot), - Item_t (Pair_t (_, (b, expected_field_annot, _b_annot), _), rest) ) -> + Item_t (Pair_t (_, (b, expected_field_annot), _), rest) ) -> parse_destr_annot loc annot >>?= fun field_annot -> check_correct_field field_annot expected_field_annot >>?= fun () -> let cdr = {apply = (fun kinfo k -> ICdr (kinfo, k))} in @@ -3651,10 +3636,9 @@ and[@coq_axiom_with_reason "gadt"] parse_instr : let k = ty_of_comparable_ty ck in check_kind [Seq_kind] body >>?= fun () -> parse_var_type_annot loc annot >>?= fun ty_name -> - let k_name = field_to_var_annot default_key_annot in - let e_name = field_to_var_annot default_elt_annot in - pair_t loc (k, None, k_name) (elt, None, e_name) ~annot:None - >>?= fun ty -> + let _k_name = field_to_var_annot default_key_annot in + let _e_name = field_to_var_annot default_elt_annot in + pair_t loc (k, None) (elt, None) ~annot:None >>?= fun ty -> non_terminal_recursion ?type_logger tc_context @@ -3698,11 +3682,10 @@ and[@coq_axiom_with_reason "gadt"] parse_instr : Item_t (Map_t (comp_elt, element_ty, _), rest) ) -> ( check_kind [Seq_kind] body >>?= fun () -> error_unexpected_annot loc annot >>?= fun () -> - let k_name = field_to_var_annot default_key_annot in - let e_name = field_to_var_annot default_elt_annot in + let _k_name = field_to_var_annot default_key_annot in + let _e_name = field_to_var_annot default_elt_annot in let key = ty_of_comparable_ty comp_elt in - pair_t loc (key, None, k_name) (element_ty, None, e_name) ~annot:None - >>?= fun ty -> + pair_t loc (key, None) (element_ty, None) ~annot:None >>?= fun ty -> non_terminal_recursion ?type_logger tc_context @@ -3865,11 +3848,7 @@ and[@coq_axiom_with_reason "gadt"] parse_instr : let instr = {apply = (fun kinfo k -> ISapling_verify_update (kinfo, k))} in - pair_t - loc - (int_t ~annot:None, None, default_sapling_balance_annot) - (state_ty, None, None) - ~annot:None + pair_t loc (int_t ~annot:None, None) (state_ty, None) ~annot:None >>?= fun pair_ty -> option_t loc pair_ty ~annot:None >>?= fun ty -> let stack = Item_t (ty, rest) in @@ -4051,8 +4030,7 @@ and[@coq_axiom_with_reason "gadt"] parse_instr : ( capture, Item_t ( Lambda_t - ( Pair_t - ((capture_ty, _, _), (arg_ty, _, _), {annot = lam_annot; _}), + ( Pair_t ((capture_ty, _), (arg_ty, _), {annot = lam_annot; _}), ret, _ ), rest ) ) ) -> @@ -4675,27 +4653,19 @@ and[@coq_axiom_with_reason "gadt"] parse_instr : ~legacy storage_type) >>?= fun (Ex_ty storage_type, ctxt) -> - let arg_annot = + let _arg_annot = default_annot (type_to_var_annot (name_of_ty arg_type)) ~default:default_param_annot in - let storage_annot = + let _storage_annot = default_annot (type_to_var_annot (name_of_ty storage_type)) ~default:default_storage_annot in - pair_t - loc - (arg_type, None, arg_annot) - (storage_type, None, storage_annot) - ~annot:None + pair_t loc (arg_type, None) (storage_type, None) ~annot:None >>?= fun arg_type_full -> - pair_t - loc - (list_operation_t, None, None) - (storage_type, None, None) - ~annot:None + pair_t loc (list_operation_t, None) (storage_type, None) ~annot:None >>?= fun ret_type_full -> trace (Ill_typed_contract (canonical_code, [])) @@ -4944,8 +4914,7 @@ and[@coq_axiom_with_reason "gadt"] parse_instr : typed ctxt loc instr stack | ( Prim (loc, I_PAIRING_CHECK, [], annot), Item_t - ( List_t - (Pair_t ((Bls12_381_g1_t _, _, _), (Bls12_381_g2_t _, _, _), _), _), + ( List_t (Pair_t ((Bls12_381_g1_t _, _), (Bls12_381_g2_t _, _), _), _), rest ) ) -> check_var_annot loc annot >>?= fun () -> let instr = @@ -4973,11 +4942,10 @@ and[@coq_axiom_with_reason "gadt"] parse_instr : | ( Prim (loc, I_SPLIT_TICKET, [], annot), Item_t ( (Ticket_t (t, _) as ticket_t), - Item_t (Pair_t ((Nat_t _, fa_a, a_a), (Nat_t _, fa_b, a_b), _), rest) - ) ) -> + Item_t (Pair_t ((Nat_t _, fa_a), (Nat_t _, fa_b), _), rest) ) ) -> check_var_annot loc annot >>?= fun () -> let () = check_dupable_comparable_ty t in - pair_t loc (ticket_t, fa_a, a_a) (ticket_t, fa_b, a_b) ~annot:None + pair_t loc (ticket_t, fa_a) (ticket_t, fa_b) ~annot:None >>?= fun pair_tickets_ty -> option_t loc pair_tickets_ty ~annot:None >>?= fun res_ty -> let instr = {apply = (fun kinfo k -> ISplit_ticket (kinfo, k))} in @@ -4985,8 +4953,8 @@ and[@coq_axiom_with_reason "gadt"] parse_instr : typed ctxt loc instr stack | ( Prim (loc, I_JOIN_TICKETS, [], annot), Item_t - ( Pair_t (((Ticket_t _ as ty_a), _, _), ((Ticket_t _ as ty_b), _, _), _), - rest ) ) -> ( + (Pair_t (((Ticket_t _ as ty_a), _), ((Ticket_t _ as ty_b), _), _), rest) + ) -> ( check_var_annot loc annot >>?= fun () -> Gas_monad.run ctxt @@ merge_types ~legacy ~error_details:Informative loc ty_a ty_b @@ -5486,27 +5454,23 @@ let parse_code : (Ill_formed_type (Some "storage", code, storage_type_loc)) (parse_storage_ty ctxt ~stack_depth:0 ~legacy storage_type) >>?= fun (Ex_ty storage_type, ctxt) -> - let arg_annot = + let _arg_annot = default_annot (type_to_var_annot (name_of_ty arg_type)) ~default:default_param_annot in - let storage_annot = + let _storage_annot = default_annot (type_to_var_annot (name_of_ty storage_type)) ~default:default_storage_annot in - pair_t - storage_type_loc - (arg_type, None, arg_annot) - (storage_type, None, storage_annot) - ~annot:None + pair_t storage_type_loc (arg_type, None) (storage_type, None) ~annot:None >>?= fun arg_type_full -> pair_t storage_type_loc - (list_operation_t, None, None) - (storage_type, None, None) + (list_operation_t, None) + (storage_type, None) ~annot:None >>?= fun ret_type_full -> trace @@ -5616,26 +5580,22 @@ let typecheck_code : (Ill_formed_type (Some "storage", code, storage_type_loc)) (parse_storage_ty ctxt ~stack_depth:0 ~legacy storage_type) >>?= fun (Ex_ty storage_type, ctxt) -> - let arg_annot = + let _arg_annot = default_annot (type_to_var_annot (name_of_ty arg_type)) ~default:default_param_annot in - let storage_annot = + let _storage_annot = default_annot (type_to_var_annot (name_of_ty storage_type)) ~default:default_storage_annot in - pair_t - storage_type_loc - (arg_type, None, arg_annot) - (storage_type, None, storage_annot) - ~annot:None + pair_t storage_type_loc (arg_type, None) (storage_type, None) ~annot:None >>?= fun arg_type_full -> pair_t storage_type_loc - (list_operation_t, None, None) - (storage_type, None, None) + (list_operation_t, None) + (storage_type, None) ~annot:None >>?= fun ret_type_full -> let type_logger loc bef aft = type_map := (loc, (bef, aft)) :: !type_map in @@ -5735,7 +5695,7 @@ let list_entrypoints (type full) (full : full ty) ctxt ~root_name = let comb_witness2 : type t. t ty -> (t, unit -> unit -> unit) comb_witness = function - | Pair_t (_, (Pair_t _, _, _), _) -> Comb_Pair (Comb_Pair Comb_Any) + | Pair_t (_, (Pair_t _, _), _) -> Comb_Pair (Comb_Pair Comb_Any) | Pair_t _ -> Comb_Pair Comb_Any | _ -> Comb_Any @@ -5778,7 +5738,7 @@ let[@coq_axiom_with_reason "gadt"] rec unparse_data : | (Bls12_381_g1_t _, x) -> Lwt.return @@ unparse_bls12_381_g1 ~loc ctxt x | (Bls12_381_g2_t _, x) -> Lwt.return @@ unparse_bls12_381_g2 ~loc ctxt x | (Bls12_381_fr_t _, x) -> Lwt.return @@ unparse_bls12_381_fr ~loc ctxt x - | (Pair_t ((tl, _, _), (tr, _, _), _), pair) -> + | (Pair_t ((tl, _), (tr, _), _), pair) -> let r_witness = comb_witness2 tr in let unparse_l ctxt v = non_terminal_recursion ctxt mode tl v in let unparse_r ctxt v = non_terminal_recursion ctxt mode tr v in @@ -6258,7 +6218,7 @@ let rec has_lazy_storage : type t. t ty -> t has_lazy_storage = | Ticket_t _ -> False_f | Chest_key_t _ -> False_f | Chest_t _ -> False_f - | Pair_t ((l, _, _), (r, _, _), _) -> aux2 (fun l r -> Pair_f (l, r)) l r + | Pair_t ((l, _), (r, _), _) -> aux2 (fun l r -> Pair_f (l, r)) l r | Union_t ((l, _), (r, _), _) -> aux2 (fun l r -> Union_f (l, r)) l r | Option_t (t, _) -> aux1 (fun h -> Option_f h) t | List_t (t, _) -> aux1 (fun h -> List_f h) t @@ -6311,7 +6271,7 @@ let[@coq_axiom_with_reason "gadt"] extract_lazy_storage_updates ctxt mode let diff = Lazy_storage.make Sapling_state id diff in let ids_to_copy = Lazy_storage.IdSet.add Sapling_state id ids_to_copy in (ctxt, sapling_state, ids_to_copy, diff :: acc) - | (Pair_f (hl, hr), Pair_t ((tyl, _, _), (tyr, _, _), _), (xl, xr)) -> + | (Pair_f (hl, hr), Pair_t ((tyl, _), (tyr, _), _), (xl, xr)) -> aux ctxt mode ~temporary ids_to_copy acc tyl xl ~has_lazy_storage:hl >>=? fun (ctxt, xl, ids_to_copy, acc) -> aux ctxt mode ~temporary ids_to_copy acc tyr xr ~has_lazy_storage:hr @@ -6407,7 +6367,7 @@ let[@coq_axiom_with_reason "gadt"] rec fold_lazy_storage : ok (Fold_lazy_storage.Ok init, ctxt) | (Sapling_state_f, Sapling_state_t _, {id = None; _}) -> ok (Fold_lazy_storage.Ok init, ctxt) - | (Pair_f (hl, hr), Pair_t ((tyl, _, _), (tyr, _, _), _), (xl, xr)) -> ( + | (Pair_f (hl, hr), Pair_t ((tyl, _), (tyr, _), _), (xl, xr)) -> ( fold_lazy_storage ~f ~init ctxt tyl xl ~has_lazy_storage:hl >>? fun (init, ctxt) -> match init with diff --git a/src/proto_alpha/lib_protocol/script_typed_ir.ml b/src/proto_alpha/lib_protocol/script_typed_ir.ml index 6cd41703eb82..9c7893c63a23 100644 --- a/src/proto_alpha/lib_protocol/script_typed_ir.ml +++ b/src/proto_alpha/lib_protocol/script_typed_ir.ml @@ -1294,8 +1294,8 @@ and 'ty ty = | Address_t : address ty_metadata -> address ty | Bool_t : bool ty_metadata -> bool ty | Pair_t : - ('a ty * field_annot option * var_annot option) - * ('b ty * field_annot option * var_annot option) + ('a ty * field_annot option) + * ('b ty * field_annot option) * ('a, 'b) pair ty_metadata -> ('a, 'b) pair ty | Union_t : @@ -1836,9 +1836,9 @@ let address_t ~annot = Address_t {annot; size = Type_size.one} let bool_t ~annot = Bool_t {annot; size = Type_size.one} -let pair_t loc (l, fannot_l, vannot_l) (r, fannot_r, vannot_r) ~annot = +let pair_t loc (l, fannot_l) (r, fannot_r) ~annot = Type_size.compound2 loc (ty_size l) (ty_size r) >|? fun size -> - Pair_t ((l, fannot_l, vannot_l), (r, fannot_r, vannot_r), {annot; size}) + Pair_t ((l, fannot_l), (r, fannot_r), {annot; size}) let union_t loc (l, fannot_l) (r, fannot_r) ~annot = Type_size.compound2 loc (ty_size l) (ty_size r) >|? fun size -> @@ -1875,8 +1875,8 @@ let option_nat_t = let option_pair_nat_nat_t = Option_t ( Pair_t - ( (nat_t ~annot:None, None, None), - (nat_t ~annot:None, None, None), + ( (nat_t ~annot:None, None), + (nat_t ~annot:None, None), {annot = None; size = Type_size.three} ), {annot = None; size = Type_size.four} ) @@ -1884,8 +1884,8 @@ let option_pair_nat'_nat'_t meta = let {annot; size = _} = meta in Option_t ( Pair_t - ( (nat_t ~annot, None, None), - (nat_t ~annot, None, None), + ( (nat_t ~annot, None), + (nat_t ~annot, None), {annot = None; size = Type_size.three} ), {annot = None; size = Type_size.four} ) @@ -1893,8 +1893,8 @@ let option_pair_nat_mutez'_t meta = let {annot; size = _} = meta in Option_t ( Pair_t - ( (nat_t ~annot:None, None, None), - (mutez_t ~annot, None, None), + ( (nat_t ~annot:None, None), + (mutez_t ~annot, None), {annot = None; size = Type_size.three} ), {annot = None; size = Type_size.four} ) @@ -1902,8 +1902,8 @@ let option_pair_mutez'_mutez'_t meta = let {annot; size = _} = meta in Option_t ( Pair_t - ( (mutez_t ~annot, None, None), - (mutez_t ~annot, None, None), + ( (mutez_t ~annot, None), + (mutez_t ~annot, None), {annot = None; size = Type_size.three} ), {annot = None; size = Type_size.four} ) @@ -1911,8 +1911,8 @@ let option_pair_int'_nat_t meta = let {annot; size = _} = meta in Option_t ( Pair_t - ( (int_t ~annot, None, None), - (nat_t ~annot:None, None, None), + ( (int_t ~annot, None), + (nat_t ~annot:None, None), {annot = None; size = Type_size.three} ), {annot = None; size = Type_size.four} ) @@ -1920,8 +1920,8 @@ let option_pair_int_nat'_t meta = let {annot; size = _} = meta in Option_t ( Pair_t - ( (int_t ~annot:None, None, None), - (nat_t ~annot, None, None), + ( (int_t ~annot:None, None), + (nat_t ~annot, None), {annot = None; size = Type_size.three} ), {annot = None; size = Type_size.four} ) @@ -2208,7 +2208,7 @@ let (ty_traverse, comparable_ty_traverse) = (continue [@ocaml.tailcall]) accu | Ticket_t (cty, _) -> aux f accu cty continue | Chest_key_t _ | Chest_t _ -> (continue [@ocaml.tailcall]) accu - | Pair_t ((ty1, _, _), (ty2, _, _), _) -> + | Pair_t ((ty1, _), (ty2, _), _) -> (next2' [@ocaml.tailcall]) f accu ty1 ty2 continue | Union_t ((ty1, _), (ty2, _), _) -> (next2' [@ocaml.tailcall]) f accu ty1 ty2 continue @@ -2290,7 +2290,7 @@ let value_traverse (type t) (ty : (t ty, t comparable_ty) union) (x : t) init f | Bls12_381_g2_t _ | Bls12_381_fr_t _ | Chest_key_t _ | Chest_t _ | Lambda_t (_, _, _) -> (return [@ocaml.tailcall]) () - | Pair_t ((ty1, _, _), (ty2, _, _), _) -> + | Pair_t ((ty1, _), (ty2, _), _) -> (next2 [@ocaml.tailcall]) ty1 ty2 (fst x) (snd x) | Union_t ((ty1, _), (ty2, _), _) -> ( match x with diff --git a/src/proto_alpha/lib_protocol/script_typed_ir.mli b/src/proto_alpha/lib_protocol/script_typed_ir.mli index 2045c405029f..0bd3069c0b62 100644 --- a/src/proto_alpha/lib_protocol/script_typed_ir.mli +++ b/src/proto_alpha/lib_protocol/script_typed_ir.mli @@ -1377,8 +1377,8 @@ and 'ty ty = | Address_t : address ty_metadata -> address ty | Bool_t : bool ty_metadata -> bool ty | Pair_t : - ('a ty * field_annot option * var_annot option) - * ('b ty * field_annot option * var_annot option) + ('a ty * field_annot option) + * ('b ty * field_annot option) * ('a, 'b) pair ty_metadata -> ('a, 'b) pair ty | Union_t : @@ -1567,8 +1567,8 @@ val bool_t : annot:type_annot option -> bool ty val pair_t : Script.location -> - 'a ty * field_annot option * var_annot option -> - 'b ty * field_annot option * var_annot option -> + 'a ty * field_annot option -> + 'b ty * field_annot option -> annot:type_annot option -> ('a, 'b) pair ty tzresult diff --git a/src/proto_alpha/lib_protocol/script_typed_ir_size.ml b/src/proto_alpha/lib_protocol/script_typed_ir_size.ml index 3702057e3bc5..d01fb45e0335 100644 --- a/src/proto_alpha/lib_protocol/script_typed_ir_size.ml +++ b/src/proto_alpha/lib_protocol/script_typed_ir_size.ml @@ -80,7 +80,7 @@ let (comparable_ty_size, ty_size) = | Bls12_381_fr_t a -> ret_succ_adding accu @@ base a | Chest_key_t a -> ret_succ_adding accu @@ base a | Chest_t a -> ret_succ_adding accu @@ base a - | Pair_t ((_ty1, _fa1, _va1), (_ty2, _fa2, _va2), a) -> + | Pair_t ((_ty1, _fa1), (_ty2, _fa2), a) -> ret_succ_adding accu @@ (base a +! hh8w) | Union_t ((_ty1, _fa1), (_ty2, _fa2), a) -> ret_succ_adding accu @@ (base a +! hh6w) diff --git a/src/proto_alpha/lib_protocol/ticket_scanner.ml b/src/proto_alpha/lib_protocol/ticket_scanner.ml index 1090c458e610..4a87b505fe2b 100644 --- a/src/proto_alpha/lib_protocol/ticket_scanner.ml +++ b/src/proto_alpha/lib_protocol/ticket_scanner.ml @@ -161,7 +161,7 @@ module Ticket_inspection = struct | Timestamp_t _ -> (k [@ocaml.tailcall]) False_ht | Address_t _ -> (k [@ocaml.tailcall]) False_ht | Bool_t _ -> (k [@ocaml.tailcall]) False_ht - | Pair_t ((ty1, _, _), (ty2, _, _), _) -> + | Pair_t ((ty1, _), (ty2, _), _) -> (has_tickets_of_pair [@ocaml.tailcall]) ty1 ty2 @@ -318,7 +318,7 @@ module Ticket_collection = struct consume_gas_steps ctxt ~num_steps:1 >>?= fun ctxt -> match (hty, ty) with | (False_ht, _) -> (k [@ocaml.tailcall]) ctxt acc - | (Pair_ht (hty1, hty2), Pair_t ((ty1, _, _), (ty2, _, _), _)) -> + | (Pair_ht (hty1, hty2), Pair_t ((ty1, _), (ty2, _), _)) -> let (l, r) = x in (tickets_of_value [@ocaml.tailcall]) ~include_lazy -- GitLab From 7e552541e6825684449302db70e9054e7794a146 Mon Sep 17 00:00:00 2001 From: Mehdi Bouaziz Date: Mon, 11 Jan 2021 11:48:48 +0100 Subject: [PATCH 02/17] Proto/Benchmarks: remove var_annot from Pair_t --- src/proto_alpha/lib_benchmark/michelson_samplers.ml | 6 ++---- src/proto_alpha/lib_benchmark/test/test_distribution.ml | 2 +- src/proto_alpha/lib_benchmarks_proto/michelson_types.ml | 2 +- .../lib_benchmarks_proto/translator_benchmarks.ml | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/proto_alpha/lib_benchmark/michelson_samplers.ml b/src/proto_alpha/lib_benchmark/michelson_samplers.ml index caa555e6c11d..fc28a39a99c7 100644 --- a/src/proto_alpha/lib_benchmark/michelson_samplers.ml +++ b/src/proto_alpha/lib_benchmark/michelson_samplers.ml @@ -369,9 +369,7 @@ end) let* (lsize, rsize) = pick_split (size - 1) in let* (Ex_ty left) = m_type ~size:lsize in let* (Ex_ty right) = m_type ~size:rsize in - match - pair_t (-1) (left, None, None) (right, None, None) ~annot:None - with + match pair_t (-1) (left, None) (right, None) ~annot:None with | Error _ -> assert false | Ok res_ty -> return @@ Ex_ty res_ty) | `TLambda -> ( @@ -535,7 +533,7 @@ end) | Timestamp_t _ -> Michelson_base.timestamp | Bool_t _ -> Base_samplers.uniform_bool | Address_t _ -> address - | Pair_t ((left_t, _, _), (right_t, _, _), _) -> + | Pair_t ((left_t, _), (right_t, _), _) -> M.( let* left_v = value left_t in let* right_v = value right_t in diff --git a/src/proto_alpha/lib_benchmark/test/test_distribution.ml b/src/proto_alpha/lib_benchmark/test/test_distribution.ml index 42bbfbc0638c..acc8084c6d10 100644 --- a/src/proto_alpha/lib_benchmark/test/test_distribution.ml +++ b/src/proto_alpha/lib_benchmark/test/test_distribution.ml @@ -68,7 +68,7 @@ let rec tnames_of_type : | Script_typed_ir.Timestamp_t _ -> `TTimestamp :: acc | Script_typed_ir.Address_t _ -> `TAddress :: acc | Script_typed_ir.Bool_t _ -> `TBool :: acc - | Script_typed_ir.Pair_t ((lty, _, _), (rty, _, _), _) -> + | Script_typed_ir.Pair_t ((lty, _), (rty, _), _) -> tnames_of_type lty (tnames_of_type rty (`TPair :: acc)) | Script_typed_ir.Union_t ((lty, _), (rty, _), _) -> tnames_of_type lty (tnames_of_type rty (`TUnion :: acc)) diff --git a/src/proto_alpha/lib_benchmarks_proto/michelson_types.ml b/src/proto_alpha/lib_benchmarks_proto/michelson_types.ml index 0a2ce6030fe1..5569ca6340da 100644 --- a/src/proto_alpha/lib_benchmarks_proto/michelson_types.ml +++ b/src/proto_alpha/lib_benchmarks_proto/michelson_types.ml @@ -100,7 +100,7 @@ let set k = (* pair type constructor*) let pair k1 k2 = - match pair_t (-1) (k1, None, None) (k2, None, None) ~annot:None with + match pair_t (-1) (k1, None) (k2, None) ~annot:None with | Error _ -> assert false | Ok t -> t diff --git a/src/proto_alpha/lib_benchmarks_proto/translator_benchmarks.ml b/src/proto_alpha/lib_benchmarks_proto/translator_benchmarks.ml index bfcd603675fc..03c225cbce16 100644 --- a/src/proto_alpha/lib_benchmarks_proto/translator_benchmarks.ml +++ b/src/proto_alpha/lib_benchmarks_proto/translator_benchmarks.ml @@ -625,7 +625,7 @@ let rec dummy_type_generator size = | Ex_ty r -> let l = unit_t ~annot:None in Ex_ty - (match pair_t (-1) (l, None, None) (r, None, None) ~annot:None with + (match pair_t (-1) (l, None) (r, None) ~annot:None with | Error _ -> assert false | Ok t -> t) -- GitLab From 91d110d442bb1c4f867d338a521174acc431124d Mon Sep 17 00:00:00 2001 From: Mehdi Bouaziz Date: Mon, 11 Jan 2021 11:48:48 +0100 Subject: [PATCH 03/17] Proto/Plugin: remove var_annot from Pair_t --- src/proto_alpha/lib_plugin/plugin.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/proto_alpha/lib_plugin/plugin.ml b/src/proto_alpha/lib_plugin/plugin.ml index 164572eab9d0..408f96ea723a 100644 --- a/src/proto_alpha/lib_plugin/plugin.ml +++ b/src/proto_alpha/lib_plugin/plugin.ml @@ -1996,12 +1996,12 @@ module RPC = struct | Contract_t (ut, meta) -> let t = unparse_ty ~loc ut in return (T_contract, [t], unparse_type_annot meta.annot) - | Pair_t ((utl, l_field, l_var), (utr, r_field, r_var), meta) -> + | Pair_t ((utl, l_field), (utr, r_field), meta) -> let annot = unparse_type_annot meta.annot in let utl = unparse_ty ~loc utl in - let tl = add_field_annot l_field l_var utl in + let tl = add_field_annot l_field None utl in let utr = unparse_ty ~loc utr in - let tr = add_field_annot r_field r_var utr in + let tr = add_field_annot r_field None utr in return (T_pair, [tl; tr], annot) | Union_t ((utl, l_field), (utr, r_field), meta) -> let annot = unparse_type_annot meta.annot in -- GitLab From 69b5f6e6cfa03b8fe0d755e722d4153f6463becf Mon Sep 17 00:00:00 2001 From: Mehdi Bouaziz Date: Mon, 11 Jan 2021 12:08:10 +0100 Subject: [PATCH 04/17] Proto/Tests: remove var_annot from Pair_t --- .../integration/michelson/test_sapling.ml | 2 +- .../michelson/test_typechecking.ml | 101 +++++------------- 2 files changed, 30 insertions(+), 73 deletions(-) diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_sapling.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_sapling.ml index ac912cd0b9ed..4f0d28016c8e 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_sapling.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_sapling.ml @@ -1004,7 +1004,7 @@ module Interpreter_tests = struct (let memo_size = memo_size_of_int memo_size in let open Script_typed_ir in let state_ty = sapling_state_t ~memo_size ~annot:None in - pair_t (-1) (state_ty, None, None) (state_ty, None, None) ~annot:None) + pair_t (-1) (state_ty, None) (state_ty, None) ~annot:None) >>??= fun tytype -> Script_ir_translator.parse_storage ctx_without_gas diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_typechecking.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_typechecking.ml index e4e7081e7cbb..5037627a9da0 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_typechecking.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_typechecking.ml @@ -194,9 +194,7 @@ let test_parse_comb_type () = let nat_prim_c = Prim (-1, T_nat, [], ["%c"]) in let nat_ty = nat_t ~annot:None in let pair_prim l = Prim (-1, T_pair, l, []) in - let pair_ty ty1 ty2 = - pair_t (-1) (ty1, None, None) (ty2, None, None) ~annot:None - in + let pair_ty ty1 ty2 = pair_t (-1) (ty1, None) (ty2, None) ~annot:None in let pair_prim2 a b = pair_prim [a; b] in let pair_nat_nat_prim = pair_prim2 nat_prim nat_prim in pair_ty nat_ty nat_ty >>??= fun pair_nat_nat_ty -> @@ -225,28 +223,20 @@ let test_parse_comb_type () = pair_nat_nat_nat_ty >>?= fun ctxt -> (* pair (nat %a) nat *) - pair_t - (-1) - (nat_ty, Some (field_annot "a"), None) - (nat_ty, None, None) - ~annot:None + pair_t (-1) (nat_ty, Some (field_annot "a")) (nat_ty, None) ~annot:None >>??= fun pair_nat_a_nat_ty -> test_parse_ty ctxt (pair_prim2 nat_prim_a nat_prim) pair_nat_a_nat_ty >>?= fun ctxt -> (* pair nat (nat %b) *) - pair_t - (-1) - (nat_ty, None, None) - (nat_ty, Some (field_annot "b"), None) - ~annot:None + pair_t (-1) (nat_ty, None) (nat_ty, Some (field_annot "b")) ~annot:None >>??= fun pair_nat_nat_b_ty -> test_parse_ty ctxt (pair_prim2 nat_prim nat_prim_b) pair_nat_nat_b_ty >>?= fun ctxt -> (* pair (nat %a) (nat %b) *) pair_t (-1) - (nat_ty, Some (field_annot "a"), None) - (nat_ty, Some (field_annot "b"), None) + (nat_ty, Some (field_annot "a")) + (nat_ty, Some (field_annot "b")) ~annot:None >>??= fun pair_nat_a_nat_b_ty -> test_parse_ty ctxt (pair_prim2 nat_prim_a nat_prim_b) pair_nat_a_nat_b_ty @@ -254,14 +244,14 @@ let test_parse_comb_type () = (* pair (nat %a) (nat %b) (nat %c) *) pair_t (-1) - (nat_ty, Some (field_annot "b"), None) - (nat_ty, Some (field_annot "c"), None) + (nat_ty, Some (field_annot "b")) + (nat_ty, Some (field_annot "c")) ~annot:None >>??= fun pair_nat_b_nat_c_ty -> pair_t (-1) - (nat_ty, Some (field_annot "a"), None) - (pair_nat_b_nat_c_ty, None, None) + (nat_ty, Some (field_annot "a")) + (pair_nat_b_nat_c_ty, None) ~annot:None >>??= fun pair_nat_a_nat_b_nat_c_ty -> test_parse_ty @@ -270,12 +260,12 @@ let test_parse_comb_type () = pair_nat_a_nat_b_nat_c_ty >>?= fun ctxt -> (* pair (nat %a) (pair %b nat nat) *) - pair_t (-1) (nat_ty, None, None) (nat_ty, None, None) ~annot:None + pair_t (-1) (nat_ty, None) (nat_ty, None) ~annot:None >>??= fun pair_b_nat_nat_ty -> pair_t (-1) - (nat_ty, Some (field_annot "a"), None) - (pair_b_nat_nat_ty, Some (field_annot "b"), None) + (nat_ty, Some (field_annot "a")) + (pair_b_nat_nat_ty, Some (field_annot "b")) ~annot:None >>??= fun pair_nat_a_pair_b_nat_nat_ty -> test_parse_ty @@ -299,9 +289,7 @@ let test_unparse_comb_type () = let nat_prim_c = Prim ((), T_nat, [], ["%c"]) in let nat_ty = nat_t ~annot:None in let pair_prim l = Prim ((), T_pair, l, []) in - let pair_ty ty1 ty2 = - pair_t (-1) (ty1, None, None) (ty2, None, None) ~annot:None - in + let pair_ty ty1 ty2 = pair_t (-1) (ty1, None) (ty2, None) ~annot:None in let pair_prim2 a b = pair_prim [a; b] in let pair_nat_nat_prim = pair_prim2 nat_prim nat_prim in pair_ty nat_ty nat_ty >>??= fun pair_nat_nat_ty -> @@ -326,11 +314,7 @@ let test_unparse_comb_type () = pair_nat_nat_nat_ty >>?= fun ctxt -> (* pair (nat %a) nat *) - pair_t - (-1) - (nat_ty, Some (field_annot "a"), None) - (nat_ty, None, None) - ~annot:None + pair_t (-1) (nat_ty, Some (field_annot "a")) (nat_ty, None) ~annot:None >>??= fun pair_nat_a_nat_ty -> test_unparse_ty __LOC__ @@ -339,11 +323,7 @@ let test_unparse_comb_type () = pair_nat_a_nat_ty >>?= fun ctxt -> (* pair nat (nat %b) *) - pair_t - (-1) - (nat_ty, None, None) - (nat_ty, Some (field_annot "b"), None) - ~annot:None + pair_t (-1) (nat_ty, None) (nat_ty, Some (field_annot "b")) ~annot:None >>??= fun pair_nat_nat_b_ty -> test_unparse_ty __LOC__ @@ -354,8 +334,8 @@ let test_unparse_comb_type () = (* pair (nat %a) (nat %b) *) pair_t (-1) - (nat_ty, Some (field_annot "a"), None) - (nat_ty, Some (field_annot "b"), None) + (nat_ty, Some (field_annot "a")) + (nat_ty, Some (field_annot "b")) ~annot:None >>??= fun pair_nat_a_nat_b_ty -> test_unparse_ty @@ -367,14 +347,14 @@ let test_unparse_comb_type () = (* pair (nat %a) (nat %b) (nat %c) *) pair_t (-1) - (nat_ty, Some (field_annot "b"), None) - (nat_ty, Some (field_annot "c"), None) + (nat_ty, Some (field_annot "b")) + (nat_ty, Some (field_annot "c")) ~annot:None >>??= fun pair_nat_b_nat_c_ty -> pair_t (-1) - (nat_ty, Some (field_annot "a"), None) - (pair_nat_b_nat_c_ty, None, None) + (nat_ty, Some (field_annot "a")) + (pair_nat_b_nat_c_ty, None) ~annot:None >>??= fun pair_nat_a_nat_b_nat_c_ty -> test_unparse_ty @@ -384,12 +364,12 @@ let test_unparse_comb_type () = pair_nat_a_nat_b_nat_c_ty >>?= fun ctxt -> (* pair (nat %a) (pair %b nat nat) *) - pair_t (-1) (nat_ty, None, None) (nat_ty, None, None) ~annot:None + pair_t (-1) (nat_ty, None) (nat_ty, None) ~annot:None >>??= fun pair_nat_nat_ty -> pair_t (-1) - (nat_ty, Some (field_annot "a"), None) - (pair_nat_nat_ty, Some (field_annot "b"), None) + (nat_ty, Some (field_annot "a")) + (pair_nat_nat_ty, Some (field_annot "b")) ~annot:None >>??= fun pair_nat_a_pair_b_nat_nat_ty -> test_unparse_ty @@ -398,27 +378,10 @@ let test_unparse_comb_type () = (pair_prim2 nat_prim_a (Prim ((), T_pair, [nat_prim; nat_prim], ["%b"]))) pair_nat_a_pair_b_nat_nat_ty >>?= fun ctxt -> - (* pair nat (pair @b nat nat) *) - pair_t - (-1) - (nat_ty, None, None) - (pair_nat_nat_ty, None, Some (var_annot "b")) - ~annot:None - >>??= fun pair_nat_pair_b_nat_nat_ty -> - test_unparse_ty - __LOC__ - ctxt - (pair_prim2 nat_prim (Prim ((), T_pair, [nat_prim; nat_prim], ["@b"]))) - pair_nat_pair_b_nat_nat_ty - >>?= fun ctxt -> (* pair nat (pair :b nat nat) *) - pair_t - (-1) - (nat_ty, None, None) - (nat_ty, None, None) - ~annot:(Some (type_annot "b")) + pair_t (-1) (nat_ty, None) (nat_ty, None) ~annot:(Some (type_annot "b")) >>??= fun pair_b_nat_nat_ty -> - pair_t (-1) (nat_ty, None, None) (pair_b_nat_nat_ty, None, None) ~annot:None + pair_t (-1) (nat_ty, None) (pair_b_nat_nat_ty, None) ~annot:None >>??= fun pair_nat_pair_b_nat_nat_ty -> test_unparse_ty __LOC__ @@ -588,9 +551,7 @@ let test_parse_comb_data () = let z_prim = Micheline.Int (-1, Z.zero) in let nat_ty = nat_t ~annot:None in let pair_prim l = Prim (-1, D_Pair, l, []) in - let pair_ty ty1 ty2 = - pair_t (-1) (ty1, None, None) (ty2, None, None) ~annot:None - in + let pair_ty ty1 ty2 = pair_t (-1) (ty1, None) (ty2, None) ~annot:None in pair_ty nat_ty nat_ty >>??= fun pair_nat_nat_ty -> let pair_prim2 a b = pair_prim [a; b] in let pair_z_z_prim = pair_prim2 z_prim z_prim in @@ -740,9 +701,7 @@ let test_unparse_comb_data () = let z_prim = Micheline.Int (-1, Z.zero) in let nat_ty = nat_t ~annot:None in let pair_prim l = Prim (-1, D_Pair, l, []) in - let pair_ty ty1 ty2 = - pair_t (-1) (ty1, None, None) (ty2, None, None) ~annot:None - in + let pair_ty ty1 ty2 = pair_t (-1) (ty1, None) (ty2, None) ~annot:None in pair_ty nat_ty nat_ty >>??= fun pair_nat_nat_ty -> let pair_prim2 a b = pair_prim [a; b] in let pair_z_z_prim = pair_prim2 z_prim z_prim in @@ -849,9 +808,7 @@ let test_optimal_comb () = @@ gen_combs leaf_mich arity >>=? fun () -> return ctxt ) in - let pair_ty ty1 ty2 = - pair_t (-1) (ty1, None, None) (ty2, None, None) ~annot:None - in + let pair_ty ty1 ty2 = pair_t (-1) (ty1, None) (ty2, None) ~annot:None in test_context () >>=? fun ctxt -> pair_ty leaf_ty leaf_ty >>??= fun comb2_ty -> let comb2_v = (leaf_v, leaf_v) in -- GitLab From 0fa7dfc20cad287893976c47776c1b6b9dbfb4c2 Mon Sep 17 00:00:00 2001 From: Mehdi Bouaziz Date: Mon, 11 Jan 2021 12:09:35 +0100 Subject: [PATCH 05/17] Proto/Michelson: remove unused field_to_var_annot --- src/proto_alpha/lib_protocol/script_ir_annot.ml | 4 ---- src/proto_alpha/lib_protocol/script_ir_annot.mli | 2 -- src/proto_alpha/lib_protocol/script_ir_translator.ml | 4 ---- 3 files changed, 10 deletions(-) diff --git a/src/proto_alpha/lib_protocol/script_ir_annot.ml b/src/proto_alpha/lib_protocol/script_ir_annot.ml index bd7801125ec0..91df1de1b820 100644 --- a/src/proto_alpha/lib_protocol/script_ir_annot.ml +++ b/src/proto_alpha/lib_protocol/script_ir_annot.ml @@ -73,10 +73,6 @@ let unparse_field_annot : field_annot option -> string list = function | None -> [] | Some (Field_annot a) -> ["%" ^ (a :> string)] -let field_to_var_annot : field_annot option -> var_annot option = function - | None -> None - | Some (Field_annot s) -> Some (Var_annot s) - let type_to_var_annot : type_annot option -> var_annot option = function | None -> None | Some (Type_annot s) -> Some (Var_annot s) diff --git a/src/proto_alpha/lib_protocol/script_ir_annot.mli b/src/proto_alpha/lib_protocol/script_ir_annot.mli index b606426da09f..441cfd10c5e2 100644 --- a/src/proto_alpha/lib_protocol/script_ir_annot.mli +++ b/src/proto_alpha/lib_protocol/script_ir_annot.mli @@ -61,8 +61,6 @@ val unparse_field_annot : field_annot option -> string list (** Conversion functions between different annotation kinds *) -val field_to_var_annot : field_annot option -> var_annot option - val type_to_var_annot : type_annot option -> var_annot option (** Converts a field annot option to an entrypoint. diff --git a/src/proto_alpha/lib_protocol/script_ir_translator.ml b/src/proto_alpha/lib_protocol/script_ir_translator.ml index 9970a14c426e..d5709a01fb85 100644 --- a/src/proto_alpha/lib_protocol/script_ir_translator.ml +++ b/src/proto_alpha/lib_protocol/script_ir_translator.ml @@ -3636,8 +3636,6 @@ and[@coq_axiom_with_reason "gadt"] parse_instr : let k = ty_of_comparable_ty ck in check_kind [Seq_kind] body >>?= fun () -> parse_var_type_annot loc annot >>?= fun ty_name -> - let _k_name = field_to_var_annot default_key_annot in - let _e_name = field_to_var_annot default_elt_annot in pair_t loc (k, None) (elt, None) ~annot:None >>?= fun ty -> non_terminal_recursion ?type_logger @@ -3682,8 +3680,6 @@ and[@coq_axiom_with_reason "gadt"] parse_instr : Item_t (Map_t (comp_elt, element_ty, _), rest) ) -> ( check_kind [Seq_kind] body >>?= fun () -> error_unexpected_annot loc annot >>?= fun () -> - let _k_name = field_to_var_annot default_key_annot in - let _e_name = field_to_var_annot default_elt_annot in let key = ty_of_comparable_ty comp_elt in pair_t loc (key, None) (element_ty, None) ~annot:None >>?= fun ty -> non_terminal_recursion -- GitLab From b128be750d60c4e57de0e56f4e13108cf132e6d1 Mon Sep 17 00:00:00 2001 From: Mehdi Bouaziz Date: Mon, 11 Jan 2021 12:09:35 +0100 Subject: [PATCH 06/17] Proto/Michelson: remove unused default_annot and name_of_ty --- .../lib_protocol/script_ir_annot.ml | 2 - .../lib_protocol/script_ir_annot.mli | 3 - .../lib_protocol/script_ir_translator.ml | 65 ------------------- 3 files changed, 70 deletions(-) diff --git a/src/proto_alpha/lib_protocol/script_ir_annot.ml b/src/proto_alpha/lib_protocol/script_ir_annot.ml index 91df1de1b820..17c3c03d7293 100644 --- a/src/proto_alpha/lib_protocol/script_ir_annot.ml +++ b/src/proto_alpha/lib_protocol/script_ir_annot.ml @@ -89,8 +89,6 @@ let field_annot_opt_eq_entrypoint_lax field_annot_opt entrypoint = | None -> false | Some a' -> Entrypoint.(a' = entrypoint)) -let default_annot ~default = function None -> default | annot -> annot - let merge_type_annot : type error_trace. legacy:bool -> diff --git a/src/proto_alpha/lib_protocol/script_ir_annot.mli b/src/proto_alpha/lib_protocol/script_ir_annot.mli index 441cfd10c5e2..09e930cf5392 100644 --- a/src/proto_alpha/lib_protocol/script_ir_annot.mli +++ b/src/proto_alpha/lib_protocol/script_ir_annot.mli @@ -75,9 +75,6 @@ val field_annot_opt_to_entrypoint_strict : val field_annot_opt_eq_entrypoint_lax : field_annot option -> Entrypoint.t -> bool -(** Replace an annotation by its default value if it is [None] *) -val default_annot : default:'a option -> 'a option -> 'a option - (** Merge type annotations. @return an error {!Inconsistent_type_annotations} if they are both present and different, unless [legacy] *) diff --git a/src/proto_alpha/lib_protocol/script_ir_translator.ml b/src/proto_alpha/lib_protocol/script_ir_translator.ml index d5709a01fb85..2adab4bad371 100644 --- a/src/proto_alpha/lib_protocol/script_ir_translator.ml +++ b/src/proto_alpha/lib_protocol/script_ir_translator.ml @@ -404,40 +404,6 @@ let serialize_stack_for_error ctxt stack_ty = | Unaccounted -> unparse_stack_uncarbonated stack_ty | Limited _ -> [] -let name_of_ty : type a. a ty -> type_annot option = function - | Unit_t meta -> meta.annot - | Int_t meta -> meta.annot - | Nat_t meta -> meta.annot - | String_t meta -> meta.annot - | Bytes_t meta -> meta.annot - | Mutez_t meta -> meta.annot - | Bool_t meta -> meta.annot - | Key_hash_t meta -> meta.annot - | Key_t meta -> meta.annot - | Timestamp_t meta -> meta.annot - | Address_t meta -> meta.annot - | Signature_t meta -> meta.annot - | Operation_t meta -> meta.annot - | Chain_id_t meta -> meta.annot - | Never_t meta -> meta.annot - | Contract_t (_, meta) -> meta.annot - | Pair_t (_, _, meta) -> meta.annot - | Union_t (_, _, meta) -> meta.annot - | Lambda_t (_, _, meta) -> meta.annot - | Option_t (_, meta) -> meta.annot - | List_t (_, meta) -> meta.annot - | Ticket_t (_, meta) -> meta.annot - | Set_t (_, meta) -> meta.annot - | Map_t (_, _, meta) -> meta.annot - | Big_map_t (_, _, meta) -> meta.annot - | Bls12_381_g1_t meta -> meta.annot - | Bls12_381_g2_t meta -> meta.annot - | Bls12_381_fr_t meta -> meta.annot - | Sapling_state_t (_, meta) -> meta.annot - | Sapling_transaction_t (_, meta) -> meta.annot - | Chest_key_t meta -> meta.annot - | Chest_t meta -> meta.annot - let unparse_unit ~loc ctxt () = ok (Prim (loc, D_Unit, [], []), ctxt) let unparse_int ~loc ctxt v = ok (Int (loc, Script_int.to_zint v), ctxt) @@ -4649,16 +4615,6 @@ and[@coq_axiom_with_reason "gadt"] parse_instr : ~legacy storage_type) >>?= fun (Ex_ty storage_type, ctxt) -> - let _arg_annot = - default_annot - (type_to_var_annot (name_of_ty arg_type)) - ~default:default_param_annot - in - let _storage_annot = - default_annot - (type_to_var_annot (name_of_ty storage_type)) - ~default:default_storage_annot - in pair_t loc (arg_type, None) (storage_type, None) ~annot:None >>?= fun arg_type_full -> pair_t loc (list_operation_t, None) (storage_type, None) ~annot:None @@ -5450,17 +5406,6 @@ let parse_code : (Ill_formed_type (Some "storage", code, storage_type_loc)) (parse_storage_ty ctxt ~stack_depth:0 ~legacy storage_type) >>?= fun (Ex_ty storage_type, ctxt) -> - let _arg_annot = - default_annot - (type_to_var_annot (name_of_ty arg_type)) - ~default:default_param_annot - in - let _storage_annot = - default_annot - (type_to_var_annot (name_of_ty storage_type)) - ~default:default_storage_annot - in - pair_t storage_type_loc (arg_type, None) (storage_type, None) ~annot:None >>?= fun arg_type_full -> pair_t @@ -5576,16 +5521,6 @@ let typecheck_code : (Ill_formed_type (Some "storage", code, storage_type_loc)) (parse_storage_ty ctxt ~stack_depth:0 ~legacy storage_type) >>?= fun (Ex_ty storage_type, ctxt) -> - let _arg_annot = - default_annot - (type_to_var_annot (name_of_ty arg_type)) - ~default:default_param_annot - in - let _storage_annot = - default_annot - (type_to_var_annot (name_of_ty storage_type)) - ~default:default_storage_annot - in pair_t storage_type_loc (arg_type, None) (storage_type, None) ~annot:None >>?= fun arg_type_full -> pair_t -- GitLab From ae43db2bedc00cb628cba8149cda8c1468a670a4 Mon Sep 17 00:00:00 2001 From: Mehdi Bouaziz Date: Mon, 11 Jan 2021 12:12:55 +0100 Subject: [PATCH 07/17] Proto/Michelson: remove unused type_to_var_annot --- src/proto_alpha/lib_protocol/script_ir_annot.ml | 4 ---- src/proto_alpha/lib_protocol/script_ir_annot.mli | 4 ---- 2 files changed, 8 deletions(-) diff --git a/src/proto_alpha/lib_protocol/script_ir_annot.ml b/src/proto_alpha/lib_protocol/script_ir_annot.ml index 17c3c03d7293..99f8398d3d40 100644 --- a/src/proto_alpha/lib_protocol/script_ir_annot.ml +++ b/src/proto_alpha/lib_protocol/script_ir_annot.ml @@ -73,10 +73,6 @@ let unparse_field_annot : field_annot option -> string list = function | None -> [] | Some (Field_annot a) -> ["%" ^ (a :> string)] -let type_to_var_annot : type_annot option -> var_annot option = function - | None -> None - | Some (Type_annot s) -> Some (Var_annot s) - let field_annot_opt_to_entrypoint_strict ~loc = function | None -> Ok Entrypoint.default | Some (Field_annot a) -> Entrypoint.of_annot_strict ~loc a diff --git a/src/proto_alpha/lib_protocol/script_ir_annot.mli b/src/proto_alpha/lib_protocol/script_ir_annot.mli index 09e930cf5392..bc306d710075 100644 --- a/src/proto_alpha/lib_protocol/script_ir_annot.mli +++ b/src/proto_alpha/lib_protocol/script_ir_annot.mli @@ -59,10 +59,6 @@ val unparse_var_annot : var_annot option -> string list val unparse_field_annot : field_annot option -> string list -(** Conversion functions between different annotation kinds *) - -val type_to_var_annot : type_annot option -> var_annot option - (** Converts a field annot option to an entrypoint. An error is returned if the field annot is too long or is "default". [None] is converted to [Some default]. -- GitLab From 993f800ec283e8a6a1b2a0a44b55e8e22b40e1fd Mon Sep 17 00:00:00 2001 From: Mehdi Bouaziz Date: Mon, 11 Jan 2021 12:12:55 +0100 Subject: [PATCH 08/17] Proto/Michelson: remove unused merge_var_annot --- src/proto_alpha/lib_protocol/script_ir_annot.ml | 7 ------- src/proto_alpha/lib_protocol/script_ir_annot.mli | 3 --- src/proto_alpha/lib_protocol/script_ir_translator.ml | 2 -- 3 files changed, 12 deletions(-) diff --git a/src/proto_alpha/lib_protocol/script_ir_annot.ml b/src/proto_alpha/lib_protocol/script_ir_annot.ml index 99f8398d3d40..02a74b2c584b 100644 --- a/src/proto_alpha/lib_protocol/script_ir_annot.ml +++ b/src/proto_alpha/lib_protocol/script_ir_annot.ml @@ -127,13 +127,6 @@ let merge_field_annot : @@ Inconsistent_annotations ("%" ^ (a1 :> string), "%" ^ (a2 :> string))) -let merge_var_annot : var_annot option -> var_annot option -> var_annot option = - fun annot1 annot2 -> - match (annot1, annot2) with - | (None, None) | (Some _, None) | (None, Some _) -> None - | (Some (Var_annot a1), Some (Var_annot a2)) -> - if Non_empty_string.(a1 = a2) then annot1 else None - let error_unexpected_annot loc annot = match annot with | [] -> Result.return_unit diff --git a/src/proto_alpha/lib_protocol/script_ir_annot.mli b/src/proto_alpha/lib_protocol/script_ir_annot.mli index bc306d710075..07644467175f 100644 --- a/src/proto_alpha/lib_protocol/script_ir_annot.mli +++ b/src/proto_alpha/lib_protocol/script_ir_annot.mli @@ -91,9 +91,6 @@ val merge_field_annot : field_annot option -> (field_annot option, 'error_trace) result -(** Merge variable annotations, does not fail ([None] if different). *) -val merge_var_annot : var_annot option -> var_annot option -> var_annot option - (** @return an error {!Unexpected_annotation} in the monad the list is not empty. *) val error_unexpected_annot : Script.location -> 'a list -> unit tzresult diff --git a/src/proto_alpha/lib_protocol/script_ir_translator.ml b/src/proto_alpha/lib_protocol/script_ir_translator.ml index 2adab4bad371..fd144fc212f0 100644 --- a/src/proto_alpha/lib_protocol/script_ir_translator.ml +++ b/src/proto_alpha/lib_protocol/script_ir_translator.ml @@ -994,8 +994,6 @@ let merge_types : merge_type_metadata tn1 tn2 >>$ fun tname -> merge_field_annot ~legacy l_field1 l_field2 >>$ fun l_field -> merge_field_annot ~legacy r_field1 r_field2 >>$ fun r_field -> - let _l_var = merge_var_annot None None in - let _r_var = merge_var_annot None None in help tal tbl >>$ fun (Eq, left_ty) -> help tar tbr >|$ fun (Eq, right_ty) -> ( (Eq : (ta ty, tb ty) eq), -- GitLab From 6d1374f46988c1787ff8615312a0e6d89f648e50 Mon Sep 17 00:00:00 2001 From: Mehdi Bouaziz Date: Mon, 11 Jan 2021 12:25:02 +0100 Subject: [PATCH 09/17] Proto/Michelson: simplify add_field_annot Second parameter was always None and `unparse_var_annot None = []` --- src/proto_alpha/lib_plugin/plugin.ml | 16 +++++----- .../lib_protocol/script_interpreter_defs.ml | 2 +- .../lib_protocol/script_ir_translator.ml | 31 +++++++------------ .../lib_protocol/script_ir_translator.mli | 1 - 4 files changed, 20 insertions(+), 30 deletions(-) diff --git a/src/proto_alpha/lib_plugin/plugin.ml b/src/proto_alpha/lib_plugin/plugin.ml index 408f96ea723a..f496a451dd62 100644 --- a/src/proto_alpha/lib_plugin/plugin.ml +++ b/src/proto_alpha/lib_plugin/plugin.ml @@ -1944,12 +1944,12 @@ module RPC = struct | Chain_id_key meta -> Prim (loc, T_chain_id, [], unparse_type_annot meta.annot) | Pair_key ((l, al), (r, ar), meta) -> - let tl = add_field_annot al None (unparse_comparable_ty ~loc l) in - let tr = add_field_annot ar None (unparse_comparable_ty ~loc r) in + let tl = add_field_annot al (unparse_comparable_ty ~loc l) in + let tr = add_field_annot ar (unparse_comparable_ty ~loc r) in Prim (loc, T_pair, [tl; tr], unparse_type_annot meta.annot) | Union_key ((l, al), (r, ar), meta) -> - let tl = add_field_annot al None (unparse_comparable_ty ~loc l) in - let tr = add_field_annot ar None (unparse_comparable_ty ~loc r) in + let tl = add_field_annot al (unparse_comparable_ty ~loc l) in + let tr = add_field_annot ar (unparse_comparable_ty ~loc r) in Prim (loc, T_or, [tl; tr], unparse_type_annot meta.annot) | Option_key (t, meta) -> Prim @@ -1999,16 +1999,16 @@ module RPC = struct | Pair_t ((utl, l_field), (utr, r_field), meta) -> let annot = unparse_type_annot meta.annot in let utl = unparse_ty ~loc utl in - let tl = add_field_annot l_field None utl in + let tl = add_field_annot l_field utl in let utr = unparse_ty ~loc utr in - let tr = add_field_annot r_field None utr in + let tr = add_field_annot r_field utr in return (T_pair, [tl; tr], annot) | Union_t ((utl, l_field), (utr, r_field), meta) -> let annot = unparse_type_annot meta.annot in let utl = unparse_ty ~loc utl in - let tl = add_field_annot l_field None utl in + let tl = add_field_annot l_field utl in let utr = unparse_ty ~loc utr in - let tr = add_field_annot r_field None utr in + let tr = add_field_annot r_field utr in return (T_or, [tl; tr], annot) | Lambda_t (uta, utr, meta) -> let ta = unparse_ty ~loc uta in diff --git a/src/proto_alpha/lib_protocol/script_interpreter_defs.ml b/src/proto_alpha/lib_protocol/script_interpreter_defs.ml index 4963601dadc0..76455a1d77d8 100644 --- a/src/proto_alpha/lib_protocol/script_interpreter_defs.ml +++ b/src/proto_alpha/lib_protocol/script_interpreter_defs.ml @@ -543,7 +543,7 @@ let create_contract (ctxt, sc) gas storage_type param_type code views root_name let loc = Micheline.dummy_location in unparse_ty ~loc ctxt param_type >>?= fun (unparsed_param_type, ctxt) -> let unparsed_param_type = - Script_ir_translator.add_field_annot root_name None unparsed_param_type + Script_ir_translator.add_field_annot root_name unparsed_param_type in unparse_ty ~loc ctxt storage_type >>?= fun (unparsed_storage_type, ctxt) -> let open Micheline in diff --git a/src/proto_alpha/lib_protocol/script_ir_translator.ml b/src/proto_alpha/lib_protocol/script_ir_translator.ml index fd144fc212f0..c0ba5ea23ca0 100644 --- a/src/proto_alpha/lib_protocol/script_ir_translator.ml +++ b/src/proto_alpha/lib_protocol/script_ir_translator.ml @@ -178,10 +178,9 @@ let rec ty_of_comparable_ty : type a. a comparable_ty -> a ty = function Union_t ((ty_of_comparable_ty l, al), (ty_of_comparable_ty r, ar), tname) | Option_key (t, tname) -> Option_t (ty_of_comparable_ty t, tname) -let add_field_annot a var = function +let add_field_annot a = function | Prim (loc, prim, args, annots) -> - Prim - (loc, prim, args, annots @ unparse_field_annot a @ unparse_var_annot var) + Prim (loc, prim, args, annots @ unparse_field_annot a) | expr -> expr let rec unparse_comparable_ty_uncarbonated : @@ -206,12 +205,8 @@ let rec unparse_comparable_ty_uncarbonated : | Chain_id_key meta -> Prim (loc, T_chain_id, [], unparse_type_annot meta.annot) | Pair_key ((l, al), (r, ar), meta) -> ( - let tl = - add_field_annot al None (unparse_comparable_ty_uncarbonated ~loc l) - in - let tr = - add_field_annot ar None (unparse_comparable_ty_uncarbonated ~loc r) - in + let tl = add_field_annot al (unparse_comparable_ty_uncarbonated ~loc l) in + let tr = add_field_annot ar (unparse_comparable_ty_uncarbonated ~loc r) in (* Fold [pair a1 (pair ... (pair an-1 an))] into [pair a1 ... an] *) (* Note that the folding does not happen if the pair on the right has a field annotation because this annotation would be lost *) @@ -220,12 +215,8 @@ let rec unparse_comparable_ty_uncarbonated : Prim (loc, T_pair, tl :: ts, unparse_type_annot meta.annot) | _ -> Prim (loc, T_pair, [tl; tr], unparse_type_annot meta.annot)) | Union_key ((l, al), (r, ar), meta) -> - let tl = - add_field_annot al None (unparse_comparable_ty_uncarbonated ~loc l) - in - let tr = - add_field_annot ar None (unparse_comparable_ty_uncarbonated ~loc r) - in + let tl = add_field_annot al (unparse_comparable_ty_uncarbonated ~loc l) in + let tr = add_field_annot ar (unparse_comparable_ty_uncarbonated ~loc r) in Prim (loc, T_or, [tl; tr], unparse_type_annot meta.annot) | Option_key (t, meta) -> Prim @@ -270,9 +261,9 @@ let rec unparse_ty_uncarbonated : | Pair_t ((utl, l_field), (utr, r_field), meta) -> let annot = unparse_type_annot meta.annot in let utl = unparse_ty_uncarbonated ~loc utl in - let tl = add_field_annot l_field None utl in + let tl = add_field_annot l_field utl in let utr = unparse_ty_uncarbonated ~loc utr in - let tr = add_field_annot r_field None utr in + let tr = add_field_annot r_field utr in (* Fold [pair a1 (pair ... (pair an-1 an))] into [pair a1 ... an] *) (* Note that the folding does not happen if the pair on the right has an annotation because this annotation would be lost *) @@ -283,9 +274,9 @@ let rec unparse_ty_uncarbonated : | Union_t ((utl, l_field), (utr, r_field), meta) -> let annot = unparse_type_annot meta.annot in let utl = unparse_ty_uncarbonated ~loc utl in - let tl = add_field_annot l_field None utl in + let tl = add_field_annot l_field utl in let utr = unparse_ty_uncarbonated ~loc utr in - let tr = add_field_annot r_field None utr in + let tr = add_field_annot r_field utr in prim (T_or, [tl; tr], annot) | Lambda_t (uta, utr, meta) -> let ta = unparse_ty_uncarbonated ~loc uta in @@ -5884,7 +5875,7 @@ let unparse_script ctxt mode (let loc = Micheline.dummy_location in unparse_ty ~loc ctxt arg_type >>? fun (arg_type, ctxt) -> unparse_ty ~loc ctxt storage_type >>? fun (storage_type, ctxt) -> - let arg_type = add_field_annot root_name None arg_type in + let arg_type = add_field_annot root_name arg_type in let open Micheline in let view name {input_ty; output_ty; view_code} views = Prim diff --git a/src/proto_alpha/lib_protocol/script_ir_translator.mli b/src/proto_alpha/lib_protocol/script_ir_translator.mli index 0fef3a64fd54..1d2a8d88210a 100644 --- a/src/proto_alpha/lib_protocol/script_ir_translator.mli +++ b/src/proto_alpha/lib_protocol/script_ir_translator.mli @@ -338,7 +338,6 @@ val parse_toplevel : val add_field_annot : Script_ir_annot.field_annot option -> - Script_ir_annot.var_annot option -> ('loc, 'prim) Micheline.node -> ('loc, 'prim) Micheline.node -- GitLab From 47391bd6cedd1ff6160936d229391d63e60ce131 Mon Sep 17 00:00:00 2001 From: Mehdi Bouaziz Date: Mon, 11 Jan 2021 12:43:39 +0100 Subject: [PATCH 10/17] Proto/Michelson: remove unused unparse_var_annot --- src/proto_alpha/lib_protocol/script_ir_annot.ml | 4 ---- src/proto_alpha/lib_protocol/script_ir_annot.mli | 2 -- 2 files changed, 6 deletions(-) diff --git a/src/proto_alpha/lib_protocol/script_ir_annot.ml b/src/proto_alpha/lib_protocol/script_ir_annot.ml index 02a74b2c584b..49a31ff2b2c6 100644 --- a/src/proto_alpha/lib_protocol/script_ir_annot.ml +++ b/src/proto_alpha/lib_protocol/script_ir_annot.ml @@ -65,10 +65,6 @@ let unparse_type_annot : type_annot option -> string list = function | None -> [] | Some (Type_annot a) -> [":" ^ (a :> string)] -let unparse_var_annot : var_annot option -> string list = function - | None -> [] - | Some (Var_annot a) -> ["@" ^ (a :> string)] - let unparse_field_annot : field_annot option -> string list = function | None -> [] | Some (Field_annot a) -> ["%" ^ (a :> string)] diff --git a/src/proto_alpha/lib_protocol/script_ir_annot.mli b/src/proto_alpha/lib_protocol/script_ir_annot.mli index 07644467175f..6615c624395d 100644 --- a/src/proto_alpha/lib_protocol/script_ir_annot.mli +++ b/src/proto_alpha/lib_protocol/script_ir_annot.mli @@ -55,8 +55,6 @@ val default_key_annot : field_annot option val unparse_type_annot : type_annot option -> string list -val unparse_var_annot : var_annot option -> string list - val unparse_field_annot : field_annot option -> string list (** Converts a field annot option to an entrypoint. -- GitLab From 175c8ec1d8fdea0109554bbe6396f703338d14ac Mon Sep 17 00:00:00 2001 From: Mehdi Bouaziz Date: Mon, 11 Jan 2021 12:12:55 +0100 Subject: [PATCH 11/17] Proto/Michelson: remove unused default annot names --- src/proto_alpha/lib_protocol/script_ir_annot.ml | 17 ----------------- .../lib_protocol/script_ir_annot.mli | 12 ------------ 2 files changed, 29 deletions(-) diff --git a/src/proto_alpha/lib_protocol/script_ir_annot.ml b/src/proto_alpha/lib_protocol/script_ir_annot.ml index 49a31ff2b2c6..5da87b253b62 100644 --- a/src/proto_alpha/lib_protocol/script_ir_annot.ml +++ b/src/proto_alpha/lib_protocol/script_ir_annot.ml @@ -44,23 +44,6 @@ module FOR_TESTS = struct Field_annot (Non_empty_string.of_string_exn s) end -let some_var_annot_of_string_exn s = - Some (Var_annot (Non_empty_string.of_string_exn s)) - -let some_field_annot_of_string_exn s = - Some (Field_annot (Non_empty_string.of_string_exn s)) - -let default_param_annot = some_var_annot_of_string_exn "parameter" - -let default_storage_annot = some_var_annot_of_string_exn "storage" - -let default_elt_annot = some_field_annot_of_string_exn "elt" - -let default_key_annot = some_field_annot_of_string_exn "key" - -let default_sapling_balance_annot = - some_var_annot_of_string_exn "sapling_balance" - let unparse_type_annot : type_annot option -> string list = function | None -> [] | Some (Type_annot a) -> [":" ^ (a :> string)] diff --git a/src/proto_alpha/lib_protocol/script_ir_annot.mli b/src/proto_alpha/lib_protocol/script_ir_annot.mli index 6615c624395d..f5cc54d08c1b 100644 --- a/src/proto_alpha/lib_protocol/script_ir_annot.mli +++ b/src/proto_alpha/lib_protocol/script_ir_annot.mli @@ -39,18 +39,6 @@ module FOR_TESTS : sig val unsafe_field_annot_of_string : string -> field_annot end -(** Default annotations *) - -val default_param_annot : var_annot option - -val default_storage_annot : var_annot option - -val default_sapling_balance_annot : var_annot option - -val default_elt_annot : field_annot option - -val default_key_annot : field_annot option - (** Unparse annotations to their string representation *) val unparse_type_annot : type_annot option -> string list -- GitLab From 7d2765d0c5e1d5175d51dd47e16d3891744855e5 Mon Sep 17 00:00:00 2001 From: Mehdi Bouaziz Date: Mon, 10 Jan 2022 16:47:14 +0100 Subject: [PATCH 12/17] Proto/Michelson: update ty_size --- src/proto_alpha/lib_protocol/script_typed_ir_size.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/proto_alpha/lib_protocol/script_typed_ir_size.ml b/src/proto_alpha/lib_protocol/script_typed_ir_size.ml index d01fb45e0335..2950658c7c9d 100644 --- a/src/proto_alpha/lib_protocol/script_typed_ir_size.ml +++ b/src/proto_alpha/lib_protocol/script_typed_ir_size.ml @@ -81,7 +81,7 @@ let (comparable_ty_size, ty_size) = | Chest_key_t a -> ret_succ_adding accu @@ base a | Chest_t a -> ret_succ_adding accu @@ base a | Pair_t ((_ty1, _fa1), (_ty2, _fa2), a) -> - ret_succ_adding accu @@ (base a +! hh8w) + ret_succ_adding accu @@ (base a +! hh6w) | Union_t ((_ty1, _fa1), (_ty2, _fa2), a) -> ret_succ_adding accu @@ (base a +! hh6w) | Lambda_t (_ty1, _ty2, a) -> -- GitLab From 83ec6ee3a79233d8353393568813118b9203f98a Mon Sep 17 00:00:00 2001 From: Mehdi Bouaziz Date: Mon, 10 Jan 2022 16:50:37 +0100 Subject: [PATCH 13/17] Proto/Doc: add entry in changelog --- docs/protocols/alpha.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/protocols/alpha.rst b/docs/protocols/alpha.rst index 63d822e2411b..d1110e8e078e 100644 --- a/docs/protocols/alpha.rst +++ b/docs/protocols/alpha.rst @@ -50,6 +50,9 @@ Michelson ``annot`` are replaced with the contents of the field ``item``. (MR :gl:`!4139`) +- Variable annotations in pairs are ignored and not propagated. + (MR :gl:`!4140`) + Internal -------- -- GitLab From f0452f08e668ae1964282365971e96a9b96bf59e Mon Sep 17 00:00:00 2001 From: Mehdi Bouaziz Date: Mon, 10 Jan 2022 19:32:46 +0100 Subject: [PATCH 14/17] Tests/Python: regenerate typechecking traces --- ...ck::test_typecheck[attic--accounts.tz].out | 112 +- ...st_typecheck[attic--after_strategy.tz].out | 5 +- ...eck::test_typecheck[attic--auction.tz].out | 25 +- ...heck::test_typecheck[attic--concat.tz].out | 5 +- ...::test_typecheck[attic--cons_twice.tz].out | 5 +- ...st_typecheck[attic--data_publisher.tz].out | 6 +- ...ck::test_typecheck[attic--dispatch.tz].out | 16 +- ...eck::test_typecheck[attic--forward.tz].out | 1846 ++++++++--------- ...est_typecheck[attic--int_publisher.tz].out | 90 +- ...:test_typecheck[attic--king_of_tez.tz].out | 14 +- ...check::test_typecheck[attic--queue.tz].out | 15 +- ...::test_typecheck[attic--reduce_map.tz].out | 3 +- ...pecheck[attic--scrutable_reservoir.tz].out | 66 +- ..._typecheck[attic--spawn_identities.tz].out | 4 +- ..._typecheck[macros--big_map_get_add.tz].out | 43 +- ...test_typecheck[macros--big_map_mem.tz].out | 10 +- ...:test_typecheck[macros--pair_macro.tz].out | 12 +- ...est_typecheck[macros--set_caddaadr.tz].out | 12 +- ...ck[mini_scenarios--create_contract.tz].out | 2 +- ...ck[mini_scenarios--default_account.tz].out | 2 +- ...eck[mini_scenarios--lqt_fa12.mligo.tz].out | 260 ++- ...check[mini_scenarios--multiple_en2.tz].out | 32 +- ...rios--multiple_entrypoints_counter.tz].out | 15 +- ..._scenarios--parameterized_multisig.tz].out | 9 +- ..._scenarios--reveal_signed_preimage.tz].out | 39 +- ...scenarios--ticket_builder_fungible.tz].out | 14 +- ...arios--ticket_builder_non_fungible.tz].out | 10 +- ..._scenarios--ticket_wallet_fungible.tz].out | 16 +- ...narios--ticket_wallet_non_fungible.tz].out | 16 +- ...[mini_scenarios--vote_for_delegate.tz].out | 56 +- ...[mini_scenarios--weather_insurance.tz].out | 279 ++- ...ypecheck[mini_scenarios--xcat_dapp.tz].out | 40 +- ...echeck[non_regression--pairk_annot.tz].out | 18 +- ...::test_typecheck[opcodes--chain_id.tz].out | 4 +- ...typecheck[opcodes--check_signature.tz].out | 34 +- ...t_typecheck[opcodes--comb-literals.tz].out | 2 +- ...typecheck[opcodes--create_contract.tz].out | 2 +- ...[opcodes--create_contract_rootname.tz].out | 2 +- ...odes--create_contract_rootname_alt.tz].out | 2 +- ...opcodes--create_contract_with_view.tz].out | 2 +- ...pecheck[opcodes--get_big_map_value.tz].out | 7 +- ...t_typecheck[opcodes--get_map_value.tz].out | 7 +- ...k::test_typecheck[opcodes--map_car.tz].out | 5 +- ...::test_typecheck[opcodes--map_iter.tz].out | 9 +- ...eck::test_typecheck[opcodes--pexec.tz].out | 4 +- ...k::test_typecheck[opcodes--set_car.tz].out | 6 +- ...k::test_typecheck[opcodes--set_cdr.tz].out | 6 +- ...test_typecheck[opcodes--set_member.tz].out | 24 +- ...ck::test_typecheck[opcodes--slices.tz].out | 123 +- 49 files changed, 1495 insertions(+), 1841 deletions(-) diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--accounts.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--accounts.tz].out index 9995b3f7c951..2d6e91f2af71 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--accounts.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--accounts.tz].out @@ -7,28 +7,24 @@ Gas remaining: 1039925.145 units remaining (pair %Withdraw (key %from) (pair (mutez %withdraw_amount) (signature %sig)))) ; storage (map :stored_balance key_hash mutez) ; code { DUP - /* [ pair (or @parameter - (key_hash %Initialize) - (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) - (map :stored_balance @stored_balance key_hash mutez) - : pair (or @parameter - (key_hash %Initialize) - (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) - (map :stored_balance @stored_balance key_hash mutez) ] */ ; + /* [ pair (or (key_hash %Initialize) + (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) + (map :stored_balance key_hash mutez) + : pair (or (key_hash %Initialize) + (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) + (map :stored_balance key_hash mutez) ] */ ; CAR /* [ or (key_hash %Initialize) (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig)) - : pair (or @parameter - (key_hash %Initialize) - (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) - (map :stored_balance @stored_balance key_hash mutez) ] */ ; + : pair (or (key_hash %Initialize) + (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) + (map :stored_balance key_hash mutez) ] */ ; IF_LEFT { DUP /* [ key_hash : key_hash - : pair (or @parameter - (key_hash %Initialize) - (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) - (map :stored_balance @stored_balance key_hash mutez) ] */ ; + : pair (or (key_hash %Initialize) + (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) + (map :stored_balance key_hash mutez) ] */ ; DIIP { CDR %stored_balance /* [ map :stored_balance key_hash mutez ] */ ; DUP @@ -73,97 +69,85 @@ Gas remaining: 1039925.145 units remaining { DUP /* [ pair (key %from) (mutez %withdraw_amount) (signature %sig) : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (or @parameter - (key_hash %Initialize) - (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) - (map :stored_balance @stored_balance key_hash mutez) ] */ ; + : pair (or (key_hash %Initialize) + (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) + (map :stored_balance key_hash mutez) ] */ ; DUP /* [ pair (key %from) (mutez %withdraw_amount) (signature %sig) : pair (key %from) (mutez %withdraw_amount) (signature %sig) : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (or @parameter - (key_hash %Initialize) - (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) - (map :stored_balance @stored_balance key_hash mutez) ] */ ; + : pair (or (key_hash %Initialize) + (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) + (map :stored_balance key_hash mutez) ] */ ; DUP /* [ pair (key %from) (mutez %withdraw_amount) (signature %sig) : pair (key %from) (mutez %withdraw_amount) (signature %sig) : pair (key %from) (mutez %withdraw_amount) (signature %sig) : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (or @parameter - (key_hash %Initialize) - (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) - (map :stored_balance @stored_balance key_hash mutez) ] */ ; + : pair (or (key_hash %Initialize) + (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) + (map :stored_balance key_hash mutez) ] */ ; DUP /* [ pair (key %from) (mutez %withdraw_amount) (signature %sig) : pair (key %from) (mutez %withdraw_amount) (signature %sig) : pair (key %from) (mutez %withdraw_amount) (signature %sig) : pair (key %from) (mutez %withdraw_amount) (signature %sig) : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (or @parameter - (key_hash %Initialize) - (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) - (map :stored_balance @stored_balance key_hash mutez) ] */ ; + : pair (or (key_hash %Initialize) + (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) + (map :stored_balance key_hash mutez) ] */ ; CAR %from /* [ key : pair (key %from) (mutez %withdraw_amount) (signature %sig) : pair (key %from) (mutez %withdraw_amount) (signature %sig) : pair (key %from) (mutez %withdraw_amount) (signature %sig) : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (or @parameter - (key_hash %Initialize) - (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) - (map :stored_balance @stored_balance key_hash mutez) ] */ ; + : pair (or (key_hash %Initialize) + (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) + (map :stored_balance key_hash mutez) ] */ ; DIIP { CDAR %withdraw_amount ; PACK /* [ bytes : pair (key %from) (mutez %withdraw_amount) (signature %sig) : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (or @parameter - (key_hash %Initialize) - (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) - (map :stored_balance @stored_balance key_hash mutez) ] */ ; + : pair (or (key_hash %Initialize) + (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) + (map :stored_balance key_hash mutez) ] */ ; BLAKE2B @signed_amount /* [ bytes : pair (key %from) (mutez %withdraw_amount) (signature %sig) : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (or @parameter - (key_hash %Initialize) - (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) - (map :stored_balance @stored_balance key_hash mutez) ] */ } + : pair (or (key_hash %Initialize) + (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) + (map :stored_balance key_hash mutez) ] */ } /* [ key : pair (key %from) (mutez %withdraw_amount) (signature %sig) : bytes : pair (key %from) (mutez %withdraw_amount) (signature %sig) : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (or @parameter - (key_hash %Initialize) - (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) - (map :stored_balance @stored_balance key_hash mutez) ] */ ; + : pair (or (key_hash %Initialize) + (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) + (map :stored_balance key_hash mutez) ] */ ; DIP { CDDR %sig } /* [ key : signature : bytes : pair (key %from) (mutez %withdraw_amount) (signature %sig) : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (or @parameter - (key_hash %Initialize) - (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) - (map :stored_balance @stored_balance key_hash mutez) ] */ ; + : pair (or (key_hash %Initialize) + (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) + (map :stored_balance key_hash mutez) ] */ ; CHECK_SIGNATURE /* [ bool : pair (key %from) (mutez %withdraw_amount) (signature %sig) : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (or @parameter - (key_hash %Initialize) - (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) - (map :stored_balance @stored_balance key_hash mutez) ] */ ; + : pair (or (key_hash %Initialize) + (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) + (map :stored_balance key_hash mutez) ] */ ; IF { /* [ pair (key %from) (mutez %withdraw_amount) (signature %sig) : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (or @parameter - (key_hash %Initialize) - (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) - (map :stored_balance @stored_balance key_hash mutez) ] */ } + : pair (or (key_hash %Initialize) + (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) + (map :stored_balance key_hash mutez) ] */ } { PUSH string "Bad signature" /* [ string : pair (key %from) (mutez %withdraw_amount) (signature %sig) : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (or @parameter - (key_hash %Initialize) - (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) - (map :stored_balance @stored_balance key_hash mutez) ] */ ; + : pair (or (key_hash %Initialize) + (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) + (map :stored_balance key_hash mutez) ] */ ; FAILWITH /* [] */ } ; DIIP { CDR %stored_balance diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--after_strategy.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--after_strategy.tz].out index c556cd5fe60d..f13f72ec5d7c 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--after_strategy.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--after_strategy.tz].out @@ -5,10 +5,9 @@ Gas remaining: 1039989.643 units remaining { parameter nat ; storage (pair (pair nat bool) timestamp) ; code { DUP - /* [ pair (nat @parameter) (pair @storage (pair nat bool) timestamp) - : pair (nat @parameter) (pair @storage (pair nat bool) timestamp) ] */ ; + /* [ pair nat (pair nat bool) timestamp : pair nat (pair nat bool) timestamp ] */ ; CAR - /* [ nat : pair (nat @parameter) (pair @storage (pair nat bool) timestamp) ] */ ; + /* [ nat : pair nat (pair nat bool) timestamp ] */ ; DIP { CDDR ; DUP /* [ timestamp : timestamp ] */ ; diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--auction.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--auction.tz].out index 7944e5d105ed..1593cd1d0ff3 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--auction.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--auction.tz].out @@ -5,30 +5,23 @@ Gas remaining: 1039972.258 units remaining { parameter key_hash ; storage (pair timestamp (pair mutez key_hash)) ; code { DUP - /* [ pair (key_hash @parameter) (pair @storage timestamp mutez key_hash) - : pair (key_hash @parameter) (pair @storage timestamp mutez key_hash) ] */ ; + /* [ pair key_hash timestamp mutez key_hash + : pair key_hash timestamp mutez key_hash ] */ ; CDAR ; DUP - /* [ timestamp : timestamp - : pair (key_hash @parameter) (pair @storage timestamp mutez key_hash) ] */ ; + /* [ timestamp : timestamp : pair key_hash timestamp mutez key_hash ] */ ; NOW /* [ timestamp : timestamp : timestamp - : pair (key_hash @parameter) (pair @storage timestamp mutez key_hash) ] */ ; + : pair key_hash timestamp mutez key_hash ] */ ; CMPGT ; - IF { FAIL } - { /* [ timestamp - : pair (key_hash @parameter) (pair @storage timestamp mutez key_hash) ] */ } ; + IF { FAIL } { /* [ timestamp : pair key_hash timestamp mutez key_hash ] */ } ; SWAP - /* [ pair (key_hash @parameter) (pair @storage timestamp mutez key_hash) - : timestamp ] */ ; + /* [ pair key_hash timestamp mutez key_hash : timestamp ] */ ; DUP - /* [ pair (key_hash @parameter) (pair @storage timestamp mutez key_hash) - : pair (key_hash @parameter) (pair @storage timestamp mutez key_hash) - : timestamp ] */ ; + /* [ pair key_hash timestamp mutez key_hash + : pair key_hash timestamp mutez key_hash : timestamp ] */ ; CAR - /* [ key_hash - : pair (key_hash @parameter) (pair @storage timestamp mutez key_hash) - : timestamp ] */ ; + /* [ key_hash : pair key_hash timestamp mutez key_hash : timestamp ] */ ; DIP { CDDR } /* [ key_hash : pair mutez key_hash : timestamp ] */ ; AMOUNT diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--concat.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--concat.tz].out index aed12ebd6982..6a9d4a3facb1 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--concat.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--concat.tz].out @@ -5,8 +5,7 @@ Gas remaining: 1039992.618 units remaining { parameter string ; storage string ; code { DUP - /* [ pair (string @parameter) (string @storage) - : pair (string @parameter) (string @storage) ] */ ; + /* [ pair string string : pair string string ] */ ; DIP { CDR /* [ string ] */ ; NIL string @@ -15,7 +14,7 @@ Gas remaining: 1039992.618 units remaining /* [ string : list string ] */ ; CONS /* [ list string ] */ } - /* [ pair (string @parameter) (string @storage) : list string ] */ ; + /* [ pair string string : list string ] */ ; CAR /* [ string : list string ] */ ; CONS diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--cons_twice.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--cons_twice.tz].out index 88a5f13091a2..61910b17a867 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--cons_twice.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--cons_twice.tz].out @@ -5,10 +5,9 @@ Gas remaining: 1039992.638 units remaining { parameter nat ; storage (list nat) ; code { DUP - /* [ pair (nat @parameter) (list @storage nat) - : pair (nat @parameter) (list @storage nat) ] */ ; + /* [ pair nat (list nat) : pair nat (list nat) ] */ ; CAR - /* [ nat : pair (nat @parameter) (list @storage nat) ] */ ; + /* [ nat : pair nat (list nat) ] */ ; DIP { CDR /* [ list nat ] */ } /* [ nat : list nat ] */ ; DUP diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--data_publisher.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--data_publisher.tz].out index 5df6245e17bd..5f21c0a53776 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--data_publisher.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--data_publisher.tz].out @@ -5,11 +5,11 @@ Gas remaining: 1039974.524 units remaining { parameter (pair signature (pair string nat)) ; storage (pair (pair key nat) string) ; code { DUP - /* [ pair (pair @parameter signature string nat) (pair @storage (pair key nat) string) - : pair (pair @parameter signature string nat) (pair @storage (pair key nat) string) ] */ ; + /* [ pair (pair signature string nat) (pair key nat) string + : pair (pair signature string nat) (pair key nat) string ] */ ; CAR /* [ pair signature string nat - : pair (pair @parameter signature string nat) (pair @storage (pair key nat) string) ] */ ; + : pair (pair signature string nat) (pair key nat) string ] */ ; DIP { CDR /* [ pair (pair key nat) string ] */ ; DUP diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--dispatch.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--dispatch.tz].out index 98b786e67eb7..a02e29dd8d1e 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--dispatch.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--dispatch.tz].out @@ -5,14 +5,16 @@ Gas remaining: 1039979.486 units remaining { parameter (or string (pair string (lambda unit string))) ; storage (pair string (map string (lambda unit string))) ; code { DUP - /* [ pair (or @parameter string (pair string (lambda unit string))) - (pair @storage string (map string (lambda unit string))) - : pair (or @parameter string (pair string (lambda unit string))) - (pair @storage string (map string (lambda unit string))) ] */ ; + /* [ pair (or string (pair string (lambda unit string))) + string + (map string (lambda unit string)) + : pair (or string (pair string (lambda unit string))) + string + (map string (lambda unit string)) ] */ ; DIP { CDDR } - /* [ pair (or @parameter string (pair string (lambda unit string))) - (pair @storage string (map string (lambda unit string))) - : map string (lambda unit string) ] */ ; + /* [ pair (or string (pair string (lambda unit string))) + string + (map string (lambda unit string)) : map string (lambda unit string) ] */ ; CAR /* [ or string (pair string (lambda unit string)) : map string (lambda unit string) ] */ ; diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--forward.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--forward.tz].out index 4dc2407fa3e2..3d717bb246ab 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--forward.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--forward.tz].out @@ -8,240 +8,213 @@ Gas remaining: 1039634.172 units remaining (pair (pair nat (pair timestamp timestamp)) (pair (pair mutez mutez) (pair (pair address address) address)))) ; code { DUP - /* [ pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + /* [ pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; CDDADDR ; PUSH int 86400 /* [ int : timestamp - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; SWAP /* [ timestamp : int - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; ADD /* [ timestamp - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; NOW /* [ timestamp : timestamp - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; COMPARE /* [ int - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; LT /* [ bool - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; IF { DUP - /* [ pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + /* [ pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; CAR /* [ or string nat - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; IF_LEFT { DUP /* [ string : string - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; PUSH string "buyer" /* [ string : string : string - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; COMPARE /* [ int : string - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; EQ /* [ bool : string - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; IF { DROP - /* [ pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + /* [ pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; DUP - /* [ pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + /* [ pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; CDADAR ; DIP { AMOUNT /* [ mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ } + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ } /* [ mutez : mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; ADD /* [ mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; DIP { DUP - /* [ pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + /* [ pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; CDADDR } /* [ mutez : mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; PAIR /* [ pair mutez mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; PUSH nat 0 /* [ nat : pair mutez mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; PAIR /* [ pair nat mutez mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; DIP { CDDR } /* [ pair nat mutez mutez : pair (pair nat timestamp timestamp) (pair mutez mutez) (pair address address) address ] */ ; @@ -268,134 +241,119 @@ Gas remaining: 1039634.172 units remaining { PUSH string "seller" /* [ string : string - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; COMPARE /* [ int - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; EQ /* [ bool - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; IF { DUP - /* [ pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + /* [ pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; CDADDR ; DIP { AMOUNT /* [ mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ } + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ } /* [ mutez : mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; ADD /* [ mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; DIP { DUP - /* [ pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + /* [ pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; CDADAR } /* [ mutez : mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; SWAP /* [ mutez : mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; PAIR /* [ pair mutez mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; PUSH nat 0 /* [ nat : pair mutez mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; PAIR /* [ pair nat mutez mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; DIP { CDDR } /* [ pair nat mutez mutez : pair (pair nat timestamp timestamp) (pair mutez mutez) (pair address address) address ] */ ; @@ -423,127 +381,113 @@ Gas remaining: 1039634.172 units remaining { FAIL } } { BALANCE /* [ mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; PUSH mutez 0 /* [ mutez : mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; IFCMPEQ { FAIL } - { /* [ pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ } ; + { /* [ pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ } ; DUP - /* [ pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + /* [ pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; CDDAAR ; DIP { DUP - /* [ pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + /* [ pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; CDDDADR } /* [ nat : mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; MUL /* [ mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; PUSH nat 2 /* [ nat : mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; MUL /* [ mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; BALANCE /* [ mutez : mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; COMPARE /* [ int - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; LT /* [ bool - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; IF { CDR /* [ pair (pair nat mutez mutez) (pair nat timestamp timestamp) @@ -834,358 +778,317 @@ Gas remaining: 1039634.172 units remaining (pair address address) address ] */ } { DUP - /* [ pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + /* [ pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; CDDADAR ; NOW /* [ timestamp : timestamp - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; COMPARE /* [ int - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; LT /* [ bool - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; IF { FAIL } { DUP - /* [ pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + /* [ pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; CDDADAR ; PUSH int 86400 /* [ int : timestamp - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; ADD /* [ timestamp - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; NOW /* [ timestamp : timestamp - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; COMPARE /* [ int - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; LT /* [ bool - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; IF { DUP - /* [ pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + /* [ pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; CAR /* [ or string nat - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; IF_LEFT { PUSH string "buyer" /* [ string : string - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; COMPARE /* [ int - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; EQ /* [ bool - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; IF { DUP - /* [ pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + /* [ pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; CDADAR ; DIP { AMOUNT /* [ mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ } + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ } /* [ mutez : mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; ADD /* [ mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; DUP /* [ mutez : mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; DIIP { DUP - /* [ pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + /* [ pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; CDDAAR ; DIP { DUP - /* [ pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + /* [ pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; CDDDAAR } /* [ nat : mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; MUL /* [ mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ } + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ } /* [ mutez : mutez : mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; DIP { COMPARE /* [ int - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; GT /* [ bool - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; IF { FAIL } - { /* [ pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ } } + { /* [ pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ } } /* [ mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; DIP { DUP - /* [ pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + /* [ pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; CDADDR } /* [ mutez : mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; PAIR /* [ pair mutez mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; PUSH nat 0 /* [ nat : pair mutez mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; PAIR /* [ pair nat mutez mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; DIP { CDDR } /* [ pair nat mutez mutez : pair (pair nat timestamp timestamp) (pair mutez mutez) (pair address address) address ] */ ; @@ -1212,129 +1115,114 @@ Gas remaining: 1039634.172 units remaining { FAIL } } { FAIL } } { DUP - /* [ pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + /* [ pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; CDDAAR ; DIP { DUP - /* [ pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + /* [ pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; CDDDAAR } /* [ nat : mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; MUL /* [ mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; DIP { DUP - /* [ pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + /* [ pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; CDADAR } /* [ mutez : mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; COMPARE /* [ int - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; NEQ /* [ bool - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; IF { BALANCE /* [ mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; DIP { DUP - /* [ pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + /* [ pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; CDDDDADR } /* [ mutez : address - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; DIIP { CDR /* [ pair (pair nat mutez mutez) (pair nat timestamp timestamp) @@ -1405,229 +1293,203 @@ Gas remaining: 1039634.172 units remaining (pair address address) address ] */ } { DUP - /* [ pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + /* [ pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; CDDADAR ; PUSH int 86400 /* [ int : timestamp - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; ADD /* [ timestamp - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; PUSH int 86400 /* [ int : timestamp - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; ADD /* [ timestamp - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; NOW /* [ timestamp : timestamp - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; COMPARE /* [ int - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; LT /* [ bool - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; IF { DUP - /* [ pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + /* [ pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; CDDDDDR ; SENDER /* [ address : address - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; COMPARE /* [ int - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; NEQ /* [ bool - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; IF { FAIL } - { /* [ pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ } ; + { /* [ pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ } ; DUP - /* [ pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + /* [ pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; CAR /* [ or string nat - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; IF_LEFT { FAIL } { DIP { DUP - /* [ pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + /* [ pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; CDAAR } /* [ nat : nat - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; ADD /* [ nat - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; DIP { DUP - /* [ pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + /* [ pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; CDADR } /* [ nat : pair mutez mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; PAIR /* [ pair nat mutez mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; DIP { CDDR } /* [ pair nat mutez mutez : pair (pair nat timestamp timestamp) (pair mutez mutez) (pair address address) address ] */ ; @@ -1815,37 +1677,33 @@ Gas remaining: 1039634.172 units remaining address ] */ } { BALANCE /* [ mutez - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; DIP { DUP - /* [ pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + /* [ pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; CDDDDAAR } /* [ mutez : address - : pair (or @parameter string nat) - (pair @storage - (pair nat mutez mutez) - (pair nat timestamp timestamp) - (pair mutez mutez) - (pair address address) - address) ] */ ; + : pair (or string nat) + (pair nat mutez mutez) + (pair nat timestamp timestamp) + (pair mutez mutez) + (pair address address) + address ] */ ; DIIP { CDR /* [ pair (pair nat mutez mutez) (pair nat timestamp timestamp) diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--int_publisher.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--int_publisher.tz].out index ca260fe7eed5..be420737b5f1 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--int_publisher.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--int_publisher.tz].out @@ -5,94 +5,78 @@ Gas remaining: 1039967.523 units remaining { parameter (option (pair signature int)) ; storage (pair key int) ; code { DUP - /* [ pair (option @parameter (pair signature int)) (pair @storage key int) - : pair (option @parameter (pair signature int)) (pair @storage key int) ] */ ; + /* [ pair (option (pair signature int)) key int + : pair (option (pair signature int)) key int ] */ ; DUP - /* [ pair (option @parameter (pair signature int)) (pair @storage key int) - : pair (option @parameter (pair signature int)) (pair @storage key int) - : pair (option @parameter (pair signature int)) (pair @storage key int) ] */ ; + /* [ pair (option (pair signature int)) key int + : pair (option (pair signature int)) key int + : pair (option (pair signature int)) key int ] */ ; CAR - /* [ option (pair signature int) - : pair (option @parameter (pair signature int)) (pair @storage key int) - : pair (option @parameter (pair signature int)) (pair @storage key int) ] */ ; + /* [ option (pair signature int) : pair (option (pair signature int)) key int + : pair (option (pair signature int)) key int ] */ ; IF_NONE { PUSH mutez 1000000 - /* [ mutez - : pair (option @parameter (pair signature int)) (pair @storage key int) - : pair (option @parameter (pair signature int)) (pair @storage key int) ] */ ; + /* [ mutez : pair (option (pair signature int)) key int + : pair (option (pair signature int)) key int ] */ ; AMOUNT - /* [ mutez : mutez - : pair (option @parameter (pair signature int)) (pair @storage key int) - : pair (option @parameter (pair signature int)) (pair @storage key int) ] */ ; + /* [ mutez : mutez : pair (option (pair signature int)) key int + : pair (option (pair signature int)) key int ] */ ; CMPLE ; IF { FAIL } - { /* [ pair (option @parameter (pair signature int)) (pair @storage key int) - : pair (option @parameter (pair signature int)) (pair @storage key int) ] */ } ; + { /* [ pair (option (pair signature int)) key int + : pair (option (pair signature int)) key int ] */ } ; CDR - /* [ pair key int - : pair (option @parameter (pair signature int)) (pair @storage key int) ] */ ; + /* [ pair key int : pair (option (pair signature int)) key int ] */ ; DIP { CDDR } /* [ pair key int : int ] */ } { DUP /* [ pair signature int : pair signature int - : pair (option @parameter (pair signature int)) (pair @storage key int) - : pair (option @parameter (pair signature int)) (pair @storage key int) ] */ ; + : pair (option (pair signature int)) key int + : pair (option (pair signature int)) key int ] */ ; DIP { SWAP - /* [ pair (option @parameter (pair signature int)) (pair @storage key int) - : pair signature int - : pair (option @parameter (pair signature int)) (pair @storage key int) ] */ } - /* [ pair signature int - : pair (option @parameter (pair signature int)) (pair @storage key int) - : pair signature int - : pair (option @parameter (pair signature int)) (pair @storage key int) ] */ ; + /* [ pair (option (pair signature int)) key int : pair signature int + : pair (option (pair signature int)) key int ] */ } + /* [ pair signature int : pair (option (pair signature int)) key int + : pair signature int : pair (option (pair signature int)) key int ] */ ; SWAP - /* [ pair (option @parameter (pair signature int)) (pair @storage key int) - : pair signature int : pair signature int - : pair (option @parameter (pair signature int)) (pair @storage key int) ] */ ; + /* [ pair (option (pair signature int)) key int : pair signature int + : pair signature int : pair (option (pair signature int)) key int ] */ ; CDAR ; DIP { DUP /* [ pair signature int : pair signature int : pair signature int - : pair (option @parameter (pair signature int)) (pair @storage key int) ] */ ; + : pair (option (pair signature int)) key int ] */ ; CAR /* [ signature : pair signature int : pair signature int - : pair (option @parameter (pair signature int)) (pair @storage key int) ] */ ; + : pair (option (pair signature int)) key int ] */ ; DIP { CDR - /* [ int : pair signature int - : pair (option @parameter (pair signature int)) (pair @storage key int) ] */ ; + /* [ int : pair signature int : pair (option (pair signature int)) key int ] */ ; PACK - /* [ bytes : pair signature int - : pair (option @parameter (pair signature int)) (pair @storage key int) ] */ ; + /* [ bytes : pair signature int : pair (option (pair signature int)) key int ] */ ; BLAKE2B - /* [ bytes : pair signature int - : pair (option @parameter (pair signature int)) (pair @storage key int) ] */ } + /* [ bytes : pair signature int : pair (option (pair signature int)) key int ] */ } /* [ signature : bytes : pair signature int - : pair (option @parameter (pair signature int)) (pair @storage key int) ] */ } + : pair (option (pair signature int)) key int ] */ } /* [ key : signature : bytes : pair signature int - : pair (option @parameter (pair signature int)) (pair @storage key int) ] */ ; + : pair (option (pair signature int)) key int ] */ ; CHECK_SIGNATURE - /* [ bool : pair signature int - : pair (option @parameter (pair signature int)) (pair @storage key int) ] */ ; + /* [ bool : pair signature int : pair (option (pair signature int)) key int ] */ ; IF { CDR - /* [ int - : pair (option @parameter (pair signature int)) (pair @storage key int) ] */ ; + /* [ int : pair (option (pair signature int)) key int ] */ ; SWAP - /* [ pair (option @parameter (pair signature int)) (pair @storage key int) - : int ] */ ; + /* [ pair (option (pair signature int)) key int : int ] */ ; DIP { DUP /* [ int : int ] */ } - /* [ pair (option @parameter (pair signature int)) (pair @storage key int) : int - : int ] */ ; + /* [ pair (option (pair signature int)) key int : int : int ] */ ; CDAR ; PAIR /* [ pair key int : int ] */ } { DROP - /* [ pair (option @parameter (pair signature int)) (pair @storage key int) ] */ ; + /* [ pair (option (pair signature int)) key int ] */ ; DUP - /* [ pair (option @parameter (pair signature int)) (pair @storage key int) - : pair (option @parameter (pair signature int)) (pair @storage key int) ] */ ; + /* [ pair (option (pair signature int)) key int + : pair (option (pair signature int)) key int ] */ ; CDR - /* [ pair key int - : pair (option @parameter (pair signature int)) (pair @storage key int) ] */ ; + /* [ pair key int : pair (option (pair signature int)) key int ] */ ; DIP { CDDR } /* [ pair key int : int ] */ } } ; DIP { DROP /* [] */ } diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--king_of_tez.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--king_of_tez.tz].out index b32f89c88d43..ef5a0759ec41 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--king_of_tez.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--king_of_tez.tz].out @@ -5,12 +5,11 @@ Gas remaining: 1039971.047 units remaining { parameter key_hash ; storage (pair timestamp (pair mutez key_hash)) ; code { DUP - /* [ pair (key_hash @parameter) (pair @storage timestamp mutez key_hash) - : pair (key_hash @parameter) (pair @storage timestamp mutez key_hash) ] */ ; + /* [ pair key_hash timestamp mutez key_hash + : pair key_hash timestamp mutez key_hash ] */ ; CDAR ; NOW - /* [ timestamp : timestamp - : pair (key_hash @parameter) (pair @storage timestamp mutez key_hash) ] */ ; + /* [ timestamp : timestamp : pair key_hash timestamp mutez key_hash ] */ ; CMPGT ; IF { CAR /* [ key_hash ] */ ; @@ -29,12 +28,11 @@ Gas remaining: 1039971.047 units remaining NIL operation /* [ list operation : pair timestamp mutez key_hash ] */ } { DUP - /* [ pair (key_hash @parameter) (pair @storage timestamp mutez key_hash) - : pair (key_hash @parameter) (pair @storage timestamp mutez key_hash) ] */ ; + /* [ pair key_hash timestamp mutez key_hash + : pair key_hash timestamp mutez key_hash ] */ ; CDDAR ; AMOUNT - /* [ mutez : mutez - : pair (key_hash @parameter) (pair @storage timestamp mutez key_hash) ] */ ; + /* [ mutez : mutez : pair key_hash timestamp mutez key_hash ] */ ; CMPLT ; IF { FAIL } { CAR diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--queue.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--queue.tz].out index 3cc8befc24cc..ffce16bbaace 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--queue.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--queue.tz].out @@ -5,14 +5,11 @@ Gas remaining: 1039952.504 units remaining { parameter (option string) ; storage (pair (option string) (pair (pair nat nat) (map nat string))) ; code { DUP - /* [ pair (option @parameter string) - (pair @storage (option string) (pair nat nat) (map nat string)) - : pair (option @parameter string) - (pair @storage (option string) (pair nat nat) (map nat string)) ] */ ; + /* [ pair (option string) (option string) (pair nat nat) (map nat string) + : pair (option string) (option string) (pair nat nat) (map nat string) ] */ ; CAR /* [ option string - : pair (option @parameter string) - (pair @storage (option string) (pair nat nat) (map nat string)) ] */ ; + : pair (option string) (option string) (pair nat nat) (map nat string) ] */ ; IF_NONE { CDDR ; DUP @@ -68,10 +65,8 @@ Gas remaining: 1039952.504 units remaining PAIR /* [ pair (option string) (pair nat nat) (map nat string) ] */ } } { DIP { DUP - /* [ pair (option @parameter string) - (pair @storage (option string) (pair nat nat) (map nat string)) - : pair (option @parameter string) - (pair @storage (option string) (pair nat nat) (map nat string)) ] */ ; + /* [ pair (option string) (option string) (pair nat nat) (map nat string) + : pair (option string) (option string) (pair nat nat) (map nat string) ] */ ; CDDAR ; DIP { CDDDR } /* [ pair nat nat : map nat string ] */ ; diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--reduce_map.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--reduce_map.tz].out index cf4502fb1b58..b12810ef5d26 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--reduce_map.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--reduce_map.tz].out @@ -5,8 +5,7 @@ Gas remaining: 1039975.926 units remaining { parameter (pair (lambda int int) (list int)) ; storage (list int) ; code { DIP { NIL int /* [ list int ] */ } - /* [ pair (pair @parameter (lambda int int) (list int)) (list @storage int) - : list int ] */ ; + /* [ pair (pair (lambda int int) (list int)) (list int) : list int ] */ ; CAR /* [ pair (lambda int int) (list int) : list int ] */ ; DUP diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--scrutable_reservoir.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--scrutable_reservoir.tz].out index 52189ffb5cd1..50c6a40c70d9 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--scrutable_reservoir.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--scrutable_reservoir.tz].out @@ -7,86 +7,64 @@ Gas remaining: 1039876.691 units remaining (pair string (pair timestamp (pair (pair mutez mutez) (pair address (pair address address))))) ; code { DUP - /* [ pair (unit @parameter) - (pair @storage string timestamp (pair mutez mutez) address address address) - : pair (unit @parameter) - (pair @storage string timestamp (pair mutez mutez) address address address) ] */ ; + /* [ pair unit string timestamp (pair mutez mutez) address address address + : pair unit string timestamp (pair mutez mutez) address address address ] */ ; CDAR ; PUSH string "open" /* [ string : string - : pair (unit @parameter) - (pair @storage string timestamp (pair mutez mutez) address address address) ] */ ; + : pair unit string timestamp (pair mutez mutez) address address address ] */ ; COMPARE /* [ int - : pair (unit @parameter) - (pair @storage string timestamp (pair mutez mutez) address address address) ] */ ; + : pair unit string timestamp (pair mutez mutez) address address address ] */ ; NEQ /* [ bool - : pair (unit @parameter) - (pair @storage string timestamp (pair mutez mutez) address address address) ] */ ; + : pair unit string timestamp (pair mutez mutez) address address address ] */ ; IF { FAIL } { DUP - /* [ pair (unit @parameter) - (pair @storage string timestamp (pair mutez mutez) address address address) - : pair (unit @parameter) - (pair @storage string timestamp (pair mutez mutez) address address address) ] */ ; + /* [ pair unit string timestamp (pair mutez mutez) address address address + : pair unit string timestamp (pair mutez mutez) address address address ] */ ; CDDAR ; NOW /* [ timestamp : timestamp - : pair (unit @parameter) - (pair @storage string timestamp (pair mutez mutez) address address address) ] */ ; + : pair unit string timestamp (pair mutez mutez) address address address ] */ ; COMPARE /* [ int - : pair (unit @parameter) - (pair @storage string timestamp (pair mutez mutez) address address address) ] */ ; + : pair unit string timestamp (pair mutez mutez) address address address ] */ ; LT /* [ bool - : pair (unit @parameter) - (pair @storage string timestamp (pair mutez mutez) address address address) ] */ ; + : pair unit string timestamp (pair mutez mutez) address address address ] */ ; IF { PUSH mutez 0 /* [ mutez - : pair (unit @parameter) - (pair @storage string timestamp (pair mutez mutez) address address address) ] */ ; + : pair unit string timestamp (pair mutez mutez) address address address ] */ ; DIP { DUP - /* [ pair (unit @parameter) - (pair @storage string timestamp (pair mutez mutez) address address address) - : pair (unit @parameter) - (pair @storage string timestamp (pair mutez mutez) address address address) ] */ ; + /* [ pair unit string timestamp (pair mutez mutez) address address address + : pair unit string timestamp (pair mutez mutez) address address address ] */ ; CDDDAAR } /* [ mutez : mutez - : pair (unit @parameter) - (pair @storage string timestamp (pair mutez mutez) address address address) ] */ ; + : pair unit string timestamp (pair mutez mutez) address address address ] */ ; ADD /* [ mutez - : pair (unit @parameter) - (pair @storage string timestamp (pair mutez mutez) address address address) ] */ ; + : pair unit string timestamp (pair mutez mutez) address address address ] */ ; DIP { DUP - /* [ pair (unit @parameter) - (pair @storage string timestamp (pair mutez mutez) address address address) - : pair (unit @parameter) - (pair @storage string timestamp (pair mutez mutez) address address address) ] */ ; + /* [ pair unit string timestamp (pair mutez mutez) address address address + : pair unit string timestamp (pair mutez mutez) address address address ] */ ; CDDDADR } /* [ mutez : mutez - : pair (unit @parameter) - (pair @storage string timestamp (pair mutez mutez) address address address) ] */ ; + : pair unit string timestamp (pair mutez mutez) address address address ] */ ; ADD /* [ mutez - : pair (unit @parameter) - (pair @storage string timestamp (pair mutez mutez) address address address) ] */ ; + : pair unit string timestamp (pair mutez mutez) address address address ] */ ; BALANCE /* [ mutez : mutez - : pair (unit @parameter) - (pair @storage string timestamp (pair mutez mutez) address address address) ] */ ; + : pair unit string timestamp (pair mutez mutez) address address address ] */ ; COMPARE /* [ int - : pair (unit @parameter) - (pair @storage string timestamp (pair mutez mutez) address address address) ] */ ; + : pair unit string timestamp (pair mutez mutez) address address address ] */ ; LT /* [ bool - : pair (unit @parameter) - (pair @storage string timestamp (pair mutez mutez) address address address) ] */ ; + : pair unit string timestamp (pair mutez mutez) address address address ] */ ; IF { CDR /* [ pair string timestamp (pair mutez mutez) address address address ] */ ; NIL operation diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--spawn_identities.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--spawn_identities.tz].out index a5e5598bb845..9f477fa3dd56 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--spawn_identities.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--spawn_identities.tz].out @@ -4,11 +4,11 @@ Well typed Gas remaining: 1039971.200 units remaining { parameter nat ; storage (list address) ; - code { /* [ pair (string @parameter) (string @storage) ] */ + code { /* [ pair string string ] */ DUP /* [ list operation : string ] */ ; CAR - /* [ nat : pair (nat @parameter) (list @storage address) ] */ ; + /* [ nat : pair nat (list address) ] */ ; DIP { CDR /* [ list address ] */ ; NIL operation /* [ list operation : list address ] */ } /* [ pair (list operation) string ] */ ; PUSH bool True diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[macros--big_map_get_add.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[macros--big_map_get_add.tz].out index a83096b521aa..bc82e51f1019 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[macros--big_map_get_add.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[macros--big_map_get_add.tz].out @@ -5,28 +5,23 @@ Gas remaining: 1039968.666 units remaining { parameter (pair (pair %set_pair int (option int)) (pair %check_pair int (option int))) ; storage (pair (big_map int int) unit) ; code { DUP - /* [ pair (pair @parameter - (pair %set_pair int (option int)) - (pair %check_pair int (option int))) - (pair @storage (big_map int int) unit) - : pair (pair @parameter - (pair %set_pair int (option int)) - (pair %check_pair int (option int))) - (pair @storage (big_map int int) unit) ] */ ; + /* [ pair (pair (pair %set_pair int (option int)) (pair %check_pair int (option int))) + (big_map int int) + unit + : pair (pair (pair %set_pair int (option int)) (pair %check_pair int (option int))) + (big_map int int) + unit ] */ ; DIP { CDAR } - /* [ pair (pair @parameter - (pair %set_pair int (option int)) - (pair %check_pair int (option int))) - (pair @storage (big_map int int) unit) : big_map int int ] */ ; + /* [ pair (pair (pair %set_pair int (option int)) (pair %check_pair int (option int))) + (big_map int int) + unit : big_map int int ] */ ; DUP - /* [ pair (pair @parameter - (pair %set_pair int (option int)) - (pair %check_pair int (option int))) - (pair @storage (big_map int int) unit) - : pair (pair @parameter - (pair %set_pair int (option int)) - (pair %check_pair int (option int))) - (pair @storage (big_map int int) unit) : big_map int int ] */ ; + /* [ pair (pair (pair %set_pair int (option int)) (pair %check_pair int (option int))) + (big_map int int) + unit + : pair (pair (pair %set_pair int (option int)) (pair %check_pair int (option int))) + (big_map int int) + unit : big_map int int ] */ ; DIP { CADR ; DUP /* [ pair int (option int) : pair int (option int) : big_map int int ] */ ; @@ -38,11 +33,9 @@ Gas remaining: 1039968.666 units remaining /* [ big_map int int ] */ ; DUP /* [ big_map int int : big_map int int ] */ } - /* [ pair (pair @parameter - (pair %set_pair int (option int)) - (pair %check_pair int (option int))) - (pair @storage (big_map int int) unit) : big_map int int - : big_map int int ] */ ; + /* [ pair (pair (pair %set_pair int (option int)) (pair %check_pair int (option int))) + (big_map int int) + unit : big_map int int : big_map int int ] */ ; CADR ; DUP /* [ pair int (option int) : pair int (option int) : big_map int int diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[macros--big_map_mem.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[macros--big_map_mem.tz].out index a18a6818b436..5e0952d8f8ac 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[macros--big_map_mem.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[macros--big_map_mem.tz].out @@ -5,12 +5,12 @@ Gas remaining: 1039982.471 units remaining { parameter (pair int bool) ; storage (pair (big_map int unit) unit) ; code { DUP - /* [ pair (pair @parameter int bool) (pair @storage (big_map int unit) unit) - : pair (pair @parameter int bool) (pair @storage (big_map int unit) unit) ] */ ; + /* [ pair (pair int bool) (big_map int unit) unit + : pair (pair int bool) (big_map int unit) unit ] */ ; DUP - /* [ pair (pair @parameter int bool) (pair @storage (big_map int unit) unit) - : pair (pair @parameter int bool) (pair @storage (big_map int unit) unit) - : pair (pair @parameter int bool) (pair @storage (big_map int unit) unit) ] */ ; + /* [ pair (pair int bool) (big_map int unit) unit + : pair (pair int bool) (big_map int unit) unit + : pair (pair int bool) (big_map int unit) unit ] */ ; CADR ; DIP { CAAR ; DIP { CDAR ; DUP /* [ big_map int unit : big_map int unit ] */ } diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[macros--pair_macro.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[macros--pair_macro.tz].out index 8abd8525ba50..4cbabdcb2ecf 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[macros--pair_macro.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[macros--pair_macro.tz].out @@ -5,19 +5,19 @@ Gas remaining: 1039988.218 units remaining { parameter unit ; storage unit ; code { UNIT - /* [ unit : pair (unit @parameter) (unit @storage) ] */ ; + /* [ unit : pair unit unit ] */ ; UNIT - /* [ unit : unit : pair (unit @parameter) (unit @storage) ] */ ; + /* [ unit : unit : pair unit unit ] */ ; UNIT - /* [ unit : unit : unit : pair (unit @parameter) (unit @storage) ] */ ; + /* [ unit : unit : unit : pair unit unit ] */ ; UNIT - /* [ unit : unit : unit : unit : pair (unit @parameter) (unit @storage) ] */ ; + /* [ unit : unit : unit : unit : pair unit unit ] */ ; UNIT - /* [ unit : unit : unit : unit : unit : pair (unit @parameter) (unit @storage) ] */ ; + /* [ unit : unit : unit : unit : unit : pair unit unit ] */ ; PAPAPAPAIR @name %x1 %x2 %x3 %x4 %x5 ; CDDDAR %x4 @fourth ; DROP - /* [ pair (unit @parameter) (unit @storage) ] */ ; + /* [ pair unit unit ] */ ; CDR /* [ unit ] */ ; NIL operation diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[macros--set_caddaadr.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[macros--set_caddaadr.tz].out index 6cb6fd18c00a..ac30e8414c01 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[macros--set_caddaadr.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[macros--set_caddaadr.tz].out @@ -5,17 +5,13 @@ Gas remaining: 1039968.110 units remaining { parameter mutez ; storage (pair (pair nat (pair nat (pair (pair (pair (nat %p) (mutez %value)) nat) nat))) nat) ; code { DUP - /* [ pair (mutez @parameter) - (pair @storage (pair nat nat (pair (pair (nat %p) (mutez %value)) nat) nat) nat) - : pair (mutez @parameter) - (pair @storage (pair nat nat (pair (pair (nat %p) (mutez %value)) nat) nat) nat) ] */ ; + /* [ pair mutez (pair nat nat (pair (pair (nat %p) (mutez %value)) nat) nat) nat + : pair mutez (pair nat nat (pair (pair (nat %p) (mutez %value)) nat) nat) nat ] */ ; CAR /* [ mutez - : pair (mutez @parameter) - (pair @storage (pair nat nat (pair (pair (nat %p) (mutez %value)) nat) nat) nat) ] */ ; + : pair mutez (pair nat nat (pair (pair (nat %p) (mutez %value)) nat) nat) nat ] */ ; SWAP - /* [ pair (mutez @parameter) - (pair @storage (pair nat nat (pair (pair (nat %p) (mutez %value)) nat) nat) nat) + /* [ pair mutez (pair nat nat (pair (pair (nat %p) (mutez %value)) nat) nat) nat : mutez ] */ ; CDR /* [ pair (pair nat nat (pair (pair (nat %p) (mutez %value)) nat) nat) nat diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--create_contract.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--create_contract.tz].out index 3be134e65c71..49b3c3931ec7 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--create_contract.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--create_contract.tz].out @@ -4,7 +4,7 @@ Well typed Gas remaining: 1039968.907 units remaining { parameter (option address) ; storage unit ; - code { /* [ pair (string @parameter) (string @storage) ] */ + code { /* [ pair string string ] */ CAR /* [ list operation : string ] */ ; IF_NONE diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--default_account.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--default_account.tz].out index 45ce559fb80f..6bae2d8ba1a2 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--default_account.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--default_account.tz].out @@ -5,7 +5,7 @@ Gas remaining: 1039992.790 units remaining { parameter key_hash ; storage unit ; code { DIP { UNIT /* [ unit ] */ } - /* [ pair (key_hash @parameter) (unit @storage) : unit ] */ ; + /* [ pair key_hash unit : unit ] */ ; CAR /* [ key_hash : unit ] */ ; IMPLICIT_ACCOUNT diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--lqt_fa12.mligo.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--lqt_fa12.mligo.tz].out index f5298f853529..473949c34bdc 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--lqt_fa12.mligo.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--lqt_fa12.mligo.tz].out @@ -16,53 +16,47 @@ Gas remaining: 1039662.882 units remaining (pair (big_map %allowances (pair (address %owner) (address %spender)) nat) (pair (address %admin) (nat %total_supply)))) ; code { DUP - /* [ pair (or @parameter - (or (or (pair %approve (address %spender) (nat %value)) - (pair %getAllowance - (pair %request (address %owner) (address %spender)) - (contract %callback nat))) - (or (pair %getBalance (address %owner) (contract %callback nat)) - (pair %getTotalSupply (unit %request) (contract %callback nat)))) - (or (pair %mintOrBurn (int %quantity) (address %target)) - (pair %transfer (address %from) (address %to) (nat %value)))) - (pair @storage - (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply)) - : pair (or @parameter - (or (or (pair %approve (address %spender) (nat %value)) - (pair %getAllowance - (pair %request (address %owner) (address %spender)) - (contract %callback nat))) - (or (pair %getBalance (address %owner) (contract %callback nat)) - (pair %getTotalSupply (unit %request) (contract %callback nat)))) - (or (pair %mintOrBurn (int %quantity) (address %target)) - (pair %transfer (address %from) (address %to) (nat %value)))) - (pair @storage - (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply)) ] */ ; + /* [ pair (or (or (or (pair %approve (address %spender) (nat %value)) + (pair %getAllowance + (pair %request (address %owner) (address %spender)) + (contract %callback nat))) + (or (pair %getBalance (address %owner) (contract %callback nat)) + (pair %getTotalSupply (unit %request) (contract %callback nat)))) + (or (pair %mintOrBurn (int %quantity) (address %target)) + (pair %transfer (address %from) (address %to) (nat %value)))) + (big_map %tokens address nat) + (big_map %allowances (pair (address %owner) (address %spender)) nat) + (address %admin) + (nat %total_supply) + : pair (or (or (or (pair %approve (address %spender) (nat %value)) + (pair %getAllowance + (pair %request (address %owner) (address %spender)) + (contract %callback nat))) + (or (pair %getBalance (address %owner) (contract %callback nat)) + (pair %getTotalSupply (unit %request) (contract %callback nat)))) + (or (pair %mintOrBurn (int %quantity) (address %target)) + (pair %transfer (address %from) (address %to) (nat %value)))) + (big_map %tokens address nat) + (big_map %allowances (pair (address %owner) (address %spender)) nat) + (address %admin) + (nat %total_supply) ] */ ; CDR /* [ pair (big_map %tokens address nat) (big_map %allowances (pair (address %owner) (address %spender)) nat) (address %admin) (nat %total_supply) - : pair (or @parameter - (or (or (pair %approve (address %spender) (nat %value)) - (pair %getAllowance - (pair %request (address %owner) (address %spender)) - (contract %callback nat))) - (or (pair %getBalance (address %owner) (contract %callback nat)) - (pair %getTotalSupply (unit %request) (contract %callback nat)))) - (or (pair %mintOrBurn (int %quantity) (address %target)) - (pair %transfer (address %from) (address %to) (nat %value)))) - (pair @storage - (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply)) ] */ ; + : pair (or (or (or (pair %approve (address %spender) (nat %value)) + (pair %getAllowance + (pair %request (address %owner) (address %spender)) + (contract %callback nat))) + (or (pair %getBalance (address %owner) (contract %callback nat)) + (pair %getTotalSupply (unit %request) (contract %callback nat)))) + (or (pair %mintOrBurn (int %quantity) (address %target)) + (pair %transfer (address %from) (address %to) (nat %value)))) + (big_map %tokens address nat) + (big_map %allowances (pair (address %owner) (address %spender)) nat) + (address %admin) + (nat %total_supply) ] */ ; PUSH mutez 0 /* [ mutez @@ -70,80 +64,72 @@ Gas remaining: 1039662.882 units remaining (big_map %allowances (pair (address %owner) (address %spender)) nat) (address %admin) (nat %total_supply) - : pair (or @parameter - (or (or (pair %approve (address %spender) (nat %value)) - (pair %getAllowance - (pair %request (address %owner) (address %spender)) - (contract %callback nat))) - (or (pair %getBalance (address %owner) (contract %callback nat)) - (pair %getTotalSupply (unit %request) (contract %callback nat)))) - (or (pair %mintOrBurn (int %quantity) (address %target)) - (pair %transfer (address %from) (address %to) (nat %value)))) - (pair @storage - (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply)) ] */ ; + : pair (or (or (or (pair %approve (address %spender) (nat %value)) + (pair %getAllowance + (pair %request (address %owner) (address %spender)) + (contract %callback nat))) + (or (pair %getBalance (address %owner) (contract %callback nat)) + (pair %getTotalSupply (unit %request) (contract %callback nat)))) + (or (pair %mintOrBurn (int %quantity) (address %target)) + (pair %transfer (address %from) (address %to) (nat %value)))) + (big_map %tokens address nat) + (big_map %allowances (pair (address %owner) (address %spender)) nat) + (address %admin) + (nat %total_supply) ] */ ; AMOUNT /* [ mutez : mutez : pair (big_map %tokens address nat) (big_map %allowances (pair (address %owner) (address %spender)) nat) (address %admin) (nat %total_supply) - : pair (or @parameter - (or (or (pair %approve (address %spender) (nat %value)) - (pair %getAllowance - (pair %request (address %owner) (address %spender)) - (contract %callback nat))) - (or (pair %getBalance (address %owner) (contract %callback nat)) - (pair %getTotalSupply (unit %request) (contract %callback nat)))) - (or (pair %mintOrBurn (int %quantity) (address %target)) - (pair %transfer (address %from) (address %to) (nat %value)))) - (pair @storage - (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply)) ] */ ; + : pair (or (or (or (pair %approve (address %spender) (nat %value)) + (pair %getAllowance + (pair %request (address %owner) (address %spender)) + (contract %callback nat))) + (or (pair %getBalance (address %owner) (contract %callback nat)) + (pair %getTotalSupply (unit %request) (contract %callback nat)))) + (or (pair %mintOrBurn (int %quantity) (address %target)) + (pair %transfer (address %from) (address %to) (nat %value)))) + (big_map %tokens address nat) + (big_map %allowances (pair (address %owner) (address %spender)) nat) + (address %admin) + (nat %total_supply) ] */ ; COMPARE /* [ int : pair (big_map %tokens address nat) (big_map %allowances (pair (address %owner) (address %spender)) nat) (address %admin) (nat %total_supply) - : pair (or @parameter - (or (or (pair %approve (address %spender) (nat %value)) - (pair %getAllowance - (pair %request (address %owner) (address %spender)) - (contract %callback nat))) - (or (pair %getBalance (address %owner) (contract %callback nat)) - (pair %getTotalSupply (unit %request) (contract %callback nat)))) - (or (pair %mintOrBurn (int %quantity) (address %target)) - (pair %transfer (address %from) (address %to) (nat %value)))) - (pair @storage - (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply)) ] */ ; + : pair (or (or (or (pair %approve (address %spender) (nat %value)) + (pair %getAllowance + (pair %request (address %owner) (address %spender)) + (contract %callback nat))) + (or (pair %getBalance (address %owner) (contract %callback nat)) + (pair %getTotalSupply (unit %request) (contract %callback nat)))) + (or (pair %mintOrBurn (int %quantity) (address %target)) + (pair %transfer (address %from) (address %to) (nat %value)))) + (big_map %tokens address nat) + (big_map %allowances (pair (address %owner) (address %spender)) nat) + (address %admin) + (nat %total_supply) ] */ ; NEQ /* [ bool : pair (big_map %tokens address nat) (big_map %allowances (pair (address %owner) (address %spender)) nat) (address %admin) (nat %total_supply) - : pair (or @parameter - (or (or (pair %approve (address %spender) (nat %value)) - (pair %getAllowance - (pair %request (address %owner) (address %spender)) - (contract %callback nat))) - (or (pair %getBalance (address %owner) (contract %callback nat)) - (pair %getTotalSupply (unit %request) (contract %callback nat)))) - (or (pair %mintOrBurn (int %quantity) (address %target)) - (pair %transfer (address %from) (address %to) (nat %value)))) - (pair @storage - (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply)) ] */ ; + : pair (or (or (or (pair %approve (address %spender) (nat %value)) + (pair %getAllowance + (pair %request (address %owner) (address %spender)) + (contract %callback nat))) + (or (pair %getBalance (address %owner) (contract %callback nat)) + (pair %getTotalSupply (unit %request) (contract %callback nat)))) + (or (pair %mintOrBurn (int %quantity) (address %target)) + (pair %transfer (address %from) (address %to) (nat %value)))) + (big_map %tokens address nat) + (big_map %allowances (pair (address %owner) (address %spender)) nat) + (address %admin) + (nat %total_supply) ] */ ; IF { PUSH string "DontSendTez" /* [ string @@ -151,55 +137,49 @@ Gas remaining: 1039662.882 units remaining (big_map %allowances (pair (address %owner) (address %spender)) nat) (address %admin) (nat %total_supply) - : pair (or @parameter - (or (or (pair %approve (address %spender) (nat %value)) - (pair %getAllowance - (pair %request (address %owner) (address %spender)) - (contract %callback nat))) - (or (pair %getBalance (address %owner) (contract %callback nat)) - (pair %getTotalSupply (unit %request) (contract %callback nat)))) - (or (pair %mintOrBurn (int %quantity) (address %target)) - (pair %transfer (address %from) (address %to) (nat %value)))) - (pair @storage - (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply)) ] */ ; + : pair (or (or (or (pair %approve (address %spender) (nat %value)) + (pair %getAllowance + (pair %request (address %owner) (address %spender)) + (contract %callback nat))) + (or (pair %getBalance (address %owner) (contract %callback nat)) + (pair %getTotalSupply (unit %request) (contract %callback nat)))) + (or (pair %mintOrBurn (int %quantity) (address %target)) + (pair %transfer (address %from) (address %to) (nat %value)))) + (big_map %tokens address nat) + (big_map %allowances (pair (address %owner) (address %spender)) nat) + (address %admin) + (nat %total_supply) ] */ ; FAILWITH /* [] */ } { /* [ pair (big_map %tokens address nat) (big_map %allowances (pair (address %owner) (address %spender)) nat) (address %admin) (nat %total_supply) - : pair (or @parameter - (or (or (pair %approve (address %spender) (nat %value)) - (pair %getAllowance - (pair %request (address %owner) (address %spender)) - (contract %callback nat))) - (or (pair %getBalance (address %owner) (contract %callback nat)) - (pair %getTotalSupply (unit %request) (contract %callback nat)))) - (or (pair %mintOrBurn (int %quantity) (address %target)) - (pair %transfer (address %from) (address %to) (nat %value)))) - (pair @storage - (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply)) ] */ } ; + : pair (or (or (or (pair %approve (address %spender) (nat %value)) + (pair %getAllowance + (pair %request (address %owner) (address %spender)) + (contract %callback nat))) + (or (pair %getBalance (address %owner) (contract %callback nat)) + (pair %getTotalSupply (unit %request) (contract %callback nat)))) + (or (pair %mintOrBurn (int %quantity) (address %target)) + (pair %transfer (address %from) (address %to) (nat %value)))) + (big_map %tokens address nat) + (big_map %allowances (pair (address %owner) (address %spender)) nat) + (address %admin) + (nat %total_supply) ] */ } ; SWAP - /* [ pair (or @parameter - (or (or (pair %approve (address %spender) (nat %value)) - (pair %getAllowance - (pair %request (address %owner) (address %spender)) - (contract %callback nat))) - (or (pair %getBalance (address %owner) (contract %callback nat)) - (pair %getTotalSupply (unit %request) (contract %callback nat)))) - (or (pair %mintOrBurn (int %quantity) (address %target)) - (pair %transfer (address %from) (address %to) (nat %value)))) - (pair @storage - (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply)) + /* [ pair (or (or (or (pair %approve (address %spender) (nat %value)) + (pair %getAllowance + (pair %request (address %owner) (address %spender)) + (contract %callback nat))) + (or (pair %getBalance (address %owner) (contract %callback nat)) + (pair %getTotalSupply (unit %request) (contract %callback nat)))) + (or (pair %mintOrBurn (int %quantity) (address %target)) + (pair %transfer (address %from) (address %to) (nat %value)))) + (big_map %tokens address nat) + (big_map %allowances (pair (address %owner) (address %spender)) nat) + (address %admin) + (nat %total_supply) : pair (big_map %tokens address nat) (big_map %allowances (pair (address %owner) (address %spender)) nat) (address %admin) diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--multiple_en2.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--multiple_en2.tz].out index b01d416e6e68..737df8b33516 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--multiple_en2.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--multiple_en2.tz].out @@ -5,42 +5,38 @@ Gas remaining: 1039921.322 units remaining { parameter unit ; storage (option address) ; code { SENDER - /* [ address : pair (unit @parameter) (option @storage address) ] */ ; + /* [ address : pair unit (option address) ] */ ; SELF - /* [ contract unit : address - : pair (unit @parameter) (option @storage address) ] */ ; + /* [ contract unit : address : pair unit (option address) ] */ ; ADDRESS - /* [ address : address : pair (unit @parameter) (option @storage address) ] */ ; - { /* [ pair (or @parameter (or (nat %add) (nat %sub)) (unit %default)) (int @storage) ] */ + /* [ address : address : pair unit (option address) ] */ ; + { /* [ pair (or (or (nat %add) (nat %sub)) (unit %default)) int ] */ COMPARE - /* [ mutez : mutez - : pair (or @parameter (or (nat %add) (nat %sub)) (unit %default)) (int @storage) ] */ ; + /* [ mutez : mutez : pair (or (or (nat %add) (nat %sub)) (unit %default)) int ] */ ; EQ - /* [ bool : pair (unit @parameter) (option @storage address) ] */ ; + /* [ bool : pair unit (option address) ] */ ; IF { CDR /* [ option address ] */ ; - { /* [ mutez : mutez - : pair (or @parameter (or (nat %add) (nat %sub)) (unit %default)) (int @storage) ] */ + { /* [ mutez : mutez : pair (or (or (nat %add) (nat %sub)) (unit %default)) int ] */ IF_NONE - { { /* [ pair (or @parameter (or (nat %add) (nat %sub)) (unit %default)) (int @storage) ] */ + { { /* [ pair (or (or (nat %add) (nat %sub)) (unit %default)) int ] */ UNIT /* [ unit ] */ ; FAILWITH /* [] */ } } - { /* [ pair (or @parameter (or (nat %add) (nat %sub)) (unit %default)) (int @storage) ] */ } - /* [ bool - : pair (or @parameter (or (nat %add) (nat %sub)) (unit %default)) (int @storage) ] */ } ; + { /* [ pair (or (or (nat %add) (nat %sub)) (unit %default)) int ] */ } + /* [ bool : pair (or (or (nat %add) (nat %sub)) (unit %default)) int ] */ } ; DIP { NIL operation - /* [ pair (or @parameter (or (nat %add) (nat %sub)) (unit %default)) (int @storage) - : pair (or @parameter (or (nat %add) (nat %sub)) (unit %default)) (int @storage) ] */ + /* [ pair (or (or (nat %add) (nat %sub)) (unit %default)) int + : pair (or (or (nat %add) (nat %sub)) (unit %default)) int ] */ /* [ list operation ] */ } /* [] */ ; DUP /* [ or (or (nat %add) (nat %sub)) (unit %default) - : pair (or @parameter (or (nat %add) (nat %sub)) (unit %default)) (int @storage) ] */ ; + : pair (or (or (nat %add) (nat %sub)) (unit %default)) int ] */ ; CONTRACT %add unit /* [ or (or (nat %add) (nat %sub)) (unit %default) : int ] */ ; - { /* [ pair (or @parameter (or (nat %add) (nat %sub)) (unit %default)) (int @storage) ] */ + { /* [ pair (or (or (nat %add) (nat %sub)) (unit %default)) int ] */ IF_NONE { /* [ address : list operation ] */ } { { UNIT /* [ int ] */ ; FAILWITH /* [] */ } } } ; diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--multiple_entrypoints_counter.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--multiple_entrypoints_counter.tz].out index 8e192681a635..d703bb5e6faa 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--multiple_entrypoints_counter.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--multiple_entrypoints_counter.tz].out @@ -5,19 +5,17 @@ Gas remaining: 1039924.032 units remaining { parameter unit ; storage (option address) ; code { SENDER - /* [ address : pair (unit @parameter) (option @storage address) ] */ ; + /* [ address : pair unit (option address) ] */ ; SELF - /* [ contract unit : address - : pair (unit @parameter) (option @storage address) ] */ ; + /* [ contract unit : address : pair unit (option address) ] */ ; ADDRESS - /* [ address : address : pair (unit @parameter) (option @storage address) ] */ ; + /* [ address : address : pair unit (option address) ] */ ; IFCMPEQ { CDR /* [ option address ] */ ; ASSERT_SOME - /* [ int - : pair (or @parameter (or (nat %add) (nat %sub)) (unit %default)) (int @storage) ] */ ; - DIP { /* [ pair (or @parameter (or (nat %add) (nat %sub)) (unit %default)) (int @storage) ] */ + /* [ int : pair (or (or (nat %add) (nat %sub)) (unit %default)) int ] */ ; + DIP { /* [ pair (or (or (nat %add) (nat %sub)) (unit %default)) int ] */ NIL operation /* [ list operation ] */ } /* [] */ ; @@ -149,5 +147,4 @@ Gas remaining: 1039924.032 units remaining /* [ list operation : option address ] */ ; PAIR /* [ pair (list operation) (option address) ] */ } - /* [ mutez - : pair (or @parameter (or (nat %add) (nat %sub)) (unit %default)) (int @storage) ] */ } } + /* [ mutez : pair (or (or (nat %add) (nat %sub)) (unit %default)) int ] */ } } diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--parameterized_multisig.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--parameterized_multisig.tz].out index b26188b4808f..a64f06f06be8 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--parameterized_multisig.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--parameterized_multisig.tz].out @@ -5,14 +5,11 @@ Gas remaining: 1039928.103 units remaining { storage (pair bool (pair (map nat (pair bool bool)) (pair key key))) ; parameter (or nat (pair signature nat)) ; code { DUP - /* [ pair (or @parameter nat (pair signature nat)) - (pair @storage bool (map nat (pair bool bool)) key key) - : pair (or @parameter nat (pair signature nat)) - (pair @storage bool (map nat (pair bool bool)) key key) ] */ ; + /* [ pair (or nat (pair signature nat)) bool (map nat (pair bool bool)) key key + : pair (or nat (pair signature nat)) bool (map nat (pair bool bool)) key key ] */ ; CAR /* [ or nat (pair signature nat) - : pair (or @parameter nat (pair signature nat)) - (pair @storage bool (map nat (pair bool bool)) key key) ] */ ; + : pair (or nat (pair signature nat)) bool (map nat (pair bool bool)) key key ] */ ; DIP { CDDR } /* [ or nat (pair signature nat) : pair (map nat (pair bool bool)) key key ] */ ; IF_LEFT diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--reveal_signed_preimage.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--reveal_signed_preimage.tz].out index 63c755149a80..75ddcc06dedf 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--reveal_signed_preimage.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--reveal_signed_preimage.tz].out @@ -5,44 +5,37 @@ Gas remaining: 1039977.336 units remaining { parameter (pair bytes signature) ; storage (pair bytes key) ; code { DUP - /* [ pair (pair @parameter bytes signature) (pair @storage bytes key) - : pair (pair @parameter bytes signature) (pair @storage bytes key) ] */ ; + /* [ pair (pair bytes signature) bytes key + : pair (pair bytes signature) bytes key ] */ ; UNPAIR /* [ pair bytes signature : pair bytes key - : pair (pair @parameter bytes signature) (pair @storage bytes key) ] */ ; + : pair (pair bytes signature) bytes key ] */ ; CAR - /* [ bytes : pair bytes key - : pair (pair @parameter bytes signature) (pair @storage bytes key) ] */ ; + /* [ bytes : pair bytes key : pair (pair bytes signature) bytes key ] */ ; SHA256 - /* [ bytes : pair bytes key - : pair (pair @parameter bytes signature) (pair @storage bytes key) ] */ ; - DIP { CAR - /* [ bytes : pair (pair @parameter bytes signature) (pair @storage bytes key) ] */ } - /* [ bytes : bytes - : pair (pair @parameter bytes signature) (pair @storage bytes key) ] */ ; + /* [ bytes : pair bytes key : pair (pair bytes signature) bytes key ] */ ; + DIP { CAR /* [ bytes : pair (pair bytes signature) bytes key ] */ } + /* [ bytes : bytes : pair (pair bytes signature) bytes key ] */ ; ASSERT_CMPEQ ; DUP - /* [ pair (pair @parameter bytes signature) (pair @storage bytes key) - : pair (pair @parameter bytes signature) (pair @storage bytes key) ] */ ; + /* [ pair (pair bytes signature) bytes key + : pair (pair bytes signature) bytes key ] */ ; UNPAIR /* [ pair bytes signature : pair bytes key - : pair (pair @parameter bytes signature) (pair @storage bytes key) ] */ ; + : pair (pair bytes signature) bytes key ] */ ; SWAP /* [ pair bytes key : pair bytes signature - : pair (pair @parameter bytes signature) (pair @storage bytes key) ] */ ; + : pair (pair bytes signature) bytes key ] */ ; DIP { UNPAIR - /* [ bytes : signature - : pair (pair @parameter bytes signature) (pair @storage bytes key) ] */ ; + /* [ bytes : signature : pair (pair bytes signature) bytes key ] */ ; SWAP - /* [ signature : bytes - : pair (pair @parameter bytes signature) (pair @storage bytes key) ] */ } + /* [ signature : bytes : pair (pair bytes signature) bytes key ] */ } /* [ pair bytes key : signature : bytes - : pair (pair @parameter bytes signature) (pair @storage bytes key) ] */ ; + : pair (pair bytes signature) bytes key ] */ ; CDR - /* [ key : signature : bytes - : pair (pair @parameter bytes signature) (pair @storage bytes key) ] */ ; + /* [ key : signature : bytes : pair (pair bytes signature) bytes key ] */ ; CHECK_SIGNATURE - /* [ bool : pair (pair @parameter bytes signature) (pair @storage bytes key) ] */ ; + /* [ bool : pair (pair bytes signature) bytes key ] */ ; ASSERT ; CDR /* [ pair bytes key ] */ ; diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--ticket_builder_fungible.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--ticket_builder_fungible.tz].out index 55032656efbc..ecbda13d5892 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--ticket_builder_fungible.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--ticket_builder_fungible.tz].out @@ -8,17 +8,15 @@ Gas remaining: 1039973.685 units remaining storage address ; code { AMOUNT /* [ mutez - : pair (or @parameter - (ticket %burn unit) - (pair %mint (contract %destination (ticket unit)) (nat %amount))) - (address @storage) ] */ ; + : pair (or (ticket %burn unit) + (pair %mint (contract %destination (ticket unit)) (nat %amount))) + address ] */ ; PUSH mutez 0 /* [ mutez : mutez - : pair (or @parameter - (ticket %burn unit) - (pair %mint (contract %destination (ticket unit)) (nat %amount))) - (address @storage) ] */ ; + : pair (or (ticket %burn unit) + (pair %mint (contract %destination (ticket unit)) (nat %amount))) + address ] */ ; ASSERT_CMPEQ ; UNPAIR /* [ or (ticket %burn unit) diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--ticket_builder_non_fungible.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--ticket_builder_non_fungible.tz].out index c2a6e9a1ea33..3eed07403e58 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--ticket_builder_non_fungible.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--ticket_builder_non_fungible.tz].out @@ -6,13 +6,15 @@ Gas remaining: 1039970.718 units remaining storage (pair (address %manager) (nat %counter)) ; code { AMOUNT /* [ mutez - : pair (or @parameter (ticket %burn nat) (contract %mint_destination (ticket nat))) - (pair @storage (address %manager) (nat %counter)) ] */ ; + : pair (or (ticket %burn nat) (contract %mint_destination (ticket nat))) + (address %manager) + (nat %counter) ] */ ; PUSH mutez 0 /* [ mutez : mutez - : pair (or @parameter (ticket %burn nat) (contract %mint_destination (ticket nat))) - (pair @storage (address %manager) (nat %counter)) ] */ ; + : pair (or (ticket %burn nat) (contract %mint_destination (ticket nat))) + (address %manager) + (nat %counter) ] */ ; ASSERT_CMPEQ ; UNPAIR 3 diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--ticket_wallet_fungible.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--ticket_wallet_fungible.tz].out index 4be42ebff450..2f781db90855 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--ticket_wallet_fungible.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--ticket_wallet_fungible.tz].out @@ -8,17 +8,17 @@ Gas remaining: 1039935.806 units remaining storage (pair (address %manager) (big_map %tickets address (ticket unit))) ; code { AMOUNT /* [ mutez - : pair (or @parameter - (ticket %receive unit) - (pair %send (contract %destination (ticket unit)) (nat %amount) (address %ticketer))) - (pair @storage (address %manager) (big_map %tickets address (ticket unit))) ] */ ; + : pair (or (ticket %receive unit) + (pair %send (contract %destination (ticket unit)) (nat %amount) (address %ticketer))) + (address %manager) + (big_map %tickets address (ticket unit)) ] */ ; PUSH mutez 0 /* [ mutez : mutez - : pair (or @parameter - (ticket %receive unit) - (pair %send (contract %destination (ticket unit)) (nat %amount) (address %ticketer))) - (pair @storage (address %manager) (big_map %tickets address (ticket unit))) ] */ ; + : pair (or (ticket %receive unit) + (pair %send (contract %destination (ticket unit)) (nat %amount) (address %ticketer))) + (address %manager) + (big_map %tickets address (ticket unit)) ] */ ; ASSERT_CMPEQ ; UNPAIR 3 diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--ticket_wallet_non_fungible.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--ticket_wallet_non_fungible.tz].out index 1a9b2205347e..bc3624931db0 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--ticket_wallet_non_fungible.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--ticket_wallet_non_fungible.tz].out @@ -8,17 +8,17 @@ Gas remaining: 1039952.622 units remaining storage (pair (address %manager) (big_map %tickets (pair address nat) (ticket nat))) ; code { AMOUNT /* [ mutez - : pair (or @parameter - (ticket %receive nat) - (pair %send (contract %destination (ticket nat)) (address %ticketer) (nat %id))) - (pair @storage (address %manager) (big_map %tickets (pair address nat) (ticket nat))) ] */ ; + : pair (or (ticket %receive nat) + (pair %send (contract %destination (ticket nat)) (address %ticketer) (nat %id))) + (address %manager) + (big_map %tickets (pair address nat) (ticket nat)) ] */ ; PUSH mutez 0 /* [ mutez : mutez - : pair (or @parameter - (ticket %receive nat) - (pair %send (contract %destination (ticket nat)) (address %ticketer) (nat %id))) - (pair @storage (address %manager) (big_map %tickets (pair address nat) (ticket nat))) ] */ ; + : pair (or (ticket %receive nat) + (pair %send (contract %destination (ticket nat)) (address %ticketer) (nat %id))) + (address %manager) + (big_map %tickets (pair address nat) (ticket nat)) ] */ ; ASSERT_CMPEQ ; UNPAIR 3 diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--vote_for_delegate.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--vote_for_delegate.tz].out index 09ddd4a67886..84cf87c812b5 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--vote_for_delegate.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--vote_for_delegate.tz].out @@ -7,33 +7,28 @@ Gas remaining: 1039933.671 units remaining (pair (pair %mgr1 (address %addr) (option %key key_hash)) (pair %mgr2 (address %addr) (option %key key_hash))) ; code { DUP - /* [ pair (option @parameter key_hash) - (pair @storage - (pair %mgr1 (address %addr) (option %key key_hash)) - (pair %mgr2 (address %addr) (option %key key_hash))) - : pair (option @parameter key_hash) - (pair @storage - (pair %mgr1 (address %addr) (option %key key_hash)) - (pair %mgr2 (address %addr) (option %key key_hash))) ] */ ; + /* [ pair (option key_hash) + (pair %mgr1 (address %addr) (option %key key_hash)) + (pair %mgr2 (address %addr) (option %key key_hash)) + : pair (option key_hash) + (pair %mgr1 (address %addr) (option %key key_hash)) + (pair %mgr2 (address %addr) (option %key key_hash)) ] */ ; CDAAR %addr @% ; SENDER /* [ address : address - : pair (option @parameter key_hash) - (pair @storage - (pair %mgr1 (address %addr) (option %key key_hash)) - (pair %mgr2 (address %addr) (option %key key_hash))) ] */ ; + : pair (option key_hash) + (pair %mgr1 (address %addr) (option %key key_hash)) + (pair %mgr2 (address %addr) (option %key key_hash)) ] */ ; PAIR %@ %@ /* [ pair address address - : pair (option @parameter key_hash) - (pair @storage - (pair %mgr1 (address %addr) (option %key key_hash)) - (pair %mgr2 (address %addr) (option %key key_hash))) ] */ ; + : pair (option key_hash) + (pair %mgr1 (address %addr) (option %key key_hash)) + (pair %mgr2 (address %addr) (option %key key_hash)) ] */ ; UNPAIR /* [ address : address - : pair (option @parameter key_hash) - (pair @storage - (pair %mgr1 (address %addr) (option %key key_hash)) - (pair %mgr2 (address %addr) (option %key key_hash))) ] */ ; + : pair (option key_hash) + (pair %mgr1 (address %addr) (option %key key_hash)) + (pair %mgr2 (address %addr) (option %key key_hash)) ] */ ; IFCMPEQ { UNPAIR /* [ option key_hash @@ -44,21 +39,18 @@ Gas remaining: 1039933.671 units remaining (pair %mgr2 (address %addr) (option %key key_hash)) : option key_hash ] */ ; SET_CADR %key @changed_mgr1_key } { DUP - /* [ pair (option @parameter key_hash) - (pair @storage - (pair %mgr1 (address %addr) (option %key key_hash)) - (pair %mgr2 (address %addr) (option %key key_hash))) - : pair (option @parameter key_hash) - (pair @storage - (pair %mgr1 (address %addr) (option %key key_hash)) - (pair %mgr2 (address %addr) (option %key key_hash))) ] */ ; + /* [ pair (option key_hash) + (pair %mgr1 (address %addr) (option %key key_hash)) + (pair %mgr2 (address %addr) (option %key key_hash)) + : pair (option key_hash) + (pair %mgr1 (address %addr) (option %key key_hash)) + (pair %mgr2 (address %addr) (option %key key_hash)) ] */ ; CDDAR ; SENDER /* [ address : address - : pair (option @parameter key_hash) - (pair @storage - (pair %mgr1 (address %addr) (option %key key_hash)) - (pair %mgr2 (address %addr) (option %key key_hash))) ] */ ; + : pair (option key_hash) + (pair %mgr1 (address %addr) (option %key key_hash)) + (pair %mgr2 (address %addr) (option %key key_hash)) ] */ ; IFCMPEQ { UNPAIR /* [ option key_hash diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--weather_insurance.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--weather_insurance.tz].out index 24584db5b745..4fc3d59179ba 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--weather_insurance.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--weather_insurance.tz].out @@ -7,194 +7,163 @@ Gas remaining: 1039960.200 units remaining (pair (pair (address %under_key) (address %over_key)) (pair (nat :rain %rain_level) (key %weather_service_key))) ; code { DUP - /* [ pair (pair @parameter (signature %signed_weather_data) (nat :rain %actual_level)) - (pair @storage - (pair (address %under_key) (address %over_key)) - (nat :rain %rain_level) - (key %weather_service_key)) - : pair (pair @parameter (signature %signed_weather_data) (nat :rain %actual_level)) - (pair @storage - (pair (address %under_key) (address %over_key)) - (nat :rain %rain_level) - (key %weather_service_key)) ] */ ; + /* [ pair (pair (signature %signed_weather_data) (nat :rain %actual_level)) + (pair (address %under_key) (address %over_key)) + (nat :rain %rain_level) + (key %weather_service_key) + : pair (pair (signature %signed_weather_data) (nat :rain %actual_level)) + (pair (address %under_key) (address %over_key)) + (nat :rain %rain_level) + (key %weather_service_key) ] */ ; DUP - /* [ pair (pair @parameter (signature %signed_weather_data) (nat :rain %actual_level)) - (pair @storage - (pair (address %under_key) (address %over_key)) - (nat :rain %rain_level) - (key %weather_service_key)) - : pair (pair @parameter (signature %signed_weather_data) (nat :rain %actual_level)) - (pair @storage - (pair (address %under_key) (address %over_key)) - (nat :rain %rain_level) - (key %weather_service_key)) - : pair (pair @parameter (signature %signed_weather_data) (nat :rain %actual_level)) - (pair @storage - (pair (address %under_key) (address %over_key)) - (nat :rain %rain_level) - (key %weather_service_key)) ] */ ; + /* [ pair (pair (signature %signed_weather_data) (nat :rain %actual_level)) + (pair (address %under_key) (address %over_key)) + (nat :rain %rain_level) + (key %weather_service_key) + : pair (pair (signature %signed_weather_data) (nat :rain %actual_level)) + (pair (address %under_key) (address %over_key)) + (nat :rain %rain_level) + (key %weather_service_key) + : pair (pair (signature %signed_weather_data) (nat :rain %actual_level)) + (pair (address %under_key) (address %over_key)) + (nat :rain %rain_level) + (key %weather_service_key) ] */ ; CAR /* [ pair (signature %signed_weather_data) (nat :rain %actual_level) - : pair (pair @parameter (signature %signed_weather_data) (nat :rain %actual_level)) - (pair @storage - (pair (address %under_key) (address %over_key)) - (nat :rain %rain_level) - (key %weather_service_key)) - : pair (pair @parameter (signature %signed_weather_data) (nat :rain %actual_level)) - (pair @storage - (pair (address %under_key) (address %over_key)) - (nat :rain %rain_level) - (key %weather_service_key)) ] */ ; + : pair (pair (signature %signed_weather_data) (nat :rain %actual_level)) + (pair (address %under_key) (address %over_key)) + (nat :rain %rain_level) + (key %weather_service_key) + : pair (pair (signature %signed_weather_data) (nat :rain %actual_level)) + (pair (address %under_key) (address %over_key)) + (nat :rain %rain_level) + (key %weather_service_key) ] */ ; MAP_CDR { PACK /* [ bytes : pair (signature %signed_weather_data) (nat :rain %actual_level) - : pair (pair @parameter (signature %signed_weather_data) (nat :rain %actual_level)) - (pair @storage - (pair (address %under_key) (address %over_key)) - (nat :rain %rain_level) - (key %weather_service_key)) - : pair (pair @parameter (signature %signed_weather_data) (nat :rain %actual_level)) - (pair @storage - (pair (address %under_key) (address %over_key)) - (nat :rain %rain_level) - (key %weather_service_key)) ] */ ; + : pair (pair (signature %signed_weather_data) (nat :rain %actual_level)) + (pair (address %under_key) (address %over_key)) + (nat :rain %rain_level) + (key %weather_service_key) + : pair (pair (signature %signed_weather_data) (nat :rain %actual_level)) + (pair (address %under_key) (address %over_key)) + (nat :rain %rain_level) + (key %weather_service_key) ] */ ; BLAKE2B /* [ bytes : pair (signature %signed_weather_data) (nat :rain %actual_level) - : pair (pair @parameter (signature %signed_weather_data) (nat :rain %actual_level)) - (pair @storage - (pair (address %under_key) (address %over_key)) - (nat :rain %rain_level) - (key %weather_service_key)) - : pair (pair @parameter (signature %signed_weather_data) (nat :rain %actual_level)) - (pair @storage - (pair (address %under_key) (address %over_key)) - (nat :rain %rain_level) - (key %weather_service_key)) ] */ } ; + : pair (pair (signature %signed_weather_data) (nat :rain %actual_level)) + (pair (address %under_key) (address %over_key)) + (nat :rain %rain_level) + (key %weather_service_key) + : pair (pair (signature %signed_weather_data) (nat :rain %actual_level)) + (pair (address %under_key) (address %over_key)) + (nat :rain %rain_level) + (key %weather_service_key) ] */ } ; SWAP - /* [ pair (pair @parameter (signature %signed_weather_data) (nat :rain %actual_level)) - (pair @storage - (pair (address %under_key) (address %over_key)) - (nat :rain %rain_level) - (key %weather_service_key)) : pair signature bytes - : pair (pair @parameter (signature %signed_weather_data) (nat :rain %actual_level)) - (pair @storage - (pair (address %under_key) (address %over_key)) - (nat :rain %rain_level) - (key %weather_service_key)) ] */ ; + /* [ pair (pair (signature %signed_weather_data) (nat :rain %actual_level)) + (pair (address %under_key) (address %over_key)) + (nat :rain %rain_level) + (key %weather_service_key) : pair signature bytes + : pair (pair (signature %signed_weather_data) (nat :rain %actual_level)) + (pair (address %under_key) (address %over_key)) + (nat :rain %rain_level) + (key %weather_service_key) ] */ ; CDDDR %weather_service_key ; DIP { UNPAIR /* [ signature : bytes - : pair (pair @parameter (signature %signed_weather_data) (nat :rain %actual_level)) - (pair @storage - (pair (address %under_key) (address %over_key)) - (nat :rain %rain_level) - (key %weather_service_key)) ] */ } + : pair (pair (signature %signed_weather_data) (nat :rain %actual_level)) + (pair (address %under_key) (address %over_key)) + (nat :rain %rain_level) + (key %weather_service_key) ] */ } /* [ key : signature : bytes - : pair (pair @parameter (signature %signed_weather_data) (nat :rain %actual_level)) - (pair @storage - (pair (address %under_key) (address %over_key)) - (nat :rain %rain_level) - (key %weather_service_key)) ] */ ; + : pair (pair (signature %signed_weather_data) (nat :rain %actual_level)) + (pair (address %under_key) (address %over_key)) + (nat :rain %rain_level) + (key %weather_service_key) ] */ ; CHECK_SIGNATURE @sigok /* [ bool - : pair (pair @parameter (signature %signed_weather_data) (nat :rain %actual_level)) - (pair @storage - (pair (address %under_key) (address %over_key)) - (nat :rain %rain_level) - (key %weather_service_key)) ] */ ; + : pair (pair (signature %signed_weather_data) (nat :rain %actual_level)) + (pair (address %under_key) (address %over_key)) + (nat :rain %rain_level) + (key %weather_service_key) ] */ ; ASSERT ; DUP - /* [ pair (pair @parameter (signature %signed_weather_data) (nat :rain %actual_level)) - (pair @storage - (pair (address %under_key) (address %over_key)) - (nat :rain %rain_level) - (key %weather_service_key)) - : pair (pair @parameter (signature %signed_weather_data) (nat :rain %actual_level)) - (pair @storage - (pair (address %under_key) (address %over_key)) - (nat :rain %rain_level) - (key %weather_service_key)) ] */ ; + /* [ pair (pair (signature %signed_weather_data) (nat :rain %actual_level)) + (pair (address %under_key) (address %over_key)) + (nat :rain %rain_level) + (key %weather_service_key) + : pair (pair (signature %signed_weather_data) (nat :rain %actual_level)) + (pair (address %under_key) (address %over_key)) + (nat :rain %rain_level) + (key %weather_service_key) ] */ ; DUP - /* [ pair (pair @parameter (signature %signed_weather_data) (nat :rain %actual_level)) - (pair @storage - (pair (address %under_key) (address %over_key)) - (nat :rain %rain_level) - (key %weather_service_key)) - : pair (pair @parameter (signature %signed_weather_data) (nat :rain %actual_level)) - (pair @storage - (pair (address %under_key) (address %over_key)) - (nat :rain %rain_level) - (key %weather_service_key)) - : pair (pair @parameter (signature %signed_weather_data) (nat :rain %actual_level)) - (pair @storage - (pair (address %under_key) (address %over_key)) - (nat :rain %rain_level) - (key %weather_service_key)) ] */ ; + /* [ pair (pair (signature %signed_weather_data) (nat :rain %actual_level)) + (pair (address %under_key) (address %over_key)) + (nat :rain %rain_level) + (key %weather_service_key) + : pair (pair (signature %signed_weather_data) (nat :rain %actual_level)) + (pair (address %under_key) (address %over_key)) + (nat :rain %rain_level) + (key %weather_service_key) + : pair (pair (signature %signed_weather_data) (nat :rain %actual_level)) + (pair (address %under_key) (address %over_key)) + (nat :rain %rain_level) + (key %weather_service_key) ] */ ; DUP - /* [ pair (pair @parameter (signature %signed_weather_data) (nat :rain %actual_level)) - (pair @storage - (pair (address %under_key) (address %over_key)) - (nat :rain %rain_level) - (key %weather_service_key)) - : pair (pair @parameter (signature %signed_weather_data) (nat :rain %actual_level)) - (pair @storage - (pair (address %under_key) (address %over_key)) - (nat :rain %rain_level) - (key %weather_service_key)) - : pair (pair @parameter (signature %signed_weather_data) (nat :rain %actual_level)) - (pair @storage - (pair (address %under_key) (address %over_key)) - (nat :rain %rain_level) - (key %weather_service_key)) - : pair (pair @parameter (signature %signed_weather_data) (nat :rain %actual_level)) - (pair @storage - (pair (address %under_key) (address %over_key)) - (nat :rain %rain_level) - (key %weather_service_key)) ] */ ; + /* [ pair (pair (signature %signed_weather_data) (nat :rain %actual_level)) + (pair (address %under_key) (address %over_key)) + (nat :rain %rain_level) + (key %weather_service_key) + : pair (pair (signature %signed_weather_data) (nat :rain %actual_level)) + (pair (address %under_key) (address %over_key)) + (nat :rain %rain_level) + (key %weather_service_key) + : pair (pair (signature %signed_weather_data) (nat :rain %actual_level)) + (pair (address %under_key) (address %over_key)) + (nat :rain %rain_level) + (key %weather_service_key) + : pair (pair (signature %signed_weather_data) (nat :rain %actual_level)) + (pair (address %under_key) (address %over_key)) + (nat :rain %rain_level) + (key %weather_service_key) ] */ ; DIIIP { CDR %storage /* [ pair (pair (address %under_key) (address %over_key)) (nat :rain %rain_level) (key %weather_service_key) ] */ } - /* [ pair (pair @parameter (signature %signed_weather_data) (nat :rain %actual_level)) - (pair @storage - (pair (address %under_key) (address %over_key)) - (nat :rain %rain_level) - (key %weather_service_key)) - : pair (pair @parameter (signature %signed_weather_data) (nat :rain %actual_level)) - (pair @storage - (pair (address %under_key) (address %over_key)) - (nat :rain %rain_level) - (key %weather_service_key)) - : pair (pair @parameter (signature %signed_weather_data) (nat :rain %actual_level)) - (pair @storage - (pair (address %under_key) (address %over_key)) - (nat :rain %rain_level) - (key %weather_service_key)) + /* [ pair (pair (signature %signed_weather_data) (nat :rain %actual_level)) + (pair (address %under_key) (address %over_key)) + (nat :rain %rain_level) + (key %weather_service_key) + : pair (pair (signature %signed_weather_data) (nat :rain %actual_level)) + (pair (address %under_key) (address %over_key)) + (nat :rain %rain_level) + (key %weather_service_key) + : pair (pair (signature %signed_weather_data) (nat :rain %actual_level)) + (pair (address %under_key) (address %over_key)) + (nat :rain %rain_level) + (key %weather_service_key) : pair (pair (address %under_key) (address %over_key)) (nat :rain %rain_level) (key %weather_service_key) ] */ ; DIIP { CDAR } - /* [ pair (pair @parameter (signature %signed_weather_data) (nat :rain %actual_level)) - (pair @storage - (pair (address %under_key) (address %over_key)) - (nat :rain %rain_level) - (key %weather_service_key)) - : pair (pair @parameter (signature %signed_weather_data) (nat :rain %actual_level)) - (pair @storage - (pair (address %under_key) (address %over_key)) - (nat :rain %rain_level) - (key %weather_service_key)) + /* [ pair (pair (signature %signed_weather_data) (nat :rain %actual_level)) + (pair (address %under_key) (address %over_key)) + (nat :rain %rain_level) + (key %weather_service_key) + : pair (pair (signature %signed_weather_data) (nat :rain %actual_level)) + (pair (address %under_key) (address %over_key)) + (nat :rain %rain_level) + (key %weather_service_key) : pair (address %under_key) (address %over_key) : pair (pair (address %under_key) (address %over_key)) (nat :rain %rain_level) (key %weather_service_key) ] */ ; DIP { CADR %actual_level } - /* [ pair (pair @parameter (signature %signed_weather_data) (nat :rain %actual_level)) - (pair @storage - (pair (address %under_key) (address %over_key)) - (nat :rain %rain_level) - (key %weather_service_key)) : nat :rain + /* [ pair (pair (signature %signed_weather_data) (nat :rain %actual_level)) + (pair (address %under_key) (address %over_key)) + (nat :rain %rain_level) + (key %weather_service_key) : nat :rain : pair (address %under_key) (address %over_key) : pair (pair (address %under_key) (address %over_key)) (nat :rain %rain_level) diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--xcat_dapp.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--xcat_dapp.tz].out index 6a8693771ee7..9be533d51968 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--xcat_dapp.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--xcat_dapp.tz].out @@ -16,29 +16,25 @@ Gas remaining: 1039911.852 units remaining code { NIL @operations operation /* [ list operation - : pair (or @parameter - (pair %fund - (address %dest) - (pair %settings (bytes %target_hash) (timestamp %deadline))) - (or %claim_refund (bytes %preimage_claim) (bytes %refund_hash))) - (pair @storage - (big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline)))) - unit) ] */ ; + : pair (or (pair %fund + (address %dest) + (pair %settings (bytes %target_hash) (timestamp %deadline))) + (or %claim_refund (bytes %preimage_claim) (bytes %refund_hash))) + (big_map + bytes + (pair (pair %recipients (address %from) (address %dest)) + (pair %settings (mutez %amount) (timestamp %deadline)))) + unit ] */ ; SWAP - /* [ pair (or @parameter - (pair %fund - (address %dest) - (pair %settings (bytes %target_hash) (timestamp %deadline))) - (or %claim_refund (bytes %preimage_claim) (bytes %refund_hash))) - (pair @storage - (big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline)))) - unit) : list operation ] */ ; + /* [ pair (or (pair %fund + (address %dest) + (pair %settings (bytes %target_hash) (timestamp %deadline))) + (or %claim_refund (bytes %preimage_claim) (bytes %refund_hash))) + (big_map + bytes + (pair (pair %recipients (address %from) (address %dest)) + (pair %settings (mutez %amount) (timestamp %deadline)))) + unit : list operation ] */ ; UNPAPAIR @% @% @% ; DIP { DUP /* [ big_map diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[non_regression--pairk_annot.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[non_regression--pairk_annot.tz].out index cc58de6ff1b7..b569215ee030 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[non_regression--pairk_annot.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[non_regression--pairk_annot.tz].out @@ -5,23 +5,21 @@ Gas remaining: 1039992.198 units remaining { parameter unit ; storage unit ; code { SENDER - /* [ address : pair (unit @parameter) (unit @storage) ] */ ; + /* [ address : pair unit unit ] */ ; SOURCE - /* [ address : address : pair (unit @parameter) (unit @storage) ] */ ; + /* [ address : address : pair unit unit ] */ ; PAIR 2 - /* [ pair address address : pair (unit @parameter) (unit @storage) ] */ ; + /* [ pair address address : pair unit unit ] */ ; SOURCE - /* [ address : pair address address : pair (unit @parameter) (unit @storage) ] */ ; + /* [ address : pair address address : pair unit unit ] */ ; SENDER - /* [ address : address : pair address address - : pair (unit @parameter) (unit @storage) ] */ ; + /* [ address : address : pair address address : pair unit unit ] */ ; PAIR 2 - /* [ pair address address : pair address address - : pair (unit @parameter) (unit @storage) ] */ ; + /* [ pair address address : pair address address : pair unit unit ] */ ; COMPARE - /* [ int : pair (unit @parameter) (unit @storage) ] */ ; + /* [ int : pair unit unit ] */ ; DROP - /* [ pair (unit @parameter) (unit @storage) ] */ ; + /* [ pair unit unit ] */ ; CDR /* [ unit ] */ ; NIL operation diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--chain_id.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--chain_id.tz].out index c884228e39ef..326a438aa6d7 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--chain_id.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--chain_id.tz].out @@ -5,9 +5,9 @@ Gas remaining: 1039996.340 units remaining { parameter unit ; storage unit ; code { CHAIN_ID - /* [ chain_id : pair (unit @parameter) (unit @storage) ] */ ; + /* [ chain_id : pair unit unit ] */ ; DROP - /* [ pair (unit @parameter) (unit @storage) ] */ ; + /* [ pair unit unit ] */ ; CAR /* [ unit ] */ ; NIL operation diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--check_signature.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--check_signature.tz].out index f0c95ff26ba7..945f42bbcd9a 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--check_signature.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--check_signature.tz].out @@ -5,35 +5,27 @@ Gas remaining: 1039988.024 units remaining { parameter key ; storage (pair signature string) ; code { DUP - /* [ pair (key @parameter) (pair @storage signature string) - : pair (key @parameter) (pair @storage signature string) ] */ ; + /* [ pair key signature string : pair key signature string ] */ ; DUP - /* [ pair (key @parameter) (pair @storage signature string) - : pair (key @parameter) (pair @storage signature string) - : pair (key @parameter) (pair @storage signature string) ] */ ; + /* [ pair key signature string : pair key signature string + : pair key signature string ] */ ; DIP { CDR - /* [ pair signature string - : pair (key @parameter) (pair @storage signature string) ] */ ; + /* [ pair signature string : pair key signature string ] */ ; DUP - /* [ pair signature string : pair signature string - : pair (key @parameter) (pair @storage signature string) ] */ ; + /* [ pair signature string : pair signature string : pair key signature string ] */ ; CAR - /* [ signature : pair signature string - : pair (key @parameter) (pair @storage signature string) ] */ ; + /* [ signature : pair signature string : pair key signature string ] */ ; DIP { CDR - /* [ string : pair (key @parameter) (pair @storage signature string) ] */ ; + /* [ string : pair key signature string ] */ ; PACK - /* [ bytes : pair (key @parameter) (pair @storage signature string) ] */ } - /* [ signature : bytes - : pair (key @parameter) (pair @storage signature string) ] */ } - /* [ pair (key @parameter) (pair @storage signature string) : signature : bytes - : pair (key @parameter) (pair @storage signature string) ] */ ; + /* [ bytes : pair key signature string ] */ } + /* [ signature : bytes : pair key signature string ] */ } + /* [ pair key signature string : signature : bytes : pair key signature string ] */ ; CAR - /* [ key : signature : bytes - : pair (key @parameter) (pair @storage signature string) ] */ ; + /* [ key : signature : bytes : pair key signature string ] */ ; CHECK_SIGNATURE - /* [ bool : pair (key @parameter) (pair @storage signature string) ] */ ; - IF { /* [ pair (key @parameter) (pair @storage signature string) ] */ } { FAIL } ; + /* [ bool : pair key signature string ] */ ; + IF { /* [ pair key signature string ] */ } { FAIL } ; CDR /* [ pair signature string ] */ ; NIL operation diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--comb-literals.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--comb-literals.tz].out index 08859a580700..7f5e78409446 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--comb-literals.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--comb-literals.tz].out @@ -6,7 +6,7 @@ Gas remaining: 1039992.630 units remaining storage unit ; code { PUSH (list (pair nat nat nat nat)) { Pair 0 3 6 9 ; Pair 1 (Pair 4 (Pair 7 10)) ; { 2 ; 5 ; 8 ; 11 } } - /* [ list (pair nat nat nat nat) : pair (unit @parameter) (unit @storage) ] */ ; + /* [ list (pair nat nat nat nat) : pair unit unit ] */ ; DROP 2 /* [] */ ; UNIT diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--create_contract.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--create_contract.tz].out index a1ee25882b4d..3d022a4fb79e 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--create_contract.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--create_contract.tz].out @@ -4,7 +4,7 @@ Well typed Gas remaining: 1039988.704 units remaining { parameter unit ; storage (option address) ; - code { /* [ pair (unit @parameter) (unit @storage) ] */ + code { /* [ pair unit unit ] */ DROP /* [ list operation : unit ] */ ; UNIT diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--create_contract_rootname.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--create_contract_rootname.tz].out index cc16e3e475bb..b1c8f67e84df 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--create_contract_rootname.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--create_contract_rootname.tz].out @@ -4,7 +4,7 @@ Well typed Gas remaining: 1039988.704 units remaining { parameter unit ; storage (option address) ; - code { /* [ pair (unit @parameter) (unit @storage) ] */ + code { /* [ pair unit unit ] */ DROP /* [ list operation : unit ] */ ; UNIT diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--create_contract_rootname_alt.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--create_contract_rootname_alt.tz].out index f0a55dc59fc8..450cfd2bca40 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--create_contract_rootname_alt.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--create_contract_rootname_alt.tz].out @@ -4,7 +4,7 @@ Well typed Gas remaining: 1039988.704 units remaining { parameter unit ; storage (option address) ; - code { /* [ pair (unit @parameter) (unit @storage) ] */ + code { /* [ pair unit unit ] */ DROP /* [ list operation : unit ] */ ; UNIT diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--create_contract_with_view.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--create_contract_with_view.tz].out index 4bb8cbb75d14..8d49d10779dc 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--create_contract_with_view.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--create_contract_with_view.tz].out @@ -4,7 +4,7 @@ Well typed Gas remaining: 1039987.516 units remaining { parameter unit ; storage (option address) ; - code { /* [ pair (unit @parameter) (unit @storage) ] */ + code { /* [ pair unit unit ] */ DROP /* [ list operation : unit ] */ ; UNIT diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--get_big_map_value.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--get_big_map_value.tz].out index b8bc404ba267..f7e442486c19 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--get_big_map_value.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--get_big_map_value.tz].out @@ -5,11 +5,10 @@ Gas remaining: 1039990.479 units remaining { parameter string ; storage (pair (big_map string string) (option string)) ; code { DUP - /* [ pair (string @parameter) (pair @storage (big_map string string) (option string)) - : pair (string @parameter) (pair @storage (big_map string string) (option string)) ] */ ; + /* [ pair string (big_map string string) (option string) + : pair string (big_map string string) (option string) ] */ ; CAR - /* [ string - : pair (string @parameter) (pair @storage (big_map string string) (option string)) ] */ ; + /* [ string : pair string (big_map string string) (option string) ] */ ; DIP { CDAR ; DUP /* [ big_map string string : big_map string string ] */ } /* [ string : big_map string string : big_map string string ] */ ; GET diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--get_map_value.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--get_map_value.tz].out index b81b76b41473..738252442ed1 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--get_map_value.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--get_map_value.tz].out @@ -5,11 +5,10 @@ Gas remaining: 1039991.007 units remaining { parameter string ; storage (pair (option string) (map string string)) ; code { DUP - /* [ pair (string @parameter) (pair @storage (option string) (map string string)) - : pair (string @parameter) (pair @storage (option string) (map string string)) ] */ ; + /* [ pair string (option string) (map string string) + : pair string (option string) (map string string) ] */ ; CAR - /* [ string - : pair (string @parameter) (pair @storage (option string) (map string string)) ] */ ; + /* [ string : pair string (option string) (map string string) ] */ ; DIP { CDDR ; DUP /* [ map string string : map string string ] */ } /* [ string : map string string : map string string ] */ ; GET diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--map_car.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--map_car.tz].out index 38c2db76e933..20f4e12e76d2 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--map_car.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--map_car.tz].out @@ -5,10 +5,9 @@ Gas remaining: 1039990.103 units remaining { parameter bool ; storage (pair (bool %b) (nat %n)) ; code { DUP - /* [ pair (bool @parameter) (pair @storage (bool %b) (nat %n)) - : pair (bool @parameter) (pair @storage (bool %b) (nat %n)) ] */ ; + /* [ pair bool (bool %b) (nat %n) : pair bool (bool %b) (nat %n) ] */ ; CAR - /* [ bool : pair (bool @parameter) (pair @storage (bool %b) (nat %n)) ] */ ; + /* [ bool : pair bool (bool %b) (nat %n) ] */ ; DIP { CDR /* [ pair (bool %b) (nat %n) ] */ } /* [ bool : pair (bool %b) (nat %n) ] */ ; SWAP diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--map_iter.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--map_iter.tz].out index f865564d10a0..4aae424dee4f 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--map_iter.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--map_iter.tz].out @@ -20,14 +20,13 @@ Gas remaining: 1039985.509 units remaining /* [ int :k : pair (int :k) (int :e %r) ] */ ; DIP { CDR /* [ int :e ] */ } /* [ int :k : int :e ] */ } - /* [ pair (int :k @key) (int :e @elt) : int :k : int :e ] */ ; + /* [ pair (int :k) (int :e) : int :k : int :e ] */ ; DUP - /* [ pair (int :k @key) (int :e @elt) : pair (int :k @key) (int :e @elt) - : int :k : int :e ] */ ; + /* [ pair (int :k) (int :e) : pair (int :k) (int :e) : int :k : int :e ] */ ; DIP { CAR /* [ int :k : int :k : int :e ] */ ; ADD /* [ int :k : int :e ] */ } - /* [ pair (int :k @key) (int :e @elt) : int :k : int :e ] */ ; + /* [ pair (int :k) (int :e) : int :k : int :e ] */ ; SWAP - /* [ int :k : pair (int :k @key) (int :e @elt) : int :e ] */ ; + /* [ int :k : pair (int :k) (int :e) : int :e ] */ ; DIP { CDR /* [ int :e : int :e ] */ ; ADD /* [ int :e ] */ } /* [ int :k : int :e ] */ ; PAIR % %r diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--pexec.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--pexec.tz].out index 31dc4c344209..ca033fd489d2 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--pexec.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--pexec.tz].out @@ -8,9 +8,9 @@ Gas remaining: 1039992.874 units remaining (pair nat nat) nat { UNPAIR /* [ nat : nat ] */ ; ADD /* [ nat ] */ } - /* [ lambda (pair nat nat) nat : pair (nat @parameter) (nat @storage) ] */ ; + /* [ lambda (pair nat nat) nat : pair nat nat ] */ ; SWAP - /* [ pair (nat @parameter) (nat @storage) : lambda (pair nat nat) nat ] */ ; + /* [ pair nat nat : lambda (pair nat nat) nat ] */ ; UNPAIR /* [ nat : nat : lambda (pair nat nat) nat ] */ ; DIP { APPLY /* [ lambda nat nat ] */ } diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--set_car.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--set_car.tz].out index 0fdf159b0527..d670ca5e4784 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--set_car.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--set_car.tz].out @@ -5,11 +5,9 @@ Gas remaining: 1039991.314 units remaining { parameter string ; storage (pair (string %s) (nat %n)) ; code { DUP - /* [ pair (string @parameter) (pair @storage (string %s) (nat %n)) - : pair (string @parameter) (pair @storage (string %s) (nat %n)) ] */ ; + /* [ pair string (string %s) (nat %n) : pair string (string %s) (nat %n) ] */ ; CDR - /* [ pair (string %s) (nat %n) - : pair (string @parameter) (pair @storage (string %s) (nat %n)) ] */ ; + /* [ pair (string %s) (nat %n) : pair string (string %s) (nat %n) ] */ ; DIP { CAR /* [ string ] */ } /* [ pair (string %s) (nat %n) : string ] */ ; SET_CAR %s ; diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--set_cdr.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--set_cdr.tz].out index 04a7076e77ed..6a964277b32e 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--set_cdr.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--set_cdr.tz].out @@ -5,11 +5,9 @@ Gas remaining: 1039991.782 units remaining { parameter nat ; storage (pair (string %s) (nat %n)) ; code { DUP - /* [ pair (nat @parameter) (pair @storage (string %s) (nat %n)) - : pair (nat @parameter) (pair @storage (string %s) (nat %n)) ] */ ; + /* [ pair nat (string %s) (nat %n) : pair nat (string %s) (nat %n) ] */ ; CDR - /* [ pair (string %s) (nat %n) - : pair (nat @parameter) (pair @storage (string %s) (nat %n)) ] */ ; + /* [ pair (string %s) (nat %n) : pair nat (string %s) (nat %n) ] */ ; DIP { CAR /* [ nat ] */ } /* [ pair (string %s) (nat %n) : nat ] */ ; SET_CDR %n ; diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--set_member.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--set_member.tz].out index f218d06ece12..06b1fd28911d 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--set_member.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--set_member.tz].out @@ -5,25 +5,21 @@ Gas remaining: 1039988.400 units remaining { parameter string ; storage (pair (set string) (option bool)) ; code { DUP - /* [ pair (string @parameter) (pair @storage (set string) (option bool)) - : pair (string @parameter) (pair @storage (set string) (option bool)) ] */ ; + /* [ pair string (set string) (option bool) + : pair string (set string) (option bool) ] */ ; DUP - /* [ pair (string @parameter) (pair @storage (set string) (option bool)) - : pair (string @parameter) (pair @storage (set string) (option bool)) - : pair (string @parameter) (pair @storage (set string) (option bool)) ] */ ; + /* [ pair string (set string) (option bool) + : pair string (set string) (option bool) + : pair string (set string) (option bool) ] */ ; CAR - /* [ string - : pair (string @parameter) (pair @storage (set string) (option bool)) - : pair (string @parameter) (pair @storage (set string) (option bool)) ] */ ; + /* [ string : pair string (set string) (option bool) + : pair string (set string) (option bool) ] */ ; DIP { CDAR } - /* [ string : set string - : pair (string @parameter) (pair @storage (set string) (option bool)) ] */ ; + /* [ string : set string : pair string (set string) (option bool) ] */ ; MEM - /* [ bool - : pair (string @parameter) (pair @storage (set string) (option bool)) ] */ ; + /* [ bool : pair string (set string) (option bool) ] */ ; SOME - /* [ option bool - : pair (string @parameter) (pair @storage (set string) (option bool)) ] */ ; + /* [ option bool : pair string (set string) (option bool) ] */ ; DIP { CDAR } /* [ option bool : set string ] */ ; SWAP diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--slices.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--slices.tz].out index e09315842bb7..67d46ea071cc 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--slices.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--slices.tz].out @@ -5,113 +5,92 @@ Gas remaining: 1039935.257 units remaining { parameter (pair bytes signature) ; storage key ; code { DUP - /* [ pair (pair @parameter bytes signature) (key @storage) - : pair (pair @parameter bytes signature) (key @storage) ] */ ; + /* [ pair (pair bytes signature) key : pair (pair bytes signature) key ] */ ; CAAR ; DUP - /* [ bytes : bytes : pair (pair @parameter bytes signature) (key @storage) ] */ ; + /* [ bytes : bytes : pair (pair bytes signature) key ] */ ; SIZE - /* [ nat : bytes : pair (pair @parameter bytes signature) (key @storage) ] */ ; - PUSH nat - 128 - /* [ nat : nat : bytes : pair (pair @parameter bytes signature) (key @storage) ] */ ; + /* [ nat : bytes : pair (pair bytes signature) key ] */ ; + PUSH nat 128 + /* [ nat : nat : bytes : pair (pair bytes signature) key ] */ ; SWAP - /* [ nat : nat : bytes : pair (pair @parameter bytes signature) (key @storage) ] */ ; + /* [ nat : nat : bytes : pair (pair bytes signature) key ] */ ; SUB - /* [ int : bytes : pair (pair @parameter bytes signature) (key @storage) ] */ ; + /* [ int : bytes : pair (pair bytes signature) key ] */ ; ISNAT - /* [ option nat : bytes - : pair (pair @parameter bytes signature) (key @storage) ] */ ; - IF_SOME - { /* [ nat : bytes : pair (pair @parameter bytes signature) (key @storage) ] */ } - { FAIL } ; - PUSH nat - 128 - /* [ nat : nat : bytes : pair (pair @parameter bytes signature) (key @storage) ] */ ; + /* [ option nat : bytes : pair (pair bytes signature) key ] */ ; + IF_SOME { /* [ nat : bytes : pair (pair bytes signature) key ] */ } { FAIL } ; + PUSH nat 128 + /* [ nat : nat : bytes : pair (pair bytes signature) key ] */ ; SLICE @payload - /* [ option bytes : pair (pair @parameter bytes signature) (key @storage) ] */ ; + /* [ option bytes : pair (pair bytes signature) key ] */ ; ASSERT_SOME ; DUP - /* [ bytes : bytes : pair (pair @parameter bytes signature) (key @storage) ] */ ; + /* [ bytes : bytes : pair (pair bytes signature) key ] */ ; DIP { DIP { DUP - /* [ pair (pair @parameter bytes signature) (key @storage) - : pair (pair @parameter bytes signature) (key @storage) ] */ ; + /* [ pair (pair bytes signature) key : pair (pair bytes signature) key ] */ ; CAAR ; - PUSH nat - 32 - /* [ nat : bytes : pair (pair @parameter bytes signature) (key @storage) ] */ ; - PUSH nat - 0 - /* [ nat : nat : bytes : pair (pair @parameter bytes signature) (key @storage) ] */ ; + PUSH nat 32 + /* [ nat : bytes : pair (pair bytes signature) key ] */ ; + PUSH nat 0 + /* [ nat : nat : bytes : pair (pair bytes signature) key ] */ ; SLICE - /* [ option bytes : pair (pair @parameter bytes signature) (key @storage) ] */ ; + /* [ option bytes : pair (pair bytes signature) key ] */ ; ASSERT_SOME } - /* [ bytes : bytes : pair (pair @parameter bytes signature) (key @storage) ] */ ; + /* [ bytes : bytes : pair (pair bytes signature) key ] */ ; SHA256 - /* [ bytes : bytes : pair (pair @parameter bytes signature) (key @storage) ] */ ; + /* [ bytes : bytes : pair (pair bytes signature) key ] */ ; ASSERT_CMPEQ } - /* [ bytes : pair (pair @parameter bytes signature) (key @storage) ] */ ; + /* [ bytes : pair (pair bytes signature) key ] */ ; DUP - /* [ bytes : bytes : pair (pair @parameter bytes signature) (key @storage) ] */ ; + /* [ bytes : bytes : pair (pair bytes signature) key ] */ ; DIP { DIP { DUP - /* [ pair (pair @parameter bytes signature) (key @storage) - : pair (pair @parameter bytes signature) (key @storage) ] */ ; + /* [ pair (pair bytes signature) key : pair (pair bytes signature) key ] */ ; CAAR ; - PUSH nat - 32 - /* [ nat : bytes : pair (pair @parameter bytes signature) (key @storage) ] */ ; - PUSH nat - 32 - /* [ nat : nat : bytes : pair (pair @parameter bytes signature) (key @storage) ] */ ; + PUSH nat 32 + /* [ nat : bytes : pair (pair bytes signature) key ] */ ; + PUSH nat 32 + /* [ nat : nat : bytes : pair (pair bytes signature) key ] */ ; SLICE - /* [ option bytes : pair (pair @parameter bytes signature) (key @storage) ] */ ; + /* [ option bytes : pair (pair bytes signature) key ] */ ; ASSERT_SOME } - /* [ bytes : bytes : pair (pair @parameter bytes signature) (key @storage) ] */ ; + /* [ bytes : bytes : pair (pair bytes signature) key ] */ ; BLAKE2B - /* [ bytes : bytes : pair (pair @parameter bytes signature) (key @storage) ] */ ; + /* [ bytes : bytes : pair (pair bytes signature) key ] */ ; ASSERT_CMPEQ } - /* [ bytes : pair (pair @parameter bytes signature) (key @storage) ] */ ; + /* [ bytes : pair (pair bytes signature) key ] */ ; DUP - /* [ bytes : bytes : pair (pair @parameter bytes signature) (key @storage) ] */ ; + /* [ bytes : bytes : pair (pair bytes signature) key ] */ ; DIP { DIP { DUP - /* [ pair (pair @parameter bytes signature) (key @storage) - : pair (pair @parameter bytes signature) (key @storage) ] */ ; + /* [ pair (pair bytes signature) key : pair (pair bytes signature) key ] */ ; CAAR ; - PUSH nat - 64 - /* [ nat : bytes : pair (pair @parameter bytes signature) (key @storage) ] */ ; - PUSH nat - 64 - /* [ nat : nat : bytes : pair (pair @parameter bytes signature) (key @storage) ] */ ; + PUSH nat 64 + /* [ nat : bytes : pair (pair bytes signature) key ] */ ; + PUSH nat 64 + /* [ nat : nat : bytes : pair (pair bytes signature) key ] */ ; SLICE - /* [ option bytes : pair (pair @parameter bytes signature) (key @storage) ] */ ; + /* [ option bytes : pair (pair bytes signature) key ] */ ; ASSERT_SOME } - /* [ bytes : bytes : pair (pair @parameter bytes signature) (key @storage) ] */ ; + /* [ bytes : bytes : pair (pair bytes signature) key ] */ ; SHA512 - /* [ bytes : bytes : pair (pair @parameter bytes signature) (key @storage) ] */ ; + /* [ bytes : bytes : pair (pair bytes signature) key ] */ ; ASSERT_CMPEQ } - /* [ bytes : pair (pair @parameter bytes signature) (key @storage) ] */ ; + /* [ bytes : pair (pair bytes signature) key ] */ ; DIP { DUP - /* [ pair (pair @parameter bytes signature) (key @storage) - : pair (pair @parameter bytes signature) (key @storage) ] */ ; + /* [ pair (pair bytes signature) key : pair (pair bytes signature) key ] */ ; CDR - /* [ key : pair (pair @parameter bytes signature) (key @storage) ] */ ; + /* [ key : pair (pair bytes signature) key ] */ ; DIP { DUP - /* [ pair (pair @parameter bytes signature) (key @storage) - : pair (pair @parameter bytes signature) (key @storage) ] */ ; + /* [ pair (pair bytes signature) key : pair (pair bytes signature) key ] */ ; CADR } - /* [ key : signature : pair (pair @parameter bytes signature) (key @storage) ] */ } - /* [ bytes : key : signature - : pair (pair @parameter bytes signature) (key @storage) ] */ ; + /* [ key : signature : pair (pair bytes signature) key ] */ } + /* [ bytes : key : signature : pair (pair bytes signature) key ] */ ; SWAP - /* [ key : bytes : signature - : pair (pair @parameter bytes signature) (key @storage) ] */ ; - DIP { SWAP - /* [ signature : bytes : pair (pair @parameter bytes signature) (key @storage) ] */ } - /* [ key : signature : bytes - : pair (pair @parameter bytes signature) (key @storage) ] */ ; + /* [ key : bytes : signature : pair (pair bytes signature) key ] */ ; + DIP { SWAP /* [ signature : bytes : pair (pair bytes signature) key ] */ } + /* [ key : signature : bytes : pair (pair bytes signature) key ] */ ; CHECK_SIGNATURE - /* [ bool : pair (pair @parameter bytes signature) (key @storage) ] */ ; + /* [ bool : pair (pair bytes signature) key ] */ ; ASSERT ; CDR /* [ key ] */ ; -- GitLab From 497142df65521141dcd018cfc140dd01980799b8 Mon Sep 17 00:00:00 2001 From: Mehdi Bouaziz Date: Mon, 10 Jan 2022 19:35:34 +0100 Subject: [PATCH 15/17] Tests/Python: regenerate opcodes regtests outputs --- ...odes.TestContractOnchainOpcodes::test_set_delegate.out | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract_onchain_opcodes.TestContractOnchainOpcodes::test_set_delegate.out b/tests_python/tests_alpha/_regtest_outputs/test_contract_onchain_opcodes.TestContractOnchainOpcodes::test_set_delegate.out index dc85dd773ec9..b7f5b011a618 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract_onchain_opcodes.TestContractOnchainOpcodes::test_set_delegate.out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract_onchain_opcodes.TestContractOnchainOpcodes::test_set_delegate.out @@ -48,7 +48,7 @@ Injected block at minimal timestamp Injected block at minimal timestamp none Node is bootstrapped. -Estimated gas: 3056.118 units (will add 100 for safety) +Estimated gas: 3056.061 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[BLOCK_HASH]' @@ -74,7 +74,7 @@ This sequence of operations was run: This transaction was successfully applied Updated storage: Unit Storage size: 51 bytes - Consumed gas: 2056.118 + Consumed gas: 2056.061 Internal operations: Delegation: Contract: [CONTRACT_HASH] @@ -85,7 +85,7 @@ This sequence of operations was run: Injected block at minimal timestamp [CONTRACT_HASH] (known as bootstrap5) Node is bootstrapped. -Estimated gas: 2202.482 units (will add 100 for safety) +Estimated gas: 2202.425 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[BLOCK_HASH]' @@ -111,7 +111,7 @@ This sequence of operations was run: This transaction was successfully applied Updated storage: Unit Storage size: 51 bytes - Consumed gas: 1202.482 + Consumed gas: 1202.425 Internal operations: Delegation: Contract: [CONTRACT_HASH] -- GitLab From aa187e5d8c8143b30f9c11823f0e7e9586aac74e Mon Sep 17 00:00:00 2001 From: Mehdi Bouaziz Date: Tue, 11 Jan 2022 19:46:36 +0100 Subject: [PATCH 16/17] Proto/Tests: adapt script cache hard-coded values --- .../test/integration/michelson/test_script_cache.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_script_cache.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_script_cache.ml index d8dc8be679b1..c2360c1e3ded 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_script_cache.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_script_cache.ml @@ -46,7 +46,7 @@ let err x = Exn (Script_cache_test_error x) model. It has been computed by a manual run of the test. *) -let liquidity_baking_contract_size = 291537 +let liquidity_baking_contract_size = 289783 let liquidity_baking_contract = Contract.of_b58check "KT1TxqZ8QtKvLu3V3JH7Gx58n7Co8pgtpQU5" |> function @@ -120,7 +120,7 @@ let add_some_contracts k src block baker = model. It has been computed by a manual run of the test. *) -let int_store_contract_size = 1456 +let int_store_contract_size = 1406 (* -- GitLab From e553e7a3b65cc36b736bb1789d51feea75c477f0 Mon Sep 17 00:00:00 2001 From: Mehdi Bouaziz Date: Mon, 11 Jan 2021 13:03:53 +0100 Subject: [PATCH 17/17] Proto/Michelson: remove dead values --- src/proto_alpha/lib_protocol/script_ir_annot.ml | 3 --- src/proto_alpha/lib_protocol/script_ir_annot.mli | 4 ---- .../test/integration/michelson/test_typechecking.ml | 2 -- 3 files changed, 9 deletions(-) diff --git a/src/proto_alpha/lib_protocol/script_ir_annot.ml b/src/proto_alpha/lib_protocol/script_ir_annot.ml index 5da87b253b62..01fa09bea1d8 100644 --- a/src/proto_alpha/lib_protocol/script_ir_annot.ml +++ b/src/proto_alpha/lib_protocol/script_ir_annot.ml @@ -34,9 +34,6 @@ type type_annot = Type_annot of Non_empty_string.t [@@ocaml.unboxed] type field_annot = Field_annot of Non_empty_string.t [@@ocaml.unboxed] module FOR_TESTS = struct - let unsafe_var_annot_of_string s = - Var_annot (Non_empty_string.of_string_exn s) - let unsafe_type_annot_of_string s = Type_annot (Non_empty_string.of_string_exn s) diff --git a/src/proto_alpha/lib_protocol/script_ir_annot.mli b/src/proto_alpha/lib_protocol/script_ir_annot.mli index f5cc54d08c1b..cf7c5f0cb51d 100644 --- a/src/proto_alpha/lib_protocol/script_ir_annot.mli +++ b/src/proto_alpha/lib_protocol/script_ir_annot.mli @@ -25,15 +25,11 @@ open Alpha_context -type var_annot = private Var_annot of Non_empty_string.t [@@ocaml.unboxed] - type type_annot = private Type_annot of Non_empty_string.t [@@ocaml.unboxed] type field_annot = private Field_annot of Non_empty_string.t [@@ocaml.unboxed] module FOR_TESTS : sig - val unsafe_var_annot_of_string : string -> var_annot - val unsafe_type_annot_of_string : string -> type_annot val unsafe_field_annot_of_string : string -> field_annot diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_typechecking.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_typechecking.ml index 5037627a9da0..ad265b4a7600 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_typechecking.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_typechecking.ml @@ -179,8 +179,6 @@ let test_parse_ty ctxt node expected = Script_ir_translator.ty_eq ctxt (location node) actual expected >|? fun (_, ctxt) -> ctxt ) -let var_annot = Script_ir_annot.FOR_TESTS.unsafe_var_annot_of_string - let type_annot = Script_ir_annot.FOR_TESTS.unsafe_type_annot_of_string let field_annot = Script_ir_annot.FOR_TESTS.unsafe_field_annot_of_string -- GitLab