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

Prove binary search's result #54

Open
yannbolliger opened this issue Dec 3, 2020 · 0 comments
Open

Prove binary search's result #54

yannbolliger opened this issue Dec 3, 2020 · 0 comments
Labels
verification Feature or bug with the verification phase

Comments

@yannbolliger
Copy link
Collaborator

yannbolliger commented Dec 3, 2020

From @gsps' review in #42.

Not necessarily for this PR, but you could also try a variant that returns an which returns None instead of false and Some(i) instead of true. Then you should be able to prove as a postcondition that match res { Some(i) => list.get(i) == x; _ => true }.

@romac romac added the verification Feature or bug with the verification phase label Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
verification Feature or bug with the verification phase
Projects
None yet
Development

No branches or pull requests

2 participants