basic_mutator icon indicating copy to clipboard operation
basic_mutator copied to clipboard

Reduce code duplication for mutation strategies that have overwrite and insert modes

Open gamozolabs opened this issue 5 years ago • 0 comments

Some of our mutation strategies have both an insert and overwrite mode. Currently we split the logic into two. These could be combined into one function and reduce some code duplication.

It's a bit non-trivial as insertions can append to the input, or insert to an empty input, where overwrites can only overwrite valid parts of an existing input. Further, things like inserts must check for situations which would expand the input past the maximum input size, where for overwrites, the bounds must be checked of the region to overwrite.

gamozolabs avatar Aug 10 '20 16:08 gamozolabs