
On 11-11-23 08:28 PM, Jason Dagit wrote:
On a similar line of reasoning, I've wondered if Perlin style noise generation could be applied to get a sort of "fuzzing" effect. This would be more interesting for cases where writing instances of arbitrary is hard to do but test cases do exist. Apply some sort of pseudo-random noise to your examples and see if your properties still hold. I could see this having applications in parsers.
As far as I can tell, no one has used Perlin noise on algebraic structures. It seems to have only been applied to real valued spaces. Imagine having a parse tree then applying noise to the structure of the tree then "unparsing" the tree back to concrete syntax. You're making the structure noisy instead of just fussing the concrete syntax directly (which should increase the frequency that you change the shape/meaning instead of just changing the tokens in the parse tree).
Interesting idea! With the "strategy based" unified Quickcheck/Smallcheck that we're finishing up, it would be quite easy to program that as a new generation strategy and try it. We've already got Boltzmann sampling on the list of things to look at in the future. Jacques