mull icon indicating copy to clipboard operation
mull copied to clipboard

Get source code of the mutated version of the original program

Open RainyTong opened this issue 3 years ago • 4 comments

Hello.

I went through "Two-step analysis process" in the tutorial and get an executable file (hello-world-mutated) of the Hello World example by running: $ mull-cxx -mutate-only -output=hello-world-mutated hello-world

I am wondering if it is possible to get the source of the mutants instead of executable file. Is there any command to do so or any approach?

Any hint is appreciated.

RainyTong avatar Jan 26 '22 23:01 RainyTong

We have a Patches reporter, it generates patch files for each mutation. I'd suggest giving it a try.

Please, report an issue if you hit any problems with the reporter.

AlexDenisov avatar Jan 27 '22 08:01 AlexDenisov

Thank you for your help! I tried with option --reporters=Patches and get patches which look like the git diff. Is there any way to apply the diff (patch) to the program to get a complete mutated version of the original program?

RainyTong avatar Jan 27 '22 21:01 RainyTong

At the moment, there is no way to get a complete mutated program. We are working on another approach for mutations (#867), it should be possible when its done, but there is no ETA.

You could also try to apply mutated patches, but I guess it won't work for conflicting mutants (that is, the ones mutating the same line of code).

AlexDenisov avatar Jan 28 '22 08:01 AlexDenisov

+1 on this. I can write a script that does this with the json reports file, but would be great if mull dumped this.

ardier avatar Oct 18 '23 18:10 ardier