Skip to content

Commit

Permalink
Removing the unused folder
Browse files Browse the repository at this point in the history
  • Loading branch information
hecmas committed Mar 26, 2024
1 parent 9b5a4e9 commit fe68ee7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 607 deletions.
274 changes: 1 addition & 273 deletions test/testArrayArith.zkasm
Original file line number Diff line number Diff line change
Expand Up @@ -1249,271 +1249,6 @@ start:
array_div_two_wc_test_end:
; ---------------------------------------------------------------

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; UNUSED
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; addition
; ---------------------------------------------------------------
; 1] len(inA) = len(inB)
3 => C
3 => D
%ARRAY_BASE_MINUS_ONE :MSTORE(array_add_inA)
1 => E
%ARRAY_BASE_MINUS_ONE :MSTORE(array_add_inA + E)
2 => E
%ARRAY_BASE_MINUS_ONE :MSTORE(array_add_inA + E)

%ARRAY_BASE_MINUS_ONE :MSTORE(array_add_inB)
1 => E
%ARRAY_BASE_MINUS_ONE :MSTORE(array_add_inB + E)
2 => E
%ARRAY_BASE_MINUS_ONE :MSTORE(array_add_inB + E)
:CALL(array_add)
115792089237316195423570985008687907853269984665640564039457584007913129639934n :MLOAD(array_add_out)
1 => E
%ARRAY_BASE_MINUS_ONE :MLOAD(array_add_out + E)
2 => E
%ARRAY_BASE_MINUS_ONE :MLOAD(array_add_out + E)
3 => E
1n :MLOAD(array_add_out + E)
4 :MLOAD(array_add_len_out)

; 2] len(inA) = len(inB) + 1
3 => C
2 => D
%ARRAY_BASE_MINUS_ONE :MSTORE(array_add_inA)
1 => E
%ARRAY_BASE_MINUS_ONE :MSTORE(array_add_inA + E)
2 => E
%ARRAY_BASE_MINUS_ONE :MSTORE(array_add_inA + E)

%ARRAY_BASE_MINUS_ONE :MSTORE(array_add_inB)
1 => E
%ARRAY_BASE_MINUS_ONE :MSTORE(array_add_inB + E)
:CALL(array_add)
115792089237316195423570985008687907853269984665640564039457584007913129639934n :MLOAD(array_add_out)
1 => E
%ARRAY_BASE_MINUS_ONE :MLOAD(array_add_out + E)
2 => E
0n :MLOAD(array_add_out + E)
3 => E
1n :MLOAD(array_add_out + E)
4 :MLOAD(array_add_len_out)

; 3] len(inA) = len(inB) + 3
7 => C
4 => D
0n :MSTORE(array_add_inA)
1 => E
0n :MSTORE(array_add_inA + E)
2 => E
71980342328814551066277152664912916825216970430701952092274083071078176857050n :MSTORE(array_add_inA + E)
3 => E
115792089237316195423570985008687907853269984665640564039457584007907110318705n :MSTORE(array_add_inA + E)
4 => E
87552057494100699607633960453116574392480272162273084008350826812719088235448n :MSTORE(array_add_inA + E)
5 => E
29405388739667337424543497575767709934732594998639086405406332616399343873602n :MSTORE(array_add_inA + E)
6 => E
370491411790392985199n :MSTORE(array_add_inA + E)

0n :MSTORE(array_add_inB)
1 => E
0n :MSTORE(array_add_inB + E)
2 => E
43811746908501644357293832343774991028053014234938611947183500936834952782886n :MSTORE(array_add_inB + E)
3 => E
6019321230n :MSTORE(array_add_inB + E)
:CALL(array_add)
0n :MLOAD(array_add_out)
1 => E
0n :MLOAD(array_add_out + E)
2 => E
0n :MLOAD(array_add_out + E)
3 => E
0n :MLOAD(array_add_out + E)
4 => E
87552057494100699607633960453116574392480272162273084008350826812719088235449n :MLOAD(array_add_out + E)
5 => E
29405388739667337424543497575767709934732594998639086405406332616399343873602n :MLOAD(array_add_out + E)
6 => E
370491411790392985199n :MLOAD(array_add_out + E)
7 :MLOAD(array_add_len_out)

; 4] len(inA) = len(inB) - 3
4 => C
7 => D
0n :MSTORE(array_add_inA)
1 => E
0n :MSTORE(array_add_inA + E)
2 => E
43811746908501644357293832343774991028053014234938611947183500936834952782886n :MSTORE(array_add_inA + E)
3 => E
6019321230n :MSTORE(array_add_inA + E)

0n :MSTORE(array_add_inB)
1 => E
0n :MSTORE(array_add_inB + E)
2 => E
71980342328814551066277152664912916825216970430701952092274083071078176857050n :MSTORE(array_add_inB + E)
3 => E
115792089237316195423570985008687907853269984665640564039457584007907110318705n :MSTORE(array_add_inB + E)
4 => E
87552057494100699607633960453116574392480272162273084008350826812719088235448n :MSTORE(array_add_inB + E)
5 => E
29405388739667337424543497575767709934732594998639086405406332616399343873602n :MSTORE(array_add_inB + E)
6 => E
370491411790392985199n :MSTORE(array_add_inB + E)
:CALL(array_add)
0n :MLOAD(array_add_out)
1 => E
0n :MLOAD(array_add_out + E)
2 => E
0n :MLOAD(array_add_out + E)
3 => E
0n :MLOAD(array_add_out + E)
4 => E
87552057494100699607633960453116574392480272162273084008350826812719088235449n :MLOAD(array_add_out + E)
5 => E
29405388739667337424543497575767709934732594998639086405406332616399343873602n :MLOAD(array_add_out + E)
6 => E
370491411790392985199n :MLOAD(array_add_out + E)
7 :MLOAD(array_add_len_out)
; ---------------------------------------------------------------

; subtraction with len(inA) >= len(inB)
; ---------------------------------------------------------------
; 1] len(inA) > len(inB) and inA_i >= inb_i for all i
3 => C
2 => D
5n :MSTORE(array_sub_AGTB_inA)
1 => E
6n :MSTORE(array_sub_AGTB_inA + E)
2 => E
7n :MSTORE(array_sub_AGTB_inA + E)

2n :MSTORE(array_sub_AGTB_inB)
1 => E
3n :MSTORE(array_sub_AGTB_inB + E)
:CALL(array_sub_AGTB)
3n :MLOAD(array_sub_AGTB_out)
1 => E
3n :MLOAD(array_sub_AGTB_out + E)
2 => E
7n :MLOAD(array_sub_AGTB_out + E)

; 2] len(inA) > len(inB) and inA_i < inb_i for some i
3 => C
2 => D
5n :MSTORE(array_sub_AGTB_inA)
1 => E
6n :MSTORE(array_sub_AGTB_inA + E)
2 => E
7n :MSTORE(array_sub_AGTB_inA + E)

6n :MSTORE(array_sub_AGTB_inB)
1 => E
3n :MSTORE(array_sub_AGTB_inB + E)
:CALL(array_sub_AGTB)
%ARRAY_BASE_MINUS_ONE :MLOAD(array_sub_AGTB_out)
1 => E
2n :MLOAD(array_sub_AGTB_out + E)
2 => E
7n :MLOAD(array_sub_AGTB_out + E)

; 3] len(inA) > len(inB) and inA_i < inB_i for all i lower than len(inA)
3 => C
2 => D
5n :MSTORE(array_sub_AGTB_inA)
1 => E
1n :MSTORE(array_sub_AGTB_inA + E)
2 => E
7n :MSTORE(array_sub_AGTB_inA + E)

6n :MSTORE(array_sub_AGTB_inB)
1 => E
8n :MSTORE(array_sub_AGTB_inB + E)
:CALL(array_sub_AGTB)
%ARRAY_BASE_MINUS_ONE :MLOAD(array_sub_AGTB_out)
1 => E
115792089237316195423570985008687907853269984665640564039457584007913129639928n :MLOAD(array_sub_AGTB_out + E)
2 => E
6n :MLOAD(array_sub_AGTB_out + E)

; 4] len(inB) > len(inA) and inB_i < inA_i for all i lower than len(inB)
3 => C
2 => D
6n :MSTORE(array_sub_AGTB_inB)
1 => E
8n :MSTORE(array_sub_AGTB_inB + E)

5n :MSTORE(array_sub_AGTB_inA)
1 => E
1n :MSTORE(array_sub_AGTB_inA + E)
2 => E
7n :MSTORE(array_sub_AGTB_inA + E)
:CALL(array_sub_AGTB)
%ARRAY_BASE_MINUS_ONE :MLOAD(array_sub_AGTB_out)
1 => E
115792089237316195423570985008687907853269984665640564039457584007913129639928n :MLOAD(array_sub_AGTB_out + E)
2 => E
6n :MLOAD(array_sub_AGTB_out + E)

; 5] len(inB) = len(inA) and inB > inA
3 => C
3 => D
6n :MSTORE(array_sub_AGTB_inB)
1 => E
8n :MSTORE(array_sub_AGTB_inB + E)
2 => E
8n :MSTORE(array_sub_AGTB_inB + E)

7n :MSTORE(array_sub_AGTB_inA)
1 => E
8n :MSTORE(array_sub_AGTB_inA + E)
2 => E
8n :MSTORE(array_sub_AGTB_inA + E)
:CALL(array_sub_AGTB)
1n :MLOAD(array_sub_AGTB_out)
1 => E
0n :MLOAD(array_sub_AGTB_out + E)
2 => E
0n :MLOAD(array_sub_AGTB_out + E)
; ---------------------------------------------------------------

; division
; ---------------------------------------------------------------
; 1] inA == inB == 0 -> error
1 => C
1 => D
0n :MSTORE(array_div_inA)
0n :MSTORE(array_div_inB)
:CALL(array_div)
1 => A
B :ASSERT

; 2] inA != 0, inB == 0 and len(inA) == 1 -> error
1 => C
1 => D
8n :MSTORE(array_div_inA)
0n :MSTORE(array_div_inB)
:CALL(array_div)
1 => A
B :ASSERT

; 3] inA != 0, inB and len(inA) > 1 == 0 -> error
2 => C
1 => D
0n :MSTORE(array_div_inA)
1 => E
30n :MSTORE(array_div_inA + E)
0n :MSTORE(array_div_inB)
:CALL(array_div)
1 => A
B :ASSERT
; ---------------------------------------------------------------

:JMP(end)

outOfCountersBinary:
Expand Down Expand Up @@ -1562,11 +1297,4 @@ INCLUDE "../main/modexp/array_lib/array_mul_two.zkasm"
INCLUDE "../main/modexp/array_lib/array_square.zkasm"
INCLUDE "../main/modexp/array_lib/array_div_long.zkasm"
INCLUDE "../main/modexp/array_lib/array_div_short.zkasm"
INCLUDE "../main/modexp/array_lib/array_div_two.zkasm"

INCLUDE "../main/modexp/array_lib/unused/array_compare.zkasm"
INCLUDE "../main/modexp/array_lib/unused/array_trim.zkasm"
INCLUDE "../main/modexp/array_lib/unused/array_sub_AGTB.zkasm"
INCLUDE "../main/modexp/array_lib/unused/array_add.zkasm"
INCLUDE "../main/modexp/array_lib/unused/array_mul.zkasm"
INCLUDE "../main/modexp/array_lib/unused/array_div.zkasm"
INCLUDE "../main/modexp/array_lib/array_div_two.zkasm"
Loading

0 comments on commit fe68ee7

Please sign in to comment.