smite-ir: Add InstructionReorderMutator#61
Conversation
Introduce `is_act()` to the set of predicate methods for smite-IR's `Operation` type. This will be used by `InstructionReorderMutator` to identify "Act" instructions to swap.
|
Drafting right now because tests for the mutator are yet to be implemented. |
morehouse
left a comment
There was a problem hiding this comment.
This all looks correctly implemented to me.
Unfortunately I don't think it's useful until we implement more Act operations and start generating more interesting programs. Currently we just have SendMessage and RecvAcceptChannel, which we actually don't want to swap (doing so would lead to 5s timeout delays as we wait to receive a message that never comes, which would register as a hang).
I think it would be best to defer further work on this mutator until we have some more interesting things to swap. Then we can figure out how to avoid swapping a Recv* operation to a location before a SendMessage. We will also then be able to collect better data about how often swapping is actually possible with the current implementation, which may lead us to investigate further changes to this mutator (e.g., moving entire dependency trees).
Add an
InstructionReordermutator for Smite IR. Mutates a given program by swapping two '"Act" instructions that have no data dependencies between them. This explores alternative execution orderings while preserving SSA invariants.