-
Notifications
You must be signed in to change notification settings - Fork 164
Saturated experiment revived #2120
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
base: master
Are you sure you want to change the base?
Saturated experiment revived #2120
Conversation
Yes, that sounds right to me |
| if ((Z.of_nat k <=? Z.of_nat (length a)) | ||
| && (Z.of_nat (length b) <=? Z.of_nat (length a)) | ||
| && (0 <=? c) | ||
| && (c <? weight bound k) | ||
| && (0 <=? eval bound a) | ||
| && (eval bound a <? weight bound (length a)) | ||
| && (c*Z.abs (eval bound b) <=? weight bound k - c))%bool | ||
| then reduce' bound k c a b | ||
| else a ++ b. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another alternative to #1761 would be to remove this kind of checks from the templates, avoiding the need to do range analysis on thunks by doing that range analysis in proofs instead. This might involve using list (word 64) instead of list Z. Going in this direction would be shifting work from the rewriter and associated pipeline into tactic-based proofs. However, there's a good chance the resulting code would work with the current rewriter, or perhaps even with eval-cbv (if first transformed to continuation-passing style).
|
The first step listed above seems like the most uncertain still, so if we want to move forward here, that would be the one to try first. Following
|
Perhaps there is a way forward here after all.
bottomwhen we can avoid it (now guarded by--fancy-and-powerful-but-exponentially-slow-bounds-analysis) #1761, a less ambitious alternative would be to add a specialifto the pipeline IR for cases where a specific branch is expected to be taken, and the other branch is only there for proof purposes. Only the expected-dead branch should be thunked. Thus there wouldn't be a need to do bounds analysis inside a thunk.@JasonGross did I get this right?