I wonder how this program
http://rise4fun.com/Dafny/TBQ0
is verified by Dafny without the inner invariant, since the outer invariant is not preserved in the inner loop.
Best,
Paqui
Comments: Oooh, I see!!! In fact, I was intrigued about the inference of perm(a,old(a)) in the outer-loop from no information about this fact in the inner-loop. The key point I haven't realised is that old(a)[..] and old(a[..]) are not the same thing, isn't it? That explains some other problems I have open in preparing laboratories for students. I mean, this is a great help for preparing my course, thanks a lot. Btw, I like the elegance of your last invariant for the inner loop. Thank you very much, Paqui
http://rise4fun.com/Dafny/TBQ0
is verified by Dafny without the inner invariant, since the outer invariant is not preserved in the inner loop.
Best,
Paqui
Comments: Oooh, I see!!! In fact, I was intrigued about the inference of perm(a,old(a)) in the outer-loop from no information about this fact in the inner-loop. The key point I haven't realised is that old(a)[..] and old(a[..]) are not the same thing, isn't it? That explains some other problems I have open in preparing laboratories for students. I mean, this is a great help for preparing my course, thanks a lot. Btw, I like the elegance of your last invariant for the inner loop. Thank you very much, Paqui