MuTeC is developed on top of LLVM/Clang compiler infrastructure to generate mutations for programs written in C and C++.
Make sure you have the following:
- Latest CMake and your favourite build system (recommand to use Ninja).
- Latest LLVM. Instuctions can be found here.
- Go to /path/to/your/llvm-source-tree/tools/clang/tools/extra/
- Clone this project.
- Add the following line to CMakeLists.txt:
add_subdirectory(mutec)
- Go to /path/to/your/llvm/build
- Run ninja mutec
- Run ninja mutec-template
Two executables are provided.
-
mutec: generate mutants for C/C++ source files.
Usage: mutec source_filenames [options] -o output_directory
Options:
-r: randomly generate one mutants. Default settings generate all possible mutants.
-t: only generate MuTeC code template for the source files.
-
mutec-template: generate mutants from the intermediate form (MuTeC code template) produced by mutec command.
Usage: mutec-template template_filenames [options]
Options:
-o output_directory: provide the path to store generated mutants.
-d: show details of the code templates.
-r: randomly generate one mutants. Default settings generate all possible mutants. Note: either -o or -d or both should be provided.