-
Notifications
You must be signed in to change notification settings - Fork 388
chore(ssa refactor): Add code to handle less than comparison #1433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
83de289
add field mul and div
kevaundray 1ef2ca9
add code to process field mul and div
kevaundray 0637626
add assert example
kevaundray 18c4274
add `is_equal` constraint
kevaundray 171d5d9
add `eq_var` method for AcirVar
kevaundray f1bfdc6
process `Constrain` instruction and BinaryOp::Eq
kevaundray 58edbc9
add TODO for more than the maximum number of bits
kevaundray 3c8c901
add numeric_cast_var method which constrains a variable to be equal t…
kevaundray a58f7a4
implement casting for numeric types
kevaundray ca60032
add simple range constraint example
kevaundray fbdfefa
add constraints for `more_than_eq`
kevaundray 327c2f6
- add more_than_eq method
kevaundray 90c2102
add method to process less than binary operation
kevaundray 99f414b
add example
kevaundray 8d7f7f9
assign result of cast operation
kevaundray a7f1178
Merge branch 'kw/range-constraints' into kw/add-comparison
kevaundray 6b159ee
add `y` as an input value
kevaundray 1c2cee5
return optimized circuit
kevaundray b935436
Merge branch 'kw/add-optimized-circuit' into kw/add-comparison
kevaundray 7d8753b
Addressed in Address GtEq extra opcodes #1444
kevaundray 7241896
Merge remote-tracking branch 'origin/master' into kw/add-comparison
kevaundray c654b5d
Merge remote-tracking branch 'origin/master' into kw/add-comparison
kevaundray File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
crates/nargo_cli/tests/test_data_ssa_refactor/simple_comparison/Nargo.toml
This file contains hidden or 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,5 @@ | ||
| [package] | ||
| authors = [""] | ||
| compiler_version = "0.1" | ||
|
|
||
| [dependencies] |
2 changes: 2 additions & 0 deletions
2
crates/nargo_cli/tests/test_data_ssa_refactor/simple_comparison/Prover.toml
This file contains hidden or 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,2 @@ | ||
| x = "3" | ||
| y = "4" |
6 changes: 6 additions & 0 deletions
6
crates/nargo_cli/tests/test_data_ssa_refactor/simple_comparison/src/main.nr
This file contains hidden or 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 @@ | ||
| // Tests a very simple program. | ||
| // | ||
| // The features being tested is comparison | ||
| fn main(x : Field, y : Field) { | ||
| assert(x as u32 < y as u32); | ||
| } | ||
This file contains hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.