FStar.Pure.Break: add a utility to "break away" the VC of the continuation #3174
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While stabilizing some queries in HACL*, I wrote something similar for the STATE effect
This worked very well to cause a VC to be split at points chosen by the programmer, to make verification more stable. In my case:
That single break stabilizes this proof to pass
--quake 10
, with an rlimit of 50, while before it had an rlimit of 250 and was still flaky.Now, I could just say that's a common pattern/trick and document it, but for
Pure
it is considerably harder to do because we need to prove monotonicity of the effect. This PR is my best attempt, with a small modification in Pervasives to expose thatspinoff p
is really equal top
.The interface file is not really clean, but I don't know if I can do better... the
postprocess_with
is there to ensure thatbreak_wp
really isfun p -> spinoff (squash (p ()))
, so it shouldn't add any unexpected indirection or overhead.