From 68dac762dbaac7cf33f047cd81d273d684685465 Mon Sep 17 00:00:00 2001 From: dark64 Date: Wed, 1 Jun 2022 00:04:40 +0200 Subject: [PATCH] spaces > tabs --- .../examples/array_generic_inference.zok | 4 +- zokrates_cli/examples/arrays/array_loop.zok | 10 ++--- .../examples/arrays/array_loop_update.zok | 10 ++--- .../examples/arrays/boolean_array.zok | 14 +++--- .../examples/arrays/constant_array.zok | 2 +- zokrates_cli/examples/arrays/cube.zok | 16 +++---- zokrates_cli/examples/arrays/if_eq.zok | 2 +- .../examples/arrays/multidim_update.zok | 4 +- zokrates_cli/examples/arrays/repeat.zok | 4 +- zokrates_cli/examples/arrays/slicefrom.zok | 12 ++--- zokrates_cli/examples/arrays/update.zok | 6 +-- zokrates_cli/examples/arrays/wrap_select.zok | 2 +- zokrates_cli/examples/book/assert.zok | 2 +- zokrates_cli/examples/book/bubblesort.zok | 6 +-- zokrates_cli/examples/book/declaration.zok | 8 ++-- zokrates_cli/examples/book/for.zok | 4 +- zokrates_cli/examples/book/for_scope.zok | 12 ++--- zokrates_cli/examples/book/generics.zok | 10 ++--- zokrates_cli/examples/book/no_shadowing.zok | 12 ++--- .../examples/book/numeric_inference.zok | 12 ++--- zokrates_cli/examples/book/struct_assign.zok | 4 +- zokrates_cli/examples/book/struct_init.zok | 8 ++-- zokrates_cli/examples/book/structs.zok | 14 +++--- zokrates_cli/examples/book/tuples.zok | 6 +-- zokrates_cli/examples/bool_not.zok | 4 +- zokrates_cli/examples/boolean_literal.zok | 2 +- .../generics/assign_size_mismatch.zok | 4 +- .../generics/concrete_length_mismatch.zok | 4 +- .../generics/generic_in_main.zok | 2 +- .../generics/generics_in_main.zok | 2 +- .../compile_errors/generics/incompatible.zok | 4 +- .../compile_errors/generics/no_weak_eq.zok | 4 +- .../compile_errors/keyword_as_identifier.zok | 2 +- .../examples/compile_errors/no_return.zok | 2 +- .../compile_errors/out_of_for_scope.zok | 4 +- .../examples/compile_errors/shadowing.zok | 8 ++-- .../struct_member_type_mismatch_field.zok | 16 +++---- .../struct_member_type_mismatch_u8.zok | 16 +++---- .../compile_errors/too_many_return.zok | 2 +- .../examples/compile_errors/two_return.zok | 4 +- .../examples/compile_errors/unassigned.zok | 6 +-- zokrates_cli/examples/conditions.zok | 6 +-- .../constant_index_on_spread_inline.zok | 2 +- zokrates_cli/examples/for.zok | 2 +- .../examples/functions/lt_comparison.zok | 4 +- zokrates_cli/examples/left_side_call.zok | 6 +-- .../merkleTree/pedersenPathProof3.zok | 16 +++---- .../examples/merkleTree/sha256PathProof3.zok | 18 ++++---- zokrates_cli/examples/multi_return.zok | 6 +-- zokrates_cli/examples/propagate.zok | 16 +++---- zokrates_cli/examples/propagate_call.zok | 8 ++-- zokrates_cli/examples/reduceable_exponent.zok | 4 +- .../runtime_errors/div_zero_field.zok | 4 +- .../examples/runtime_errors/div_zero_uint.zok | 4 +- .../examples/struct_generic_inference.zok | 4 +- zokrates_cli/examples/structs/add.zok | 12 ++--- .../examples/structs/nested_access.zok | 8 ++-- zokrates_cli/examples/structs/set_member.zok | 44 +++++++++---------- zokrates_cli/examples/synonyms.zok | 12 ++--- zokrates_cli/examples/tuples/add.zok | 2 +- .../examples/tuples/nested_access.zok | 4 +- zokrates_cli/examples/tuples/set_member.zok | 20 ++++----- 62 files changed, 236 insertions(+), 236 deletions(-) diff --git a/zokrates_cli/examples/array_generic_inference.zok b/zokrates_cli/examples/array_generic_inference.zok index 1d0af717..ac0aea72 100644 --- a/zokrates_cli/examples/array_generic_inference.zok +++ b/zokrates_cli/examples/array_generic_inference.zok @@ -1,6 +1,6 @@ def myFct(u64[N] ignored) -> u64[N2] { - assert(2*N == N2); - return [0; N2]; + assert(2*N == N2); + return [0; N2]; } const u32 N = 3; diff --git a/zokrates_cli/examples/arrays/array_loop.zok b/zokrates_cli/examples/arrays/array_loop.zok index d0e917a2..f13e926c 100644 --- a/zokrates_cli/examples/arrays/array_loop.zok +++ b/zokrates_cli/examples/arrays/array_loop.zok @@ -1,8 +1,8 @@ def main() -> u32 { u32[3] a = [1, 2, 3]; - u32 c = 0; - for u32 i in 0..3 { - c = c + a[i]; - } - return c; + u32 c = 0; + for u32 i in 0..3 { + c = c + a[i]; + } + return c; } diff --git a/zokrates_cli/examples/arrays/array_loop_update.zok b/zokrates_cli/examples/arrays/array_loop_update.zok index 764050fa..13a1db6c 100644 --- a/zokrates_cli/examples/arrays/array_loop_update.zok +++ b/zokrates_cli/examples/arrays/array_loop_update.zok @@ -1,8 +1,8 @@ def main() -> (u32[3]) { u32[3] a = [1, 2, 3]; - u32[3] c = [4, 5, 6]; - for u32 i in 0..3 { - c[i] = c[i] + a[i]; - } - return c; + u32[3] c = [4, 5, 6]; + for u32 i in 0..3 { + c[i] = c[i] + a[i]; + } + return c; } diff --git a/zokrates_cli/examples/arrays/boolean_array.zok b/zokrates_cli/examples/arrays/boolean_array.zok index 6a0870de..d4dbd001 100644 --- a/zokrates_cli/examples/arrays/boolean_array.zok +++ b/zokrates_cli/examples/arrays/boolean_array.zok @@ -1,11 +1,11 @@ def main(bool[3] a) -> (field[3]) { bool[3] c = [true, true || false, true]; - a[1] = true || a[2]; - a[2] = a[0]; - field[3] result = [0; 3]; - for u32 i in 0..3 { - result[i] = a[i] ? 33 : 0; - } - return result; + a[1] = true || a[2]; + a[2] = a[0]; + field[3] result = [0; 3]; + for u32 i in 0..3 { + result[i] = a[i] ? 33 : 0; + } + return result; } diff --git a/zokrates_cli/examples/arrays/constant_array.zok b/zokrates_cli/examples/arrays/constant_array.zok index 571b1a3a..6a330a9c 100644 --- a/zokrates_cli/examples/arrays/constant_array.zok +++ b/zokrates_cli/examples/arrays/constant_array.zok @@ -1,4 +1,4 @@ def main() -> field { field[4] a = [1, 2, 42, 55]; - return a[2]; + return a[2]; } diff --git a/zokrates_cli/examples/arrays/cube.zok b/zokrates_cli/examples/arrays/cube.zok index cdeababb..7ea7c1af 100644 --- a/zokrates_cli/examples/arrays/cube.zok +++ b/zokrates_cli/examples/arrays/cube.zok @@ -1,13 +1,13 @@ def main(field[2][2][2] cube) -> field { field res = 0; - for u32 i in 0..2 { - for u32 j in 0..2 { - for u32 k in 0..2 { - res = res + cube[i][j][k]; - } - } - } + for u32 i in 0..2 { + for u32 j in 0..2 { + for u32 k in 0..2 { + res = res + cube[i][j][k]; + } + } + } - return res; + return res; } diff --git a/zokrates_cli/examples/arrays/if_eq.zok b/zokrates_cli/examples/arrays/if_eq.zok index 13a080b8..6a0ebef8 100644 --- a/zokrates_cli/examples/arrays/if_eq.zok +++ b/zokrates_cli/examples/arrays/if_eq.zok @@ -1,3 +1,3 @@ def main(field[2] a, field[2] b, field condition) -> field[2] { - return condition == 1 ? a : b; + return condition == 1 ? a : b; } diff --git a/zokrates_cli/examples/arrays/multidim_update.zok b/zokrates_cli/examples/arrays/multidim_update.zok index 8c86dd1a..5e7c1470 100644 --- a/zokrates_cli/examples/arrays/multidim_update.zok +++ b/zokrates_cli/examples/arrays/multidim_update.zok @@ -1,5 +1,5 @@ def main(field[10][10][10] a, u32 i, u32 j, u32 k) -> (field[3]) { a[i][j][k] = 42; - field[3][3] b = [[1, 2, 3], [1, 2, 3], [1, 2, 3]]; - return b[0]; + field[3][3] b = [[1, 2, 3], [1, 2, 3], [1, 2, 3]]; + return b[0]; } diff --git a/zokrates_cli/examples/arrays/repeat.zok b/zokrates_cli/examples/arrays/repeat.zok index a96c219f..f0067919 100644 --- a/zokrates_cli/examples/arrays/repeat.zok +++ b/zokrates_cli/examples/arrays/repeat.zok @@ -1,5 +1,5 @@ def main(field a) -> field[4] { u32 SIZE = 4; - field[SIZE] res = [a; SIZE]; - return res; + field[SIZE] res = [a; SIZE]; + return res; } diff --git a/zokrates_cli/examples/arrays/slicefrom.zok b/zokrates_cli/examples/arrays/slicefrom.zok index 913eaca5..9bbdf0a5 100644 --- a/zokrates_cli/examples/arrays/slicefrom.zok +++ b/zokrates_cli/examples/arrays/slicefrom.zok @@ -1,12 +1,12 @@ def slice32from(u32 offset, field[2048] input) -> (field[32]) { - field[32] result = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - for u32 i in 0..32 { - result[i] = input[offset + i]; - } - return result; + field[32] result = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + for u32 i in 0..32 { + result[i] = input[offset + i]; + } + return result; } def main() -> (field[32]) { field[2048] input = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - return slice32from(67, input); + return slice32from(67, input); } diff --git a/zokrates_cli/examples/arrays/update.zok b/zokrates_cli/examples/arrays/update.zok index 4f6e616b..06d5753d 100644 --- a/zokrates_cli/examples/arrays/update.zok +++ b/zokrates_cli/examples/arrays/update.zok @@ -5,8 +5,8 @@ def foo(field[3] a) -> field { def main() -> (field, field) { field[3] a = [0, 0, 0]; - field res = foo(a); - assert(a[1] == 0); - return res, a[1]; + field res = foo(a); + assert(a[1] == 0); + return res, a[1]; } diff --git a/zokrates_cli/examples/arrays/wrap_select.zok b/zokrates_cli/examples/arrays/wrap_select.zok index da6c34f8..c7d34028 100644 --- a/zokrates_cli/examples/arrays/wrap_select.zok +++ b/zokrates_cli/examples/arrays/wrap_select.zok @@ -1,5 +1,5 @@ def get(field[32] array, u32 index) -> field { - return array[index]; + return array[index]; } def main() -> field { diff --git a/zokrates_cli/examples/book/assert.zok b/zokrates_cli/examples/book/assert.zok index c7bd7830..1bfd0617 100644 --- a/zokrates_cli/examples/book/assert.zok +++ b/zokrates_cli/examples/book/assert.zok @@ -1,4 +1,4 @@ def main() -> () { assert(1f + 1f == 2f); - return; + return; } diff --git a/zokrates_cli/examples/book/bubblesort.zok b/zokrates_cli/examples/book/bubblesort.zok index a3892d4e..825aaad7 100644 --- a/zokrates_cli/examples/book/bubblesort.zok +++ b/zokrates_cli/examples/book/bubblesort.zok @@ -1,7 +1,7 @@ def swap(u32 a, u32 b, bool c) -> (u32, u32) { u32 a_prime = c ? b : a; - b = c ? a : b; - return a_prime, b; + b = c ? a : b; + return a_prime, b; } def bubblesort(u32[N] a) -> u32[N] { @@ -11,7 +11,7 @@ def bubblesort(u32[N] a) -> u32[N] { a[j], a[j + 1] = swap(a[j], a[j + 1], need_swap); } } - return a; + return a; } def main(u32[10] a) -> u32[10] { diff --git a/zokrates_cli/examples/book/declaration.zok b/zokrates_cli/examples/book/declaration.zok index f4f8c7d7..225c4973 100644 --- a/zokrates_cli/examples/book/declaration.zok +++ b/zokrates_cli/examples/book/declaration.zok @@ -1,7 +1,7 @@ def main() { // declare and define `my_variable` - field my_variable = 2; - // redefine `my_variable` - my_variable = 3; - return; + field my_variable = 2; + // redefine `my_variable` + my_variable = 3; + return; } \ No newline at end of file diff --git a/zokrates_cli/examples/book/for.zok b/zokrates_cli/examples/book/for.zok index 994819f9..bea69a33 100644 --- a/zokrates_cli/examples/book/for.zok +++ b/zokrates_cli/examples/book/for.zok @@ -1,8 +1,8 @@ def main() -> u32 { u32 res = 0; for u32 i in 0..4 { - for u32 j in i..5 { - res = res + i; + for u32 j in i..5 { + res = res + i; } } return res; diff --git a/zokrates_cli/examples/book/for_scope.zok b/zokrates_cli/examples/book/for_scope.zok index 92e14bba..8bdfe443 100644 --- a/zokrates_cli/examples/book/for_scope.zok +++ b/zokrates_cli/examples/book/for_scope.zok @@ -1,8 +1,8 @@ def main() -> u32 { - u32 a = 0; - for u32 i in 0..5 { - a = a + i; - } - // return i <- not allowed - return a; + u32 a = 0; + for u32 i in 0..5 { + a = a + i; + } + // return i <- not allowed + return a; } diff --git a/zokrates_cli/examples/book/generics.zok b/zokrates_cli/examples/book/generics.zok index 54f27340..7021ac2e 100644 --- a/zokrates_cli/examples/book/generics.zok +++ b/zokrates_cli/examples/book/generics.zok @@ -1,9 +1,9 @@ def sum(field[N] a) -> field { - field res = 0; - for u32 i in 0..N { - res = res + a[i]; - } - return res; + field res = 0; + for u32 i in 0..N { + res = res + a[i]; + } + return res; } def main(field[3] a) -> field { diff --git a/zokrates_cli/examples/book/no_shadowing.zok b/zokrates_cli/examples/book/no_shadowing.zok index ee978a37..4147bfe6 100644 --- a/zokrates_cli/examples/book/no_shadowing.zok +++ b/zokrates_cli/examples/book/no_shadowing.zok @@ -1,8 +1,8 @@ def main() -> field { - field a = 2; - // field a = 3 <- not allowed - for u32 i in 0..5 { - // field a = 7 <- not allowed - } - return a; + field a = 2; + // field a = 3 <- not allowed + for u32 i in 0..5 { + // field a = 7 <- not allowed + } + return a; } diff --git a/zokrates_cli/examples/book/numeric_inference.zok b/zokrates_cli/examples/book/numeric_inference.zok index dc034475..f8106431 100644 --- a/zokrates_cli/examples/book/numeric_inference.zok +++ b/zokrates_cli/examples/book/numeric_inference.zok @@ -1,10 +1,10 @@ def main() { - // `255` is infered to `255f`, and the addition happens between field elements - assert(255 + 1f == 256); + // `255` is infered to `255f`, and the addition happens between field elements + assert(255 + 1f == 256); - // `255` is infered to `255u8`, and the addition happens between u8 - // This causes an overflow - assert(255 + 1u8 == 0); + // `255` is infered to `255u8`, and the addition happens between u8 + // This causes an overflow + assert(255 + 1u8 == 0); - return; + return; } diff --git a/zokrates_cli/examples/book/struct_assign.zok b/zokrates_cli/examples/book/struct_assign.zok index 633af8e1..822bc6e9 100644 --- a/zokrates_cli/examples/book/struct_assign.zok +++ b/zokrates_cli/examples/book/struct_assign.zok @@ -1,6 +1,6 @@ struct Point { - field x; - field y; + field x; + field y; } def main(field a) -> (Point) { diff --git a/zokrates_cli/examples/book/struct_init.zok b/zokrates_cli/examples/book/struct_init.zok index 4da779da..11d2d333 100644 --- a/zokrates_cli/examples/book/struct_init.zok +++ b/zokrates_cli/examples/book/struct_init.zok @@ -1,10 +1,10 @@ struct Point { - field x; - field y; + field x; + field y; } def main() -> (Point) { - Point p = Point { x: 1, y: 0 }; - return p; + Point p = Point { x: 1, y: 0 }; + return p; } diff --git a/zokrates_cli/examples/book/structs.zok b/zokrates_cli/examples/book/structs.zok index 86f6f891..308294a4 100644 --- a/zokrates_cli/examples/book/structs.zok +++ b/zokrates_cli/examples/book/structs.zok @@ -1,16 +1,16 @@ struct Bar { - field[N] c; - bool d; + field[N] c; + bool d; } struct Foo

{ - Bar

a; - bool b; + Bar

a; + bool b; } def main() -> (Foo<2>) { - Foo<2>[2] f = [Foo { a: Bar { c: [0, 0], d: false }, b: true}, Foo { a: Bar {c: [0, 0], d: false}, b: true }]; - f[0].a.c = [42, 43]; - return f[0]; + Foo<2>[2] f = [Foo { a: Bar { c: [0, 0], d: false }, b: true}, Foo { a: Bar {c: [0, 0], d: false}, b: true }]; + f[0].a.c = [42, 43]; + return f[0]; } diff --git a/zokrates_cli/examples/book/tuples.zok b/zokrates_cli/examples/book/tuples.zok index 560de181..a1a3521f 100644 --- a/zokrates_cli/examples/book/tuples.zok +++ b/zokrates_cli/examples/book/tuples.zok @@ -1,6 +1,6 @@ def main() -> bool { - (field[2], bool) v = ([1, 2], true); - v.0 = [42, 43]; - return v.1; + (field[2], bool) v = ([1, 2], true); + v.0 = [42, 43]; + return v.1; } diff --git a/zokrates_cli/examples/bool_not.zok b/zokrates_cli/examples/bool_not.zok index c1ad3ad6..eab9f649 100644 --- a/zokrates_cli/examples/bool_not.zok +++ b/zokrates_cli/examples/bool_not.zok @@ -1,4 +1,4 @@ def main(field a) -> field { - field x = !(!(a < 5) && !(a > 1) || a < 4) ? 3 : 4; - return x; + field x = !(!(a < 5) && !(a > 1) || a < 4) ? 3 : 4; + return x; } \ No newline at end of file diff --git a/zokrates_cli/examples/boolean_literal.zok b/zokrates_cli/examples/boolean_literal.zok index 97ee1319..7d2dc062 100644 --- a/zokrates_cli/examples/boolean_literal.zok +++ b/zokrates_cli/examples/boolean_literal.zok @@ -1,3 +1,3 @@ def main(bool a) -> bool { - return (false || true) && false; + return (false || true) && false; } diff --git a/zokrates_cli/examples/compile_errors/generics/assign_size_mismatch.zok b/zokrates_cli/examples/compile_errors/generics/assign_size_mismatch.zok index f8ccb7ad..e0043ebd 100644 --- a/zokrates_cli/examples/compile_errors/generics/assign_size_mismatch.zok +++ b/zokrates_cli/examples/compile_errors/generics/assign_size_mismatch.zok @@ -1,9 +1,9 @@ def foo(field[N] a) -> bool { field[3] b = a; - return true; + return true; } def main(field[1] a) { assert(foo(a)); - return; + return; } diff --git a/zokrates_cli/examples/compile_errors/generics/concrete_length_mismatch.zok b/zokrates_cli/examples/compile_errors/generics/concrete_length_mismatch.zok index defee922..23221289 100644 --- a/zokrates_cli/examples/compile_errors/generics/concrete_length_mismatch.zok +++ b/zokrates_cli/examples/compile_errors/generics/concrete_length_mismatch.zok @@ -1,4 +1,4 @@ def main() { - assert([1] == [1, 2]); - return; + assert([1] == [1, 2]); + return; } diff --git a/zokrates_cli/examples/compile_errors/generics/generic_in_main.zok b/zokrates_cli/examples/compile_errors/generics/generic_in_main.zok index 1ec8d350..8a8a1352 100644 --- a/zokrates_cli/examples/compile_errors/generics/generic_in_main.zok +++ b/zokrates_cli/examples/compile_errors/generics/generic_in_main.zok @@ -1,3 +1,3 @@ def main

() { - return; + return; } diff --git a/zokrates_cli/examples/compile_errors/generics/generics_in_main.zok b/zokrates_cli/examples/compile_errors/generics/generics_in_main.zok index adbd9755..f16460ac 100644 --- a/zokrates_cli/examples/compile_errors/generics/generics_in_main.zok +++ b/zokrates_cli/examples/compile_errors/generics/generics_in_main.zok @@ -1,3 +1,3 @@ def main

(field[P] a) { - return; + return; } diff --git a/zokrates_cli/examples/compile_errors/generics/incompatible.zok b/zokrates_cli/examples/compile_errors/generics/incompatible.zok index 11c6c5a0..d4696239 100644 --- a/zokrates_cli/examples/compile_errors/generics/incompatible.zok +++ b/zokrates_cli/examples/compile_errors/generics/incompatible.zok @@ -1,7 +1,7 @@ def foo

(field[P] a, field[P] b) -> field { - return 42; + return 42; } def main() -> field { - return foo([1, 2], [1]); + return foo([1, 2], [1]); } diff --git a/zokrates_cli/examples/compile_errors/generics/no_weak_eq.zok b/zokrates_cli/examples/compile_errors/generics/no_weak_eq.zok index 4fc60da7..1664af50 100644 --- a/zokrates_cli/examples/compile_errors/generics/no_weak_eq.zok +++ b/zokrates_cli/examples/compile_errors/generics/no_weak_eq.zok @@ -1,4 +1,4 @@ def main() { - assert([[1]] == [1, 2]); - return; + assert([[1]] == [1, 2]); + return; } diff --git a/zokrates_cli/examples/compile_errors/keyword_as_identifier.zok b/zokrates_cli/examples/compile_errors/keyword_as_identifier.zok index 517d2444..bc518681 100644 --- a/zokrates_cli/examples/compile_errors/keyword_as_identifier.zok +++ b/zokrates_cli/examples/compile_errors/keyword_as_identifier.zok @@ -4,4 +4,4 @@ def assert() { def main(): - return \ No newline at end of file + return \ No newline at end of file diff --git a/zokrates_cli/examples/compile_errors/no_return.zok b/zokrates_cli/examples/compile_errors/no_return.zok index 3e2e0f4f..058212d5 100644 --- a/zokrates_cli/examples/compile_errors/no_return.zok +++ b/zokrates_cli/examples/compile_errors/no_return.zok @@ -1,5 +1,5 @@ def foo() {} def main() { - return; + return; } diff --git a/zokrates_cli/examples/compile_errors/out_of_for_scope.zok b/zokrates_cli/examples/compile_errors/out_of_for_scope.zok index d7934a8c..b34ed6d6 100644 --- a/zokrates_cli/examples/compile_errors/out_of_for_scope.zok +++ b/zokrates_cli/examples/compile_errors/out_of_for_scope.zok @@ -1,4 +1,4 @@ def main() -> field { - for u32 i in 0..5 {} - return i; + for u32 i in 0..5 {} + return i; } diff --git a/zokrates_cli/examples/compile_errors/shadowing.zok b/zokrates_cli/examples/compile_errors/shadowing.zok index bcbaa5fb..0d373155 100644 --- a/zokrates_cli/examples/compile_errors/shadowing.zok +++ b/zokrates_cli/examples/compile_errors/shadowing.zok @@ -1,9 +1,9 @@ def foo() -> field { - return 1; + return 1; } def main() { - field a = 2; - field a = foo(); - return; + field a = 2; + field a = foo(); + return; } diff --git a/zokrates_cli/examples/compile_errors/struct_member_type_mismatch_field.zok b/zokrates_cli/examples/compile_errors/struct_member_type_mismatch_field.zok index 4fea2779..79c90b75 100644 --- a/zokrates_cli/examples/compile_errors/struct_member_type_mismatch_field.zok +++ b/zokrates_cli/examples/compile_errors/struct_member_type_mismatch_field.zok @@ -1,17 +1,17 @@ struct Foo { - field[2] values; + field[2] values; } struct Bar { - Foo foo; - field bar; + Foo foo; + field bar; } def main() { - Bar s = Bar { - foo: Foo { values: [1] }, - bar: 0, - }; + Bar s = Bar { + foo: Foo { values: [1] }, + bar: 0, + }; field b = s.bar; - return; + return; } diff --git a/zokrates_cli/examples/compile_errors/struct_member_type_mismatch_u8.zok b/zokrates_cli/examples/compile_errors/struct_member_type_mismatch_u8.zok index 259df3e2..fa866724 100644 --- a/zokrates_cli/examples/compile_errors/struct_member_type_mismatch_u8.zok +++ b/zokrates_cli/examples/compile_errors/struct_member_type_mismatch_u8.zok @@ -1,17 +1,17 @@ struct Foo { - u8[2] values; + u8[2] values; } struct Bar { - Foo foo; - u8 bar; + Foo foo; + u8 bar; } def main() { - Bar s = Bar { - foo: Foo { values: [1] }, // notice the size mismatch here - bar: 0, - }; + Bar s = Bar { + foo: Foo { values: [1] }, // notice the size mismatch here + bar: 0, + }; u8 b = s.bar; - return; + return; } diff --git a/zokrates_cli/examples/compile_errors/too_many_return.zok b/zokrates_cli/examples/compile_errors/too_many_return.zok index 44b5d4fa..a0da83b6 100644 --- a/zokrates_cli/examples/compile_errors/too_many_return.zok +++ b/zokrates_cli/examples/compile_errors/too_many_return.zok @@ -1,3 +1,3 @@ def main() { - return 1; + return 1; } diff --git a/zokrates_cli/examples/compile_errors/two_return.zok b/zokrates_cli/examples/compile_errors/two_return.zok index 149bb2d9..129ea3a9 100644 --- a/zokrates_cli/examples/compile_errors/two_return.zok +++ b/zokrates_cli/examples/compile_errors/two_return.zok @@ -1,4 +1,4 @@ def main() { - return; - return; + return; + return; } diff --git a/zokrates_cli/examples/compile_errors/unassigned.zok b/zokrates_cli/examples/compile_errors/unassigned.zok index 2c992f0b..4037a608 100644 --- a/zokrates_cli/examples/compile_errors/unassigned.zok +++ b/zokrates_cli/examples/compile_errors/unassigned.zok @@ -1,5 +1,5 @@ def main() -> field { - field a; - field b = a + 1; - return b; + field a; + field b = a + 1; + return b; } diff --git a/zokrates_cli/examples/conditions.zok b/zokrates_cli/examples/conditions.zok index 11e4abf8..e54e357e 100644 --- a/zokrates_cli/examples/conditions.zok +++ b/zokrates_cli/examples/conditions.zok @@ -1,13 +1,13 @@ struct Foo { - field a; + field a; } struct Bar { - Foo[1] foo; + Foo[1] foo; } def isEqual(field a, field b) -> bool { - return a == b; + return a == b; } def main(field a) -> field { diff --git a/zokrates_cli/examples/constant_index_on_spread_inline.zok b/zokrates_cli/examples/constant_index_on_spread_inline.zok index 7313a279..6491d476 100644 --- a/zokrates_cli/examples/constant_index_on_spread_inline.zok +++ b/zokrates_cli/examples/constant_index_on_spread_inline.zok @@ -1,3 +1,3 @@ def main(field[3] a) -> field { - return [...a][0] + [a[0]][0] + [a[0]; 1][0]; + return [...a][0] + [a[0]][0] + [a[0]; 1][0]; } \ No newline at end of file diff --git a/zokrates_cli/examples/for.zok b/zokrates_cli/examples/for.zok index 19b6a057..4b989945 100644 --- a/zokrates_cli/examples/for.zok +++ b/zokrates_cli/examples/for.zok @@ -1,5 +1,5 @@ def bound(field x) -> u32 { - return 41 + 1; + return 41 + 1; } def main(field a) -> field { diff --git a/zokrates_cli/examples/functions/lt_comparison.zok b/zokrates_cli/examples/functions/lt_comparison.zok index e31220f4..e94bd4a9 100644 --- a/zokrates_cli/examples/functions/lt_comparison.zok +++ b/zokrates_cli/examples/functions/lt_comparison.zok @@ -7,8 +7,8 @@ def cutoff() -> field { } def getThing(u32 index) -> field { - field[6] a = [13, 23, 43, 53, 73, 83]; - return a[index]; + field[6] a = [13, 23, 43, 53, 73, 83]; + return a[index]; } def cubeThing(field thing) -> field { diff --git a/zokrates_cli/examples/left_side_call.zok b/zokrates_cli/examples/left_side_call.zok index c0884f1a..dcfb4815 100644 --- a/zokrates_cli/examples/left_side_call.zok +++ b/zokrates_cli/examples/left_side_call.zok @@ -1,9 +1,9 @@ def foo() -> field { - return 1; + return 1; } def main() { - assert(foo() + (1 + 44*3) == 134); - return; + assert(foo() + (1 + 44*3) == 134); + return; } diff --git a/zokrates_cli/examples/merkleTree/pedersenPathProof3.zok b/zokrates_cli/examples/merkleTree/pedersenPathProof3.zok index a0320bed..a2a2dc41 100644 --- a/zokrates_cli/examples/merkleTree/pedersenPathProof3.zok +++ b/zokrates_cli/examples/merkleTree/pedersenPathProof3.zok @@ -7,14 +7,14 @@ const u32 DEPTH = 3; // directionSelector => true if current digest is on the rhs of the hash def main(u32[8] root, private u32[8] leaf, private bool[DEPTH] directionSelector, private u32[DEPTH][8] path) -> bool { - // Start from the leaf - u32[8] digest = leaf; + // Start from the leaf + u32[8] digest = leaf; - // Loop up the tree - for u32 i in 0..DEPTH { - u32[16] preimage = multiplex(directionSelector[i], digest, path[i]); - digest = hash(preimage); - } + // Loop up the tree + for u32 i in 0..DEPTH { + u32[16] preimage = multiplex(directionSelector[i], digest, path[i]); + digest = hash(preimage); + } - return digest == root; + return digest == root; } \ No newline at end of file diff --git a/zokrates_cli/examples/merkleTree/sha256PathProof3.zok b/zokrates_cli/examples/merkleTree/sha256PathProof3.zok index 44bd1aa4..f82f3fe2 100644 --- a/zokrates_cli/examples/merkleTree/sha256PathProof3.zok +++ b/zokrates_cli/examples/merkleTree/sha256PathProof3.zok @@ -4,23 +4,23 @@ import "hashes/utils/256bitsDirectionHelper" as multiplex; const u32 DEPTH = 3; def select(bool condition, u32[8] left, u32[8] right) -> (u32[8], u32[8]) { - return condition ? right : left, condition ? left : right; + return condition ? right : left, condition ? left : right; } // Merke-Tree inclusion proof for tree depth 4 using sha256 // directionSelector => true if current digest is on the rhs of the hash def main(u32[8] root, private u32[8] leaf, private bool[DEPTH] directionSelector, private u32[DEPTH][8] path) -> bool { - // Start from the leaf - u32[8] digest = leaf; + // Start from the leaf + u32[8] digest = leaf; - // Loop up the tree - for u32 i in 0..DEPTH { - u32[8] left, u32[8] right = select(directionSelector[i], digest, path[i]); - digest = hash(left, right); - } + // Loop up the tree + for u32 i in 0..DEPTH { + u32[8] left, u32[8] right = select(directionSelector[i], digest, path[i]); + digest = hash(left, right); + } - return digest == root; + return digest == root; } diff --git a/zokrates_cli/examples/multi_return.zok b/zokrates_cli/examples/multi_return.zok index ea2067e4..f7512e4c 100644 --- a/zokrates_cli/examples/multi_return.zok +++ b/zokrates_cli/examples/multi_return.zok @@ -1,9 +1,9 @@ def foo(field a) -> (field, field, field, field) { - field b = 12 * a; - return a, 2 * a, 5 * b, a * b; + field b = 12 * a; + return a, 2 * a, 5 * b, a * b; } def main(field i) { - field x, field y, field z, field t = foo(i); + field x, field y, field z, field t = foo(i); return; } diff --git a/zokrates_cli/examples/propagate.zok b/zokrates_cli/examples/propagate.zok index e5b3e0e7..ff6cced0 100644 --- a/zokrates_cli/examples/propagate.zok +++ b/zokrates_cli/examples/propagate.zok @@ -1,10 +1,10 @@ def main() -> field { - field a = 1 + 2 + 3; - field b = 1 < a ? 3 : a + 3; - field c = b + a == 2 ? 1 : b; - for u32 e in 0..2 { - field g = 4; - c = c + g; - } - return c * a; + field a = 1 + 2 + 3; + field b = 1 < a ? 3 : a + 3; + field c = b + a == 2 ? 1 : b; + for u32 e in 0..2 { + field g = 4; + c = c + g; + } + return c * a; } diff --git a/zokrates_cli/examples/propagate_call.zok b/zokrates_cli/examples/propagate_call.zok index 41f89f0d..669b16fb 100644 --- a/zokrates_cli/examples/propagate_call.zok +++ b/zokrates_cli/examples/propagate_call.zok @@ -1,9 +1,9 @@ def foo(field a, field b) -> (field, field) { - assert(a == b); - return a, b; + assert(a == b); + return a, b; } def main() -> field { - field a, field b = foo(1, 1); - return a + b; + field a, field b = foo(1, 1); + return a + b; } diff --git a/zokrates_cli/examples/reduceable_exponent.zok b/zokrates_cli/examples/reduceable_exponent.zok index 9bd0da71..411337aa 100644 --- a/zokrates_cli/examples/reduceable_exponent.zok +++ b/zokrates_cli/examples/reduceable_exponent.zok @@ -1,4 +1,4 @@ def main() -> field { - u32 a = 2; - return 2**(a * 2 + 2); + u32 a = 2; + return 2**(a * 2 + 2); } diff --git a/zokrates_cli/examples/runtime_errors/div_zero_field.zok b/zokrates_cli/examples/runtime_errors/div_zero_field.zok index 9d9cc2ea..2948a2e5 100644 --- a/zokrates_cli/examples/runtime_errors/div_zero_field.zok +++ b/zokrates_cli/examples/runtime_errors/div_zero_field.zok @@ -1,4 +1,4 @@ def main(field x) { - field y = 1 / x; - return; + field y = 1 / x; + return; } diff --git a/zokrates_cli/examples/runtime_errors/div_zero_uint.zok b/zokrates_cli/examples/runtime_errors/div_zero_uint.zok index 9858b7ff..24224534 100644 --- a/zokrates_cli/examples/runtime_errors/div_zero_uint.zok +++ b/zokrates_cli/examples/runtime_errors/div_zero_uint.zok @@ -1,4 +1,4 @@ def main(u8 x) { - u8 y = 0x01 / x; - return; + u8 y = 0x01 / x; + return; } diff --git a/zokrates_cli/examples/struct_generic_inference.zok b/zokrates_cli/examples/struct_generic_inference.zok index 95fd56b3..82e13433 100644 --- a/zokrates_cli/examples/struct_generic_inference.zok +++ b/zokrates_cli/examples/struct_generic_inference.zok @@ -3,8 +3,8 @@ struct SomeStruct { } def myFct(SomeStruct ignored) -> u32[N2] { - assert(2*N == N2); - return [N3; N2]; + assert(2*N == N2); + return [N3; N2]; } const u32 N = 3; diff --git a/zokrates_cli/examples/structs/add.zok b/zokrates_cli/examples/structs/add.zok index cda9b7f3..b0cbe871 100644 --- a/zokrates_cli/examples/structs/add.zok +++ b/zokrates_cli/examples/structs/add.zok @@ -1,6 +1,6 @@ struct Point { - field x; - field y; + field x; + field y; } def main(Point p, Point q) -> Point { @@ -9,10 +9,10 @@ def main(Point p, Point q) -> Point { field dpxpyqxqy = d * p.x * p.y * q.x * q.y; - return Point { - x: (p.x * q.y + q.x * p.y) / (1 + dpxpyqxqy), - y: (q.x * q.y - a * p.x * p.y) / (1 - dpxpyqxqy) - }; + return Point { + x: (p.x * q.y + q.x * p.y) / (1 + dpxpyqxqy), + y: (q.x * q.y - a * p.x * p.y) / (1 - dpxpyqxqy) + }; } diff --git a/zokrates_cli/examples/structs/nested_access.zok b/zokrates_cli/examples/structs/nested_access.zok index b9de6081..5ded0958 100644 --- a/zokrates_cli/examples/structs/nested_access.zok +++ b/zokrates_cli/examples/structs/nested_access.zok @@ -1,12 +1,12 @@ struct Foo { - field a; + field a; } struct Bar { - Foo foo; + Foo foo; } def main(Bar b) { - field a = b.foo.a; - return; + field a = b.foo.a; + return; } diff --git a/zokrates_cli/examples/structs/set_member.zok b/zokrates_cli/examples/structs/set_member.zok index 675c9434..690b8d95 100644 --- a/zokrates_cli/examples/structs/set_member.zok +++ b/zokrates_cli/examples/structs/set_member.zok @@ -1,30 +1,30 @@ struct Bar { - field[2] c; - bool d; + field[2] c; + bool d; } struct Foo { - Bar a; - bool b; + Bar a; + bool b; } def main() -> Foo { - Foo[2] f = [ - Foo { - a: Bar { - c: [0, 0], - d: false - }, - b: true - }, - Foo { - a: Bar { - c: [0, 0], - d: false - }, - b: true - } - ]; - f[0].a.c = [42, 43]; - return f[0]; + Foo[2] f = [ + Foo { + a: Bar { + c: [0, 0], + d: false + }, + b: true + }, + Foo { + a: Bar { + c: [0, 0], + d: false + }, + b: true + } + ]; + f[0].a.c = [42, 43]; + return f[0]; } diff --git a/zokrates_cli/examples/synonyms.zok b/zokrates_cli/examples/synonyms.zok index e432e4e2..5ee41cb5 100644 --- a/zokrates_cli/examples/synonyms.zok +++ b/zokrates_cli/examples/synonyms.zok @@ -1,8 +1,8 @@ def main() -> field { - field a = 1; - field b = a; - field c = b; - field d = c; - field e = d; - return e; + field a = 1; + field b = a; + field c = b; + field d = c; + field e = d; + return e; } diff --git a/zokrates_cli/examples/tuples/add.zok b/zokrates_cli/examples/tuples/add.zok index 168959f4..44f9d0d0 100644 --- a/zokrates_cli/examples/tuples/add.zok +++ b/zokrates_cli/examples/tuples/add.zok @@ -4,6 +4,6 @@ def main((field, field) p, (field, field) q) -> ((field, field)) { field dpxpyqxqy = d * p.0 * p.1 * q.0 * q.1; - return ((p.0 * q.1 + q.0 * p.1) / (1 + dpxpyqxqy), (q.0 * q.1 - a * p.0 * p.1) / (1 - dpxpyqxqy)); + return ((p.0 * q.1 + q.0 * p.1) / (1 + dpxpyqxqy), (q.0 * q.1 - a * p.0 * p.1) / (1 - dpxpyqxqy)); } diff --git a/zokrates_cli/examples/tuples/nested_access.zok b/zokrates_cli/examples/tuples/nested_access.zok index 9125ba29..355dc566 100644 --- a/zokrates_cli/examples/tuples/nested_access.zok +++ b/zokrates_cli/examples/tuples/nested_access.zok @@ -1,4 +1,4 @@ def main(((field,),) b) { - field a = b.0.0; - return; + field a = b.0.0; + return; } diff --git a/zokrates_cli/examples/tuples/set_member.zok b/zokrates_cli/examples/tuples/set_member.zok index 83a37909..e50613b8 100644 --- a/zokrates_cli/examples/tuples/set_member.zok +++ b/zokrates_cli/examples/tuples/set_member.zok @@ -1,19 +1,19 @@ struct Bar { - field[2] c; - bool d; + field[2] c; + bool d; } struct Foo { - Bar a; - bool b; + Bar a; + bool b; } def main() -> (((field[2], bool), bool)) { - ((field[2], bool), bool)[2] f = [ - (([0, 0], false), true), - (([0, 0], false), true) - ]; - f[0].0.0 = [42, 43]; - return f[0]; + ((field[2], bool), bool)[2] f = [ + (([0, 0], false), true), + (([0, 0], false), true) + ]; + f[0].0.0 = [42, 43]; + return f[0]; }