feat(fuzz): Generate Match expressions and statements#9108
Merged
Conversation
Contributor
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Test Suite Duration'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: ce217e7 | Previous: 913ee63 | Ratio |
|---|---|---|---|
test_report_zkpassport_noir-ecdsa_ |
130 s |
104 s |
1.25 |
test_report_zkpassport_noir_rsa_ |
2 s |
1 s |
2 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
rkarabut
approved these changes
Jul 10, 2025
Contributor
Author
|
Latest test failures need #9195 |
5 tasks
Contributor
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Execution Time'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: 327d0ce | Previous: 11d86ef | Ratio |
|---|---|---|---|
private-kernel-inner |
0.021 s |
0.016 s |
1.31 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
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
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 #7926
Summary*
Implement
matchstatements in the AST generator.Additional Context
We are generating the what a match statement looks like in the monomorphized AST, but doing so without having in mind a full match statement in Noir, rather, just doing a single layer.
For example take this program:
It turns into the following AST:
So, it's a series of simpler match statements, on one variable at a time. The AST fuzzer generates only one random match, which can be:
true,false,__(wanted to do ranges but the frontend doesn't parse them)I added support for variable names in the
Matchso that I can print a parseable AST.The
monotest which tests the AST roundtrip is currently not enabled. Example of the difference between how the generated AST is parsed back and printed are as follows:Extra internal variables introduced by the compiler:
Never matched cases removed by the compiler:
Documentation*
Check one:
PR Checklist*
cargo fmton default settings.