Skip to content

[DSLX Fuzz Testing] Rewrite how FuzzTestConverter deals with constants;#4197

Draft
copybara-service[bot] wants to merge 1 commit intomainfrom
test_910153472
Draft

[DSLX Fuzz Testing] Rewrite how FuzzTestConverter deals with constants;#4197
copybara-service[bot] wants to merge 1 commit intomainfrom
test_910153472

Conversation

@copybara-service
Copy link
Copy Markdown

@copybara-service copybara-service Bot commented May 4, 2026

[DSLX Fuzz Testing] Rewrite how FuzzTestConverter deals with constants;
instead of looking up their Constant AST node, it properly looks up the
InterpValue for the AST in the type info.

For constant ranges, arrays or tuples, it processes each type of
InterpValue in a new method that used a similar pattern to its AST version.

To distinguish constant arrays from constant ranges (both of which have
the IsArray bit set), it uses the new is_range flag on InterpValue.

Finally, fixed a bug with ranges; DSLX ranges are exclusive but
Google Fuzztest domains are inclusive, so we have to decrement the "max"
field as appropriate.

@copybara-service copybara-service Bot force-pushed the test_910153472 branch 2 times, most recently from b8bc76b to 5db068a Compare May 5, 2026 18:59
instead of looking up their Constant AST node, it properly looks up the
`InterpValue` for the AST in the type info.

For constant ranges, arrays or tuples, it processes each type of
`InterpValue` in a new method that used a similar pattern to its AST version.

To distinguish constant arrays from constant ranges (both of which have
the `IsArray` bit set), it uses the new `is_range` flag on `InterpValue`.

Finally, fixed a bug with ranges; DSLX ranges are exclusive but
Google Fuzztest domains are inclusive, so we have to decrement the "max"
field as appropriate.

PiperOrigin-RevId: 910153472
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.

1 participant