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

Re: [csmith-dev] Extending csmith for c extensions



sameeran joshi <gsocsameeran@gmail.com> writes:

> We 2 people have started to work on extending csmith for c language
> extensions.  We are currently reading the c language extensions in gcc
> documentation.  Where and how do we start exploring the csmith and to extend
> it,what else do we need to learn?

The best way to start is by reading the Csmith paper that was published at
PLDI.  You can find an online copy here:

  http://www.flux.utah.edu/paper/yang-pldi11

That paper has a section that describes how Csmith works at a high level.

After that, the next thing to do is to start reading the code!  There is no
"implementer's guide," so you'll have to learn how it works by examining the
code itself.  My advice to you is to "start at the top" and work your way down
into the details.

The code itself is available here:

  https://github.com/csmith-project/csmith

The main function is in the file:

  src/RandomProgramGenerator.cpp

If Csmith is too difficult to start with, you might try starting with
"randprog" instead, which is the program that Csmith evolved from.  Randprog is
much simpler, so it might be easier to understand, but it works in the same
general way as Csmith.

You can find the source to randprog linked from this web page:

  http://www.cs.utah.edu/~eeide/emsoft08/

Good luck, and happy hacking! ---

Eric.

-- 
-------------------------------------------------------------------------------
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