Certora/gambit

Issue with Gambit tool when generating maximum number of mutants

Sta1400 opened this issue · 3 comments

I encountered an issue while using the Gambit tool to generate mutants from Solidity source code. When I tried to generate the maximum number of mutants possible using the 'num-mutants' parameter in the configuration file below, the program continued to run indefinitely, forcing me to manually kill the process.

Configuration file used:
{ "filename": "src/ERC20_OZ/ERC20.sol", "contract": "ERC20", "functions": ["decreaseAllowance"], "mutations": [ "binary-op-mutation", "unary-operator-mutation", "require-mutation", "delete-expression-mutation", "function-call-mutation", "if-statement-mutation", "swap-arguments-function-mutation", "swap-arguments-operator-mutation", "swap-lines-mutation", "elim-delegate-mutation" ], "num-mutants": 10000 }

I suspect that this issue is caused by the tool not properly handling the case when the number of mutants generated exceeds the maximum possible. It would be helpful if the Gambit tool could throw an error message or exit gracefully in such cases, rather than forcing the user to manually kill the process. Thank you for your attention to this matter.

I think @chandrakananandi mentioned this already, but please see #14 (branch ben/mutator-refactor), I've fixed this quite a bit.

I also am generating a CSV mutants.log, and I generate all mutants by default

btw, lmk if you want any more information in mutants.log, I haven't finalized it yet

Closing: this issue was fixed with #14