Simple fuzzers need more "output shape" parameters
We need more than --max-depth
for controlling the shape of generated programs.
Off the top of my head, we could usefully use:
-
--max-top-level-defs
— maximum number of top-level definitions -
--max-block-statements
— maximum number of immediate stmt/expr children in a block -
--max-block-declarations
— maximum number of immediate decl.children in a block -
--max-expr-depth
— maximum depth of an expression
These names need some thought, and maybe they need language-specific names/meanings, but I hope you get the idea.
It would maybe also be useful to have --min
variants of these parameters, too.
I started doing parameters along these lines in the Verilog generator.
See also the (many many) shape parameters that Csmith provides.