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

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

Junio Cezar <ser.juninho@gmail.com> writes:

> [...]  So, I would like to know what I can do to generate programs
> arbitrarily large. The bigger the program, the better for me.

Have you experimented with Csmith's command-line options?  There are various
options for setting the maximum number of statements per block, the maximum
block nesting depth, the maximum expression-nesting depth, the maximum number
of functions, and so on.

Even if you set these values high, Csmith may pick terminal productions at a
rate that is too high for your tastes.  To generate very large programs, you
might also want to adjust the probability-distribution tables that Csmith uses
when it makes random choices about what to generate next.  (I'm answering this
email quickly, so I'm not giving a code pointer --- but these should be fairly
easy to find!)

Is this enough guidance for you to get started?

I don't think that we (Utah folks) have ever explored tuning Csmith to generate
"very large" programs.

Good luck, and happy hacking ---


Eric Eide <eeide@cs.utah.edu>  .         University of Utah School of Computing
http://www.cs.utah.edu/~eeide/ . +1 (801) 585-5512 voice, +1 (801) 581-5843 FAX