-
Notifications
You must be signed in to change notification settings - Fork 586
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
Add BackendCannotProceed
to improve integration
#4092
Conversation
@Zac-HD Easy to integrate, and it makes the plugin code less fragile! 🎉 (my changes)
|
Nice!
How about
I was thinking we'd try to use Ideally this would allow us to support sound verification of e.g. code that just does SMT-friendly integer logic, whereas tests that hit timeouts or whatever else will fall back to Hypothesis' own backend for the remainder of the test budget. At the extremely ambitious end, we might eventually try to focus Hypothesis on the subspaces that Crosshair couldn't handle as per the last few ideas in #3914. That's definitely a far-future thing though, and I'd rather start with using Crosshair to explore specific branches that HypoFuzz can't cover...
Hmm, I don't think |
That works!
Over-sharing a little bit, but this is CrossHair's exception taxonomy for early path exits:
Notably, The other case that's not covered here is when we have plenty of successful completions, but too much realization is happening. This could also potentially be detected in the plugin. And, yes, I share your vision for expanding information sharing between the backends. There is so much we could do. |
|
bfeb51d
to
b498f05
Compare
b498f05
to
a7cc537
Compare
a7cc537
to
b948562
Compare
@pschanely I think this is now complete on the Hypothesis end; let me know if you find any issues or have any suggestions from pschanely/hypothesis-crosshair#23? I'll merge after you confirm it's ready. |
fec4867
to
6a67838
Compare
@Zac-HD this is looking pretty good when I cobble together the right bits of everything. Let's ship it! |
Sometimes, an alternative backend will just be done, and this new exception (and handlers) provides an interface to communicate that. There are several reasons this could happen, including:
not_realizable
: e.g. hitting a timeout while attempting to.realize()
some value, as in RarePathTimeout
errors inprovider.realize(...)
pschanely/hypothesis-crosshair#21exhausted
: running out of useful work to do, e.g. if the test function immediately invokes compiled code then Crosshair doesn't have much to do, and can hand back to the Hypothesis backendverified
: for the cases where we've estabilished that the test will never fail, similar to Hypothesis' ownExitReason.finished
if the datatree is exhausted (e.g. whenst.booleans()
has generated bothTrue
andFalse
).exhausted
and continue testing on the Hypothesis backend for now.TODO: lots of tests
cc @pschanely; I'm probably not going to get back to this for a week or two but if you want to try it out I'd love to hear your thoughts 🙂