eigerco / move-spec-testing

Other
0 stars 1 forks source link

chore: improve the binary_operator_swap op #24

Closed Rqnsom closed 3 weeks ago

Rqnsom commented 3 weeks ago

These binary operations have the commutative property: +, *, &, &&, |, ||, ==, !=, ^

And by default, the mutator shouldn't swap expressions around operators for these operations.

Except in the case where expressions contain a function or a closure somewhere in the expression AST tree. In those cases, the binary operator swap should be applied since functions and closures might affect the values in the expressions depending on the order of the expressions.

Explore tests under module 0x42::m2 in the check_swap_operator project under move-assets for more info.