-
Notifications
You must be signed in to change notification settings - Fork 224
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
fix(experimental elaborator): Move code to declare trait impls earlier #5105
Merged
Conversation
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
#5081) # Description ## Problem\* Closes #5035 ## Summary\* Alternative to #5035 which just deletes any test programs which don't have a Nargo.toml file. ## Additional Context ## Documentation\* Check one: - [x] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[For Experimental Features]** Documentation to be submitted in a separate PR. # PR Checklist\* - [x] I have tested the changes locally. - [x] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings.
# Description ## Problem\* Resolves <!-- Link to GitHub Issue --> ## Summary\* This PR reactivates the gates report workflow now that we don't have access to the number of constraints through `nargo info` ## Additional Context ## Documentation\* Check one: - [x] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[For Experimental Features]** Documentation to be submitted in a separate PR. # PR Checklist\* - [x] I have tested the changes locally. - [x] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings.
…ng identifiers (#5087) # Description ## Problem\* Resolves #5063 ## Summary\* After the turbofish PRs we want the ability to instantiate a variable from a generic trait. This was possible but it required a redundant type annotiation like such (assume `H` has been specified with a `where` clause): ```rust let hasher: H = H::default() ``` Similarly to trait generics, we now add type bindings from a trait constraint if the trait impl is assumed to exist. We now can just do: ```rust let hasher = H::default() ``` ## Additional Context ## Documentation\* Check one: - [X] No documentation needed. - [ ] Documentation included in this PR. - [] **[For Experimental Features]** Documentation to be submitted in a separate PR. # PR Checklist\* - [X] I have tested the changes locally. - [X] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings.
# Description ## Problem\* Resolves <!-- Link to GitHub Issue --> ## Summary\* Moving #3542, #5041, and #5087 to the elaborator ## Additional Context ## Documentation\* Check one: - [ ] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[For Experimental Features]** Documentation to be submitted in a separate PR. # PR Checklist\* - [ ] I have tested the changes locally. - [ ] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings. --------- Co-authored-by: jfecher <jake@aztecprotocol.com>
…#5098) # Description ## Problem\* Currently, when creating a regular (not marked with unconstrained) function, it can end up running in both a constrained and unconstrained context. ## Summary\* This intrinsic is resolved at compile time a provides a way for developers to dispatch to different implementations in library code for constrained and unconstrained context. This intrinsic has been used in stdlib's field comparison code as demonstration. ## Additional Context It's very typical for the constrained version of a calculation to take a hint of a computed value and verify it. However, in the unconstrained version of that calculation we just need to compute the value, there is no point in verifying what we just did. This intrinsic provides a tool for devs to optimize a function for unconstrained removing these verifications. ## Documentation\* Check one: - [ ] No documentation needed. - [x] Documentation included in this PR. - [ ] **[For Experimental Features]** Documentation to be submitted in a separate PR. # PR Checklist\* - [x] I have tested the changes locally. - [x] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings. --------- Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
# Description ## Problem\* Related to #4629 ## Summary\* Do not create a witness when multiplying a witness (or an affine transformation of a witness) with an expression of degree 1. ## Additional Context This PR does NOT fix the issue #4629, but it should help reducing the overall gates number. The arithmetic expressions resulting from the multiplication should not explode in width since I only consider multiplication with a witness (or 'affine witness'). ## Documentation\* Check one: - [X] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[For Experimental Features]** Documentation to be submitted in a separate PR. # PR Checklist\* - [X] I have tested the changes locally. - [X] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings.
github-actions
bot
added
the
documentation
Improvements or additions to documentation
label
May 24, 2024
🚀 Deployed on https://66562a3fb69b5f7d15fd29b0--noir-docs.netlify.app |
vezenovm
reviewed
May 28, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Problem*
Resolves "No matching impl found for ..." trait solver issues in the elaborator.
Summary*
These issues were just because we'd add a trait impl to the interner after elaborating the impl. At that point, we'd already have elaborated all other functions & methods so it wasn't of much use. I've moved it to add the trait impl to the interner during
collect_trait_impl
instead.Additional Context
Down to 6 errors after this PR. The errors are:
fn hash<H>(self, state: &mut H) where H: Hasher;
(1 error)(merging master has fixed the 2 "expression is ambiguous" errors from the turbofish operator changes)
Documentation*
Check one:
PR Checklist*
cargo fmt
on default settings.