hypothesis
hypothesis copied to clipboard
Follow up on IR shrinking tasks
We just migrated the shrinker to the IR in #3962, as a part of #3921. While this was a performance win overall, we took some temporary regressions and left notes for where to improve in the future. This issue tracks those items.
- [ ] Improve the
Float
shrinker with special logic forn >= 2**53
, where the float gap becomes > 1 (https://github.com/HypothesisWorks/hypothesis/pull/3962#discussion_r1614925641) - [ ] Adaptively delete in the
Collection
shrinker: https://github.com/HypothesisWorks/hypothesis/blob/54d029d3cdbd78419f3496faa3eb39b57cde03b3/hypothesis-python/src/hypothesis/internal/conjecture/shrinking/collection.py#L44-L48 - [x] Fix shrinking of stateful tests with bundles. This is a known regression in the shrinker. Likely has to do with misalignments that were allowed via buffers and not via ir (https://github.com/HypothesisWorks/hypothesis/pull/3962#issuecomment-2136317247)
- [x] #4086
- [ ] Fix any remaining
TODO_BETTER_SHRINK
orTODO_SHRINK
comments in the code - [ ] Update docstring comments around the shrinker, and any related internal docs such as
guides/internals.rst
Ambitiously (not necessary to close this issue):
- [ ] rewrite
lstar.py
and DFA shrinking for the IR. Here's the commit that took it out: https://github.com/HypothesisWorks/hypothesis/pull/3962/commits/8eaa4d48d4e6838684826109d10e53cfd9733225