LLM4Decompile icon indicating copy to clipboard operation
LLM4Decompile copied to clipboard

details of splitting exebench for train and evaluation

Open wang-yongpan opened this issue 1 year ago • 10 comments

hello, i m impressed by the Decompile model you released.

i want to know the details of splitting exebench for train and evaluation. because i want to reproduce your evaluation results for a better application.

thank you.

wang-yongpan avatar Sep 29 '24 07:09 wang-yongpan

We use all the training samples:

train_synth_compilable
train_real_compilable
train_synth_simple_io
train_real_simple_io
train_synth_rich_io

And test on its test set:

test_synth

Good luck for your project!

albertan017 avatar Sep 29 '24 07:09 albertan017

ok, i get it. thanks for your reply

wang-yongpan avatar Sep 29 '24 07:09 wang-yongpan

hi,

I found that the exebench has three optimization options (O0, O3, Os). How can I evaluate your tool on different options (O0, O1, O2, O3) similar to your experiments?

wang-yongpan avatar Oct 08 '24 08:10 wang-yongpan

Unfortunately, you will have to compile the dataset on your own as we do not have the authorization to distribute another's dataset. For more details on the issues we faced, please refer to Appendix A in our paper.

albertan017 avatar Oct 08 '24 11:10 albertan017

OK, how can i obtain the source code of exebench? i can not find them from huggingface.

wang-yongpan avatar Oct 09 '24 01:10 wang-yongpan

you can find it here

albertan017 avatar Oct 09 '24 03:10 albertan017

I can not find the source code from this link. I just found the below files:

train_not_compilable: 2.357M train_synth_compilable: 2.308373M train_real_compilable: 0.675074M train_synth_simple_io: 0.550116M train_real_simple_io: 0.043769M train_synth_rich_io: 0.097250M valid_synth: 5k valid_real: 2.133k test_synth: 5k test_real: 2.134k

do you mean the source code is contained in these?

wang-yongpan avatar Oct 09 '24 03:10 wang-yongpan

that's all they provided...

albertan017 avatar Oct 09 '24 04:10 albertan017

ok, I noticed that your paper tested the re-executability rate of the exebench dataset. Can I ask how you achieved it?

wang-yongpan avatar Oct 10 '24 09:10 wang-yongpan

in the examples/basic.py, you can see

synth_wrapper = Wrapper(c_deps=row['synth_deps'] + '\n' + row['synth_io_pairs']['dummy_funcs'][0] + '\n',
                                    func_c_signature=row['func_head_types'].replace('extern', ''), func_assembly=row['asm']['code'][0],
                                    cpp_wrapper=row['synth_exe_wrapper'])

it requires the func_assembly. So we remove the func_assembly, and add the func_def:

synth_wrapper = Wrapper(c_deps=row['synth_deps'] + '\n' + row['synth_io_pairs']['dummy_funcs'][0] + '\n' + row['func_def'],
                                    func_c_signature=row['func_head_types'].replace('extern', ''), func_assembly=None,
                                    cpp_wrapper=row['synth_exe_wrapper'])

We made some additional changes to the code for our specific needs, but that's essentially how you can modify it. However, we were only able to compile half of the code with these modifications. If you have any better solutions, we would really appreciate your insights!

albertan017 avatar Oct 11 '24 03:10 albertan017