-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Here's an algorithm to generate tons of tests:
- For each dialect file found here:
This will require an intractable amount of work, so it might not be motivated until MLIR is more stable, but it might be motivated in the future as I suspect the rules in mlir.lark are not as robust or correct as we need it to be.
This might have helped us discover #7 earlier. I suspect that there are similar problems with how standard_attribute is currently defined (either with how it's defined or with how it's used in the dialects currently).
The MLIR docs provide rules for their syntax (e.g. here), and as far as I can tell by my cursory look, these rules describe a context-free language, so using the CFG approach taken so far via lark should in theory work. Perhaps just going down the syntax rules as listed in the MLIR docs could work as a better first step to make sure we have sufficient test coverage of things that should be accepted before we start testing things that should be not accepted.