[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [csmith-dev] How to generate large programs



Hi Junio,

As Eric says, Csmith doesn't support an option that would generate a "fix-sized" (or within a range) program, but you can pass --max-funcs <num> --max-block-size <num> to Csmith and Csmith may generate large programs for you. When the numbers passed to these options are "large", e.g., --max-funcs 50 --max-block-size 20, Csmith can become very slow and it may take a while to generate a test case.

- Yang

On 2014-09-10 12:20, Junio Cezar wrote:
 I would like to use CSmith to test the asymptotic complexity of a
few compiler optimizations. To this end, I need to generate random
programs of different sizes. I can get programs of different sizes by
varying the seed of the random number generator that CSmith uses.
However, there seems to exist a limit on how much these programs grow.
So, I would like to know what I can do to generate programs
arbitrarily large. The bigger the program, the better for me. I am
willing to change CSmith source code, if there is anything blocking
the growth of the programs.

    Thank you very much,

Junio Cezar