tuple empty_tuple() pure asm "NIL"; forall X -> (tuple, ()) tpush(tuple t, X x) pure asm "TPUSH"; tuple emptyTuple() { return empty_tuple(); } forall X -> (tuple, ()) tuplePush(tuple t, X value) { return tpush(t, value); } tuple asm_func_1(int x, int y, int z) pure asm "3 TUPLE"; tuple asm_func_2(int x, int y, int z) pure asm (z y x -> 0) "3 TUPLE"; tuple asm_func_3(int x, int y, int z) pure asm (y z x -> 0) "3 TUPLE"; tuple asm_func_4(int a, (int, (int, int)) b, int c) pure asm (b a c -> 0) "5 TUPLE"; _ asmFunc1(int x, int y, int z) { return asm_func_1(x, y, z); } _ asmFunc3(int x, int y, int z) { return asm_func_3(x, y, z); } (tuple, ()) asm_func_modify(tuple a, int b, int c) pure asm (c b a -> 0) "SWAP TPUSH SWAP TPUSH"; (tuple, ()) asmFuncModify(tuple a, int b, int c) { return asm_func_modify(a, b, c); } global tuple t; int foo(int x) { t~tuplePush(x); return x * 10; } (tuple, tuple) test_old_1() method_id(11) { t = empty_tuple(); tuple t2 = asmFunc1(foo(11), foo(22), foo(33)); return (t, t2); } (tuple, tuple) test_old_2() method_id(12) { t = emptyTuple(); tuple t2 = asm_func_2(foo(11), foo(22), foo(33)); return (t, t2); } (tuple, tuple) test_old_3() method_id(13) { t = empty_tuple(); tuple t2 = asm_func_3(foo(11), foo(22), foo(33)); return (t, t2); } (tuple, tuple) test_old_4() method_id(14) { t = emptyTuple(); tuple t2 = empty_tuple(); ;; This actually computes left-to-right even without compute-asm-ltr tuple t2 = asm_func_4(foo(11), (foo(22), (foo(33), foo(44))), foo(55)); return (t, t2); } (tuple, tuple) test_old_modify() method_id(15) { t = empty_tuple(); tuple t2 = empty_tuple(); t2~asmFuncModify(foo(22), foo(33)); return (t, t2); } (tuple, tuple) test_old_dot() method_id(16) { t = empty_tuple(); tuple t2 = foo(11).asmFunc3(foo(22), foo(33)); return (t, t2); } (tuple, tuple) test_new_1() method_id(21) { t = empty_tuple(); tuple t2 = asmFunc1(foo(11), foo(22), foo(33)); return (t, t2); } (tuple, tuple) test_new_2() method_id(22) { t = empty_tuple(); tuple t2 = asm_func_2(foo(11), foo(22), foo(33)); return (t, t2); } (tuple, tuple) test_new_3() method_id(23) { t = empty_tuple(); tuple t2 = asm_func_3(foo(11), foo(22), foo(33)); return (t, t2); } (tuple, tuple) test_new_4() method_id(24) { t = empty_tuple(); tuple t2 = asm_func_4(foo(11), (foo(22), (foo(33), foo(44))), foo(55)); return (t, t2); } (tuple, tuple) test_new_modify() method_id(25) { t = empty_tuple(); tuple t2 = empty_tuple(); t2~asm_func_modify(foo(22), foo(33)); return (t, t2); } (tuple, tuple) test_new_dot() method_id(26) { t = empty_tuple(); tuple t2 = foo(11).asm_func_3(foo(22), foo(33)); return (t, t2); } () main() { } {- method_id | in | out TESTCASE | 11 | | [ 11 22 33 ] [ 110 220 330 ] TESTCASE | 12 | | [ 11 22 33 ] [ 330 220 110 ] TESTCASE | 13 | | [ 11 22 33 ] [ 220 330 110 ] TESTCASE | 14 | | [ 11 22 33 44 55 ] [ 220 330 440 110 550 ] TESTCASE | 15 | | [ 22 33 ] [ 220 330 ] TESTCASE | 16 | | [ 11 22 33 ] [ 220 330 110 ] TESTCASE | 21 | | [ 11 22 33 ] [ 110 220 330 ] TESTCASE | 22 | | [ 11 22 33 ] [ 330 220 110 ] TESTCASE | 23 | | [ 11 22 33 ] [ 220 330 110 ] TESTCASE | 24 | | [ 11 22 33 44 55 ] [ 220 330 440 110 550 ] TESTCASE | 25 | | [ 22 33 ] [ 220 330 ] TESTCASE | 26 | | [ 11 22 33 ] [ 220 330 110 ] @code_hash 93068291567112337250118419287631047120002003622184251973082208096953112184588 -}