-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #131 from erhant/erhant/public-output-array
feat: Allow array of fields on public output
- Loading branch information
Showing
11 changed files
with
146 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
@ noname.0.7.0 | ||
|
||
DoubleGeneric<1> | ||
DoubleGeneric<1> | ||
DoubleGeneric<1> | ||
DoubleGeneric<1,1,-1> | ||
DoubleGeneric<1,0,0,0,-2> | ||
DoubleGeneric<1,0,-1,0,6> | ||
DoubleGeneric<0,0,-1,1> | ||
DoubleGeneric<1,-1> | ||
DoubleGeneric<1,-1> | ||
(0,0) -> (7,0) | ||
(1,0) -> (8,0) | ||
(2,0) -> (3,1) -> (6,1) | ||
(3,2) -> (4,0) -> (5,0) -> (6,0) | ||
(5,2) -> (7,1) | ||
(6,2) -> (8,1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
@ noname.0.7.0 | ||
|
||
DoubleGeneric<1> | ||
DoubleGeneric<1> | ||
DoubleGeneric<1> | ||
DoubleGeneric<1> | ||
DoubleGeneric<1> | ||
DoubleGeneric<1> | ||
DoubleGeneric<2,0,-1> | ||
DoubleGeneric<2,0,-1> | ||
DoubleGeneric<2,0,-1> | ||
DoubleGeneric<1,-1> | ||
DoubleGeneric<2,0,-1> | ||
DoubleGeneric<1,-1> | ||
DoubleGeneric<1,-1> | ||
DoubleGeneric<1,-1> | ||
DoubleGeneric<1,-1> | ||
DoubleGeneric<1,-1> | ||
(0,0) -> (12,0) | ||
(1,0) -> (13,0) | ||
(2,0) -> (14,0) | ||
(3,0) -> (15,0) | ||
(4,0) -> (6,0) -> (8,0) -> (14,1) | ||
(5,0) -> (7,0) -> (10,0) -> (13,1) | ||
(6,2) -> (9,1) -> (12,1) | ||
(7,2) -> (11,1) -> (15,1) | ||
(8,2) -> (9,0) | ||
(10,2) -> (11,0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
@ noname.0.7.0 | ||
|
||
2 == (v_3 + v_4) * (1) | ||
v_5 == (v_3 + v_4) * (v_3) | ||
v_3 + v_4 + 6 == (v_1) * (1) | ||
v_5 == (v_2) * (1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@ noname.0.7.0 | ||
|
||
2 * v_5 == (2 * v_5) * (1) | ||
2 * v_6 == (2 * v_6) * (1) | ||
2 * v_5 == (v_1) * (1) | ||
v_6 == (v_2) * (1) | ||
v_5 == (v_3) * (1) | ||
2 * v_6 == (v_4) * (1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
fn main(pub public_input: Field, private_input: Field) -> [Field; 2] { | ||
let xx = private_input + public_input; | ||
assert_eq(xx, 2); | ||
let yy = xx + 6; | ||
return [yy, xx * public_input]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
struct Thing { | ||
xx: Field, | ||
yy: Field, | ||
} | ||
|
||
fn main(pub xx: Field, pub yy: Field) -> [Thing; 2] { | ||
let thing1 = Thing { | ||
xx: xx * 2, | ||
yy: yy, | ||
}; | ||
let thing2 = Thing { | ||
xx: xx, | ||
yy: yy * 2, | ||
}; | ||
let things = [thing1, thing2]; | ||
|
||
assert_eq(things[1].xx * 2, things[0].xx); | ||
assert_eq(things[0].yy * 2, things[1].yy); | ||
|
||
return things; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters