@@ -145,8 +145,7 @@ we click on [example.cpp](http://127.0.0.1:5000/projects/1/files/1), we see the
145
145
146
146
- Next to "example.cpp", click on [ "generate patches"] ( http://127.0.0.1:5000/projects/1/files/1/generate ) .
147
147
- Leave "first line" and "last line" empty to mutate the whole file.
148
- - Right now, none of the check boxes are actually implemented, so you can ignore all of them - all mutations will be
149
- used by default.
148
+ - Select check boxes of mutations you want to use. If none is selected, all mutations will be used by default.
150
149
- Click on "Generate patches".
151
150
152
151
Back in the [ project overview] ( http://127.0.0.1:5000/projects/1 ) , you see that 14 patches have been generated. You can
@@ -275,13 +274,21 @@ venv/bin/python3 cli/add_files.py --project "Example project" /tmp/cmake-example
275
274
```
276
275
277
276
### ` generate_patches.py `
278
- This script will generate patches for all files in a project.
277
+ This script will generate patches for files in a project using selected mutators .
279
278
280
279
Example usage:
281
280
``` bash
282
281
venv/bin/python3 cli/generate_patches.py --project " Example project"
283
282
```
284
283
284
+ Example usage with files and mutators:
285
+ ``` bash
286
+ venv/bin/python3 cli/generate_patches.py \
287
+ --project " Example project" \
288
+ --files /tmp/cmake-example/src/example.cpp:13:-1 \
289
+ --mutators logicalOperator,lineDeletion
290
+ ```
291
+
285
292
### ` queue_control.py `
286
293
This script allows you to control the queue and view its state.
287
294
@@ -290,6 +297,26 @@ Example usage:
290
297
venv/bin/python3 cli/queue_control.py start
291
298
```
292
299
300
+ ## List of mutators
301
+
302
+ | Mutator | Description |
303
+ | ----------| -------------|
304
+ | lineDeletion | Deletes a whole line |
305
+ | logicalOperator | Replaces logical operators (&&, \|\| , and, or, !, not) |
306
+ | comparisonOperator | Replaces comparison operators (==, !=, <, >, <=, >=) |
307
+ | incDecOperator | Swaps increment and decrement operators (++, --) |
308
+ | assignmentOperator | Replaces assignment operators (=, +=, -=, * =, /=, %=) |
309
+ | booleanAssignmentOperator | Replaces Boolean assignment operators (=, &=, \| =, ^=, <<=, >>=) |
310
+ | arithmeticOperator | Replaces arithmetic operators (+, -, * , /, %) |
311
+ | booleanArithmeticOperator | Replaces Boolean arithmetic operators (&, \| , ^, <<, >>) |
312
+ | booleanLiteral | Swaps the Boolean literals true and false |
313
+ | stdInserter | Changes the position where elements are inserted (front_inserter, back_inserter) |
314
+ | stdRangePredicate | Changes the semantics of an STL range predicate (all_of, any_of, none_of) |
315
+ | stdMinMax | Swaps STL minimum by maximum calls (min, max) |
316
+ | decimalNumberLiteral | Replaces decimal number literals with different values |
317
+ | hexNumberLiteral | Replaces hex number literals with different values |
318
+ | iteratorRange | Changes an iterator range (begin, end) |
319
+
293
320
## Help!
294
321
295
322
Mutate++ is in a very early stage, and there is a lot to do. In particular, we are aware of severe limitations:
0 commit comments