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

Re: [xsmith-dev] Problems of Build a DSL Fuzzer by Using Xsmith




Now, we finished to read all supporting documents and trying to modified the example “pythonseque.rtk” to suit our DSL.

My first advice is not to follow `pythonesque.rkt`, it is out of date
and basically abandoned.  We should probably move it to a directory
with a name that says as much.  I recommend looking at the
`simple/javascript.rkt` example and the racket-kernel-fuzzer example.
If you want to look at one that doesn't use the canned-components
library, I recommend looking at Schemely.  However, the canned
components library is recommended.


Besides, we also confused about how to defined the relation between Definition, binder-info, reference-info, prop edit, lift-field and fresh (how to define, use, and set the variable/function).

If you use the canned components library (like the Javascript and Racket fuzzers do), you probably don't need to worry about binder-info and reference-info.  The edit property is also probably something you don't need to worry about until after you have made a couple iterations of a working fuzzer.


Also, sometimes, after set “fresh-name-variable” the variable name is still “lift_”.

At the moment you can't control the naming of variables that are
lifted (see the lifting section in the documentation).

I'm glad you're interested in Xsmith.  My main suggestions off the bat
are to get started from a better base (eg. javascript.rkt), starting
small with something that works with minimal features and then
building from there.  Also use the git version of xsmith instead of
the release version (we plan to do a new release soon with several
good features and fixes).

If you point me to your code I'm happy to take a look at it and give
you some pointers, but try looking at better bases than pythonesque
first.

On Thu, Sep 02, 2021 at 01:31:33AM +0000, Chang Xu wrote:
Dear Xsmith Developer,

I am a postgraduate student who really interested in this xsmith project. It is a really cool project which can randomly create different testing cases for different program languages.

Currently, my project group developed a DSL and need a fuzzer to test it. Xsmith looks prefectly suit for our testing requirements. Now, we finished to read all supporting documents and trying to modified the example “pythonseque.rtk” to suit our DSL. However, we met lots of problems during this process. For example: “pythonseque.rtk” has an error said: replace-hold: all choices for filling in a XsmithAstHoleRefExpr hole were filtered out.

Besides, we also confused about how to defined the relation between Definition, binder-info, reference-info, prop edit, lift-field and fresh (how to define, use, and set the variable/function).

Also, sometimes, after set “fresh-name-variable” the variable name is still “lift_”.

Last, we want to defined add tensor (multiple dimension array) as a variable type. But we are not sure how to do that.

Could you help us when you have time? And maybe provide some study martial or video tutorial with detail of how to study Xsmith.

Best regards,
Chang