Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get source code of the mutated version of the original program #958

Open
RainyTong opened this issue Jan 26, 2022 · 4 comments
Open

Get source code of the mutated version of the original program #958

RainyTong opened this issue Jan 26, 2022 · 4 comments

Comments

@RainyTong
Copy link

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.

@AlexDenisov
Copy link
Member

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.

@RainyTong
Copy link
Author

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?

@AlexDenisov
Copy link
Member

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

@RainyTong RainyTong changed the title Get source code of the mutated version of the original program. Get source code of the mutated version of the original program Feb 1, 2022
@ardier
Copy link

ardier commented Oct 18, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants