Skip to content

Cannot prove 02_linear_search.rs #993

Answered by xldenis
southball asked this question in Help
Discussion options

You must be logged in to vote

Thanks for trying out Creusot! Unfortunately you stumbled into one of the most poorly named set of traits.

I've attached a fixed version of your specs below as a reference.

The short version of the issue: when reasoning about rust equality or orders use DeepModel ( soon to be called EqModel). The ShallowModel trait which should be called View is just a convenient shorthand for viewing types like Vec as their mathematical model. It is _unprincipled _ and it shouldn't occur in bounds.


extern crate creusot_contracts;
use creusot_contracts::*;
// Prove the following:
// 1. If we return Some(i) it is the first index containing `tgt`
// 2. If we return None, then there are no indices containin…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by southball
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants