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

Re: [csmith-dev] Generate two slightly different files

Do you care about undefined behaviors? If not, you can add a pass after Csmith generates the program (which basically is an AST), and before prints it, that mutates one of the leaf nodes. Csmith has a GTAV (generation time analysis & validation) that ensures the semantics of the AST don't introduce undefined behaviors, if you are as careful as Csmith, the mutation might come out fine. 


On Thu, Apr 28, 2016 at 8:37 AM, Christian Dietrich <dietrich@cs.fau.de> wrote:

I'm currently searching for a tool to generate two C files that
are very similar. What do I mean by similar? The respective AST of the C
files should only differ in one subexpression/type/etc. The difference
should mimic the changes a developer does between two compiler

Does csmith already allow such small alterations of its output? If so, I
haven't seen an command line option for it. If it doesn't have this
feature, could you give me a small hint where I should look to implement
this behavior?

Christian Dietrich, M.Sc. (Research Staff)
Computer Science 4 (Distributed Systems and Operating Systems)
Friedrich-Alexander-Universität Erlangen-Nürnberg
Martensstr. 1
91058 Erlangen

Tel:    (09131) 85-27280
Fax:    (09131) 85-28732
eMail:  christian.dietrich@fau.de
WWW:    http://www4.cs.fau.de/~dietrich