-
Hello, I succeed to prove this little example:
But, if I failed to prove the following variant, using predefined operations on sequences instead of my own predicates:
It seems that invariant preservation on subsequences cannot be proved. (When, I replace the above "==" over sequences by "ext_eq", all invariant initializations are proved, but no preservation yet). Sorry, I am still not used to interactive proof debugging with why3. Thus, I do not understand what is happening here. Another question on this example: if we use a |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Actually, I would also like to play with this other variant, purely based on (mutable) iterators:
Do you think possible to reason on such a combination of iterators in Creusot ? |
Beta Was this translation helpful? Give feedback.
-
Likely you are facing issues with SMT, they can be quite sensitive to formulation of properties. I'll take a look now. |
Beta Was this translation helpful? Give feedback.
-
This is a tricky thing about |
Beta Was this translation helpful? Give feedback.
Thanks a lot. Your trick of using ghost code to make the proof progress is cute: it reminds me Coq :).
And this shows me how to prove the invariants based on
subsequence
with postcondition, modulo one single admitted fact:But, I needed to use
ext_eq
instead of==
on sequences. And the version withsubsequence
in invariants induced a lot of pain (i.e. ghost code to help the proof). See main.rs.gzFinally, my first version above is the simp…