Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List of mutations to process #248

Open
gkaracha opened this issue Sep 15, 2021 · 0 comments
Open

List of mutations to process #248

gkaracha opened this issue Sep 15, 2021 · 0 comments

Comments

@gkaracha
Copy link
Contributor

gkaracha commented Sep 15, 2021

Until now we've addressed several mutations, but in a rather ad-hoc way. To be more systematic about it, we can crank up the number of mutations (to, say, a thousand) and focus on one file at a time (e.g., earthly +test-mutations --n_mutations=1000 --modules=src/parameters.ml. Here is a WIP list of mutations obtained this way that we can work on.

src/avl.ml

  • src/avl.ml SWAP_FUNCTION lt_int_int -> eq_int_int L285
  • src/avl.ml INTEGER_LITERAL 2n -> 1n L376
  • src/avl.ml INTEGER_LITERAL 0 -> -1 L277
  • src/avl.ml INTEGER_LITERAL 0n -> 1n L716
  • src/avl.ml INTEGER_LITERAL 1n -> 0n L71
  • src/avl.ml SWAP_FUNCTION leq_int_int -> geq_int_int L287
  • src/avl.ml INTEGER_LITERAL 1n -> 0n L75
  • src/avl.ml SWAP_FUNCTION leq_int_int -> gt_int_int L287
  • src/avl.ml SWAP_FUNCTION leq_int_int -> lt_int_int L287
  • src/avl.ml INTEGER_LITERAL 0 -> 1 L277
  • src/avl.ml SWAP_FUNCTION lt_int_int -> leq_int_int L285
  • src/avl.ml INTEGER_LITERAL 1n -> 2n L71
  • src/avl.ml SWAP_FUNCTION leq_int_int -> eq_int_int L287
  • src/avl.ml SWAP_FUNCTION lt_int_int -> eq_int_int L277
  • src/avl.ml SWAP_FUNCTION lt_int_int -> leq_int_int L277

src/burrow.ml

  • src/burrow.ml INTEGER_LITERAL 0 -> -1 L451

src/cfmm.ml

Nothing here.

src/error.ml

Unnecessary to mutate.

src/constants.ml

  • src/constants.ml INTEGER_LITERAL 10_000_000_000n -> 9_999_999_999n L41
  • src/constants.ml INTEGER_LITERAL 10_000_000_000n -> 10_000_000_001n L41
  • src/constants.ml INTEGER_LITERAL 10000 -> 10_001 L97
  • src/constants.ml INTEGER_LITERAL 86400 -> 86_399 L60
  • src/constants.ml INTEGER_LITERAL 86400 -> 0 L60
  • src/constants.ml INTEGER_LITERAL 12n -> 11n L118
  • src/constants.ml INTEGER_LITERAL 100 -> 99 L45
  • src/constants.ml INTEGER_LITERAL 100 -> 101 L45
  • src/constants.ml INTEGER_LITERAL 12n -> 13n L118
  • src/constants.ml INTEGER_LITERAL 5n -> 6n L113
  • src/constants.ml INTEGER_LITERAL 86400 -> 1 L60
  • src/constants.ml INTEGER_LITERAL 100 -> 1 L45
  • src/constants.ml INTEGER_LITERAL 5n -> 1n L113
  • src/constants.ml INTEGER_LITERAL 86400 -> 86_401 L60
  • src/constants.ml INTEGER_LITERAL 86400 -> -1 L60
  • src/constants.ml INTEGER_LITERAL 5n -> 4n L113
  • src/constants.ml INTEGER_LITERAL 10000 -> 9_999 L97

src/parameters.ml

  • src/parameters.ml SWAP_FUNCTION geq_int_int -> gt_int_int L183
  • src/parameters.ml INTEGER_LITERAL 0n -> 1n L92
  • src/parameters.ml SWAP_FUNCTION lt_int_int -> leq_int_int L177
  • src/parameters.ml SWAP_FUNCTION gt_int_int -> geq_int_int L182
  • src/parameters.ml SWAP_FUNCTION lt_int_int -> leq_int_int L176
  • src/parameters.ml SWAP_FUNCTION lt_int_int -> leq_int_int L179
  • src/parameters.ml SWAP_FUNCTION leq_int_int -> lt_int_int L180
  • src/parameters.ml SWAP_FUNCTION leq_int_int -> lt_int_int L185

src/checker.ml

  • src/checker.ml SWAP_FUNCTION true -> false L398
  • src/checker.ml INTEGER_LITERAL 1n -> 2n L761
  • src/checker.ml SWAP_FUNCTION lt_kit_kit -> gt_kit_kit L399
  • src/checker.ml INTEGER_LITERAL 0mutez -> 1mutez L898
  • src/checker.ml SWAP_FUNCTION kit_sub -> kit_max L596
  • src/checker.ml SWAP_FUNCTION kit_add -> kit_max L29
  • src/checker.ml SWAP_FUNCTION lt_kit_kit -> eq_kit_kit L399
  • src/checker.ml SWAP_FUNCTION kit_sub -> kit_add L596
  • src/checker.ml SWAP_FUNCTION mul_int_int -> add_int_int L403
  • src/checker.ml SWAP_FUNCTION lt_kit_kit -> geq_kit_kit L399
  • src/checker.ml SWAP_FUNCTION kit_zero -> kit_one L405
  • src/checker.ml SWAP_FUNCTION kit_zero -> kit_one L31

src/liquidationAuction.ml

  • src/liquidationAuction.ml INTEGER_LITERAL 1n -> 0n L321
  • src/liquidationAuction.ml INTEGER_LITERAL 1n -> 2n L321
  • src/liquidationAuction.ml SWAP_FUNCTION mul_int_int -> sub_int_int L229
  • src/liquidationAuction.ml SWAP_FUNCTION fixedpoint_of_ratio_ceil -> fixedpoint_of_ratio_floor L324
  • src/liquidationAuction.ml SWAP_FUNCTION mul_int_int -> add_int_int L287
  • src/liquidationAuction.ml SWAP_FUNCTION mul_int_int -> sub_int_int L287
  • src/liquidationAuction.ml SWAP_FUNCTION gt_int_int -> geq_int_int L348
  • src/liquidationAuction.ml SWAP_FUNCTION mul_int_int -> add_int_int L234
  • src/liquidationAuction.ml SWAP_FUNCTION fixedpoint_of_ratio_floor -> fixedpoint_of_ratio_ceil L331
  • src/liquidationAuction.ml SWAP_FUNCTION gt_int_int -> geq_int_int L345
  • src/liquidationAuction.ml SWAP_FUNCTION mul_int_int -> div_int_int L229
  • src/liquidationAuction.ml SWAP_FUNCTION mul_int_int -> add_int_int L229
  • src/liquidationAuction.ml SWAP_FUNCTION false -> true L615
  • src/liquidationAuction.ml SWAP_FUNCTION mul_int_int -> div_int_int L287
  • src/liquidationAuction.ml SWAP_FUNCTION mul_int_int -> div_int_int L234
  • src/liquidationAuction.ml SWAP_FUNCTION mul_int_int -> sub_int_int L234

src/sliceList.ml

  • src/sliceList.ml SWAP_FUNCTION true -> false L46
    This is in fact tested in tests/testSliceList.ml (test "slice_list_from_leaf_ptr - fails for ptr with no corresponding list in auction state", which is part of the slow tests).

src/fa12Interface.ml

Unnecessary to mutate.

src/burrowTypes.ml

Unnecessary to mutate.

src/cfmmTypes.ml

Nothing here.

src/ptr.ml

src/liquidationAuctionPrimitiveTypes.ml

Unnecessary to mutate.

src/liquidationAuctionTypes.ml

Unnecessary to mutate.

src/checkerTypes.ml

Unnecessary to mutate.

src/fa2Interface.ml

Nothing here.

src/ctez.ml

  • src/ctez.ml INTEGER_LITERAL 0 -> -1 L29
  • src/ctez.ml INTEGER_LITERAL 0 -> -1 L23
  • src/ctez.ml INTEGER_LITERAL 0 -> 1 L23
  • src/ctez.ml SWAP_FUNCTION lt_int_int -> eq_int_int L23
  • src/ctez.ml SWAP_FUNCTION mul_int_int -> add_int_int L25
  • src/ctez.ml SWAP_FUNCTION lt_int_int -> leq_int_int L23

src/lqt.ml

  • src/lqt.ml SWAP_FUNCTION lt_int_int -> leq_int_int L33
  • src/lqt.ml INTEGER_LITERAL 0 -> -1 L27
  • src/lqt.ml INTEGER_LITERAL 0n -> 1n L55
  • src/lqt.ml INTEGER_LITERAL 0 -> -1 L33
  • src/lqt.ml INTEGER_LITERAL 0 -> 1 L27
  • src/lqt.ml INTEGER_LITERAL 0 -> 1 L33
  • src/lqt.ml SWAP_FUNCTION lt_int_int -> eq_int_int L27
  • src/lqt.ml SWAP_FUNCTION lt_int_int -> leq_int_int L27
  • src/lqt.ml SWAP_FUNCTION lt_int_int -> eq_int_int L33

src/tok.ml

  • src/tok.ml INTEGER_LITERAL 0 -> 1 L27
  • src/tok.ml INTEGER_LITERAL 0n -> 1n L70
  • src/tok.ml INTEGER_LITERAL 0 -> -1 L27
  • src/tok.ml INTEGER_LITERAL 0 -> -1 L33
  • src/tok.ml SWAP_FUNCTION lt_int_int -> leq_int_int L27
  • src/tok.ml SWAP_FUNCTION mul_int_int -> add_int_int L29
  • src/tok.ml SWAP_FUNCTION lt_int_int -> eq_int_int L27

src/fixedPoint.ml

  • src/fixedPoint.ml INTEGER_LITERAL 0 -> 1 L52
  • src/fixedPoint.ml INTEGER_LITERAL 0 -> -1 L52
  • src/fixedPoint.ml SWAP_FUNCTION mul_int_int -> add_int_int L24

src/kit.ml

  • src/kit.ml INTEGER_LITERAL 0 -> -1 L37
  • src/kit.ml INTEGER_LITERAL 0n -> 1n L65
  • src/kit.ml INTEGER_LITERAL 0 -> -1 L31

src/checkerEntrypoints.ml

Cannot mutate; this file is not managed by git.

src/checkerMain.ml

  • src/checkerMain.ml INTEGER_LITERAL 0mutez -> 1mutez L80

src/common.m

This one loops forever when mutated, because the condition on the recursive loop is mutated.
It'd be nice to find a workaround for this issue.

src/mem.ml

Nothing here.
(NOTE: This operation did not as I would have liked, with zero mutations. I got Exception: Tried all possible combinations of modules and mutations and could not find a matching name. We should probably change this behavior.)

src/ligo.ml

Can't mutate this one since it gives ValueError: invalid literal for int() with base 10: '0x'.

src/ligoOp.ml

  • src/ligoOp.ml INTEGER_LITERAL 0n -> 1n L61
  • src/ligoOp.ml INTEGER_LITERAL 1n -> 2n L65
  • src/ligoOp.ml INTEGER_LITERAL 1n -> 0n L65
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant