Just so I understand this correctly, this is a tool where, if you provide it a program, it will use reduction/rewrite rules to find a simpler program that exhibits some given behavior?
In practice, how is this applied? Do compiler developers essentially use something similar to quick check to generate breaking programs and then use this to reduce those programs to a minimal form, or am I missing something else altogether?
I agree it looks similar to QuickCheck shrinking. Isn't necessary limited to compiler writers though; e.g. I can imagine a big numerical calculation (like a physics simulation), giving NaN outputs. This could presumably home-in on the problematic step (given an appropriate test script).
Yes! Another well-known program reducer is C-Reduce [0]. When Csmith [1] started churning out very large programs that exhibited errors in C compilers, the compiler maintainers asked the researchers to please reduce the ~81KB files to a more manageable size so they could understand the errors better. C-Reduce was developed specifically to address that need.
5 comments
[ 65.0 ms ] story [ 579 ms ] threadFunny that the God of Destruction is such a hot name lately
In practice, how is this applied? Do compiler developers essentially use something similar to quick check to generate breaking programs and then use this to reduce those programs to a minimal form, or am I missing something else altogether?
[0] https://github.com/csmith-project/creduce
[1] https://github.com/csmith-project/csmith