Skip to content

chore(ssa_fuzzer): refactor ssa_fuzzer part 2/4#9662

Merged
defkit merged 3 commits intosn/refactor_ssa_fuzzerfrom
sn/refactor_ssa_fuzzer2
Sep 4, 2025
Merged

chore(ssa_fuzzer): refactor ssa_fuzzer part 2/4#9662
defkit merged 3 commits intosn/refactor_ssa_fuzzerfrom
sn/refactor_ssa_fuzzer2

Conversation

@defkit
Copy link
Contributor

@defkit defkit commented Aug 28, 2025

Description

Functions now can return references, arrays and slices

function_context.rs

  • Now function returns Type instead of NumericType

fuzzer.rs

  • get_return_value -> get_return_values, returns all return witnesses, not just one

instruction.rs

  • input_types for functions are now Types, not numeric types. But fuzzer still fills all functions with numeric types (TODO in followups)

basic_tests.rs

  • Added test checking that function can return array

Mutations

  • Added mutations and generators for Type
  • Removed random mutation from vector (from arbitrary bytes), because Type cannot implement Arbitrary.

runner.rs

  • Now comparing all return witnesses, not just one

builder.rs

  • Added insert_slice

Problem*

Resolves

Summary*

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 and/or cargo fmt on default settings.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ 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: d2c1118 Previous: 387b9b2 Ratio
test_report_noir-lang_sha512_ 16 s 13 s 1.23
test_report_zkpassport_noir-ecdsa_ 3 s 2 s 1.50

This comment was automatically generated by workflow using github-action-benchmark.

CC: @TomAFrench

@defkit defkit requested a review from Rumata888 August 28, 2025 08:46
}
}

// TODO
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove or create an issue in the Noir repo and put the link here

// god save me
// can be Reference(Array(Reference(Slice(Reference(Numeric)))))
// hope can handle it
fn generate_random_reference_type(rng: &mut StdRng, config: GenerateTypeConfig) -> Type {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean this up, please

@defkit defkit merged commit 91ac3db into sn/refactor_ssa_fuzzer Sep 4, 2025
22 checks passed
@defkit defkit deleted the sn/refactor_ssa_fuzzer2 branch September 4, 2025 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants