[DSLX Fuzz testing] Unify fuzz test domain validation via constexpr value evaluation to support derived and nested struct domains.#4333
Draft
copybara-service[bot] wants to merge 1 commit into
Draft
Conversation
…alue evaluation to support derived and nested struct domains. Moved fuzz test domain validation to its own class file. To support derived and nested struct domains, this CL: - Shifts the domain validation paradigm: instead of validating the AST structure before evaluation, `ValidateFuzzTestDomain` now evaluates the constexpr domain expression to an `InterpValue` and recursively validates this evaluated value against the parameter's concrete type. - Migrates recursive validation of struct domains to the new post-evaluation path, validating evaluated domain tuple elements against `StructType` members. - Relaxes module type-checking constraints during domain struct initialization to allow assigning range and array domains to fields, relying on the post-evaluation validation to ensure type safety. - Fixes a bug where empty tuple domains `()` (which represent an arbitrary domain) were incorrectly rejected for non-tuple/non-struct parameters. Empty tuples are now correctly permitted as arbitrary domains for all parameter types. PiperOrigin-RevId: 922314923
34b0e45 to
2e6de55
Compare
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.
[DSLX Fuzz testing] Unify fuzz test domain validation via constexpr value evaluation to support derived and nested struct domains.
Moved fuzz test domain validation to its own class file.
To support derived and nested struct domains, this CL:
ValidateFuzzTestDomainnow evaluates the constexpr domain expression to anInterpValueand recursively validates this evaluated value against the parameter's concrete type.StructTypemembers.()(which represent an arbitrary domain) were incorrectly rejected for non-tuple/non-struct parameters. Empty tuples are now correctly permitted as arbitrary domains for all parameter types.