diff --git a/creusot/src/backend/program.rs b/creusot/src/backend/program.rs
index 03bb7000f5..745d54e8b4 100644
--- a/creusot/src/backend/program.rs
+++ b/creusot/src/backend/program.rs
@@ -697,7 +697,7 @@ impl<'tcx> Statement<'tcx> {
place::create_assign_inner(ctx, names, locals, &rhs, reassign, span),
]
}
- Statement::Assignment(lhs, RValue::FinalBorrow(rhs, deref_index)) => {
+ Statement::Assignment(lhs, RValue::FinalBorrow(rhs, deref_index), span) => {
let original_borrow = Place {
local: rhs.local.clone(),
projection: rhs.projection[..deref_index].to_vec(),
@@ -712,8 +712,8 @@ impl<'tcx> Statement<'tcx> {
let reassign = Exp::Final(Box::new(lhs.as_rplace(ctx, names, locals)));
vec![
- place::create_assign_inner(ctx, names, locals, &lhs, borrow),
- place::create_assign_inner(ctx, names, locals, &rhs, reassign),
+ place::create_assign_inner(ctx, names, locals, &lhs, borrow, span),
+ place::create_assign_inner(ctx, names, locals, &rhs, reassign, span),
]
}
Statement::Assignment(lhs, RValue::Ghost(rhs), span) => {
diff --git a/creusot/src/backend/term.rs b/creusot/src/backend/term.rs
index 4df80aa594..db5eba5c1f 100644
--- a/creusot/src/backend/term.rs
+++ b/creusot/src/backend/term.rs
@@ -257,11 +257,11 @@ impl<'tcx, N: Namer<'tcx>> Lower<'_, 'tcx, N> {
}
TermKind::Absurd => Exp::Absurd,
TermKind::Reborrow { cur, fin, term, projection } => {
- let inner = self.lower_term(*term);
+ let inner = self.lower_term(&*term);
let borrow_id = borrow_generated_id(inner, &projection);
Exp::Call(
Box::new(Exp::QVar("Borrow.borrow_logic".into(), Purity::Logic)),
- vec![self.lower_term(*cur), self.lower_term(*fin), borrow_id],
+ vec![self.lower_term(&*cur), self.lower_term(&*fin), borrow_id],
)
}
TermKind::Assert { cond } => {
diff --git a/creusot/tests/should_fail/bug/222.mlcfg b/creusot/tests/should_fail/bug/222.mlcfg
index 2dc39996b4..43d59858c2 100644
--- a/creusot/tests/should_fail/bug/222.mlcfg
+++ b/creusot/tests/should_fail/bug/222.mlcfg
@@ -93,8 +93,8 @@ module C222_UsesInvariant
goto BB0
}
BB0 {
- [#"../222.rs" 41 4 41 14] _5 <- Borrow.borrow_mut (C222_Once_Type.once_0 ( * x));
- [#"../222.rs" 41 4 41 14] x <- { x with current = (let C222_Once_Type.C_Once x0 = * x in C222_Once_Type.C_Once ( ^ _5)) };
+ [#"../222.rs" 41 4 41 14] _5 <- Borrow.borrow_final (C222_Once_Type.once_0 ( * x)) (Borrow.inherit_id (Borrow.get_id x) 1);
+ [#"../222.rs" 41 4 41 14] x <- { x with current = (let C222_Once_Type.C_Once x0 = * x in C222_Once_Type.C_Once ( ^ _5)) ; };
assume { inv0 ( ^ _5) };
[#"../222.rs" 41 4 41 14] _4 <- ([#"../222.rs" 41 4 41 14] take0 _5);
_5 <- any borrowed (Core_Option_Option_Type.t_option t);
diff --git a/creusot/tests/should_fail/bug/492.mlcfg b/creusot/tests/should_fail/bug/492.mlcfg
index 95c11eecc6..4a4831c7a3 100644
--- a/creusot/tests/should_fail/bug/492.mlcfg
+++ b/creusot/tests/should_fail/bug/492.mlcfg
@@ -49,8 +49,8 @@ module C492_ReborrowTuple
goto BB0
}
BB0 {
- [#"../492.rs" 6 5 6 6] _3 <- Borrow.borrow_mut ( * x);
- [#"../492.rs" 6 5 6 6] x <- { x with current = ^ _3 };
+ [#"../492.rs" 6 5 6 6] _3 <- Borrow.borrow_final ( * x) (Borrow.get_id x);
+ [#"../492.rs" 6 5 6 6] x <- { x with current = ( ^ _3) ; };
assume { inv0 ( ^ _3) };
[#"../492.rs" 6 4 6 11] _0 <- ([#"../492.rs" 6 4 6 11] (_3, ([#"../492.rs" 6 8 6 10] [#"../492.rs" 6 8 6 10] (32 : uint32))));
_3 <- any borrowed t;
@@ -122,8 +122,8 @@ module C492_Test
[#"../492.rs" 11 16 11 17] x <- ([#"../492.rs" 11 16 11 17] [#"../492.rs" 11 16 11 17] (5 : int32));
[#"../492.rs" 12 34 12 40] _6 <- Borrow.borrow_mut x;
[#"../492.rs" 12 34 12 40] x <- ^ _6;
- [#"../492.rs" 12 34 12 40] _5 <- Borrow.borrow_mut ( * _6);
- [#"../492.rs" 12 34 12 40] _6 <- { _6 with current = ^ _5 };
+ [#"../492.rs" 12 34 12 40] _5 <- Borrow.borrow_final ( * _6) (Borrow.get_id _6);
+ [#"../492.rs" 12 34 12 40] _6 <- { _6 with current = ( ^ _5) ; };
[#"../492.rs" 12 19 12 41] _4 <- ([#"../492.rs" 12 19 12 41] reborrow_tuple0 _5);
_5 <- any borrowed int32;
goto BB1
@@ -134,7 +134,7 @@ module C492_Test
assume { resolve0 _4 };
assume { resolve1 _6 };
assert { [@expl:assertion] [#"../492.rs" 13 18 13 30] ^ res = (5 : int32) };
- [#"../492.rs" 14 4 14 13] res <- { res with current = ([#"../492.rs" 14 4 14 13] [#"../492.rs" 14 11 14 13] (10 : int32)) };
+ [#"../492.rs" 14 4 14 13] res <- { res with current = ([#"../492.rs" 14 4 14 13] [#"../492.rs" 14 11 14 13] (10 : int32)) ; };
assume { resolve1 res };
[#"../492.rs" 10 14 15 1] _0 <- ([#"../492.rs" 10 14 15 1] ());
return _0
diff --git a/creusot/tests/should_fail/bug/692.mlcfg b/creusot/tests/should_fail/bug/692.mlcfg
index 4d8b6e6006..a00ef582b2 100644
--- a/creusot/tests/should_fail/bug/692.mlcfg
+++ b/creusot/tests/should_fail/bug/692.mlcfg
@@ -227,7 +227,7 @@ module C692_ValidNormal_Closure2
goto BB3
}
BB3 {
- [#"../692.rs" 16 14 16 39] _1 <- { _1 with current = (let C692_ValidNormal_Closure2.C692_ValidNormal_Closure2 x0 = * _1 in C692_ValidNormal_Closure2.C692_ValidNormal_Closure2 ({ (field_00 ( * _1)) with current = ([#"../692.rs" 16 14 16 39] _4) })) };
+ [#"../692.rs" 16 14 16 39] _1 <- { _1 with current = (let C692_ValidNormal_Closure2.C692_ValidNormal_Closure2 x0 = * _1 in C692_ValidNormal_Closure2.C692_ValidNormal_Closure2 ({ (field_00 ( * _1)) with current = ([#"../692.rs" 16 14 16 39] _4) ; })) ; };
[#"../692.rs" 16 14 16 39] _4 <- any uint32;
assume { resolve0 _1 };
[#"../692.rs" 16 14 16 39] res <- ([#"../692.rs" 16 14 16 39] ());
diff --git a/creusot/tests/should_fail/bug/695.mlcfg b/creusot/tests/should_fail/bug/695.mlcfg
index 3b177cc717..39a41ef411 100644
--- a/creusot/tests/should_fail/bug/695.mlcfg
+++ b/creusot/tests/should_fail/bug/695.mlcfg
@@ -285,7 +285,7 @@ module C695_Valid_Closure2
goto BB3
}
BB3 {
- [#"../695.rs" 20 14 20 39] _1 <- { _1 with current = (let C695_Valid_Closure2.C695_Valid_Closure2 x0 = * _1 in C695_Valid_Closure2.C695_Valid_Closure2 ({ (field_00 ( * _1)) with current = ([#"../695.rs" 20 14 20 39] _4) })) };
+ [#"../695.rs" 20 14 20 39] _1 <- { _1 with current = (let C695_Valid_Closure2.C695_Valid_Closure2 x0 = * _1 in C695_Valid_Closure2.C695_Valid_Closure2 ({ (field_00 ( * _1)) with current = ([#"../695.rs" 20 14 20 39] _4) ; })) ; };
[#"../695.rs" 20 14 20 39] _4 <- any uint32;
assume { resolve0 _1 };
[#"../695.rs" 20 14 20 39] res <- ([#"../695.rs" 20 14 20 39] ());
diff --git a/creusot/tests/should_succeed/100doors.mlcfg b/creusot/tests/should_succeed/100doors.mlcfg
index 57e2379cf2..67c3f800bb 100644
--- a/creusot/tests/should_succeed/100doors.mlcfg
+++ b/creusot/tests/should_succeed/100doors.mlcfg
@@ -405,8 +405,8 @@ module C100doors_F
BB7 {
[#"../100doors.rs" 20 4 20 41] _14 <- Borrow.borrow_mut iter;
[#"../100doors.rs" 20 4 20 41] iter <- ^ _14;
- [#"../100doors.rs" 20 4 20 41] _13 <- Borrow.borrow_mut ( * _14);
- [#"../100doors.rs" 20 4 20 41] _14 <- { _14 with current = ^ _13 };
+ [#"../100doors.rs" 20 4 20 41] _13 <- Borrow.borrow_final ( * _14) (Borrow.get_id _14);
+ [#"../100doors.rs" 20 4 20 41] _14 <- { _14 with current = ( ^ _13) ; };
[#"../100doors.rs" 20 4 20 41] _12 <- ([#"../100doors.rs" 20 4 20 41] next0 _13);
_13 <- any borrowed (Core_Ops_Range_Range_Type.t_range usize);
goto BB8
@@ -469,7 +469,7 @@ module C100doors_F
goto BB19
}
BB19 {
- [#"../100doors.rs" 26 12 26 54] _30 <- { _30 with current = ([#"../100doors.rs" 26 12 26 54] not ([#"../100doors.rs" 26 35 26 54] _26)) };
+ [#"../100doors.rs" 26 12 26 54] _30 <- { _30 with current = ([#"../100doors.rs" 26 12 26 54] not ([#"../100doors.rs" 26 35 26 54] _26)) ; };
assume { resolve1 _30 };
[#"../100doors.rs" 27 12 27 24] door <- ([#"../100doors.rs" 27 12 27 24] door + ([#"../100doors.rs" 27 20 27 24] pass));
[#"../100doors.rs" 25 26 28 9] _11 <- ([#"../100doors.rs" 25 26 28 9] ());
diff --git a/creusot/tests/should_succeed/100doors/why3session.xml b/creusot/tests/should_succeed/100doors/why3session.xml
index 91f6bd0653..127e238e33 100644
--- a/creusot/tests/should_succeed/100doors/why3session.xml
+++ b/creusot/tests/should_succeed/100doors/why3session.xml
@@ -7,7 +7,7 @@
-
+
diff --git a/creusot/tests/should_succeed/100doors/why3shapes.gz b/creusot/tests/should_succeed/100doors/why3shapes.gz
index bc806cf6eb..a497540a34 100644
Binary files a/creusot/tests/should_succeed/100doors/why3shapes.gz and b/creusot/tests/should_succeed/100doors/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/all_zero.mlcfg b/creusot/tests/should_succeed/all_zero.mlcfg
index d94cc91dc1..6294a3c0df 100644
--- a/creusot/tests/should_succeed/all_zero.mlcfg
+++ b/creusot/tests/should_succeed/all_zero.mlcfg
@@ -104,14 +104,14 @@ module AllZero_AllZero
goto BB5
}
BB5 {
- [#"../all_zero.rs" 43 19 43 24] value <- Borrow.borrow_mut (AllZero_List_Type.cons_0 ( * loop_l));
- [#"../all_zero.rs" 43 19 43 24] loop_l <- { loop_l with current = (let AllZero_List_Type.C_Cons x0 x1 = * loop_l in AllZero_List_Type.C_Cons ( ^ value) x1) };
- [#"../all_zero.rs" 43 26 43 30] next <- Borrow.borrow_mut (AllZero_List_Type.cons_1 ( * loop_l));
- [#"../all_zero.rs" 43 26 43 30] loop_l <- { loop_l with current = (let AllZero_List_Type.C_Cons x0 x1 = * loop_l in AllZero_List_Type.C_Cons x0 ( ^ next)) };
- [#"../all_zero.rs" 44 8 44 18] value <- { value with current = ([#"../all_zero.rs" 44 8 44 18] [#"../all_zero.rs" 44 17 44 18] (0 : uint32)) };
+ [#"../all_zero.rs" 43 19 43 24] value <- Borrow.borrow_final (AllZero_List_Type.cons_0 ( * loop_l)) (Borrow.inherit_id (Borrow.get_id loop_l) 1);
+ [#"../all_zero.rs" 43 19 43 24] loop_l <- { loop_l with current = (let AllZero_List_Type.C_Cons x0 x1 = * loop_l in AllZero_List_Type.C_Cons ( ^ value) x1) ; };
+ [#"../all_zero.rs" 43 26 43 30] next <- Borrow.borrow_final (AllZero_List_Type.cons_1 ( * loop_l)) (Borrow.inherit_id (Borrow.get_id loop_l) 2);
+ [#"../all_zero.rs" 43 26 43 30] loop_l <- { loop_l with current = (let AllZero_List_Type.C_Cons x0 x1 = * loop_l in AllZero_List_Type.C_Cons x0 ( ^ next)) ; };
+ [#"../all_zero.rs" 44 8 44 18] value <- { value with current = ([#"../all_zero.rs" 44 8 44 18] [#"../all_zero.rs" 44 17 44 18] (0 : uint32)) ; };
assume { resolve0 value };
[#"../all_zero.rs" 45 17 45 21] _13 <- Borrow.borrow_mut ( * next);
- [#"../all_zero.rs" 45 17 45 21] next <- { next with current = ^ _13 };
+ [#"../all_zero.rs" 45 17 45 21] next <- { next with current = ( ^ _13) ; };
assume { resolve1 loop_l };
[#"../all_zero.rs" 45 8 45 21] loop_l <- ([#"../all_zero.rs" 45 8 45 21] _13);
[#"../all_zero.rs" 45 8 45 21] _13 <- any borrowed (AllZero_List_Type.t_list);
diff --git a/creusot/tests/should_succeed/all_zero/why3session.xml b/creusot/tests/should_succeed/all_zero/why3session.xml
index 909b185ae5..de73501475 100644
--- a/creusot/tests/should_succeed/all_zero/why3session.xml
+++ b/creusot/tests/should_succeed/all_zero/why3session.xml
@@ -7,7 +7,7 @@
-
+
diff --git a/creusot/tests/should_succeed/all_zero/why3shapes.gz b/creusot/tests/should_succeed/all_zero/why3shapes.gz
index 26de960140..ab3f738a77 100644
Binary files a/creusot/tests/should_succeed/all_zero/why3shapes.gz and b/creusot/tests/should_succeed/all_zero/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/bdd.mlcfg b/creusot/tests/should_succeed/bdd.mlcfg
index 97164f123f..929c33c06f 100644
--- a/creusot/tests/should_succeed/bdd.mlcfg
+++ b/creusot/tests/should_succeed/bdd.mlcfg
@@ -2105,8 +2105,8 @@ module Bdd_Impl11_Hashcons
BB5 {
[#"../bdd.rs" 445 16 445 50] r1 <- ([#"../bdd.rs" 445 16 445 50] Bdd_Bdd_Type.C_Bdd ([#"../bdd.rs" 445 20 445 39] * _19) ([#"../bdd.rs" 445 41 445 49] Bdd_Context_Type.context_cnt ( * self)));
assume { resolve1 _19 };
- [#"../bdd.rs" 446 8 446 31] _24 <- Borrow.borrow_mut (Bdd_Context_Type.context_hashcons ( * self));
- [#"../bdd.rs" 446 8 446 31] self <- { self with current = (let Bdd_Context_Type.C_Context x0 x1 x2 x3 x4 x5 = * self in Bdd_Context_Type.C_Context x0 ( ^ _24) x2 x3 x4 x5) };
+ [#"../bdd.rs" 446 8 446 31] _24 <- Borrow.borrow_final (Bdd_Context_Type.context_hashcons ( * self)) (Borrow.inherit_id (Borrow.get_id self) 2);
+ [#"../bdd.rs" 446 8 446 31] self <- { self with current = (let Bdd_Context_Type.C_Context x0 x1 x2 x3 x4 x5 = * self in Bdd_Context_Type.C_Context x0 ( ^ _24) x2 x3 x4 x5) ; };
[#"../bdd.rs" 446 8 446 31] _23 <- ([#"../bdd.rs" 446 8 446 31] add0 _24 ([#"../bdd.rs" 446 26 446 27] n) ([#"../bdd.rs" 446 29 446 30] r1));
_24 <- any borrowed (Bdd_Hashmap_MyHashMap_Type.t_myhashmap (Bdd_Node_Type.t_node) (Bdd_Bdd_Type.t_bdd));
goto BB6
@@ -2116,7 +2116,7 @@ module Bdd_Impl11_Hashcons
goto BB7
}
BB7 {
- [#"../bdd.rs" 447 8 447 71] self <- { self with current = (let Bdd_Context_Type.C_Context x0 x1 x2 x3 x4 x5 = * self in Bdd_Context_Type.C_Context x0 x1 ([#"../bdd.rs" 447 8 447 71] _27) x3 x4 x5) };
+ [#"../bdd.rs" 447 8 447 71] self <- { self with current = (let Bdd_Context_Type.C_Context x0 x1 x2 x3 x4 x5 = * self in Bdd_Context_Type.C_Context x0 x1 ([#"../bdd.rs" 447 8 447 71] _27) x3 x4 x5) ; };
[#"../bdd.rs" 447 8 447 71] _27 <- any Ghost.ghost_ty (Map.map uint64 (Bdd_Node_Type.t_node));
switch ([#"../bdd.rs" 448 11 448 34] ([#"../bdd.rs" 448 11 448 19] Bdd_Context_Type.context_cnt ( * self)) > ([#"../bdd.rs" 448 22 448 34] ([#"../bdd.rs" 448 22 448 30] [#"../bdd.rs" 448 22 448 30] (18446744073709551615 : uint64)) - ([#"../bdd.rs" 448 33 448 34] [#"../bdd.rs" 448 33 448 34] (1 : uint64))))
| False -> goto BB11
@@ -2130,11 +2130,11 @@ module Bdd_Impl11_Hashcons
goto BB10
}
BB10 {
- [#"../bdd.rs" 451 16 451 35] self <- { self with current = (let Bdd_Context_Type.C_Context x0 x1 x2 x3 x4 x5 = * self in Bdd_Context_Type.C_Context x0 x1 x2 x3 x4 ([#"../bdd.rs" 451 27 451 35] Bdd_Context_Type.context_cnt ( * self))) };
+ [#"../bdd.rs" 451 16 451 35] self <- { self with current = (let Bdd_Context_Type.C_Context x0 x1 x2 x3 x4 x5 = * self in Bdd_Context_Type.C_Context x0 x1 x2 x3 x4 ([#"../bdd.rs" 451 27 451 35] Bdd_Context_Type.context_cnt ( * self))) ; };
goto BB9
}
BB11 {
- [#"../bdd.rs" 454 8 454 21] self <- { self with current = (let Bdd_Context_Type.C_Context x0 x1 x2 x3 x4 x5 = * self in Bdd_Context_Type.C_Context x0 x1 x2 x3 x4 ([#"../bdd.rs" 454 8 454 21] Bdd_Context_Type.context_cnt ( * self) + ([#"../bdd.rs" 454 20 454 21] [#"../bdd.rs" 454 20 454 21] (1 : uint64)))) };
+ [#"../bdd.rs" 454 8 454 21] self <- { self with current = (let Bdd_Context_Type.C_Context x0 x1 x2 x3 x4 x5 = * self in Bdd_Context_Type.C_Context x0 x1 x2 x3 x4 ([#"../bdd.rs" 454 8 454 21] Bdd_Context_Type.context_cnt ( * self) + ([#"../bdd.rs" 454 20 454 21] [#"../bdd.rs" 454 20 454 21] (1 : uint64)))) ; };
assert { [@expl:type invariant] inv0 self };
assume { resolve0 self };
[#"../bdd.rs" 455 8 455 9] _0 <- ([#"../bdd.rs" 455 8 455 9] r1);
@@ -2352,8 +2352,8 @@ module Bdd_Impl11_Node
goto BB5
}
BB3 {
- [#"../bdd.rs" 469 8 469 50] _17 <- Borrow.borrow_mut ( * self);
- [#"../bdd.rs" 469 8 469 50] self <- { self with current = ^ _17 };
+ [#"../bdd.rs" 469 8 469 50] _17 <- Borrow.borrow_final ( * self) (Borrow.get_id self);
+ [#"../bdd.rs" 469 8 469 50] self <- { self with current = ( ^ _17) ; };
assume { inv0 ( ^ _17) };
[#"../bdd.rs" 469 8 469 50] _0 <- ([#"../bdd.rs" 469 8 469 50] hashcons0 _17 ([#"../bdd.rs" 469 22 469 49] Bdd_Node_Type.C_If ([#"../bdd.rs" 469 30 469 31] x) ([#"../bdd.rs" 469 33 469 39] childt) ([#"../bdd.rs" 469 41 469 47] childf)));
_17 <- any borrowed (Bdd_Context_Type.t_context);
@@ -2531,8 +2531,8 @@ module Bdd_Impl11_True
goto BB0
}
BB0 {
- [#"../bdd.rs" 477 8 477 27] _6 <- Borrow.borrow_mut ( * self);
- [#"../bdd.rs" 477 8 477 27] self <- { self with current = ^ _6 };
+ [#"../bdd.rs" 477 8 477 27] _6 <- Borrow.borrow_final ( * self) (Borrow.get_id self);
+ [#"../bdd.rs" 477 8 477 27] self <- { self with current = ( ^ _6) ; };
assume { inv0 ( ^ _6) };
[#"../bdd.rs" 477 8 477 27] _0 <- ([#"../bdd.rs" 477 8 477 27] hashcons0 _6 ([#"../bdd.rs" 477 22 477 26] Bdd_Node_Type.C_True));
_6 <- any borrowed (Bdd_Context_Type.t_context);
@@ -2707,8 +2707,8 @@ module Bdd_Impl11_False
goto BB0
}
BB0 {
- [#"../bdd.rs" 485 8 485 28] _6 <- Borrow.borrow_mut ( * self);
- [#"../bdd.rs" 485 8 485 28] self <- { self with current = ^ _6 };
+ [#"../bdd.rs" 485 8 485 28] _6 <- Borrow.borrow_final ( * self) (Borrow.get_id self);
+ [#"../bdd.rs" 485 8 485 28] self <- { self with current = ( ^ _6) ; };
assume { inv0 ( ^ _6) };
[#"../bdd.rs" 485 8 485 28] _0 <- ([#"../bdd.rs" 485 8 485 28] hashcons0 _6 ([#"../bdd.rs" 485 22 485 27] Bdd_Node_Type.C_False));
_6 <- any borrowed (Bdd_Context_Type.t_context);
@@ -2909,7 +2909,7 @@ module Bdd_Impl11_V
}
BB0 {
[#"../bdd.rs" 492 16 492 28] _7 <- Borrow.borrow_mut ( * self);
- [#"../bdd.rs" 492 16 492 28] self <- { self with current = ^ _7 };
+ [#"../bdd.rs" 492 16 492 28] self <- { self with current = ( ^ _7) ; };
assume { inv0 ( ^ _7) };
[#"../bdd.rs" 492 16 492 28] t <- ([#"../bdd.rs" 492 16 492 28] true0 _7);
_7 <- any borrowed (Bdd_Context_Type.t_context);
@@ -2917,15 +2917,15 @@ module Bdd_Impl11_V
}
BB1 {
[#"../bdd.rs" 493 16 493 29] _9 <- Borrow.borrow_mut ( * self);
- [#"../bdd.rs" 493 16 493 29] self <- { self with current = ^ _9 };
+ [#"../bdd.rs" 493 16 493 29] self <- { self with current = ( ^ _9) ; };
assume { inv0 ( ^ _9) };
[#"../bdd.rs" 493 16 493 29] f <- ([#"../bdd.rs" 493 16 493 29] false0 _9);
_9 <- any borrowed (Bdd_Context_Type.t_context);
goto BB2
}
BB2 {
- [#"../bdd.rs" 494 8 494 26] _10 <- Borrow.borrow_mut ( * self);
- [#"../bdd.rs" 494 8 494 26] self <- { self with current = ^ _10 };
+ [#"../bdd.rs" 494 8 494 26] _10 <- Borrow.borrow_final ( * self) (Borrow.get_id self);
+ [#"../bdd.rs" 494 8 494 26] self <- { self with current = ( ^ _10) ; };
assume { inv0 ( ^ _10) };
[#"../bdd.rs" 494 8 494 26] _0 <- ([#"../bdd.rs" 494 8 494 26] node0 _10 ([#"../bdd.rs" 494 18 494 19] x) ([#"../bdd.rs" 494 21 494 22] t) ([#"../bdd.rs" 494 24 494 25] f));
_10 <- any borrowed (Bdd_Context_Type.t_context);
@@ -3274,7 +3274,7 @@ module Bdd_Impl11_Not
[#"../bdd.rs" 510 20 510 26] childt <- ([#"../bdd.rs" 510 20 510 26] Bdd_Node_Type.if_childt (Bdd_Bdd_Type.bdd_0 x));
[#"../bdd.rs" 510 28 510 34] childf <- ([#"../bdd.rs" 510 28 510 34] Bdd_Node_Type.if_childf (Bdd_Bdd_Type.bdd_0 x));
[#"../bdd.rs" 511 29 511 45] _25 <- Borrow.borrow_mut ( * self);
- [#"../bdd.rs" 511 29 511 45] self <- { self with current = ^ _25 };
+ [#"../bdd.rs" 511 29 511 45] self <- { self with current = ( ^ _25) ; };
assume { inv1 ( ^ _25) };
[#"../bdd.rs" 511 29 511 45] childt1 <- ([#"../bdd.rs" 511 29 511 45] not' _25 ([#"../bdd.rs" 511 38 511 44] childt));
_25 <- any borrowed (Bdd_Context_Type.t_context);
@@ -3282,7 +3282,7 @@ module Bdd_Impl11_Not
}
BB9 {
[#"../bdd.rs" 508 20 508 33] _19 <- Borrow.borrow_mut ( * self);
- [#"../bdd.rs" 508 20 508 33] self <- { self with current = ^ _19 };
+ [#"../bdd.rs" 508 20 508 33] self <- { self with current = ( ^ _19) ; };
assume { inv1 ( ^ _19) };
[#"../bdd.rs" 508 20 508 33] r1 <- ([#"../bdd.rs" 508 20 508 33] false0 _19);
_19 <- any borrowed (Bdd_Context_Type.t_context);
@@ -3293,7 +3293,7 @@ module Bdd_Impl11_Not
}
BB11 {
[#"../bdd.rs" 509 21 509 33] _20 <- Borrow.borrow_mut ( * self);
- [#"../bdd.rs" 509 21 509 33] self <- { self with current = ^ _20 };
+ [#"../bdd.rs" 509 21 509 33] self <- { self with current = ( ^ _20) ; };
assume { inv1 ( ^ _20) };
[#"../bdd.rs" 509 21 509 33] r1 <- ([#"../bdd.rs" 509 21 509 33] true0 _20);
_20 <- any borrowed (Bdd_Context_Type.t_context);
@@ -3304,7 +3304,7 @@ module Bdd_Impl11_Not
}
BB13 {
[#"../bdd.rs" 512 29 512 45] _28 <- Borrow.borrow_mut ( * self);
- [#"../bdd.rs" 512 29 512 45] self <- { self with current = ^ _28 };
+ [#"../bdd.rs" 512 29 512 45] self <- { self with current = ( ^ _28) ; };
assume { inv1 ( ^ _28) };
[#"../bdd.rs" 512 29 512 45] childf1 <- ([#"../bdd.rs" 512 29 512 45] not' _28 ([#"../bdd.rs" 512 38 512 44] childf));
_28 <- any borrowed (Bdd_Context_Type.t_context);
@@ -3312,7 +3312,7 @@ module Bdd_Impl11_Not
}
BB14 {
[#"../bdd.rs" 513 16 513 44] _30 <- Borrow.borrow_mut ( * self);
- [#"../bdd.rs" 513 16 513 44] self <- { self with current = ^ _30 };
+ [#"../bdd.rs" 513 16 513 44] self <- { self with current = ( ^ _30) ; };
assume { inv1 ( ^ _30) };
[#"../bdd.rs" 513 16 513 44] r1 <- ([#"../bdd.rs" 513 16 513 44] node0 _30 ([#"../bdd.rs" 513 26 513 27] v) ([#"../bdd.rs" 513 29 513 35] childt1) ([#"../bdd.rs" 513 37 513 43] childf1));
_30 <- any borrowed (Bdd_Context_Type.t_context);
@@ -3322,8 +3322,8 @@ module Bdd_Impl11_Not
goto BB16
}
BB16 {
- [#"../bdd.rs" 516 8 516 31] _35 <- Borrow.borrow_mut (Bdd_Context_Type.context_not_memo ( * self));
- [#"../bdd.rs" 516 8 516 31] self <- { self with current = (let Bdd_Context_Type.C_Context x0 x1 x2 x3 x4 x5 = * self in Bdd_Context_Type.C_Context x0 x1 x2 ( ^ _35) x4 x5) };
+ [#"../bdd.rs" 516 8 516 31] _35 <- Borrow.borrow_final (Bdd_Context_Type.context_not_memo ( * self)) (Borrow.inherit_id (Borrow.get_id self) 4);
+ [#"../bdd.rs" 516 8 516 31] self <- { self with current = (let Bdd_Context_Type.C_Context x0 x1 x2 x3 x4 x5 = * self in Bdd_Context_Type.C_Context x0 x1 x2 ( ^ _35) x4 x5) ; };
[#"../bdd.rs" 516 8 516 31] _34 <- ([#"../bdd.rs" 516 8 516 31] add0 _35 ([#"../bdd.rs" 516 26 516 27] x) ([#"../bdd.rs" 516 29 516 30] r1));
_35 <- any borrowed (Bdd_Hashmap_MyHashMap_Type.t_myhashmap (Bdd_Bdd_Type.t_bdd) (Bdd_Bdd_Type.t_bdd));
goto BB17
@@ -3835,7 +3835,7 @@ module Bdd_Impl11_And
BB17 {
assume { resolve2 _23 };
[#"../bdd.rs" 534 39 534 52] _31 <- Borrow.borrow_mut ( * self);
- [#"../bdd.rs" 534 39 534 52] self <- { self with current = ^ _31 };
+ [#"../bdd.rs" 534 39 534 52] self <- { self with current = ( ^ _31) ; };
assume { inv1 ( ^ _31) };
[#"../bdd.rs" 534 39 534 52] r1 <- ([#"../bdd.rs" 534 39 534 52] false0 _31);
_31 <- any borrowed (Bdd_Context_Type.t_context);
@@ -3857,7 +3857,7 @@ module Bdd_Impl11_And
BB21 {
[#"../bdd.rs" 552 24 552 30] v <- ([#"../bdd.rs" 552 28 552 30] va);
[#"../bdd.rs" 553 33 553 59] _67 <- Borrow.borrow_mut ( * self);
- [#"../bdd.rs" 553 33 553 59] self <- { self with current = ^ _67 };
+ [#"../bdd.rs" 553 33 553 59] self <- { self with current = ( ^ _67) ; };
assume { inv1 ( ^ _67) };
[#"../bdd.rs" 553 33 553 59] _66 <- ([#"../bdd.rs" 553 33 553 59] and _67 ([#"../bdd.rs" 553 42 553 49] childta) ([#"../bdd.rs" 553 51 553 58] childtb));
_67 <- any borrowed (Bdd_Context_Type.t_context);
@@ -3869,7 +3869,7 @@ module Bdd_Impl11_And
BB23 {
[#"../bdd.rs" 542 24 542 30] v <- ([#"../bdd.rs" 542 28 542 30] vb);
[#"../bdd.rs" 543 33 543 53] _49 <- Borrow.borrow_mut ( * self);
- [#"../bdd.rs" 543 33 543 53] self <- { self with current = ^ _49 };
+ [#"../bdd.rs" 543 33 543 53] self <- { self with current = ( ^ _49) ; };
assume { inv1 ( ^ _49) };
[#"../bdd.rs" 543 33 543 53] _48 <- ([#"../bdd.rs" 543 33 543 53] and _49 ([#"../bdd.rs" 543 42 543 43] a) ([#"../bdd.rs" 543 45 543 52] childtb));
_49 <- any borrowed (Bdd_Context_Type.t_context);
@@ -3879,7 +3879,7 @@ module Bdd_Impl11_And
[#"../bdd.rs" 543 24 543 53] childt <- ([#"../bdd.rs" 543 24 543 53] _48);
[#"../bdd.rs" 543 24 543 53] _48 <- any Bdd_Bdd_Type.t_bdd;
[#"../bdd.rs" 544 33 544 53] _53 <- Borrow.borrow_mut ( * self);
- [#"../bdd.rs" 544 33 544 53] self <- { self with current = ^ _53 };
+ [#"../bdd.rs" 544 33 544 53] self <- { self with current = ( ^ _53) ; };
assume { inv1 ( ^ _53) };
[#"../bdd.rs" 544 33 544 53] _52 <- ([#"../bdd.rs" 544 33 544 53] and _53 ([#"../bdd.rs" 544 42 544 43] a) ([#"../bdd.rs" 544 45 544 52] childfb));
_53 <- any borrowed (Bdd_Context_Type.t_context);
@@ -3894,7 +3894,7 @@ module Bdd_Impl11_And
BB26 {
[#"../bdd.rs" 547 24 547 30] v <- ([#"../bdd.rs" 547 28 547 30] va);
[#"../bdd.rs" 548 33 548 53] _58 <- Borrow.borrow_mut ( * self);
- [#"../bdd.rs" 548 33 548 53] self <- { self with current = ^ _58 };
+ [#"../bdd.rs" 548 33 548 53] self <- { self with current = ( ^ _58) ; };
assume { inv1 ( ^ _58) };
[#"../bdd.rs" 548 33 548 53] _57 <- ([#"../bdd.rs" 548 33 548 53] and _58 ([#"../bdd.rs" 548 42 548 49] childta) ([#"../bdd.rs" 548 51 548 52] b));
_58 <- any borrowed (Bdd_Context_Type.t_context);
@@ -3904,7 +3904,7 @@ module Bdd_Impl11_And
[#"../bdd.rs" 548 24 548 53] childt <- ([#"../bdd.rs" 548 24 548 53] _57);
[#"../bdd.rs" 548 24 548 53] _57 <- any Bdd_Bdd_Type.t_bdd;
[#"../bdd.rs" 549 33 549 53] _62 <- Borrow.borrow_mut ( * self);
- [#"../bdd.rs" 549 33 549 53] self <- { self with current = ^ _62 };
+ [#"../bdd.rs" 549 33 549 53] self <- { self with current = ( ^ _62) ; };
assume { inv1 ( ^ _62) };
[#"../bdd.rs" 549 33 549 53] _61 <- ([#"../bdd.rs" 549 33 549 53] and _62 ([#"../bdd.rs" 549 42 549 49] childfa) ([#"../bdd.rs" 549 51 549 52] b));
_62 <- any borrowed (Bdd_Context_Type.t_context);
@@ -3920,7 +3920,7 @@ module Bdd_Impl11_And
[#"../bdd.rs" 553 24 553 59] childt <- ([#"../bdd.rs" 553 24 553 59] _66);
[#"../bdd.rs" 553 24 553 59] _66 <- any Bdd_Bdd_Type.t_bdd;
[#"../bdd.rs" 554 33 554 59] _71 <- Borrow.borrow_mut ( * self);
- [#"../bdd.rs" 554 33 554 59] self <- { self with current = ^ _71 };
+ [#"../bdd.rs" 554 33 554 59] self <- { self with current = ( ^ _71) ; };
assume { inv1 ( ^ _71) };
[#"../bdd.rs" 554 33 554 59] _70 <- ([#"../bdd.rs" 554 33 554 59] and _71 ([#"../bdd.rs" 554 42 554 49] childfa) ([#"../bdd.rs" 554 51 554 58] childfb));
_71 <- any borrowed (Bdd_Context_Type.t_context);
@@ -3934,7 +3934,7 @@ module Bdd_Impl11_And
}
BB31 {
[#"../bdd.rs" 557 16 557 44] _74 <- Borrow.borrow_mut ( * self);
- [#"../bdd.rs" 557 16 557 44] self <- { self with current = ^ _74 };
+ [#"../bdd.rs" 557 16 557 44] self <- { self with current = ( ^ _74) ; };
assume { inv1 ( ^ _74) };
[#"../bdd.rs" 557 16 557 44] r1 <- ([#"../bdd.rs" 557 16 557 44] node0 _74 ([#"../bdd.rs" 557 26 557 27] v) ([#"../bdd.rs" 557 29 557 35] childt) ([#"../bdd.rs" 557 37 557 43] childf));
_74 <- any borrowed (Bdd_Context_Type.t_context);
@@ -3944,8 +3944,8 @@ module Bdd_Impl11_And
goto BB33
}
BB33 {
- [#"../bdd.rs" 560 8 560 36] _79 <- Borrow.borrow_mut (Bdd_Context_Type.context_and_memo ( * self));
- [#"../bdd.rs" 560 8 560 36] self <- { self with current = (let Bdd_Context_Type.C_Context x0 x1 x2 x3 x4 x5 = * self in Bdd_Context_Type.C_Context x0 x1 x2 x3 ( ^ _79) x5) };
+ [#"../bdd.rs" 560 8 560 36] _79 <- Borrow.borrow_final (Bdd_Context_Type.context_and_memo ( * self)) (Borrow.inherit_id (Borrow.get_id self) 5);
+ [#"../bdd.rs" 560 8 560 36] self <- { self with current = (let Bdd_Context_Type.C_Context x0 x1 x2 x3 x4 x5 = * self in Bdd_Context_Type.C_Context x0 x1 x2 x3 ( ^ _79) x5) ; };
[#"../bdd.rs" 560 8 560 36] _78 <- ([#"../bdd.rs" 560 8 560 36] add0 _79 ([#"../bdd.rs" 560 26 560 32] (([#"../bdd.rs" 560 27 560 28] a), ([#"../bdd.rs" 560 30 560 31] b))) ([#"../bdd.rs" 560 34 560 35] r1));
_79 <- any borrowed (Bdd_Hashmap_MyHashMap_Type.t_myhashmap (Bdd_Bdd_Type.t_bdd, Bdd_Bdd_Type.t_bdd) (Bdd_Bdd_Type.t_bdd));
goto BB34
diff --git a/creusot/tests/should_succeed/bdd/why3session.xml b/creusot/tests/should_succeed/bdd/why3session.xml
index d90136f6ee..9a85a6b051 100644
--- a/creusot/tests/should_succeed/bdd/why3session.xml
+++ b/creusot/tests/should_succeed/bdd/why3session.xml
@@ -3,7 +3,6 @@
"http://why3.lri.fr/why3session.dtd">
-
@@ -20,7 +19,7 @@
-
+
@@ -35,7 +34,7 @@
-
+
@@ -55,7 +54,7 @@
-
+
@@ -70,7 +69,7 @@
-
+
@@ -85,13 +84,13 @@
-
+
-
+
@@ -103,7 +102,7 @@
-
+
@@ -118,7 +117,7 @@
-
+
@@ -145,10 +144,10 @@
-
+
-
+
@@ -159,34 +158,34 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -195,7 +194,7 @@
-
+
@@ -220,7 +219,7 @@
-
+
@@ -233,22 +232,22 @@
-
+
-
+
-
+
-
+
-
+
@@ -263,52 +262,52 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -319,7 +318,7 @@
-
+
@@ -328,18 +327,18 @@
-
+
-
+
-
+
-
+
@@ -348,45 +347,45 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -398,36 +397,36 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -436,38 +435,38 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -482,76 +481,76 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -565,7 +564,7 @@
-
+
@@ -576,16 +575,16 @@
-
+
-
+
-
+
@@ -596,13 +595,13 @@
-
+
-
+
-
+
@@ -617,13 +616,13 @@
-
+
-
+
-
+
@@ -634,16 +633,16 @@
-
+
-
+
-
+
-
+
@@ -654,14 +653,14 @@
-
+
-
+
@@ -676,13 +675,13 @@
-
+
-
+
-
+
@@ -695,12 +694,12 @@
-
+
-
+
@@ -711,26 +710,26 @@
-
+
-
+
-
+
-
+
-
+
-
+
@@ -739,10 +738,10 @@
-
+
-
+
@@ -771,7 +770,7 @@
-
+
diff --git a/creusot/tests/should_succeed/bdd/why3shapes.gz b/creusot/tests/should_succeed/bdd/why3shapes.gz
index 7a1d3eb2bf..15d901792a 100644
Binary files a/creusot/tests/should_succeed/bdd/why3shapes.gz and b/creusot/tests/should_succeed/bdd/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/binary_search/why3session.xml b/creusot/tests/should_succeed/binary_search/why3session.xml
index 13f3beb600..7084417892 100644
--- a/creusot/tests/should_succeed/binary_search/why3session.xml
+++ b/creusot/tests/should_succeed/binary_search/why3session.xml
@@ -12,7 +12,7 @@
-
+
@@ -39,7 +39,7 @@
-
+
@@ -51,10 +51,10 @@
-
+
-
+
@@ -72,25 +72,25 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/creusot/tests/should_succeed/binary_search/why3shapes.gz b/creusot/tests/should_succeed/binary_search/why3shapes.gz
index f42c7a6580..211dfdf7b9 100644
Binary files a/creusot/tests/should_succeed/binary_search/why3shapes.gz and b/creusot/tests/should_succeed/binary_search/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/bug/206/why3shapes.gz b/creusot/tests/should_succeed/bug/206/why3shapes.gz
index f8058d5a67..f88d2db272 100644
Binary files a/creusot/tests/should_succeed/bug/206/why3shapes.gz and b/creusot/tests/should_succeed/bug/206/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/bug/463/why3shapes.gz b/creusot/tests/should_succeed/bug/463/why3shapes.gz
index f9f0051014..f574dcfb8b 100644
Binary files a/creusot/tests/should_succeed/bug/463/why3shapes.gz and b/creusot/tests/should_succeed/bug/463/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/bug/486.mlcfg b/creusot/tests/should_succeed/bug/486.mlcfg
index 90d95599de..70a5ebf5ee 100644
--- a/creusot/tests/should_succeed/bug/486.mlcfg
+++ b/creusot/tests/should_succeed/bug/486.mlcfg
@@ -25,7 +25,7 @@ module C486_Test
goto BB0
}
BB0 {
- [#"../486.rs" 8 4 8 12] x <- (let C486_HasMutRef_Type.C_HasMutRef x0 = x in C486_HasMutRef_Type.C_HasMutRef ({ (C486_HasMutRef_Type.hasmutref_0 x) with current = ([#"../486.rs" 8 4 8 12] [#"../486.rs" 8 11 8 12] (5 : uint32)) }));
+ [#"../486.rs" 8 4 8 12] x <- (let C486_HasMutRef_Type.C_HasMutRef x0 = x in C486_HasMutRef_Type.C_HasMutRef ({ (C486_HasMutRef_Type.hasmutref_0 x) with current = ([#"../486.rs" 8 4 8 12] [#"../486.rs" 8 11 8 12] (5 : uint32)) ; }));
[#"../486.rs" 8 4 8 12] _0 <- ([#"../486.rs" 8 4 8 12] ());
return _0
}
diff --git a/creusot/tests/should_succeed/bug/552/why3shapes.gz b/creusot/tests/should_succeed/bug/552/why3shapes.gz
index 46d82e8869..f3ce2bc5c7 100644
Binary files a/creusot/tests/should_succeed/bug/552/why3shapes.gz and b/creusot/tests/should_succeed/bug/552/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/bug/682.mlcfg b/creusot/tests/should_succeed/bug/682.mlcfg
index 007abf90b6..39e923a575 100644
--- a/creusot/tests/should_succeed/bug/682.mlcfg
+++ b/creusot/tests/should_succeed/bug/682.mlcfg
@@ -21,7 +21,7 @@ module C682_AddSome
goto BB0
}
BB0 {
- [#"../682.rs" 7 4 7 11] a <- { a with current = ([#"../682.rs" 7 4 7 11] * a + ([#"../682.rs" 7 10 7 11] [#"../682.rs" 7 10 7 11] (1 : uint64))) };
+ [#"../682.rs" 7 4 7 11] a <- { a with current = ([#"../682.rs" 7 4 7 11] * a + ([#"../682.rs" 7 10 7 11] [#"../682.rs" 7 10 7 11] (1 : uint64))) ; };
assume { resolve0 a };
[#"../682.rs" 6 25 8 1] _0 <- ([#"../682.rs" 6 25 8 1] ());
return _0
@@ -64,8 +64,8 @@ module C682_Foo
goto BB1
}
BB1 {
- [#"../682.rs" 14 13 14 14] _7 <- Borrow.borrow_mut ( * a);
- [#"../682.rs" 14 13 14 14] a <- { a with current = ^ _7 };
+ [#"../682.rs" 14 13 14 14] _7 <- Borrow.borrow_final ( * a) (Borrow.get_id a);
+ [#"../682.rs" 14 13 14 14] a <- { a with current = ( ^ _7) ; };
[#"../682.rs" 14 4 14 15] _6 <- ([#"../682.rs" 14 4 14 15] add_some0 _7);
_7 <- any borrowed uint64;
goto BB2
diff --git a/creusot/tests/should_succeed/bug/682/why3session.xml b/creusot/tests/should_succeed/bug/682/why3session.xml
index 8aa98ffc15..73005100ee 100644
--- a/creusot/tests/should_succeed/bug/682/why3session.xml
+++ b/creusot/tests/should_succeed/bug/682/why3session.xml
@@ -7,12 +7,12 @@
-
+
-
+
diff --git a/creusot/tests/should_succeed/bug/682/why3shapes.gz b/creusot/tests/should_succeed/bug/682/why3shapes.gz
index cd3df716c2..292c1a9c43 100644
Binary files a/creusot/tests/should_succeed/bug/682/why3shapes.gz and b/creusot/tests/should_succeed/bug/682/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/bug/766.mlcfg b/creusot/tests/should_succeed/bug/766.mlcfg
index 4b38cb6a8a..66c3c32bf6 100644
--- a/creusot/tests/should_succeed/bug/766.mlcfg
+++ b/creusot/tests/should_succeed/bug/766.mlcfg
@@ -59,8 +59,8 @@ module C766_Trait_Goo
goto BB0
}
BB0 {
- [#"../766.rs" 11 8 11 16] _2 <- Borrow.borrow_mut ( * self);
- [#"../766.rs" 11 8 11 16] self <- { self with current = ^ _2 };
+ [#"../766.rs" 11 8 11 16] _2 <- Borrow.borrow_final ( * self) (Borrow.get_id self);
+ [#"../766.rs" 11 8 11 16] self <- { self with current = ( ^ _2) ; };
assume { inv0 ( ^ _2) };
[#"../766.rs" 11 8 11 16] _0 <- ([#"../766.rs" 11 8 11 16] f0 _2);
_2 <- any borrowed self;
diff --git a/creusot/tests/should_succeed/bug/874/why3session.xml b/creusot/tests/should_succeed/bug/874/why3session.xml
index f205703b71..1ce4f18d2e 100644
--- a/creusot/tests/should_succeed/bug/874/why3session.xml
+++ b/creusot/tests/should_succeed/bug/874/why3session.xml
@@ -7,7 +7,7 @@
-
+
diff --git a/creusot/tests/should_succeed/bug/874/why3shapes.gz b/creusot/tests/should_succeed/bug/874/why3shapes.gz
index e8d97f2127..0856ad9c87 100644
Binary files a/creusot/tests/should_succeed/bug/874/why3shapes.gz and b/creusot/tests/should_succeed/bug/874/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/bug/922.mlcfg b/creusot/tests/should_succeed/bug/922.mlcfg
index 916bff1a1e..827e4a150f 100644
--- a/creusot/tests/should_succeed/bug/922.mlcfg
+++ b/creusot/tests/should_succeed/bug/922.mlcfg
@@ -35,12 +35,12 @@ module C922_G
goto BB0
}
BB0 {
- [#"../922.rs" 6 4 6 17] _4 <- Borrow.borrow_mut ( * (let (_, a) = let (a, _) = x in a in a));
- [#"../922.rs" 6 4 6 17] x <- (let (x0, x1) = x in ((let (x0, x1) = let (a, _) = x in a in (x0, { (let (_, a) = let (a, _) = x in a in a) with current = ^ _4 })), x1));
- [#"../922.rs" 6 4 6 17] _2 <- Borrow.borrow_mut ( * _4);
- [#"../922.rs" 6 4 6 17] _4 <- { _4 with current = ^ _2 };
- [#"../922.rs" 6 4 6 17] _0 <- Borrow.borrow_mut ( * _2);
- [#"../922.rs" 6 4 6 17] _2 <- { _2 with current = ^ _0 };
+ [#"../922.rs" 6 4 6 17] _4 <- Borrow.borrow_final ( * (let (_, a) = let (a, _) = x in a in a)) (Borrow.get_id (let (_, a) = let (a, _) = x in a in a));
+ [#"../922.rs" 6 4 6 17] x <- (let (x0, x1) = x in ((let (x0, x1) = let (a, _) = x in a in (x0, { (let (_, a) = let (a, _) = x in a in a) with current = ( ^ _4) ; })), x1));
+ [#"../922.rs" 6 4 6 17] _2 <- Borrow.borrow_final ( * _4) (Borrow.get_id _4);
+ [#"../922.rs" 6 4 6 17] _4 <- { _4 with current = ( ^ _2) ; };
+ [#"../922.rs" 6 4 6 17] _0 <- Borrow.borrow_final ( * _2) (Borrow.get_id _2);
+ [#"../922.rs" 6 4 6 17] _2 <- { _2 with current = ( ^ _0) ; };
assume { resolve0 _4 };
assume { resolve0 _2 };
assume { resolve1 x };
@@ -77,11 +77,11 @@ module C922_F1
}
BB0 {
[#"../922.rs" 13 4 13 13] _6 <- Borrow.borrow_mut ( * (let (_, a) = * b in a));
- [#"../922.rs" 13 4 13 13] b <- { b with current = (let (x0, x1) = * b in (x0, { (let (_, a) = * b in a) with current = ^ _6 })) };
- [#"../922.rs" 13 4 13 13] _2 <- Borrow.borrow_mut ( * _6);
- [#"../922.rs" 13 4 13 13] _6 <- { _6 with current = ^ _2 };
- [#"../922.rs" 13 4 13 13] _0 <- Borrow.borrow_mut ( * _2);
- [#"../922.rs" 13 4 13 13] _2 <- { _2 with current = ^ _0 };
+ [#"../922.rs" 13 4 13 13] b <- { b with current = (let (x0, x1) = * b in (x0, { (let (_, a) = * b in a) with current = ( ^ _6) ; })) ; };
+ [#"../922.rs" 13 4 13 13] _2 <- Borrow.borrow_final ( * _6) (Borrow.get_id _6);
+ [#"../922.rs" 13 4 13 13] _6 <- { _6 with current = ( ^ _2) ; };
+ [#"../922.rs" 13 4 13 13] _0 <- Borrow.borrow_final ( * _2) (Borrow.get_id _2);
+ [#"../922.rs" 13 4 13 13] _2 <- { _2 with current = ( ^ _0) ; };
assume { resolve0 _6 };
assume { resolve0 _2 };
assume { resolve1 b };
@@ -118,11 +118,11 @@ module C922_F2
}
BB0 {
[#"../922.rs" 20 4 20 14] _6 <- Borrow.borrow_mut ( * (let (_, a) = * x0 in a));
- [#"../922.rs" 20 4 20 14] x0 <- { x0 with current = (let (x1, x2) = * x0 in (x1, { (let (_, a) = * x0 in a) with current = ^ _6 })) };
- [#"../922.rs" 20 4 20 14] _2 <- Borrow.borrow_mut ( * _6);
- [#"../922.rs" 20 4 20 14] _6 <- { _6 with current = ^ _2 };
- [#"../922.rs" 20 4 20 14] _0 <- Borrow.borrow_mut ( * _2);
- [#"../922.rs" 20 4 20 14] _2 <- { _2 with current = ^ _0 };
+ [#"../922.rs" 20 4 20 14] x0 <- { x0 with current = (let (x1, x2) = * x0 in (x1, { (let (_, a) = * x0 in a) with current = ( ^ _6) ; })) ; };
+ [#"../922.rs" 20 4 20 14] _2 <- Borrow.borrow_final ( * _6) (Borrow.get_id _6);
+ [#"../922.rs" 20 4 20 14] _6 <- { _6 with current = ( ^ _2) ; };
+ [#"../922.rs" 20 4 20 14] _0 <- Borrow.borrow_final ( * _2) (Borrow.get_id _2);
+ [#"../922.rs" 20 4 20 14] _2 <- { _2 with current = ( ^ _0) ; };
assume { resolve0 _6 };
assume { resolve0 _2 };
assume { resolve1 x0 };
@@ -159,11 +159,11 @@ module C922_F3
}
BB0 {
[#"../922.rs" 27 4 27 14] _6 <- Borrow.borrow_mut ( * (let (_, a) = * x1 in a));
- [#"../922.rs" 27 4 27 14] x1 <- { x1 with current = (let (x0, x2) = * x1 in (x0, { (let (_, a) = * x1 in a) with current = ^ _6 })) };
- [#"../922.rs" 27 4 27 14] _2 <- Borrow.borrow_mut ( * _6);
- [#"../922.rs" 27 4 27 14] _6 <- { _6 with current = ^ _2 };
- [#"../922.rs" 27 4 27 14] _0 <- Borrow.borrow_mut ( * _2);
- [#"../922.rs" 27 4 27 14] _2 <- { _2 with current = ^ _0 };
+ [#"../922.rs" 27 4 27 14] x1 <- { x1 with current = (let (x0, x2) = * x1 in (x0, { (let (_, a) = * x1 in a) with current = ( ^ _6) ; })) ; };
+ [#"../922.rs" 27 4 27 14] _2 <- Borrow.borrow_final ( * _6) (Borrow.get_id _6);
+ [#"../922.rs" 27 4 27 14] _6 <- { _6 with current = ( ^ _2) ; };
+ [#"../922.rs" 27 4 27 14] _0 <- Borrow.borrow_final ( * _2) (Borrow.get_id _2);
+ [#"../922.rs" 27 4 27 14] _2 <- { _2 with current = ( ^ _0) ; };
assume { resolve0 _6 };
assume { resolve0 _2 };
assume { resolve1 x1 };
@@ -200,11 +200,11 @@ module C922_F4
}
BB0 {
[#"../922.rs" 34 4 34 14] _6 <- Borrow.borrow_mut ( * (let (_, a) = * x2 in a));
- [#"../922.rs" 34 4 34 14] x2 <- { x2 with current = (let (x0, x1) = * x2 in (x0, { (let (_, a) = * x2 in a) with current = ^ _6 })) };
- [#"../922.rs" 34 4 34 14] _2 <- Borrow.borrow_mut ( * _6);
- [#"../922.rs" 34 4 34 14] _6 <- { _6 with current = ^ _2 };
- [#"../922.rs" 34 4 34 14] _0 <- Borrow.borrow_mut ( * _2);
- [#"../922.rs" 34 4 34 14] _2 <- { _2 with current = ^ _0 };
+ [#"../922.rs" 34 4 34 14] x2 <- { x2 with current = (let (x0, x1) = * x2 in (x0, { (let (_, a) = * x2 in a) with current = ( ^ _6) ; })) ; };
+ [#"../922.rs" 34 4 34 14] _2 <- Borrow.borrow_final ( * _6) (Borrow.get_id _6);
+ [#"../922.rs" 34 4 34 14] _6 <- { _6 with current = ( ^ _2) ; };
+ [#"../922.rs" 34 4 34 14] _0 <- Borrow.borrow_final ( * _2) (Borrow.get_id _2);
+ [#"../922.rs" 34 4 34 14] _2 <- { _2 with current = ( ^ _0) ; };
assume { resolve0 _6 };
assume { resolve0 _2 };
assume { resolve1 x2 };
diff --git a/creusot/tests/should_succeed/bug/922/why3session.xml b/creusot/tests/should_succeed/bug/922/why3session.xml
index 2dc85f90be..11e61edc7f 100644
--- a/creusot/tests/should_succeed/bug/922/why3session.xml
+++ b/creusot/tests/should_succeed/bug/922/why3session.xml
@@ -8,27 +8,27 @@
-
+
-
+
-
+
-
+
-
+
diff --git a/creusot/tests/should_succeed/bug/922/why3shapes.gz b/creusot/tests/should_succeed/bug/922/why3shapes.gz
index 512aa00b63..d7f9148129 100644
Binary files a/creusot/tests/should_succeed/bug/922/why3shapes.gz and b/creusot/tests/should_succeed/bug/922/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/bug/box_borrow_resolve.mlcfg b/creusot/tests/should_succeed/bug/box_borrow_resolve.mlcfg
index 42d88cc4fc..e7b698b8c0 100644
--- a/creusot/tests/should_succeed/bug/box_borrow_resolve.mlcfg
+++ b/creusot/tests/should_succeed/bug/box_borrow_resolve.mlcfg
@@ -25,12 +25,12 @@ module BoxBorrowResolve_BorrowInBox
goto BB0
}
BB0 {
- [#"../box_borrow_resolve.rs" 7 4 7 12] _4 <- Borrow.borrow_mut ( * x);
- [#"../box_borrow_resolve.rs" 7 4 7 12] x <- { x with current = ^ _4 };
- [#"../box_borrow_resolve.rs" 7 4 7 12] _2 <- Borrow.borrow_mut ( * _4);
- [#"../box_borrow_resolve.rs" 7 4 7 12] _4 <- { _4 with current = ^ _2 };
- [#"../box_borrow_resolve.rs" 7 4 7 12] _0 <- Borrow.borrow_mut ( * _2);
- [#"../box_borrow_resolve.rs" 7 4 7 12] _2 <- { _2 with current = ^ _0 };
+ [#"../box_borrow_resolve.rs" 7 4 7 12] _4 <- Borrow.borrow_final ( * x) (Borrow.get_id x);
+ [#"../box_borrow_resolve.rs" 7 4 7 12] x <- { x with current = ( ^ _4) ; };
+ [#"../box_borrow_resolve.rs" 7 4 7 12] _2 <- Borrow.borrow_final ( * _4) (Borrow.get_id _4);
+ [#"../box_borrow_resolve.rs" 7 4 7 12] _4 <- { _4 with current = ( ^ _2) ; };
+ [#"../box_borrow_resolve.rs" 7 4 7 12] _0 <- Borrow.borrow_final ( * _2) (Borrow.get_id _2);
+ [#"../box_borrow_resolve.rs" 7 4 7 12] _2 <- { _2 with current = ( ^ _0) ; };
assume { resolve0 _4 };
assume { resolve0 _2 };
goto BB1
diff --git a/creusot/tests/should_succeed/bug/box_borrow_resolve/why3session.xml b/creusot/tests/should_succeed/bug/box_borrow_resolve/why3session.xml
index f1737c6c0f..1c0afe4b1e 100644
--- a/creusot/tests/should_succeed/bug/box_borrow_resolve/why3session.xml
+++ b/creusot/tests/should_succeed/bug/box_borrow_resolve/why3session.xml
@@ -7,7 +7,7 @@
-
+
diff --git a/creusot/tests/should_succeed/bug/box_borrow_resolve/why3shapes.gz b/creusot/tests/should_succeed/bug/box_borrow_resolve/why3shapes.gz
index bf694d0c2a..1efb81fa4b 100644
Binary files a/creusot/tests/should_succeed/bug/box_borrow_resolve/why3shapes.gz and b/creusot/tests/should_succeed/bug/box_borrow_resolve/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/bug/eq_panic/why3shapes.gz b/creusot/tests/should_succeed/bug/eq_panic/why3shapes.gz
index 1320ca5444..9f6b47c79a 100644
Binary files a/creusot/tests/should_succeed/bug/eq_panic/why3shapes.gz and b/creusot/tests/should_succeed/bug/eq_panic/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/bug/two_phase.mlcfg b/creusot/tests/should_succeed/bug/two_phase.mlcfg
index bcdb705ee9..88467d28a4 100644
--- a/creusot/tests/should_succeed/bug/two_phase.mlcfg
+++ b/creusot/tests/should_succeed/bug/two_phase.mlcfg
@@ -153,8 +153,8 @@ module TwoPhase_Test
goto BB0
}
BB0 {
- [#"../two_phase.rs" 7 4 7 19] _4 <- Borrow.borrow_mut ( * v);
- [#"../two_phase.rs" 7 4 7 19] v <- { v with current = ^ _4 };
+ [#"../two_phase.rs" 7 4 7 19] _4 <- Borrow.borrow_final ( * v) (Borrow.get_id v);
+ [#"../two_phase.rs" 7 4 7 19] v <- { v with current = ( ^ _4) ; };
[#"../two_phase.rs" 7 11 7 18] _5 <- ([#"../two_phase.rs" 7 11 7 18] len0 ([#"../two_phase.rs" 7 11 7 18] * _4));
goto BB1
}
diff --git a/creusot/tests/should_succeed/bug/two_phase/why3session.xml b/creusot/tests/should_succeed/bug/two_phase/why3session.xml
index 310ef881c9..b5a27314b7 100644
--- a/creusot/tests/should_succeed/bug/two_phase/why3session.xml
+++ b/creusot/tests/should_succeed/bug/two_phase/why3session.xml
@@ -7,7 +7,7 @@
-
+
diff --git a/creusot/tests/should_succeed/bug/two_phase/why3shapes.gz b/creusot/tests/should_succeed/bug/two_phase/why3shapes.gz
index a66f93e58f..ea59355ec9 100644
Binary files a/creusot/tests/should_succeed/bug/two_phase/why3shapes.gz and b/creusot/tests/should_succeed/bug/two_phase/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/cell/01/why3session.xml b/creusot/tests/should_succeed/cell/01/why3session.xml
index 61f1620090..ae42d1aaa4 100644
--- a/creusot/tests/should_succeed/cell/01/why3session.xml
+++ b/creusot/tests/should_succeed/cell/01/why3session.xml
@@ -7,7 +7,7 @@
-
+
diff --git a/creusot/tests/should_succeed/cell/01/why3shapes.gz b/creusot/tests/should_succeed/cell/01/why3shapes.gz
index 910592b25d..eb2505f72b 100644
Binary files a/creusot/tests/should_succeed/cell/01/why3shapes.gz and b/creusot/tests/should_succeed/cell/01/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/cell/02/why3session.xml b/creusot/tests/should_succeed/cell/02/why3session.xml
index 2e8740b933..0d8b3d7fc0 100644
--- a/creusot/tests/should_succeed/cell/02/why3session.xml
+++ b/creusot/tests/should_succeed/cell/02/why3session.xml
@@ -4,13 +4,12 @@
-
-
+
@@ -33,7 +32,7 @@
-
+
@@ -60,7 +59,7 @@
-
+
@@ -81,10 +80,10 @@
-
+
-
+
diff --git a/creusot/tests/should_succeed/cell/02/why3shapes.gz b/creusot/tests/should_succeed/cell/02/why3shapes.gz
index ccbf1b36c7..f37d7c7d57 100644
Binary files a/creusot/tests/should_succeed/cell/02/why3shapes.gz and b/creusot/tests/should_succeed/cell/02/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/checked_ops/why3session.xml b/creusot/tests/should_succeed/checked_ops/why3session.xml
index 300c172854..60c211c606 100644
--- a/creusot/tests/should_succeed/checked_ops/why3session.xml
+++ b/creusot/tests/should_succeed/checked_ops/why3session.xml
@@ -14,7 +14,7 @@
-
+
@@ -29,12 +29,12 @@
-
+
-
+
@@ -49,7 +49,7 @@
-
+
@@ -79,12 +79,12 @@
-
+
-
+
@@ -104,17 +104,17 @@
-
+
-
+
-
+
@@ -129,7 +129,7 @@
-
+
diff --git a/creusot/tests/should_succeed/checked_ops/why3shapes.gz b/creusot/tests/should_succeed/checked_ops/why3shapes.gz
index dc7c6ad16a..1f5e2380fa 100644
Binary files a/creusot/tests/should_succeed/checked_ops/why3shapes.gz and b/creusot/tests/should_succeed/checked_ops/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/clones/03/why3session.xml b/creusot/tests/should_succeed/clones/03/why3session.xml
index d8f0ab8628..7f65a0b9d0 100644
--- a/creusot/tests/should_succeed/clones/03/why3session.xml
+++ b/creusot/tests/should_succeed/clones/03/why3session.xml
@@ -2,23 +2,23 @@
-
-
+
+
-
+
-
+
-
+
diff --git a/creusot/tests/should_succeed/closures/01_basic.mlcfg b/creusot/tests/should_succeed/closures/01_basic.mlcfg
index ac4d1f246a..203254292a 100644
--- a/creusot/tests/should_succeed/closures/01_basic.mlcfg
+++ b/creusot/tests/should_succeed/closures/01_basic.mlcfg
@@ -166,7 +166,7 @@ module C01Basic_MoveClosure_Closure0
goto BB0
}
BB0 {
- [#"../01_basic.rs" 20 8 20 15] _1 <- { _1 with current = (let C01Basic_MoveClosure_Closure0.C01Basic_MoveClosure_Closure0 x0 = * _1 in C01Basic_MoveClosure_Closure0.C01Basic_MoveClosure_Closure0 ({ (field_00 ( * _1)) with current = ([#"../01_basic.rs" 20 8 20 15] * field_00 ( * _1) + ([#"../01_basic.rs" 20 14 20 15] [#"../01_basic.rs" 20 14 20 15] (1 : int32))) })) };
+ [#"../01_basic.rs" 20 8 20 15] _1 <- { _1 with current = (let C01Basic_MoveClosure_Closure0.C01Basic_MoveClosure_Closure0 x0 = * _1 in C01Basic_MoveClosure_Closure0.C01Basic_MoveClosure_Closure0 ({ (field_00 ( * _1)) with current = ([#"../01_basic.rs" 20 8 20 15] * field_00 ( * _1) + ([#"../01_basic.rs" 20 14 20 15] [#"../01_basic.rs" 20 14 20 15] (1 : int32))) ; })) ; };
assume { resolve0 _1 };
[#"../01_basic.rs" 19 24 21 5] _0 <- ([#"../01_basic.rs" 19 24 21 5] ());
return _0
@@ -310,9 +310,9 @@ module C01Basic_MoveMut_Closure0
goto BB1
}
BB1 {
- [#"../01_basic.rs" 36 12 36 21] _2 <- Borrow.borrow_mut ( * _3);
- [#"../01_basic.rs" 36 12 36 21] _3 <- { _3 with current = ^ _2 };
- [#"../01_basic.rs" 36 8 36 21] _1 <- { _1 with current = (let C01Basic_MoveMut_Closure0.C01Basic_MoveMut_Closure0 x0 = * _1 in C01Basic_MoveMut_Closure0.C01Basic_MoveMut_Closure0 ([#"../01_basic.rs" 36 8 36 21] _2)) };
+ [#"../01_basic.rs" 36 12 36 21] _2 <- Borrow.borrow_final ( * _3) (Borrow.get_id _3);
+ [#"../01_basic.rs" 36 12 36 21] _3 <- { _3 with current = ( ^ _2) ; };
+ [#"../01_basic.rs" 36 8 36 21] _1 <- { _1 with current = (let C01Basic_MoveMut_Closure0.C01Basic_MoveMut_Closure0 x0 = * _1 in C01Basic_MoveMut_Closure0.C01Basic_MoveMut_Closure0 ([#"../01_basic.rs" 36 8 36 21] _2)) ; };
[#"../01_basic.rs" 36 8 36 21] _2 <- any borrowed uint32;
assume { resolve0 (field_00 ( * _1)) };
assume { resolve1 _1 };
diff --git a/creusot/tests/should_succeed/closures/05_map.mlcfg b/creusot/tests/should_succeed/closures/05_map.mlcfg
index 075795ce88..48db64c207 100644
--- a/creusot/tests/should_succeed/closures/05_map.mlcfg
+++ b/creusot/tests/should_succeed/closures/05_map.mlcfg
@@ -234,8 +234,8 @@ module C05Map_Impl0_Next
goto BB0
}
BB0 {
- [#"../05_map.rs" 18 14 18 30] _3 <- Borrow.borrow_mut (C05Map_Map_Type.map_iter ( * self));
- [#"../05_map.rs" 18 14 18 30] self <- { self with current = (let C05Map_Map_Type.C_Map x0 x1 = * self in C05Map_Map_Type.C_Map ( ^ _3) x1) };
+ [#"../05_map.rs" 18 14 18 30] _3 <- Borrow.borrow_final (C05Map_Map_Type.map_iter ( * self)) (Borrow.inherit_id (Borrow.get_id self) 1);
+ [#"../05_map.rs" 18 14 18 30] self <- { self with current = (let C05Map_Map_Type.C_Map x0 x1 = * self in C05Map_Map_Type.C_Map ( ^ _3) x1) ; };
assume { inv0 ( ^ _3) };
[#"../05_map.rs" 18 14 18 30] _2 <- ([#"../05_map.rs" 18 14 18 30] next0 _3);
_3 <- any borrowed i;
diff --git a/creusot/tests/should_succeed/closures/06_fn_specs/why3session.xml b/creusot/tests/should_succeed/closures/06_fn_specs/why3session.xml
index e2e4eada85..8e467750a6 100644
--- a/creusot/tests/should_succeed/closures/06_fn_specs/why3session.xml
+++ b/creusot/tests/should_succeed/closures/06_fn_specs/why3session.xml
@@ -18,7 +18,7 @@
-
+
@@ -33,7 +33,7 @@
-
+
diff --git a/creusot/tests/should_succeed/closures/06_fn_specs/why3shapes.gz b/creusot/tests/should_succeed/closures/06_fn_specs/why3shapes.gz
index 4b1bcbfd92..ca479f2d34 100644
Binary files a/creusot/tests/should_succeed/closures/06_fn_specs/why3shapes.gz and b/creusot/tests/should_succeed/closures/06_fn_specs/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/closures/07_mutable_capture.mlcfg b/creusot/tests/should_succeed/closures/07_mutable_capture.mlcfg
index b96fc0e523..471b5e1219 100644
--- a/creusot/tests/should_succeed/closures/07_mutable_capture.mlcfg
+++ b/creusot/tests/should_succeed/closures/07_mutable_capture.mlcfg
@@ -47,7 +47,7 @@ module C07MutableCapture_TestFnmut_Closure1
goto BB0
}
BB0 {
- [#"../07_mutable_capture.rs" 10 12 10 18] _1 <- { _1 with current = (let C07MutableCapture_TestFnmut_Closure1.C07MutableCapture_TestFnmut_Closure1 x0 = * _1 in C07MutableCapture_TestFnmut_Closure1.C07MutableCapture_TestFnmut_Closure1 ({ (field_00 ( * _1)) with current = ([#"../07_mutable_capture.rs" 10 12 10 18] * field_00 ( * _1) + ([#"../07_mutable_capture.rs" 10 17 10 18] [#"../07_mutable_capture.rs" 10 17 10 18] (1 : uint32))) })) };
+ [#"../07_mutable_capture.rs" 10 12 10 18] _1 <- { _1 with current = (let C07MutableCapture_TestFnmut_Closure1.C07MutableCapture_TestFnmut_Closure1 x0 = * _1 in C07MutableCapture_TestFnmut_Closure1.C07MutableCapture_TestFnmut_Closure1 ({ (field_00 ( * _1)) with current = ([#"../07_mutable_capture.rs" 10 12 10 18] * field_00 ( * _1) + ([#"../07_mutable_capture.rs" 10 17 10 18] [#"../07_mutable_capture.rs" 10 17 10 18] (1 : uint32))) ; })) ; };
assume { resolve0 _1 };
[#"../07_mutable_capture.rs" 11 12 11 13] res1 <- ([#"../07_mutable_capture.rs" 11 12 11 13] [#"../07_mutable_capture.rs" 11 12 11 13] (5 : int32));
[#"../07_mutable_capture.rs" 7 8 7 35] res <- ([#"../07_mutable_capture.rs" 7 8 7 35] res1);
diff --git a/creusot/tests/should_succeed/closures/07_mutable_capture/why3session.xml b/creusot/tests/should_succeed/closures/07_mutable_capture/why3session.xml
index 766856ad76..403701b872 100644
--- a/creusot/tests/should_succeed/closures/07_mutable_capture/why3session.xml
+++ b/creusot/tests/should_succeed/closures/07_mutable_capture/why3session.xml
@@ -7,12 +7,12 @@
-
+
-
+
diff --git a/creusot/tests/should_succeed/closures/07_mutable_capture/why3shapes.gz b/creusot/tests/should_succeed/closures/07_mutable_capture/why3shapes.gz
index 7db3bdbbcf..463db918c5 100644
Binary files a/creusot/tests/should_succeed/closures/07_mutable_capture/why3shapes.gz and b/creusot/tests/should_succeed/closures/07_mutable_capture/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/constrained_types/why3shapes.gz b/creusot/tests/should_succeed/constrained_types/why3shapes.gz
index 92b7a2353b..65469d7dc0 100644
Binary files a/creusot/tests/should_succeed/constrained_types/why3shapes.gz and b/creusot/tests/should_succeed/constrained_types/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/drop_pair.mlcfg b/creusot/tests/should_succeed/drop_pair.mlcfg
index ff80c6ccbf..d2e9a5a3b1 100644
--- a/creusot/tests/should_succeed/drop_pair.mlcfg
+++ b/creusot/tests/should_succeed/drop_pair.mlcfg
@@ -81,8 +81,8 @@ module DropPair_Drop
}
BB0 {
assume { resolve0 _x };
- [#"../drop_pair.rs" 16 9 16 10] _3 <- Borrow.borrow_mut ( * y);
- [#"../drop_pair.rs" 16 9 16 10] y <- { y with current = ^ _3 };
+ [#"../drop_pair.rs" 16 9 16 10] _3 <- Borrow.borrow_final ( * y) (Borrow.get_id y);
+ [#"../drop_pair.rs" 16 9 16 10] y <- { y with current = ( ^ _3) ; };
[#"../drop_pair.rs" 16 4 16 10] _x <- ([#"../drop_pair.rs" 16 4 16 10] _3);
[#"../drop_pair.rs" 16 4 16 10] _3 <- any borrowed uint32;
assume { resolve0 _x };
diff --git a/creusot/tests/should_succeed/drop_pair/why3shapes.gz b/creusot/tests/should_succeed/drop_pair/why3shapes.gz
index 1e6348c91e..c4d03d63e0 100644
Binary files a/creusot/tests/should_succeed/drop_pair/why3shapes.gz and b/creusot/tests/should_succeed/drop_pair/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/filter_positive.mlcfg b/creusot/tests/should_succeed/filter_positive.mlcfg
index b22ab0df12..4134232ebc 100644
--- a/creusot/tests/should_succeed/filter_positive.mlcfg
+++ b/creusot/tests/should_succeed/filter_positive.mlcfg
@@ -441,7 +441,7 @@ module FilterPositive_M
goto BB24
}
BB24 {
- [#"../filter_positive.rs" 113 12 113 27] _46 <- { _46 with current = ([#"../filter_positive.rs" 113 23 113 27] _43) };
+ [#"../filter_positive.rs" 113 12 113 27] _46 <- { _46 with current = ([#"../filter_positive.rs" 113 23 113 27] _43) ; };
assume { resolve1 _46 };
[#"../filter_positive.rs" 114 12 114 22] count <- ([#"../filter_positive.rs" 114 12 114 22] count + ([#"../filter_positive.rs" 114 21 114 22] [#"../filter_positive.rs" 114 21 114 22] (1 : usize)));
[#"../filter_positive.rs" 103 20 115 9] _32 <- ([#"../filter_positive.rs" 103 20 115 9] ());
diff --git a/creusot/tests/should_succeed/filter_positive/why3session.xml b/creusot/tests/should_succeed/filter_positive/why3session.xml
index 62d0a90b6d..4d9744aea9 100644
--- a/creusot/tests/should_succeed/filter_positive/why3session.xml
+++ b/creusot/tests/should_succeed/filter_positive/why3session.xml
@@ -18,12 +18,12 @@
-
+
-
+
diff --git a/creusot/tests/should_succeed/filter_positive/why3shapes.gz b/creusot/tests/should_succeed/filter_positive/why3shapes.gz
index cd74a1a986..09763bb4bf 100644
Binary files a/creusot/tests/should_succeed/filter_positive/why3shapes.gz and b/creusot/tests/should_succeed/filter_positive/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/hashmap.mlcfg b/creusot/tests/should_succeed/hashmap.mlcfg
index 9976957249..2b6b181b0c 100644
--- a/creusot/tests/should_succeed/hashmap.mlcfg
+++ b/creusot/tests/should_succeed/hashmap.mlcfg
@@ -765,19 +765,19 @@ module Hashmap_Impl5_Add
[#"../hashmap.rs" 110 27 110 55] index <- ([#"../hashmap.rs" 110 27 110 55] ([#"../hashmap.rs" 110 27 110 46] UIntSize.of_int (UInt64.to_int _13)) % _15);
_13 <- any uint64;
_15 <- any usize;
- [#"../hashmap.rs" 111 39 111 51] _20 <- Borrow.borrow_mut (Hashmap_MyHashMap_Type.myhashmap_buckets ( * self));
- [#"../hashmap.rs" 111 39 111 51] self <- { self with current = (let Hashmap_MyHashMap_Type.C_MyHashMap x0 = * self in Hashmap_MyHashMap_Type.C_MyHashMap ( ^ _20)) };
+ [#"../hashmap.rs" 111 39 111 51] _20 <- Borrow.borrow_final (Hashmap_MyHashMap_Type.myhashmap_buckets ( * self)) (Borrow.inherit_id (Borrow.get_id self) 1);
+ [#"../hashmap.rs" 111 39 111 51] self <- { self with current = (let Hashmap_MyHashMap_Type.C_MyHashMap x0 = * self in Hashmap_MyHashMap_Type.C_MyHashMap ( ^ _20)) ; };
assume { inv1 ( ^ _20) };
[#"../hashmap.rs" 111 39 111 58] _19 <- ([#"../hashmap.rs" 111 39 111 58] index_mut0 _20 ([#"../hashmap.rs" 111 52 111 57] index));
_20 <- any borrowed (Alloc_Vec_Vec_Type.t_vec (Hashmap_List_Type.t_list (k, v)) (Alloc_Alloc_Global_Type.t_global));
goto BB5
}
BB5 {
- [#"../hashmap.rs" 111 34 111 58] _18 <- Borrow.borrow_mut ( * _19);
- [#"../hashmap.rs" 111 34 111 58] _19 <- { _19 with current = ^ _18 };
+ [#"../hashmap.rs" 111 34 111 58] _18 <- Borrow.borrow_final ( * _19) (Borrow.get_id _19);
+ [#"../hashmap.rs" 111 34 111 58] _19 <- { _19 with current = ( ^ _18) ; };
assume { inv2 ( ^ _18) };
- [#"../hashmap.rs" 111 34 111 58] l <- Borrow.borrow_mut ( * _18);
- [#"../hashmap.rs" 111 34 111 58] _18 <- { _18 with current = ^ l };
+ [#"../hashmap.rs" 111 34 111 58] l <- Borrow.borrow_final ( * _18) (Borrow.get_id _18);
+ [#"../hashmap.rs" 111 34 111 58] _18 <- { _18 with current = ( ^ l) ; };
assume { inv2 ( ^ l) };
assert { [@expl:type invariant] inv3 _18 };
assume { resolve1 _18 };
@@ -808,14 +808,14 @@ module Hashmap_Impl5_Add
goto BB10
}
BB10 {
- [#"../hashmap.rs" 121 24 121 25] k <- Borrow.borrow_mut (let (a, _) = Hashmap_List_Type.cons_0 ( * l) in a);
- [#"../hashmap.rs" 121 24 121 25] l <- { l with current = (let Hashmap_List_Type.C_Cons x0 x1 = * l in Hashmap_List_Type.C_Cons (let (x0, x1) = Hashmap_List_Type.cons_0 ( * l) in ( ^ k, x1)) x1) };
+ [#"../hashmap.rs" 121 24 121 25] k <- Borrow.borrow_final (let (a, _) = Hashmap_List_Type.cons_0 ( * l) in a) (Borrow.inherit_id (Borrow.inherit_id (Borrow.get_id l) 1) 1);
+ [#"../hashmap.rs" 121 24 121 25] l <- { l with current = (let Hashmap_List_Type.C_Cons x0 x1 = * l in Hashmap_List_Type.C_Cons (let (x0, x1) = Hashmap_List_Type.cons_0 ( * l) in ( ^ k, x1)) x1) ; };
assume { inv6 ( ^ k) };
- [#"../hashmap.rs" 121 27 121 28] v <- Borrow.borrow_mut (let (_, a) = Hashmap_List_Type.cons_0 ( * l) in a);
- [#"../hashmap.rs" 121 27 121 28] l <- { l with current = (let Hashmap_List_Type.C_Cons x0 x1 = * l in Hashmap_List_Type.C_Cons (let (x0, x1) = Hashmap_List_Type.cons_0 ( * l) in (x0, ^ v)) x1) };
+ [#"../hashmap.rs" 121 27 121 28] v <- Borrow.borrow_final (let (_, a) = Hashmap_List_Type.cons_0 ( * l) in a) (Borrow.inherit_id (Borrow.inherit_id (Borrow.get_id l) 1) 2);
+ [#"../hashmap.rs" 121 27 121 28] l <- { l with current = (let Hashmap_List_Type.C_Cons x0 x1 = * l in Hashmap_List_Type.C_Cons (let (x0, x1) = Hashmap_List_Type.cons_0 ( * l) in (x0, ^ v)) x1) ; };
assume { inv7 ( ^ v) };
- [#"../hashmap.rs" 121 31 121 33] tl <- Borrow.borrow_mut (Hashmap_List_Type.cons_1 ( * l));
- [#"../hashmap.rs" 121 31 121 33] l <- { l with current = (let Hashmap_List_Type.C_Cons x0 x1 = * l in Hashmap_List_Type.C_Cons x0 ( ^ tl)) };
+ [#"../hashmap.rs" 121 31 121 33] tl <- Borrow.borrow_final (Hashmap_List_Type.cons_1 ( * l)) (Borrow.inherit_id (Borrow.get_id l) 2);
+ [#"../hashmap.rs" 121 31 121 33] l <- { l with current = (let Hashmap_List_Type.C_Cons x0 x1 = * l in Hashmap_List_Type.C_Cons x0 ( ^ tl)) ; };
assume { inv8 ( ^ tl) };
[#"../hashmap.rs" 122 21 122 23] tl1 <- ([#"../hashmap.rs" 122 21 122 23] tl);
[#"../hashmap.rs" 122 21 122 23] tl <- any borrowed (Hashmap_List_Type.t_list (k, v));
@@ -837,7 +837,7 @@ module Hashmap_Impl5_Add
assume { resolve6 key };
assert { [@expl:type invariant] inv7 val' };
assume { resolve7 val' };
- [#"../hashmap.rs" 124 16 124 24] v <- { v with current = ([#"../hashmap.rs" 124 21 124 24] val') };
+ [#"../hashmap.rs" 124 16 124 24] v <- { v with current = ([#"../hashmap.rs" 124 21 124 24] val') ; };
assert { [@expl:type invariant] inv7 ( * v) };
assume { resolve7 ( * v) };
assert { [@expl:type invariant] inv10 v };
@@ -856,10 +856,10 @@ module Hashmap_Impl5_Add
assert { [@expl:type invariant] inv10 v };
assume { resolve4 v };
[#"../hashmap.rs" 128 16 128 25] _46 <- Borrow.borrow_mut ( * tl1);
- [#"../hashmap.rs" 128 16 128 25] tl1 <- { tl1 with current = ^ _46 };
+ [#"../hashmap.rs" 128 16 128 25] tl1 <- { tl1 with current = ( ^ _46) ; };
assume { inv2 ( ^ _46) };
- [#"../hashmap.rs" 128 16 128 25] _45 <- Borrow.borrow_mut ( * _46);
- [#"../hashmap.rs" 128 16 128 25] _46 <- { _46 with current = ^ _45 };
+ [#"../hashmap.rs" 128 16 128 25] _45 <- Borrow.borrow_final ( * _46) (Borrow.get_id _46);
+ [#"../hashmap.rs" 128 16 128 25] _46 <- { _46 with current = ( ^ _45) ; };
assume { inv2 ( ^ _45) };
assert { [@expl:type invariant] inv3 l };
assume { resolve1 l };
@@ -885,7 +885,7 @@ module Hashmap_Impl5_Add
goto BB17
}
BB17 {
- [#"../hashmap.rs" 131 8 131 10] l <- { l with current = ([#"../hashmap.rs" 131 13 131 44] Hashmap_List_Type.C_Cons ([#"../hashmap.rs" 131 18 131 28] (([#"../hashmap.rs" 131 19 131 22] key), ([#"../hashmap.rs" 131 24 131 27] val'))) ([#"../hashmap.rs" 131 39 131 42] Hashmap_List_Type.C_Nil)) };
+ [#"../hashmap.rs" 131 8 131 10] l <- { l with current = ([#"../hashmap.rs" 131 13 131 44] Hashmap_List_Type.C_Cons ([#"../hashmap.rs" 131 18 131 28] (([#"../hashmap.rs" 131 19 131 22] key), ([#"../hashmap.rs" 131 24 131 27] val'))) ([#"../hashmap.rs" 131 39 131 42] Hashmap_List_Type.C_Nil)) ; };
assert { [@expl:type invariant] inv2 ( * l) };
assume { resolve9 ( * l) };
assert { [@expl:type invariant] inv3 l };
@@ -1766,18 +1766,18 @@ module Hashmap_Impl5_Resize
}
BB9 {
[#"../hashmap.rs" 177 56 177 68] _30 <- Borrow.borrow_mut (Hashmap_MyHashMap_Type.myhashmap_buckets ( * self));
- [#"../hashmap.rs" 177 56 177 68] self <- { self with current = (let Hashmap_MyHashMap_Type.C_MyHashMap x0 = * self in Hashmap_MyHashMap_Type.C_MyHashMap ( ^ _30)) };
+ [#"../hashmap.rs" 177 56 177 68] self <- { self with current = (let Hashmap_MyHashMap_Type.C_MyHashMap x0 = * self in Hashmap_MyHashMap_Type.C_MyHashMap ( ^ _30)) ; };
assume { inv4 ( ^ _30) };
[#"../hashmap.rs" 177 56 177 71] _29 <- ([#"../hashmap.rs" 177 56 177 71] index_mut0 _30 ([#"../hashmap.rs" 177 69 177 70] i));
_30 <- any borrowed (Alloc_Vec_Vec_Type.t_vec (Hashmap_List_Type.t_list (k, v)) (Alloc_Alloc_Global_Type.t_global));
goto BB10
}
BB10 {
- [#"../hashmap.rs" 177 51 177 71] _28 <- Borrow.borrow_mut ( * _29);
- [#"../hashmap.rs" 177 51 177 71] _29 <- { _29 with current = ^ _28 };
+ [#"../hashmap.rs" 177 51 177 71] _28 <- Borrow.borrow_final ( * _29) (Borrow.get_id _29);
+ [#"../hashmap.rs" 177 51 177 71] _29 <- { _29 with current = ( ^ _28) ; };
assume { inv5 ( ^ _28) };
- [#"../hashmap.rs" 177 51 177 71] _27 <- Borrow.borrow_mut ( * _28);
- [#"../hashmap.rs" 177 51 177 71] _28 <- { _28 with current = ^ _27 };
+ [#"../hashmap.rs" 177 51 177 71] _27 <- Borrow.borrow_final ( * _28) (Borrow.get_id _28);
+ [#"../hashmap.rs" 177 51 177 71] _28 <- { _28 with current = ( ^ _27) ; };
assume { inv5 ( ^ _27) };
[#"../hashmap.rs" 177 33 177 83] l <- ([#"../hashmap.rs" 177 33 177 83] replace0 _27 ([#"../hashmap.rs" 177 73 177 82] Hashmap_List_Type.C_Nil));
_27 <- any borrowed (Hashmap_List_Type.t_list (k, v));
@@ -1879,7 +1879,7 @@ module Hashmap_Impl5_Resize
goto BB30
}
BB30 {
- [#"../hashmap.rs" 196 8 196 13] self <- { self with current = ([#"../hashmap.rs" 196 16 196 19] new) };
+ [#"../hashmap.rs" 196 8 196 13] self <- { self with current = ([#"../hashmap.rs" 196 16 196 19] new) ; };
[#"../hashmap.rs" 196 16 196 19] new <- any Hashmap_MyHashMap_Type.t_myhashmap k v;
assert { [@expl:type invariant] inv2 ( * self) };
assume { resolve1 ( * self) };
diff --git a/creusot/tests/should_succeed/hashmap/why3session.xml b/creusot/tests/should_succeed/hashmap/why3session.xml
index 30336af452..6ad55dff98 100644
--- a/creusot/tests/should_succeed/hashmap/why3session.xml
+++ b/creusot/tests/should_succeed/hashmap/why3session.xml
@@ -14,7 +14,7 @@
-
+
@@ -39,183 +39,183 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -232,7 +232,7 @@
-
+
@@ -247,7 +247,7 @@
-
+
@@ -273,13 +273,13 @@
-
+
-
+
@@ -357,7 +357,7 @@
-
+
@@ -372,146 +372,146 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/creusot/tests/should_succeed/hashmap/why3shapes.gz b/creusot/tests/should_succeed/hashmap/why3shapes.gz
index aa5dbfe1e4..d7e34022b8 100644
Binary files a/creusot/tests/should_succeed/hashmap/why3shapes.gz and b/creusot/tests/should_succeed/hashmap/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/heapsort_generic.mlcfg b/creusot/tests/should_succeed/heapsort_generic.mlcfg
index f2edd8180c..64a3659b53 100644
--- a/creusot/tests/should_succeed/heapsort_generic.mlcfg
+++ b/creusot/tests/should_succeed/heapsort_generic.mlcfg
@@ -680,15 +680,15 @@ module HeapsortGeneric_SiftDown
}
BB20 {
[#"../heapsort_generic.rs" 71 8 71 24] _63 <- Borrow.borrow_mut ( * v);
- [#"../heapsort_generic.rs" 71 8 71 24] v <- { v with current = ^ _63 };
+ [#"../heapsort_generic.rs" 71 8 71 24] v <- { v with current = ( ^ _63) ; };
assume { inv3 ( ^ _63) };
[#"../heapsort_generic.rs" 71 8 71 24] _62 <- ([#"../heapsort_generic.rs" 71 8 71 24] deref_mut0 _63);
_63 <- any borrowed (Alloc_Vec_Vec_Type.t_vec t (Alloc_Alloc_Global_Type.t_global));
goto BB21
}
BB21 {
- [#"../heapsort_generic.rs" 71 8 71 24] _61 <- Borrow.borrow_mut ( * _62);
- [#"../heapsort_generic.rs" 71 8 71 24] _62 <- { _62 with current = ^ _61 };
+ [#"../heapsort_generic.rs" 71 8 71 24] _61 <- Borrow.borrow_final ( * _62) (Borrow.get_id _62);
+ [#"../heapsort_generic.rs" 71 8 71 24] _62 <- { _62 with current = ( ^ _61) ; };
assume { inv4 ( ^ _61) };
[#"../heapsort_generic.rs" 71 8 71 24] _60 <- ([#"../heapsort_generic.rs" 71 8 71 24] swap0 _61 ([#"../heapsort_generic.rs" 71 15 71 16] i) ([#"../heapsort_generic.rs" 71 18 71 23] child));
_61 <- any borrowed (slice t);
@@ -1108,7 +1108,7 @@ module HeapsortGeneric_HeapSort
BB6 {
[#"../heapsort_generic.rs" 104 8 104 18] start <- ([#"../heapsort_generic.rs" 104 8 104 18] start - ([#"../heapsort_generic.rs" 104 17 104 18] [#"../heapsort_generic.rs" 104 17 104 18] (1 : usize)));
[#"../heapsort_generic.rs" 105 18 105 19] _19 <- Borrow.borrow_mut ( * v);
- [#"../heapsort_generic.rs" 105 18 105 19] v <- { v with current = ^ _19 };
+ [#"../heapsort_generic.rs" 105 18 105 19] v <- { v with current = ( ^ _19) ; };
assume { inv2 ( ^ _19) };
[#"../heapsort_generic.rs" 105 28 105 35] _21 <- ([#"../heapsort_generic.rs" 105 28 105 35] len0 ([#"../heapsort_generic.rs" 105 28 105 35] * _19));
goto BB7
@@ -1147,15 +1147,15 @@ module HeapsortGeneric_HeapSort
BB13 {
[#"../heapsort_generic.rs" 116 8 116 16] end' <- ([#"../heapsort_generic.rs" 116 8 116 16] end' - ([#"../heapsort_generic.rs" 116 15 116 16] [#"../heapsort_generic.rs" 116 15 116 16] (1 : usize)));
[#"../heapsort_generic.rs" 117 8 117 22] _38 <- Borrow.borrow_mut ( * v);
- [#"../heapsort_generic.rs" 117 8 117 22] v <- { v with current = ^ _38 };
+ [#"../heapsort_generic.rs" 117 8 117 22] v <- { v with current = ( ^ _38) ; };
assume { inv2 ( ^ _38) };
[#"../heapsort_generic.rs" 117 8 117 22] _37 <- ([#"../heapsort_generic.rs" 117 8 117 22] deref_mut0 _38);
_38 <- any borrowed (Alloc_Vec_Vec_Type.t_vec t (Alloc_Alloc_Global_Type.t_global));
goto BB14
}
BB14 {
- [#"../heapsort_generic.rs" 117 8 117 22] _36 <- Borrow.borrow_mut ( * _37);
- [#"../heapsort_generic.rs" 117 8 117 22] _37 <- { _37 with current = ^ _36 };
+ [#"../heapsort_generic.rs" 117 8 117 22] _36 <- Borrow.borrow_final ( * _37) (Borrow.get_id _37);
+ [#"../heapsort_generic.rs" 117 8 117 22] _37 <- { _37 with current = ( ^ _36) ; };
assume { inv3 ( ^ _36) };
[#"../heapsort_generic.rs" 117 8 117 22] _35 <- ([#"../heapsort_generic.rs" 117 8 117 22] swap0 _36 ([#"../heapsort_generic.rs" 117 15 117 16] [#"../heapsort_generic.rs" 117 15 117 16] (0 : usize)) ([#"../heapsort_generic.rs" 117 18 117 21] end'));
_36 <- any borrowed (slice t);
@@ -1166,7 +1166,7 @@ module HeapsortGeneric_HeapSort
assume { resolve2 _37 };
assert { [@expl:assertion] [#"../heapsort_generic.rs" 119 12 119 59] let _ = heap_frag_max0 (deep_model0 v) 0 (UIntSize.to_int end') in forall j : int . forall i : int . 0 <= i /\ i < UIntSize.to_int end' /\ UIntSize.to_int end' <= j /\ j < Seq.length (shallow_model0 v) -> le_log0 (Seq.get (deep_model0 v) i) (Seq.get (deep_model0 v) j) };
[#"../heapsort_generic.rs" 123 18 123 19] _43 <- Borrow.borrow_mut ( * v);
- [#"../heapsort_generic.rs" 123 18 123 19] v <- { v with current = ^ _43 };
+ [#"../heapsort_generic.rs" 123 18 123 19] v <- { v with current = ( ^ _43) ; };
assume { inv2 ( ^ _43) };
[#"../heapsort_generic.rs" 123 8 123 28] _42 <- ([#"../heapsort_generic.rs" 123 8 123 28] sift_down0 _43 ([#"../heapsort_generic.rs" 123 21 123 22] [#"../heapsort_generic.rs" 123 21 123 22] (0 : usize)) ([#"../heapsort_generic.rs" 123 24 123 27] end'));
_43 <- any borrowed (Alloc_Vec_Vec_Type.t_vec t (Alloc_Alloc_Global_Type.t_global));
diff --git a/creusot/tests/should_succeed/heapsort_generic/why3session.xml b/creusot/tests/should_succeed/heapsort_generic/why3session.xml
index 10a9dbc867..b133f583d3 100644
--- a/creusot/tests/should_succeed/heapsort_generic/why3session.xml
+++ b/creusot/tests/should_succeed/heapsort_generic/why3session.xml
@@ -10,7 +10,7 @@
-
+
@@ -23,7 +23,7 @@
-
+
@@ -41,115 +41,115 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -158,12 +158,12 @@
-
+
-
+
@@ -172,12 +172,12 @@
-
+
-
+
@@ -190,12 +190,12 @@
-
+
-
+
@@ -204,58 +204,58 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -276,103 +276,103 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -385,7 +385,7 @@
-
+
@@ -398,16 +398,16 @@
-
+
-
+
-
+
-
+
diff --git a/creusot/tests/should_succeed/heapsort_generic/why3shapes.gz b/creusot/tests/should_succeed/heapsort_generic/why3shapes.gz
index 1110db6a41..904f366d16 100644
Binary files a/creusot/tests/should_succeed/heapsort_generic/why3shapes.gz and b/creusot/tests/should_succeed/heapsort_generic/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/hillel.mlcfg b/creusot/tests/should_succeed/hillel.mlcfg
index eb114c1822..968e5e1575 100644
--- a/creusot/tests/should_succeed/hillel.mlcfg
+++ b/creusot/tests/should_succeed/hillel.mlcfg
@@ -221,7 +221,7 @@ module Hillel_RightPad
}
BB5 {
[#"../hillel.rs" 25 8 25 21] _23 <- Borrow.borrow_mut ( * str);
- [#"../hillel.rs" 25 8 25 21] str <- { str with current = ^ _23 };
+ [#"../hillel.rs" 25 8 25 21] str <- { str with current = ( ^ _23) ; };
assume { inv3 ( ^ _23) };
[#"../hillel.rs" 25 8 25 21] _22 <- ([#"../hillel.rs" 25 8 25 21] push0 _23 ([#"../hillel.rs" 25 17 25 20] pad));
_23 <- any borrowed (Alloc_Vec_Vec_Type.t_vec t (Alloc_Alloc_Global_Type.t_global));
@@ -443,7 +443,7 @@ module Hillel_LeftPad
}
BB6 {
[#"../hillel.rs" 44 8 44 26] _24 <- Borrow.borrow_mut ( * str);
- [#"../hillel.rs" 44 8 44 26] str <- { str with current = ^ _24 };
+ [#"../hillel.rs" 44 8 44 26] str <- { str with current = ( ^ _24) ; };
assume { inv3 ( ^ _24) };
[#"../hillel.rs" 44 8 44 26] _23 <- ([#"../hillel.rs" 44 8 44 26] insert0 _24 ([#"../hillel.rs" 44 19 44 20] [#"../hillel.rs" 44 19 44 20] (0 : usize)) ([#"../hillel.rs" 44 22 44 25] pad));
_24 <- any borrowed (Alloc_Vec_Vec_Type.t_vec t (Alloc_Alloc_Global_Type.t_global));
@@ -1036,8 +1036,8 @@ module Hillel_InsertUnique
BB13 {
[#"../hillel.rs" 84 4 84 111] _30 <- Borrow.borrow_mut iter;
[#"../hillel.rs" 84 4 84 111] iter <- ^ _30;
- [#"../hillel.rs" 84 4 84 111] _29 <- Borrow.borrow_mut ( * _30);
- [#"../hillel.rs" 84 4 84 111] _30 <- { _30 with current = ^ _29 };
+ [#"../hillel.rs" 84 4 84 111] _29 <- Borrow.borrow_final ( * _30) (Borrow.get_id _30);
+ [#"../hillel.rs" 84 4 84 111] _30 <- { _30 with current = ( ^ _29) ; };
[#"../hillel.rs" 84 4 84 111] _28 <- ([#"../hillel.rs" 84 4 84 111] next0 _29);
_29 <- any borrowed (Core_Slice_Iter_Iter_Type.t_iter t);
goto BB14
@@ -1117,8 +1117,8 @@ module Hillel_InsertUnique
goto BB12
}
BB24 {
- [#"../hillel.rs" 94 4 94 18] _49 <- Borrow.borrow_mut ( * vec);
- [#"../hillel.rs" 94 4 94 18] vec <- { vec with current = ^ _49 };
+ [#"../hillel.rs" 94 4 94 18] _49 <- Borrow.borrow_final ( * vec) (Borrow.get_id vec);
+ [#"../hillel.rs" 94 4 94 18] vec <- { vec with current = ( ^ _49) ; };
assume { inv8 ( ^ _49) };
[#"../hillel.rs" 94 4 94 18] _48 <- ([#"../hillel.rs" 94 4 94 18] push1 _49 ([#"../hillel.rs" 94 13 94 17] elem));
_49 <- any borrowed (Alloc_Vec_Vec_Type.t_vec t (Alloc_Alloc_Global_Type.t_global));
@@ -1561,8 +1561,8 @@ module Hillel_Unique
BB11 {
[#"../hillel.rs" 104 4 104 48] _25 <- Borrow.borrow_mut iter;
[#"../hillel.rs" 104 4 104 48] iter <- ^ _25;
- [#"../hillel.rs" 104 4 104 48] _24 <- Borrow.borrow_mut ( * _25);
- [#"../hillel.rs" 104 4 104 48] _25 <- { _25 with current = ^ _24 };
+ [#"../hillel.rs" 104 4 104 48] _24 <- Borrow.borrow_final ( * _25) (Borrow.get_id _25);
+ [#"../hillel.rs" 104 4 104 48] _25 <- { _25 with current = ( ^ _24) ; };
[#"../hillel.rs" 104 4 104 48] _23 <- ([#"../hillel.rs" 104 4 104 48] next0 _24);
_24 <- any borrowed (Core_Ops_Range_Range_Type.t_range usize);
goto BB12
@@ -1610,8 +1610,8 @@ module Hillel_Unique
[#"../hillel.rs" 109 22 109 33] _37 <- Borrow.borrow_mut unique;
[#"../hillel.rs" 109 22 109 33] unique <- ^ _37;
assume { inv2 ( ^ _37) };
- [#"../hillel.rs" 109 22 109 33] _36 <- Borrow.borrow_mut ( * _37);
- [#"../hillel.rs" 109 22 109 33] _37 <- { _37 with current = ^ _36 };
+ [#"../hillel.rs" 109 22 109 33] _36 <- Borrow.borrow_final ( * _37) (Borrow.get_id _37);
+ [#"../hillel.rs" 109 22 109 33] _37 <- { _37 with current = ( ^ _36) ; };
assume { inv2 ( ^ _36) };
assert { [@expl:type invariant] inv3 elem };
assume { resolve2 elem };
@@ -2134,8 +2134,8 @@ module Hillel_Fulcrum
BB5 {
[#"../hillel.rs" 159 4 159 60] _21 <- Borrow.borrow_mut iter;
[#"../hillel.rs" 159 4 159 60] iter <- ^ _21;
- [#"../hillel.rs" 159 4 159 60] _20 <- Borrow.borrow_mut ( * _21);
- [#"../hillel.rs" 159 4 159 60] _21 <- { _21 with current = ^ _20 };
+ [#"../hillel.rs" 159 4 159 60] _20 <- Borrow.borrow_final ( * _21) (Borrow.get_id _21);
+ [#"../hillel.rs" 159 4 159 60] _21 <- { _21 with current = ( ^ _20) ; };
[#"../hillel.rs" 159 4 159 60] _19 <- ([#"../hillel.rs" 159 4 159 60] next0 _20);
_20 <- any borrowed (Core_Slice_Iter_Iter_Type.t_iter uint32);
goto BB6
@@ -2204,8 +2204,8 @@ module Hillel_Fulcrum
BB17 {
[#"../hillel.rs" 171 4 171 58] _52 <- Borrow.borrow_mut iter1;
[#"../hillel.rs" 171 4 171 58] iter1 <- ^ _52;
- [#"../hillel.rs" 171 4 171 58] _51 <- Borrow.borrow_mut ( * _52);
- [#"../hillel.rs" 171 4 171 58] _52 <- { _52 with current = ^ _51 };
+ [#"../hillel.rs" 171 4 171 58] _51 <- Borrow.borrow_final ( * _52) (Borrow.get_id _52);
+ [#"../hillel.rs" 171 4 171 58] _52 <- { _52 with current = ( ^ _51) ; };
[#"../hillel.rs" 171 4 171 58] _50 <- ([#"../hillel.rs" 171 4 171 58] next1 _51);
_51 <- any borrowed (Core_Ops_Range_Range_Type.t_range usize);
goto BB18
diff --git a/creusot/tests/should_succeed/hillel/why3session.xml b/creusot/tests/should_succeed/hillel/why3session.xml
index 9f6c80d3ef..953f66eb8a 100644
--- a/creusot/tests/should_succeed/hillel/why3session.xml
+++ b/creusot/tests/should_succeed/hillel/why3session.xml
@@ -9,17 +9,17 @@
-
+
-
+
-
+
@@ -35,7 +35,7 @@
-
+
@@ -59,58 +59,58 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -118,25 +118,25 @@
-
+
-
+
-
+
-
+
-
+
@@ -145,14 +145,14 @@
-
+
-
+
@@ -172,7 +172,7 @@
-
+
@@ -181,115 +181,115 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/creusot/tests/should_succeed/hillel/why3shapes.gz b/creusot/tests/should_succeed/hillel/why3shapes.gz
index 0b45d88c4e..cb9b2fe835 100644
Binary files a/creusot/tests/should_succeed/hillel/why3shapes.gz and b/creusot/tests/should_succeed/hillel/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/index_range.mlcfg b/creusot/tests/should_succeed/index_range.mlcfg
index 5bd8714590..034a64c8af 100644
--- a/creusot/tests/should_succeed/index_range.mlcfg
+++ b/creusot/tests/should_succeed/index_range.mlcfg
@@ -796,8 +796,8 @@ module IndexRange_TestRange
goto BB54
}
BB54 {
- [#"../index_range.rs" 59 12 59 26] s2 <- Borrow.borrow_mut ( * _105);
- [#"../index_range.rs" 59 12 59 26] _105 <- { _105 with current = ^ s2 };
+ [#"../index_range.rs" 59 12 59 26] s2 <- Borrow.borrow_final ( * _105) (Borrow.get_id _105);
+ [#"../index_range.rs" 59 12 59 26] _105 <- { _105 with current = ( ^ s2) ; };
[#"../index_range.rs" 60 12 60 19] _111 <- ([#"../index_range.rs" 60 12 60 19] len0 ([#"../index_range.rs" 60 12 60 19] * s2));
goto BB55
}
@@ -821,14 +821,14 @@ module IndexRange_TestRange
goto BB58
}
BB58 {
- [#"../index_range.rs" 61 4 61 13] s2 <- { s2 with current = Slice.set ( * s2) _114 ([#"../index_range.rs" 61 4 61 13] [#"../index_range.rs" 61 11 61 13] (-1 : int32)) };
+ [#"../index_range.rs" 61 4 61 13] s2 <- { s2 with current = Slice.set ( * s2) _114 ([#"../index_range.rs" 61 4 61 13] [#"../index_range.rs" 61 11 61 13] (-1 : int32)) ; };
[#"../index_range.rs" 62 6 62 7] _117 <- ([#"../index_range.rs" 62 6 62 7] [#"../index_range.rs" 62 6 62 7] (1 : usize));
[#"../index_range.rs" 62 4 62 8] _119 <- ([#"../index_range.rs" 62 4 62 8] _117 < ([#"../index_range.rs" 62 4 62 8] Slice.length ( * s2)));
assert { [@expl:index in bounds] [#"../index_range.rs" 62 4 62 8] _119 };
goto BB59
}
BB59 {
- [#"../index_range.rs" 62 4 62 13] s2 <- { s2 with current = Slice.set ( * s2) _117 ([#"../index_range.rs" 62 4 62 13] [#"../index_range.rs" 62 11 62 13] (-1 : int32)) };
+ [#"../index_range.rs" 62 4 62 13] s2 <- { s2 with current = Slice.set ( * s2) _117 ([#"../index_range.rs" 62 4 62 13] [#"../index_range.rs" 62 11 62 13] (-1 : int32)) ; };
[#"../index_range.rs" 67 14 67 15] _124 <- ([#"../index_range.rs" 67 14 67 15] [#"../index_range.rs" 67 14 67 15] (2 : usize));
[#"../index_range.rs" 67 12 67 16] _126 <- ([#"../index_range.rs" 67 12 67 16] _124 < ([#"../index_range.rs" 67 12 67 16] Slice.length ( * s2)));
assert { [@expl:index in bounds] [#"../index_range.rs" 67 12 67 16] _126 };
@@ -1374,8 +1374,8 @@ module IndexRange_TestRangeTo
goto BB23
}
BB23 {
- [#"../index_range.rs" 99 12 99 25] s1 <- Borrow.borrow_mut ( * _44);
- [#"../index_range.rs" 99 12 99 25] _44 <- { _44 with current = ^ s1 };
+ [#"../index_range.rs" 99 12 99 25] s1 <- Borrow.borrow_final ( * _44) (Borrow.get_id _44);
+ [#"../index_range.rs" 99 12 99 25] _44 <- { _44 with current = ( ^ s1) ; };
[#"../index_range.rs" 100 12 100 19] _50 <- ([#"../index_range.rs" 100 12 100 19] len0 ([#"../index_range.rs" 100 12 100 19] * s1));
goto BB24
}
@@ -1399,14 +1399,14 @@ module IndexRange_TestRangeTo
goto BB27
}
BB27 {
- [#"../index_range.rs" 101 4 101 13] s1 <- { s1 with current = Slice.set ( * s1) _53 ([#"../index_range.rs" 101 4 101 13] [#"../index_range.rs" 101 11 101 13] (-1 : int32)) };
+ [#"../index_range.rs" 101 4 101 13] s1 <- { s1 with current = Slice.set ( * s1) _53 ([#"../index_range.rs" 101 4 101 13] [#"../index_range.rs" 101 11 101 13] (-1 : int32)) ; };
[#"../index_range.rs" 102 6 102 7] _56 <- ([#"../index_range.rs" 102 6 102 7] [#"../index_range.rs" 102 6 102 7] (2 : usize));
[#"../index_range.rs" 102 4 102 8] _58 <- ([#"../index_range.rs" 102 4 102 8] _56 < ([#"../index_range.rs" 102 4 102 8] Slice.length ( * s1)));
assert { [@expl:index in bounds] [#"../index_range.rs" 102 4 102 8] _58 };
goto BB28
}
BB28 {
- [#"../index_range.rs" 102 4 102 13] s1 <- { s1 with current = Slice.set ( * s1) _56 ([#"../index_range.rs" 102 4 102 13] [#"../index_range.rs" 102 11 102 13] (-1 : int32)) };
+ [#"../index_range.rs" 102 4 102 13] s1 <- { s1 with current = Slice.set ( * s1) _56 ([#"../index_range.rs" 102 4 102 13] [#"../index_range.rs" 102 11 102 13] (-1 : int32)) ; };
[#"../index_range.rs" 104 14 104 15] _63 <- ([#"../index_range.rs" 104 14 104 15] [#"../index_range.rs" 104 14 104 15] (1 : usize));
[#"../index_range.rs" 104 12 104 16] _65 <- ([#"../index_range.rs" 104 12 104 16] _63 < ([#"../index_range.rs" 104 12 104 16] Slice.length ( * s1)));
assert { [@expl:index in bounds] [#"../index_range.rs" 104 12 104 16] _65 };
@@ -1981,8 +1981,8 @@ module IndexRange_TestRangeFrom
goto BB28
}
BB28 {
- [#"../index_range.rs" 138 12 138 25] s1 <- Borrow.borrow_mut ( * _54);
- [#"../index_range.rs" 138 12 138 25] _54 <- { _54 with current = ^ s1 };
+ [#"../index_range.rs" 138 12 138 25] s1 <- Borrow.borrow_final ( * _54) (Borrow.get_id _54);
+ [#"../index_range.rs" 138 12 138 25] _54 <- { _54 with current = ( ^ s1) ; };
[#"../index_range.rs" 139 12 139 19] _60 <- ([#"../index_range.rs" 139 12 139 19] len0 ([#"../index_range.rs" 139 12 139 19] * s1));
goto BB29
}
@@ -2006,14 +2006,14 @@ module IndexRange_TestRangeFrom
goto BB32
}
BB32 {
- [#"../index_range.rs" 140 4 140 13] s1 <- { s1 with current = Slice.set ( * s1) _63 ([#"../index_range.rs" 140 4 140 13] [#"../index_range.rs" 140 11 140 13] (-1 : int32)) };
+ [#"../index_range.rs" 140 4 140 13] s1 <- { s1 with current = Slice.set ( * s1) _63 ([#"../index_range.rs" 140 4 140 13] [#"../index_range.rs" 140 11 140 13] (-1 : int32)) ; };
[#"../index_range.rs" 141 6 141 7] _66 <- ([#"../index_range.rs" 141 6 141 7] [#"../index_range.rs" 141 6 141 7] (1 : usize));
[#"../index_range.rs" 141 4 141 8] _68 <- ([#"../index_range.rs" 141 4 141 8] _66 < ([#"../index_range.rs" 141 4 141 8] Slice.length ( * s1)));
assert { [@expl:index in bounds] [#"../index_range.rs" 141 4 141 8] _68 };
goto BB33
}
BB33 {
- [#"../index_range.rs" 141 4 141 13] s1 <- { s1 with current = Slice.set ( * s1) _66 ([#"../index_range.rs" 141 4 141 13] [#"../index_range.rs" 141 11 141 13] (-1 : int32)) };
+ [#"../index_range.rs" 141 4 141 13] s1 <- { s1 with current = Slice.set ( * s1) _66 ([#"../index_range.rs" 141 4 141 13] [#"../index_range.rs" 141 11 141 13] (-1 : int32)) ; };
[#"../index_range.rs" 143 14 143 15] _73 <- ([#"../index_range.rs" 143 14 143 15] [#"../index_range.rs" 143 14 143 15] (2 : usize));
[#"../index_range.rs" 143 12 143 16] _75 <- ([#"../index_range.rs" 143 12 143 16] _73 < ([#"../index_range.rs" 143 12 143 16] Slice.length ( * s1)));
assert { [@expl:index in bounds] [#"../index_range.rs" 143 12 143 16] _75 };
@@ -2538,8 +2538,8 @@ module IndexRange_TestRangeFull
goto BB26
}
BB26 {
- [#"../index_range.rs" 165 12 165 24] s1 <- Borrow.borrow_mut ( * _43);
- [#"../index_range.rs" 165 12 165 24] _43 <- { _43 with current = ^ s1 };
+ [#"../index_range.rs" 165 12 165 24] s1 <- Borrow.borrow_final ( * _43) (Borrow.get_id _43);
+ [#"../index_range.rs" 165 12 165 24] _43 <- { _43 with current = ( ^ s1) ; };
[#"../index_range.rs" 166 12 166 19] _49 <- ([#"../index_range.rs" 166 12 166 19] len0 ([#"../index_range.rs" 166 12 166 19] * s1));
goto BB27
}
@@ -2563,14 +2563,14 @@ module IndexRange_TestRangeFull
goto BB30
}
BB30 {
- [#"../index_range.rs" 167 4 167 13] s1 <- { s1 with current = Slice.set ( * s1) _52 ([#"../index_range.rs" 167 4 167 13] [#"../index_range.rs" 167 11 167 13] (-1 : int32)) };
+ [#"../index_range.rs" 167 4 167 13] s1 <- { s1 with current = Slice.set ( * s1) _52 ([#"../index_range.rs" 167 4 167 13] [#"../index_range.rs" 167 11 167 13] (-1 : int32)) ; };
[#"../index_range.rs" 168 6 168 7] _55 <- ([#"../index_range.rs" 168 6 168 7] [#"../index_range.rs" 168 6 168 7] (3 : usize));
[#"../index_range.rs" 168 4 168 8] _57 <- ([#"../index_range.rs" 168 4 168 8] _55 < ([#"../index_range.rs" 168 4 168 8] Slice.length ( * s1)));
assert { [@expl:index in bounds] [#"../index_range.rs" 168 4 168 8] _57 };
goto BB31
}
BB31 {
- [#"../index_range.rs" 168 4 168 13] s1 <- { s1 with current = Slice.set ( * s1) _55 ([#"../index_range.rs" 168 4 168 13] [#"../index_range.rs" 168 11 168 13] (-1 : int32)) };
+ [#"../index_range.rs" 168 4 168 13] s1 <- { s1 with current = Slice.set ( * s1) _55 ([#"../index_range.rs" 168 4 168 13] [#"../index_range.rs" 168 11 168 13] (-1 : int32)) ; };
assume { resolve0 s1 };
assume { resolve0 _43 };
[#"../index_range.rs" 170 12 170 21] _61 <- ([#"../index_range.rs" 170 12 170 21] len1 ([#"../index_range.rs" 170 12 170 21] arr));
@@ -3081,8 +3081,8 @@ module IndexRange_TestRangeToInclusive
goto BB19
}
BB19 {
- [#"../index_range.rs" 195 12 195 26] s1 <- Borrow.borrow_mut ( * _35);
- [#"../index_range.rs" 195 12 195 26] _35 <- { _35 with current = ^ s1 };
+ [#"../index_range.rs" 195 12 195 26] s1 <- Borrow.borrow_final ( * _35) (Borrow.get_id _35);
+ [#"../index_range.rs" 195 12 195 26] _35 <- { _35 with current = ( ^ s1) ; };
[#"../index_range.rs" 196 12 196 19] _41 <- ([#"../index_range.rs" 196 12 196 19] len0 ([#"../index_range.rs" 196 12 196 19] * s1));
goto BB20
}
@@ -3106,14 +3106,14 @@ module IndexRange_TestRangeToInclusive
goto BB23
}
BB23 {
- [#"../index_range.rs" 197 4 197 13] s1 <- { s1 with current = Slice.set ( * s1) _44 ([#"../index_range.rs" 197 4 197 13] [#"../index_range.rs" 197 11 197 13] (-1 : int32)) };
+ [#"../index_range.rs" 197 4 197 13] s1 <- { s1 with current = Slice.set ( * s1) _44 ([#"../index_range.rs" 197 4 197 13] [#"../index_range.rs" 197 11 197 13] (-1 : int32)) ; };
[#"../index_range.rs" 198 6 198 7] _47 <- ([#"../index_range.rs" 198 6 198 7] [#"../index_range.rs" 198 6 198 7] (2 : usize));
[#"../index_range.rs" 198 4 198 8] _49 <- ([#"../index_range.rs" 198 4 198 8] _47 < ([#"../index_range.rs" 198 4 198 8] Slice.length ( * s1)));
assert { [@expl:index in bounds] [#"../index_range.rs" 198 4 198 8] _49 };
goto BB24
}
BB24 {
- [#"../index_range.rs" 198 4 198 13] s1 <- { s1 with current = Slice.set ( * s1) _47 ([#"../index_range.rs" 198 4 198 13] [#"../index_range.rs" 198 11 198 13] (-1 : int32)) };
+ [#"../index_range.rs" 198 4 198 13] s1 <- { s1 with current = Slice.set ( * s1) _47 ([#"../index_range.rs" 198 4 198 13] [#"../index_range.rs" 198 11 198 13] (-1 : int32)) ; };
[#"../index_range.rs" 200 14 200 15] _54 <- ([#"../index_range.rs" 200 14 200 15] [#"../index_range.rs" 200 14 200 15] (1 : usize));
[#"../index_range.rs" 200 12 200 16] _56 <- ([#"../index_range.rs" 200 12 200 16] _54 < ([#"../index_range.rs" 200 12 200 16] Slice.length ( * s1)));
assert { [@expl:index in bounds] [#"../index_range.rs" 200 12 200 16] _56 };
diff --git a/creusot/tests/should_succeed/index_range/why3session.xml b/creusot/tests/should_succeed/index_range/why3session.xml
index c9c701d6a5..f051e0dd9c 100644
--- a/creusot/tests/should_succeed/index_range/why3session.xml
+++ b/creusot/tests/should_succeed/index_range/why3session.xml
@@ -9,12 +9,12 @@
-
+
-
+
@@ -36,16 +36,16 @@
-
+
-
+
-
+
@@ -69,136 +69,136 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -207,27 +207,27 @@
-
+
-
+
-
+
-
+
-
+
diff --git a/creusot/tests/should_succeed/index_range/why3shapes.gz b/creusot/tests/should_succeed/index_range/why3shapes.gz
index 9689962c0c..713c791c00 100644
Binary files a/creusot/tests/should_succeed/index_range/why3shapes.gz and b/creusot/tests/should_succeed/index_range/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/inplace_list_reversal.mlcfg b/creusot/tests/should_succeed/inplace_list_reversal.mlcfg
index 427f9e9b17..65a1e6a0e8 100644
--- a/creusot/tests/should_succeed/inplace_list_reversal.mlcfg
+++ b/creusot/tests/should_succeed/inplace_list_reversal.mlcfg
@@ -98,8 +98,8 @@ module InplaceListReversal_Rev
assert { [@expl:type invariant] inv0 old_l };
assume { resolve0 old_l };
[#"../inplace_list_reversal.rs" 26 19 26 22] prev <- ([#"../inplace_list_reversal.rs" 26 19 26 22] InplaceListReversal_List_Type.C_Nil);
- [#"../inplace_list_reversal.rs" 27 27 27 28] _7 <- Borrow.borrow_mut ( * l);
- [#"../inplace_list_reversal.rs" 27 27 27 28] l <- { l with current = ^ _7 };
+ [#"../inplace_list_reversal.rs" 27 27 27 28] _7 <- Borrow.borrow_final ( * l) (Borrow.get_id l);
+ [#"../inplace_list_reversal.rs" 27 27 27 28] l <- { l with current = ( ^ _7) ; };
assume { inv1 ( ^ _7) };
[#"../inplace_list_reversal.rs" 27 19 27 34] head <- ([#"../inplace_list_reversal.rs" 27 19 27 34] replace0 _7 ([#"../inplace_list_reversal.rs" 27 30 27 33] InplaceListReversal_List_Type.C_Nil));
_7 <- any borrowed (InplaceListReversal_List_Type.t_list t);
@@ -172,7 +172,7 @@ module InplaceListReversal_Rev
goto BB4
}
BB21 {
- [#"../inplace_list_reversal.rs" 35 4 35 6] l <- { l with current = ([#"../inplace_list_reversal.rs" 35 9 35 13] prev) };
+ [#"../inplace_list_reversal.rs" 35 4 35 6] l <- { l with current = ([#"../inplace_list_reversal.rs" 35 9 35 13] prev) ; };
[#"../inplace_list_reversal.rs" 35 9 35 13] prev <- any InplaceListReversal_List_Type.t_list t;
assert { [@expl:type invariant] inv1 ( * l) };
assume { resolve1 ( * l) };
diff --git a/creusot/tests/should_succeed/inplace_list_reversal/why3session.xml b/creusot/tests/should_succeed/inplace_list_reversal/why3session.xml
index 71aca0aaf5..31b0868b8c 100644
--- a/creusot/tests/should_succeed/inplace_list_reversal/why3session.xml
+++ b/creusot/tests/should_succeed/inplace_list_reversal/why3session.xml
@@ -7,7 +7,7 @@
-
+
diff --git a/creusot/tests/should_succeed/inplace_list_reversal/why3shapes.gz b/creusot/tests/should_succeed/inplace_list_reversal/why3shapes.gz
index dd4c3810d0..e5dbb9b484 100644
Binary files a/creusot/tests/should_succeed/inplace_list_reversal/why3shapes.gz and b/creusot/tests/should_succeed/inplace_list_reversal/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/invariant_moves.mlcfg b/creusot/tests/should_succeed/invariant_moves.mlcfg
index fd16374e63..54b73fee8c 100644
--- a/creusot/tests/should_succeed/invariant_moves.mlcfg
+++ b/creusot/tests/should_succeed/invariant_moves.mlcfg
@@ -167,8 +167,8 @@ module InvariantMoves_TestInvariantMove
BB3 {
[#"../invariant_moves.rs" 7 26 7 34] _6 <- Borrow.borrow_mut x;
[#"../invariant_moves.rs" 7 26 7 34] x <- ^ _6;
- [#"../invariant_moves.rs" 7 26 7 40] _5 <- Borrow.borrow_mut ( * _6);
- [#"../invariant_moves.rs" 7 26 7 40] _6 <- { _6 with current = ^ _5 };
+ [#"../invariant_moves.rs" 7 26 7 40] _5 <- Borrow.borrow_final ( * _6) (Borrow.get_id _6);
+ [#"../invariant_moves.rs" 7 26 7 40] _6 <- { _6 with current = ( ^ _5) ; };
[#"../invariant_moves.rs" 7 26 7 40] _4 <- ([#"../invariant_moves.rs" 7 26 7 40] pop0 _5);
_5 <- any borrowed (Alloc_Vec_Vec_Type.t_vec uint32 (Alloc_Alloc_Global_Type.t_global));
goto BB4
diff --git a/creusot/tests/should_succeed/ite_normalize/why3session.xml b/creusot/tests/should_succeed/ite_normalize/why3session.xml
index 5ead557f0c..2d0c8562dc 100644
--- a/creusot/tests/should_succeed/ite_normalize/why3session.xml
+++ b/creusot/tests/should_succeed/ite_normalize/why3session.xml
@@ -29,7 +29,7 @@
-
+
diff --git a/creusot/tests/should_succeed/ite_normalize/why3shapes.gz b/creusot/tests/should_succeed/ite_normalize/why3shapes.gz
index 1089268b05..abfcd5003a 100644
Binary files a/creusot/tests/should_succeed/ite_normalize/why3shapes.gz and b/creusot/tests/should_succeed/ite_normalize/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/iterators/01_range.mlcfg b/creusot/tests/should_succeed/iterators/01_range.mlcfg
index 185bf9aa95..4476ee3473 100644
--- a/creusot/tests/should_succeed/iterators/01_range.mlcfg
+++ b/creusot/tests/should_succeed/iterators/01_range.mlcfg
@@ -125,7 +125,7 @@ module C01Range_Impl0_Next
}
BB2 {
[#"../01_range.rs" 61 20 61 30] r <- ([#"../01_range.rs" 61 20 61 30] C01Range_Range_Type.range_start ( * self));
- [#"../01_range.rs" 62 12 62 27] self <- { self with current = (let C01Range_Range_Type.C_Range x0 x1 = * self in C01Range_Range_Type.C_Range ([#"../01_range.rs" 62 12 62 27] C01Range_Range_Type.range_start ( * self) + ([#"../01_range.rs" 62 26 62 27] [#"../01_range.rs" 62 26 62 27] (1 : isize))) x1) };
+ [#"../01_range.rs" 62 12 62 27] self <- { self with current = (let C01Range_Range_Type.C_Range x0 x1 = * self in C01Range_Range_Type.C_Range ([#"../01_range.rs" 62 12 62 27] C01Range_Range_Type.range_start ( * self) + ([#"../01_range.rs" 62 26 62 27] [#"../01_range.rs" 62 26 62 27] (1 : isize))) x1) ; };
assume { resolve0 self };
[#"../01_range.rs" 63 12 63 19] _0 <- ([#"../01_range.rs" 63 12 63 19] Core_Option_Option_Type.C_Some ([#"../01_range.rs" 63 17 63 18] r));
goto BB3
diff --git a/creusot/tests/should_succeed/iterators/01_range/why3session.xml b/creusot/tests/should_succeed/iterators/01_range/why3session.xml
index 9b8a5393ee..3eddb88a0f 100644
--- a/creusot/tests/should_succeed/iterators/01_range/why3session.xml
+++ b/creusot/tests/should_succeed/iterators/01_range/why3session.xml
@@ -12,12 +12,12 @@
-
+
-
+
@@ -27,7 +27,7 @@
-
+
diff --git a/creusot/tests/should_succeed/iterators/01_range/why3shapes.gz b/creusot/tests/should_succeed/iterators/01_range/why3shapes.gz
index 9a664c2c31..8115206ca5 100644
Binary files a/creusot/tests/should_succeed/iterators/01_range/why3shapes.gz and b/creusot/tests/should_succeed/iterators/01_range/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/iterators/02_iter_mut.mlcfg b/creusot/tests/should_succeed/iterators/02_iter_mut.mlcfg
index e05fed1990..2b5904a62a 100644
--- a/creusot/tests/should_succeed/iterators/02_iter_mut.mlcfg
+++ b/creusot/tests/should_succeed/iterators/02_iter_mut.mlcfg
@@ -85,7 +85,6 @@ module C02IterMut_Impl1_ProducesRefl_Impl
val index_logic1 [@inline:trivial] (self : slice t) (ix : int) : t
ensures { result = index_logic1 self ix }
- use seq.Seq
function shallow_model0 (self : borrowed (slice t)) : Seq.seq t =
[#"../../../../../creusot-contracts/src/model.rs" 101 8 101 31] shallow_model1 ( * self)
val shallow_model0 (self : borrowed (slice t)) : Seq.seq t
@@ -101,17 +100,17 @@ module C02IterMut_Impl1_ProducesRefl_Impl
predicate produces0 [#"../02_iter_mut.rs" 37 4 37 65] (self : C02IterMut_IterMut_Type.t_itermut t) (visited : Seq.seq (borrowed t)) (tl : C02IterMut_IterMut_Type.t_itermut t)
=
- [#"../02_iter_mut.rs" 36 4 36 16] Seq.(==) (to_mut_seq0 (C02IterMut_IterMut_Type.itermut_inner self)) (Seq.(++) visited (to_mut_seq0 (C02IterMut_IterMut_Type.itermut_inner tl)))
+ [#"../02_iter_mut.rs" 39 12 43 13] Seq.length (shallow_model0 (C02IterMut_IterMut_Type.itermut_inner self)) = Seq.length visited + Seq.length (shallow_model0 (C02IterMut_IterMut_Type.itermut_inner tl)) /\ (forall i : int . 0 <= i /\ i < Seq.length (shallow_model0 (C02IterMut_IterMut_Type.itermut_inner self)) -> * Seq.get (to_mut_seq0 (C02IterMut_IterMut_Type.itermut_inner self)) i = * Seq.get (Seq.(++) visited (to_mut_seq0 (C02IterMut_IterMut_Type.itermut_inner tl))) i /\ ^ Seq.get (to_mut_seq0 (C02IterMut_IterMut_Type.itermut_inner self)) i = ^ Seq.get (Seq.(++) visited (to_mut_seq0 (C02IterMut_IterMut_Type.itermut_inner tl))) i)
val produces0 [#"../02_iter_mut.rs" 37 4 37 65] (self : C02IterMut_IterMut_Type.t_itermut t) (visited : Seq.seq (borrowed t)) (tl : C02IterMut_IterMut_Type.t_itermut t) : bool
ensures { result = produces0 self visited tl }
use seq.Seq
- let rec ghost function produces_refl [#"../02_iter_mut.rs" 44 4 44 29] (a : C02IterMut_IterMut_Type.t_itermut t) : ()
- requires {[#"../02_iter_mut.rs" 44 21 44 22] inv0 a}
- ensures { [#"../02_iter_mut.rs" 43 14 43 39] produces0 a (Seq.empty ) a }
+ let rec ghost function produces_refl [#"../02_iter_mut.rs" 50 4 50 29] (a : C02IterMut_IterMut_Type.t_itermut t) : ()
+ requires {[#"../02_iter_mut.rs" 50 21 50 22] inv0 a}
+ ensures { [#"../02_iter_mut.rs" 49 14 49 39] produces0 a (Seq.empty ) a }
= [@vc:do_not_keep_trace] [@vc:sp]
- [#"../02_iter_mut.rs" 41 4 41 10] ()
+ [#"../02_iter_mut.rs" 47 4 47 10] ()
end
module C02IterMut_Impl1_ProducesTrans_Impl
type t
@@ -188,7 +187,6 @@ module C02IterMut_Impl1_ProducesTrans_Impl
val index_logic1 [@inline:trivial] (self : slice t) (ix : int) : t
ensures { result = index_logic1 self ix }
- use seq.Seq
function shallow_model0 (self : borrowed (slice t)) : Seq.seq t =
[#"../../../../../creusot-contracts/src/model.rs" 101 8 101 31] shallow_model1 ( * self)
val shallow_model0 (self : borrowed (slice t)) : Seq.seq t
@@ -204,22 +202,22 @@ module C02IterMut_Impl1_ProducesTrans_Impl
predicate produces0 [#"../02_iter_mut.rs" 37 4 37 65] (self : C02IterMut_IterMut_Type.t_itermut t) (visited : Seq.seq (borrowed t)) (tl : C02IterMut_IterMut_Type.t_itermut t)
=
- [#"../02_iter_mut.rs" 36 4 36 16] Seq.(==) (to_mut_seq0 (C02IterMut_IterMut_Type.itermut_inner self)) (Seq.(++) visited (to_mut_seq0 (C02IterMut_IterMut_Type.itermut_inner tl)))
+ [#"../02_iter_mut.rs" 39 12 43 13] Seq.length (shallow_model0 (C02IterMut_IterMut_Type.itermut_inner self)) = Seq.length visited + Seq.length (shallow_model0 (C02IterMut_IterMut_Type.itermut_inner tl)) /\ (forall i : int . 0 <= i /\ i < Seq.length (shallow_model0 (C02IterMut_IterMut_Type.itermut_inner self)) -> * Seq.get (to_mut_seq0 (C02IterMut_IterMut_Type.itermut_inner self)) i = * Seq.get (Seq.(++) visited (to_mut_seq0 (C02IterMut_IterMut_Type.itermut_inner tl))) i /\ ^ Seq.get (to_mut_seq0 (C02IterMut_IterMut_Type.itermut_inner self)) i = ^ Seq.get (Seq.(++) visited (to_mut_seq0 (C02IterMut_IterMut_Type.itermut_inner tl))) i)
val produces0 [#"../02_iter_mut.rs" 37 4 37 65] (self : C02IterMut_IterMut_Type.t_itermut t) (visited : Seq.seq (borrowed t)) (tl : C02IterMut_IterMut_Type.t_itermut t) : bool
ensures { result = produces0 self visited tl }
- let rec ghost function produces_trans [#"../02_iter_mut.rs" 51 4 51 90] (a : C02IterMut_IterMut_Type.t_itermut t) (ab : Seq.seq (borrowed t)) (b : C02IterMut_IterMut_Type.t_itermut t) (bc : Seq.seq (borrowed t)) (c : C02IterMut_IterMut_Type.t_itermut t) : ()
- requires {[#"../02_iter_mut.rs" 48 15 48 32] produces0 a ab b}
- requires {[#"../02_iter_mut.rs" 49 15 49 32] produces0 b bc c}
- requires {[#"../02_iter_mut.rs" 51 22 51 23] inv0 a}
- requires {[#"../02_iter_mut.rs" 51 31 51 33] inv1 ab}
- requires {[#"../02_iter_mut.rs" 51 52 51 53] inv0 b}
- requires {[#"../02_iter_mut.rs" 51 61 51 63] inv1 bc}
- requires {[#"../02_iter_mut.rs" 51 82 51 83] inv0 c}
- ensures { [#"../02_iter_mut.rs" 50 14 50 42] produces0 a (Seq.(++) ab bc) c }
+ let rec ghost function produces_trans [#"../02_iter_mut.rs" 57 4 57 90] (a : C02IterMut_IterMut_Type.t_itermut t) (ab : Seq.seq (borrowed t)) (b : C02IterMut_IterMut_Type.t_itermut t) (bc : Seq.seq (borrowed t)) (c : C02IterMut_IterMut_Type.t_itermut t) : ()
+ requires {[#"../02_iter_mut.rs" 54 15 54 32] produces0 a ab b}
+ requires {[#"../02_iter_mut.rs" 55 15 55 32] produces0 b bc c}
+ requires {[#"../02_iter_mut.rs" 57 22 57 23] inv0 a}
+ requires {[#"../02_iter_mut.rs" 57 31 57 33] inv1 ab}
+ requires {[#"../02_iter_mut.rs" 57 52 57 53] inv0 b}
+ requires {[#"../02_iter_mut.rs" 57 61 57 63] inv1 bc}
+ requires {[#"../02_iter_mut.rs" 57 82 57 83] inv0 c}
+ ensures { [#"../02_iter_mut.rs" 56 14 56 42] produces0 a (Seq.(++) ab bc) c }
= [@vc:do_not_keep_trace] [@vc:sp]
- [#"../02_iter_mut.rs" 46 4 46 10] ()
+ [#"../02_iter_mut.rs" 52 4 52 10] ()
end
module Core_Option_Option_Type
type t_option 't =
@@ -335,7 +333,6 @@ module C02IterMut_Impl1_Next
val index_logic0 [@inline:trivial] (self : slice t) (ix : int) : t
ensures { result = index_logic0 self ix }
- use seq.Seq
function shallow_model1 (self : borrowed (slice t)) : Seq.seq t =
[#"../../../../../creusot-contracts/src/model.rs" 101 8 101 31] shallow_model0 ( * self)
val shallow_model1 (self : borrowed (slice t)) : Seq.seq t
@@ -351,23 +348,23 @@ module C02IterMut_Impl1_Next
predicate produces0 [#"../02_iter_mut.rs" 37 4 37 65] (self : C02IterMut_IterMut_Type.t_itermut t) (visited : Seq.seq (borrowed t)) (tl : C02IterMut_IterMut_Type.t_itermut t)
=
- [#"../02_iter_mut.rs" 36 4 36 16] Seq.(==) (to_mut_seq0 (C02IterMut_IterMut_Type.itermut_inner self)) (Seq.(++) visited (to_mut_seq0 (C02IterMut_IterMut_Type.itermut_inner tl)))
+ [#"../02_iter_mut.rs" 39 12 43 13] Seq.length (shallow_model1 (C02IterMut_IterMut_Type.itermut_inner self)) = Seq.length visited + Seq.length (shallow_model1 (C02IterMut_IterMut_Type.itermut_inner tl)) /\ (forall i : int . 0 <= i /\ i < Seq.length (shallow_model1 (C02IterMut_IterMut_Type.itermut_inner self)) -> * Seq.get (to_mut_seq0 (C02IterMut_IterMut_Type.itermut_inner self)) i = * Seq.get (Seq.(++) visited (to_mut_seq0 (C02IterMut_IterMut_Type.itermut_inner tl))) i /\ ^ Seq.get (to_mut_seq0 (C02IterMut_IterMut_Type.itermut_inner self)) i = ^ Seq.get (Seq.(++) visited (to_mut_seq0 (C02IterMut_IterMut_Type.itermut_inner tl))) i)
val produces0 [#"../02_iter_mut.rs" 37 4 37 65] (self : C02IterMut_IterMut_Type.t_itermut t) (visited : Seq.seq (borrowed t)) (tl : C02IterMut_IterMut_Type.t_itermut t) : bool
ensures { result = produces0 self visited tl }
use seq.Seq
use seq.Seq
use seq.Seq
+ predicate completed0 [#"../02_iter_mut.rs" 31 4 31 35] (self : borrowed (C02IterMut_IterMut_Type.t_itermut t)) =
+ [#"../02_iter_mut.rs" 32 8 32 88] shallow_model1 (C02IterMut_IterMut_Type.itermut_inner ( * self)) = shallow_model1 (C02IterMut_IterMut_Type.itermut_inner ( ^ self)) /\ Seq.(==) (shallow_model1 (C02IterMut_IterMut_Type.itermut_inner ( * self))) (Seq.empty )
+ val completed0 [#"../02_iter_mut.rs" 31 4 31 35] (self : borrowed (C02IterMut_IterMut_Type.t_itermut t)) : bool
+ ensures { result = completed0 self }
+
predicate resolve0 (self : borrowed (C02IterMut_IterMut_Type.t_itermut t)) =
[#"../../../../../creusot-contracts/src/resolve.rs" 25 20 25 34] ^ self = * self
val resolve0 (self : borrowed (C02IterMut_IterMut_Type.t_itermut t)) : bool
ensures { result = resolve0 self }
- predicate completed0 [#"../02_iter_mut.rs" 31 4 31 35] (self : borrowed (C02IterMut_IterMut_Type.t_itermut t)) =
- [#"../02_iter_mut.rs" 32 8 32 70] resolve0 self /\ Seq.(==) (shallow_model1 (C02IterMut_IterMut_Type.itermut_inner ( * self))) (Seq.empty )
- val completed0 [#"../02_iter_mut.rs" 31 4 31 35] (self : borrowed (C02IterMut_IterMut_Type.t_itermut t)) : bool
- ensures { result = completed0 self }
-
use seq_ext.SeqExt
function tail0 (self : Seq.seq t) : Seq.seq t =
[#"../../../../../creusot-contracts/src/logic/seq.rs" 52 8 52 39] SeqExt.subsequence self 1 (Seq.length self)
@@ -378,17 +375,17 @@ module C02IterMut_Impl1_Next
requires {inv3 self}
ensures { [#"../../../../../creusot-contracts/src/std/slice.rs" 278 18 285 9] match result with
| Core_Option_Option_Type.C_Some r -> * r = index_logic0 ( * * self) 0 /\ ^ r = index_logic0 ( ^ * self) 0 /\ Seq.length (shallow_model0 ( * * self)) > 0 /\ Seq.length (shallow_model0 ( ^ * self)) > 0 /\ shallow_model0 ( * ^ self) = tail0 (shallow_model0 ( * * self)) /\ shallow_model0 ( ^ ^ self) = tail0 (shallow_model0 ( ^ * self))
- | Core_Option_Option_Type.C_None -> ^ self = * self /\ Seq.length (shallow_model0 ( * * self)) = 0
+ | Core_Option_Option_Type.C_None -> Seq.length (shallow_model0 ( * ^ self)) = 0 /\ Seq.length (shallow_model0 ( ^ * self)) = 0 /\ Seq.length (shallow_model0 ( * * self)) = 0 /\ Seq.length (shallow_model0 ( ^ ^ self)) = 0
end }
ensures { inv2 result }
- let rec cfg next [#"../02_iter_mut.rs" 57 4 57 44] [@cfg:stackify] [@cfg:subregion_analysis] (self : borrowed (C02IterMut_IterMut_Type.t_itermut t)) : Core_Option_Option_Type.t_option (borrowed t)
- requires {[#"../02_iter_mut.rs" 57 17 57 21] inv1 self}
- ensures { [#"../02_iter_mut.rs" 53 14 56 5] match result with
+ let rec cfg next [#"../02_iter_mut.rs" 63 4 63 44] [@cfg:stackify] [@cfg:subregion_analysis] (self : borrowed (C02IterMut_IterMut_Type.t_itermut t)) : Core_Option_Option_Type.t_option (borrowed t)
+ requires {[#"../02_iter_mut.rs" 63 17 63 21] inv1 self}
+ ensures { [#"../02_iter_mut.rs" 59 14 62 5] match result with
| Core_Option_Option_Type.C_None -> completed0 self
| Core_Option_Option_Type.C_Some v -> produces0 ( * self) (Seq.singleton v) ( ^ self)
end }
- ensures { [#"../02_iter_mut.rs" 57 26 57 44] inv2 result }
+ ensures { [#"../02_iter_mut.rs" 63 26 63 44] inv2 result }
= [@vc:do_not_keep_trace] [@vc:sp]
var _0 : Core_Option_Option_Type.t_option (borrowed t);
@@ -398,10 +395,10 @@ module C02IterMut_Impl1_Next
goto BB0
}
BB0 {
- [#"../02_iter_mut.rs" 58 8 58 37] _3 <- Borrow.borrow_mut (C02IterMut_IterMut_Type.itermut_inner ( * self));
- [#"../02_iter_mut.rs" 58 8 58 37] self <- { self with current = (let C02IterMut_IterMut_Type.C_IterMut x0 = * self in C02IterMut_IterMut_Type.C_IterMut ( ^ _3)) };
+ [#"../02_iter_mut.rs" 64 8 64 37] _3 <- Borrow.borrow_final (C02IterMut_IterMut_Type.itermut_inner ( * self)) (Borrow.inherit_id (Borrow.get_id self) 1);
+ [#"../02_iter_mut.rs" 64 8 64 37] self <- { self with current = (let C02IterMut_IterMut_Type.C_IterMut x0 = * self in C02IterMut_IterMut_Type.C_IterMut ( ^ _3)) ; };
assume { inv0 ( ^ _3) };
- [#"../02_iter_mut.rs" 58 8 58 37] _0 <- ([#"../02_iter_mut.rs" 58 8 58 37] take_first_mut0 _3);
+ [#"../02_iter_mut.rs" 64 8 64 37] _0 <- ([#"../02_iter_mut.rs" 64 8 64 37] take_first_mut0 _3);
_3 <- any borrowed (borrowed (slice t));
goto BB1
}
@@ -470,10 +467,10 @@ module C02IterMut_Impl2_IntoIter
axiom inv0 : forall x : C02IterMut_IterMut_Type.t_itermut t . inv0 x = (invariant0 x /\ match x with
| C02IterMut_IterMut_Type.C_IterMut inner -> true
end)
- let rec cfg into_iter [#"../02_iter_mut.rs" 64 4 64 30] [@cfg:stackify] [@cfg:subregion_analysis] (self : C02IterMut_IterMut_Type.t_itermut t) : C02IterMut_IterMut_Type.t_itermut t
- requires {[#"../02_iter_mut.rs" 64 17 64 21] inv0 self}
- ensures { [#"../02_iter_mut.rs" 63 14 63 28] result = self }
- ensures { [#"../02_iter_mut.rs" 64 26 64 30] inv0 result }
+ let rec cfg into_iter [#"../02_iter_mut.rs" 70 4 70 30] [@cfg:stackify] [@cfg:subregion_analysis] (self : C02IterMut_IterMut_Type.t_itermut t) : C02IterMut_IterMut_Type.t_itermut t
+ requires {[#"../02_iter_mut.rs" 70 17 70 21] inv0 self}
+ ensures { [#"../02_iter_mut.rs" 69 14 69 28] result = self }
+ ensures { [#"../02_iter_mut.rs" 70 26 70 30] inv0 result }
= [@vc:do_not_keep_trace] [@vc:sp]
var _0 : C02IterMut_IterMut_Type.t_itermut t;
@@ -482,8 +479,8 @@ module C02IterMut_Impl2_IntoIter
goto BB0
}
BB0 {
- [#"../02_iter_mut.rs" 65 8 65 12] _0 <- ([#"../02_iter_mut.rs" 65 8 65 12] self);
- [#"../02_iter_mut.rs" 65 8 65 12] self <- any C02IterMut_IterMut_Type.t_itermut t;
+ [#"../02_iter_mut.rs" 71 8 71 12] _0 <- ([#"../02_iter_mut.rs" 71 8 71 12] self);
+ [#"../02_iter_mut.rs" 71 8 71 12] self <- any C02IterMut_IterMut_Type.t_itermut t;
return _0
}
@@ -674,12 +671,12 @@ module C02IterMut_IterMut
ensures { [#"../../../../../creusot-contracts/src/std/vec.rs" 136 26 136 55] Seq.length (shallow_model3 ( ^ self)) = Seq.length (shallow_model1 self) }
ensures { inv2 result }
- let rec cfg iter_mut [#"../02_iter_mut.rs" 72 0 72 55] [@cfg:stackify] [@cfg:subregion_analysis] (v : borrowed (Alloc_Vec_Vec_Type.t_vec t (Alloc_Alloc_Global_Type.t_global))) : C02IterMut_IterMut_Type.t_itermut t
- requires {[#"../02_iter_mut.rs" 72 19 72 20] inv3 v}
- ensures { [#"../02_iter_mut.rs" 69 10 69 29] shallow_model0 (C02IterMut_IterMut_Type.itermut_inner result) = shallow_model1 v }
- ensures { [#"../02_iter_mut.rs" 70 10 70 35] shallow_model2 ( ^ C02IterMut_IterMut_Type.itermut_inner result) = shallow_model3 ( ^ v) }
- ensures { [#"../02_iter_mut.rs" 71 10 71 33] Seq.length (shallow_model3 ( ^ v)) = Seq.length (shallow_model1 v) }
- ensures { [#"../02_iter_mut.rs" 72 41 72 55] inv4 result }
+ let rec cfg iter_mut [#"../02_iter_mut.rs" 78 0 78 55] [@cfg:stackify] [@cfg:subregion_analysis] (v : borrowed (Alloc_Vec_Vec_Type.t_vec t (Alloc_Alloc_Global_Type.t_global))) : C02IterMut_IterMut_Type.t_itermut t
+ requires {[#"../02_iter_mut.rs" 78 19 78 20] inv3 v}
+ ensures { [#"../02_iter_mut.rs" 75 10 75 29] shallow_model0 (C02IterMut_IterMut_Type.itermut_inner result) = shallow_model1 v }
+ ensures { [#"../02_iter_mut.rs" 76 10 76 35] shallow_model2 ( ^ C02IterMut_IterMut_Type.itermut_inner result) = shallow_model3 ( ^ v) }
+ ensures { [#"../02_iter_mut.rs" 77 10 77 33] Seq.length (shallow_model3 ( ^ v)) = Seq.length (shallow_model1 v) }
+ ensures { [#"../02_iter_mut.rs" 78 41 78 55] inv4 result }
= [@vc:do_not_keep_trace] [@vc:sp]
var _0 : C02IterMut_IterMut_Type.t_itermut t;
@@ -692,21 +689,21 @@ module C02IterMut_IterMut
goto BB0
}
BB0 {
- [#"../02_iter_mut.rs" 73 26 73 27] _8 <- Borrow.borrow_mut ( * v);
- [#"../02_iter_mut.rs" 73 26 73 27] v <- { v with current = ^ _8 };
+ [#"../02_iter_mut.rs" 79 26 79 27] _8 <- Borrow.borrow_final ( * v) (Borrow.get_id v);
+ [#"../02_iter_mut.rs" 79 26 79 27] v <- { v with current = ( ^ _8) ; };
assume { inv0 ( ^ _8) };
- [#"../02_iter_mut.rs" 73 26 73 31] _7 <- ([#"../02_iter_mut.rs" 73 26 73 31] index_mut0 _8 ([#"../02_iter_mut.rs" 73 28 73 30] Core_Ops_Range_RangeFull_Type.C_RangeFull));
+ [#"../02_iter_mut.rs" 79 26 79 31] _7 <- ([#"../02_iter_mut.rs" 79 26 79 31] index_mut0 _8 ([#"../02_iter_mut.rs" 79 28 79 30] Core_Ops_Range_RangeFull_Type.C_RangeFull));
_8 <- any borrowed (Alloc_Vec_Vec_Type.t_vec t (Alloc_Alloc_Global_Type.t_global));
goto BB1
}
BB1 {
- [#"../02_iter_mut.rs" 73 21 73 31] _6 <- Borrow.borrow_mut ( * _7);
- [#"../02_iter_mut.rs" 73 21 73 31] _7 <- { _7 with current = ^ _6 };
+ [#"../02_iter_mut.rs" 79 21 79 31] _6 <- Borrow.borrow_final ( * _7) (Borrow.get_id _7);
+ [#"../02_iter_mut.rs" 79 21 79 31] _7 <- { _7 with current = ( ^ _6) ; };
assume { inv1 ( ^ _6) };
- [#"../02_iter_mut.rs" 73 21 73 31] _5 <- Borrow.borrow_mut ( * _6);
- [#"../02_iter_mut.rs" 73 21 73 31] _6 <- { _6 with current = ^ _5 };
+ [#"../02_iter_mut.rs" 79 21 79 31] _5 <- Borrow.borrow_final ( * _6) (Borrow.get_id _6);
+ [#"../02_iter_mut.rs" 79 21 79 31] _6 <- { _6 with current = ( ^ _5) ; };
assume { inv1 ( ^ _5) };
- [#"../02_iter_mut.rs" 73 4 73 33] _0 <- ([#"../02_iter_mut.rs" 73 4 73 33] C02IterMut_IterMut_Type.C_IterMut _5);
+ [#"../02_iter_mut.rs" 79 4 79 33] _0 <- ([#"../02_iter_mut.rs" 79 4 79 33] C02IterMut_IterMut_Type.C_IterMut _5);
_5 <- any borrowed (slice t);
assert { [@expl:type invariant] inv2 _7 };
assume { resolve0 _7 };
@@ -837,7 +834,6 @@ module C02IterMut_AllZero
val index_logic4 [@inline:trivial] (self : slice usize) (ix : int) : usize
ensures { result = index_logic4 self ix }
- use seq.Seq
function shallow_model3 (self : borrowed (slice usize)) : Seq.seq usize =
[#"../../../../../creusot-contracts/src/model.rs" 101 8 101 31] shallow_model4 ( * self)
val shallow_model3 (self : borrowed (slice usize)) : Seq.seq usize
@@ -853,33 +849,33 @@ module C02IterMut_AllZero
predicate produces0 [#"../02_iter_mut.rs" 37 4 37 65] (self : C02IterMut_IterMut_Type.t_itermut usize) (visited : Seq.seq (borrowed usize)) (tl : C02IterMut_IterMut_Type.t_itermut usize)
=
- [#"../02_iter_mut.rs" 36 4 36 16] Seq.(==) (to_mut_seq0 (C02IterMut_IterMut_Type.itermut_inner self)) (Seq.(++) visited (to_mut_seq0 (C02IterMut_IterMut_Type.itermut_inner tl)))
+ [#"../02_iter_mut.rs" 39 12 43 13] Seq.length (shallow_model3 (C02IterMut_IterMut_Type.itermut_inner self)) = Seq.length visited + Seq.length (shallow_model3 (C02IterMut_IterMut_Type.itermut_inner tl)) /\ (forall i : int . 0 <= i /\ i < Seq.length (shallow_model3 (C02IterMut_IterMut_Type.itermut_inner self)) -> * Seq.get (to_mut_seq0 (C02IterMut_IterMut_Type.itermut_inner self)) i = * Seq.get (Seq.(++) visited (to_mut_seq0 (C02IterMut_IterMut_Type.itermut_inner tl))) i /\ ^ Seq.get (to_mut_seq0 (C02IterMut_IterMut_Type.itermut_inner self)) i = ^ Seq.get (Seq.(++) visited (to_mut_seq0 (C02IterMut_IterMut_Type.itermut_inner tl))) i)
val produces0 [#"../02_iter_mut.rs" 37 4 37 65] (self : C02IterMut_IterMut_Type.t_itermut usize) (visited : Seq.seq (borrowed usize)) (tl : C02IterMut_IterMut_Type.t_itermut usize) : bool
ensures { result = produces0 self visited tl }
- function produces_trans0 [#"../02_iter_mut.rs" 51 4 51 90] (a : C02IterMut_IterMut_Type.t_itermut usize) (ab : Seq.seq (borrowed usize)) (b : C02IterMut_IterMut_Type.t_itermut usize) (bc : Seq.seq (borrowed usize)) (c : C02IterMut_IterMut_Type.t_itermut usize) : ()
+ function produces_trans0 [#"../02_iter_mut.rs" 57 4 57 90] (a : C02IterMut_IterMut_Type.t_itermut usize) (ab : Seq.seq (borrowed usize)) (b : C02IterMut_IterMut_Type.t_itermut usize) (bc : Seq.seq (borrowed usize)) (c : C02IterMut_IterMut_Type.t_itermut usize) : ()
=
- [#"../02_iter_mut.rs" 46 4 46 10] ()
- val produces_trans0 [#"../02_iter_mut.rs" 51 4 51 90] (a : C02IterMut_IterMut_Type.t_itermut usize) (ab : Seq.seq (borrowed usize)) (b : C02IterMut_IterMut_Type.t_itermut usize) (bc : Seq.seq (borrowed usize)) (c : C02IterMut_IterMut_Type.t_itermut usize) : ()
- requires {[#"../02_iter_mut.rs" 48 15 48 32] produces0 a ab b}
- requires {[#"../02_iter_mut.rs" 49 15 49 32] produces0 b bc c}
- requires {[#"../02_iter_mut.rs" 51 22 51 23] inv0 a}
- requires {[#"../02_iter_mut.rs" 51 31 51 33] inv8 ab}
- requires {[#"../02_iter_mut.rs" 51 52 51 53] inv0 b}
- requires {[#"../02_iter_mut.rs" 51 61 51 63] inv8 bc}
- requires {[#"../02_iter_mut.rs" 51 82 51 83] inv0 c}
+ [#"../02_iter_mut.rs" 52 4 52 10] ()
+ val produces_trans0 [#"../02_iter_mut.rs" 57 4 57 90] (a : C02IterMut_IterMut_Type.t_itermut usize) (ab : Seq.seq (borrowed usize)) (b : C02IterMut_IterMut_Type.t_itermut usize) (bc : Seq.seq (borrowed usize)) (c : C02IterMut_IterMut_Type.t_itermut usize) : ()
+ requires {[#"../02_iter_mut.rs" 54 15 54 32] produces0 a ab b}
+ requires {[#"../02_iter_mut.rs" 55 15 55 32] produces0 b bc c}
+ requires {[#"../02_iter_mut.rs" 57 22 57 23] inv0 a}
+ requires {[#"../02_iter_mut.rs" 57 31 57 33] inv8 ab}
+ requires {[#"../02_iter_mut.rs" 57 52 57 53] inv0 b}
+ requires {[#"../02_iter_mut.rs" 57 61 57 63] inv8 bc}
+ requires {[#"../02_iter_mut.rs" 57 82 57 83] inv0 c}
ensures { result = produces_trans0 a ab b bc c }
- axiom produces_trans0_spec : forall a : C02IterMut_IterMut_Type.t_itermut usize, ab : Seq.seq (borrowed usize), b : C02IterMut_IterMut_Type.t_itermut usize, bc : Seq.seq (borrowed usize), c : C02IterMut_IterMut_Type.t_itermut usize . ([#"../02_iter_mut.rs" 48 15 48 32] produces0 a ab b) -> ([#"../02_iter_mut.rs" 49 15 49 32] produces0 b bc c) -> ([#"../02_iter_mut.rs" 51 22 51 23] inv0 a) -> ([#"../02_iter_mut.rs" 51 31 51 33] inv8 ab) -> ([#"../02_iter_mut.rs" 51 52 51 53] inv0 b) -> ([#"../02_iter_mut.rs" 51 61 51 63] inv8 bc) -> ([#"../02_iter_mut.rs" 51 82 51 83] inv0 c) -> ([#"../02_iter_mut.rs" 50 14 50 42] produces0 a (Seq.(++) ab bc) c)
+ axiom produces_trans0_spec : forall a : C02IterMut_IterMut_Type.t_itermut usize, ab : Seq.seq (borrowed usize), b : C02IterMut_IterMut_Type.t_itermut usize, bc : Seq.seq (borrowed usize), c : C02IterMut_IterMut_Type.t_itermut usize . ([#"../02_iter_mut.rs" 54 15 54 32] produces0 a ab b) -> ([#"../02_iter_mut.rs" 55 15 55 32] produces0 b bc c) -> ([#"../02_iter_mut.rs" 57 22 57 23] inv0 a) -> ([#"../02_iter_mut.rs" 57 31 57 33] inv8 ab) -> ([#"../02_iter_mut.rs" 57 52 57 53] inv0 b) -> ([#"../02_iter_mut.rs" 57 61 57 63] inv8 bc) -> ([#"../02_iter_mut.rs" 57 82 57 83] inv0 c) -> ([#"../02_iter_mut.rs" 56 14 56 42] produces0 a (Seq.(++) ab bc) c)
use seq.Seq
- function produces_refl0 [#"../02_iter_mut.rs" 44 4 44 29] (a : C02IterMut_IterMut_Type.t_itermut usize) : () =
- [#"../02_iter_mut.rs" 41 4 41 10] ()
- val produces_refl0 [#"../02_iter_mut.rs" 44 4 44 29] (a : C02IterMut_IterMut_Type.t_itermut usize) : ()
- requires {[#"../02_iter_mut.rs" 44 21 44 22] inv0 a}
+ function produces_refl0 [#"../02_iter_mut.rs" 50 4 50 29] (a : C02IterMut_IterMut_Type.t_itermut usize) : () =
+ [#"../02_iter_mut.rs" 47 4 47 10] ()
+ val produces_refl0 [#"../02_iter_mut.rs" 50 4 50 29] (a : C02IterMut_IterMut_Type.t_itermut usize) : ()
+ requires {[#"../02_iter_mut.rs" 50 21 50 22] inv0 a}
ensures { result = produces_refl0 a }
- axiom produces_refl0_spec : forall a : C02IterMut_IterMut_Type.t_itermut usize . ([#"../02_iter_mut.rs" 44 21 44 22] inv0 a) -> ([#"../02_iter_mut.rs" 43 14 43 39] produces0 a (Seq.empty ) a)
+ axiom produces_refl0_spec : forall a : C02IterMut_IterMut_Type.t_itermut usize . ([#"../02_iter_mut.rs" 50 21 50 22] inv0 a) -> ([#"../02_iter_mut.rs" 49 14 49 39] produces0 a (Seq.empty ) a)
predicate invariant0 [#"../02_iter_mut.rs" 20 4 20 30] (self : C02IterMut_IterMut_Type.t_itermut usize) =
[#"../02_iter_mut.rs" 22 20 22 64] Seq.length (shallow_model4 ( ^ C02IterMut_IterMut_Type.itermut_inner self)) = Seq.length (shallow_model4 ( * C02IterMut_IterMut_Type.itermut_inner self))
val invariant0 [#"../02_iter_mut.rs" 20 4 20 30] (self : C02IterMut_IterMut_Type.t_itermut usize) : bool
@@ -916,23 +912,18 @@ module C02IterMut_AllZero
use seq.Seq
use seq.Seq
use seq.Seq
- predicate resolve2 (self : borrowed (C02IterMut_IterMut_Type.t_itermut usize)) =
- [#"../../../../../creusot-contracts/src/resolve.rs" 25 20 25 34] ^ self = * self
- val resolve2 (self : borrowed (C02IterMut_IterMut_Type.t_itermut usize)) : bool
- ensures { result = resolve2 self }
-
predicate completed0 [#"../02_iter_mut.rs" 31 4 31 35] (self : borrowed (C02IterMut_IterMut_Type.t_itermut usize)) =
- [#"../02_iter_mut.rs" 32 8 32 70] resolve2 self /\ Seq.(==) (shallow_model3 (C02IterMut_IterMut_Type.itermut_inner ( * self))) (Seq.empty )
+ [#"../02_iter_mut.rs" 32 8 32 88] shallow_model3 (C02IterMut_IterMut_Type.itermut_inner ( * self)) = shallow_model3 (C02IterMut_IterMut_Type.itermut_inner ( ^ self)) /\ Seq.(==) (shallow_model3 (C02IterMut_IterMut_Type.itermut_inner ( * self))) (Seq.empty )
val completed0 [#"../02_iter_mut.rs" 31 4 31 35] (self : borrowed (C02IterMut_IterMut_Type.t_itermut usize)) : bool
ensures { result = completed0 self }
- val next0 [#"../02_iter_mut.rs" 57 4 57 44] (self : borrowed (C02IterMut_IterMut_Type.t_itermut usize)) : Core_Option_Option_Type.t_option (borrowed usize)
- requires {[#"../02_iter_mut.rs" 57 17 57 21] inv2 self}
- ensures { [#"../02_iter_mut.rs" 53 14 56 5] match result with
+ val next0 [#"../02_iter_mut.rs" 63 4 63 44] (self : borrowed (C02IterMut_IterMut_Type.t_itermut usize)) : Core_Option_Option_Type.t_option (borrowed usize)
+ requires {[#"../02_iter_mut.rs" 63 17 63 21] inv2 self}
+ ensures { [#"../02_iter_mut.rs" 59 14 62 5] match result with
| Core_Option_Option_Type.C_None -> completed0 self
| Core_Option_Option_Type.C_Some v -> produces0 ( * self) (Seq.singleton v) ( ^ self)
end }
- ensures { [#"../02_iter_mut.rs" 57 26 57 44] inv3 result }
+ ensures { [#"../02_iter_mut.rs" 63 26 63 44] inv3 result }
use prelude.Ghost
function index_logic0 [@inline:trivial] (self : Ghost.ghost_ty (Seq.seq (borrowed usize))) (ix : int) : borrowed usize
@@ -945,21 +936,21 @@ module C02IterMut_AllZero
use prelude.Ghost
use prelude.Ghost
use prelude.Ghost
- val into_iter0 [#"../02_iter_mut.rs" 64 4 64 30] (self : C02IterMut_IterMut_Type.t_itermut usize) : C02IterMut_IterMut_Type.t_itermut usize
- requires {[#"../02_iter_mut.rs" 64 17 64 21] inv0 self}
- ensures { [#"../02_iter_mut.rs" 63 14 63 28] result = self }
- ensures { [#"../02_iter_mut.rs" 64 26 64 30] inv0 result }
-
- val iter_mut0 [#"../02_iter_mut.rs" 72 0 72 55] (v : borrowed (Alloc_Vec_Vec_Type.t_vec usize (Alloc_Alloc_Global_Type.t_global))) : C02IterMut_IterMut_Type.t_itermut usize
- requires {[#"../02_iter_mut.rs" 72 19 72 20] inv1 v}
- ensures { [#"../02_iter_mut.rs" 69 10 69 29] shallow_model3 (C02IterMut_IterMut_Type.itermut_inner result) = shallow_model2 v }
- ensures { [#"../02_iter_mut.rs" 70 10 70 35] shallow_model4 ( ^ C02IterMut_IterMut_Type.itermut_inner result) = shallow_model1 ( ^ v) }
- ensures { [#"../02_iter_mut.rs" 71 10 71 33] Seq.length (shallow_model1 ( ^ v)) = Seq.length (shallow_model2 v) }
- ensures { [#"../02_iter_mut.rs" 72 41 72 55] inv0 result }
-
- let rec cfg all_zero [#"../02_iter_mut.rs" 78 0 78 35] [@cfg:stackify] [@cfg:subregion_analysis] (v : borrowed (Alloc_Vec_Vec_Type.t_vec usize (Alloc_Alloc_Global_Type.t_global))) : ()
- ensures { [#"../02_iter_mut.rs" 76 10 76 33] Seq.length (shallow_model1 ( ^ v)) = Seq.length (shallow_model2 v) }
- ensures { [#"../02_iter_mut.rs" 77 0 77 66] forall i : int . 0 <= i /\ i < Seq.length (shallow_model2 v) -> UIntSize.to_int (index_logic1 ( ^ v) i) = 0 }
+ val into_iter0 [#"../02_iter_mut.rs" 70 4 70 30] (self : C02IterMut_IterMut_Type.t_itermut usize) : C02IterMut_IterMut_Type.t_itermut usize
+ requires {[#"../02_iter_mut.rs" 70 17 70 21] inv0 self}
+ ensures { [#"../02_iter_mut.rs" 69 14 69 28] result = self }
+ ensures { [#"../02_iter_mut.rs" 70 26 70 30] inv0 result }
+
+ val iter_mut0 [#"../02_iter_mut.rs" 78 0 78 55] (v : borrowed (Alloc_Vec_Vec_Type.t_vec usize (Alloc_Alloc_Global_Type.t_global))) : C02IterMut_IterMut_Type.t_itermut usize
+ requires {[#"../02_iter_mut.rs" 78 19 78 20] inv1 v}
+ ensures { [#"../02_iter_mut.rs" 75 10 75 29] shallow_model3 (C02IterMut_IterMut_Type.itermut_inner result) = shallow_model2 v }
+ ensures { [#"../02_iter_mut.rs" 76 10 76 35] shallow_model4 ( ^ C02IterMut_IterMut_Type.itermut_inner result) = shallow_model1 ( ^ v) }
+ ensures { [#"../02_iter_mut.rs" 77 10 77 33] Seq.length (shallow_model1 ( ^ v)) = Seq.length (shallow_model2 v) }
+ ensures { [#"../02_iter_mut.rs" 78 41 78 55] inv0 result }
+
+ let rec cfg all_zero [#"../02_iter_mut.rs" 84 0 84 35] [@cfg:stackify] [@cfg:subregion_analysis] (v : borrowed (Alloc_Vec_Vec_Type.t_vec usize (Alloc_Alloc_Global_Type.t_global))) : ()
+ ensures { [#"../02_iter_mut.rs" 82 10 82 33] Seq.length (shallow_model1 ( ^ v)) = Seq.length (shallow_model2 v) }
+ ensures { [#"../02_iter_mut.rs" 83 0 83 66] forall i : int . 0 <= i /\ i < Seq.length (shallow_model2 v) -> UIntSize.to_int (index_logic1 ( ^ v) i) = 0 }
= [@vc:do_not_keep_trace] [@vc:sp]
var _0 : ();
@@ -977,39 +968,39 @@ module C02IterMut_AllZero
goto BB0
}
BB0 {
- [#"../02_iter_mut.rs" 79 26 79 27] _6 <- Borrow.borrow_mut ( * v);
- [#"../02_iter_mut.rs" 79 26 79 27] v <- { v with current = ^ _6 };
- [#"../02_iter_mut.rs" 79 17 79 28] _5 <- ([#"../02_iter_mut.rs" 79 17 79 28] iter_mut0 _6);
+ [#"../02_iter_mut.rs" 85 26 85 27] _6 <- Borrow.borrow_final ( * v) (Borrow.get_id v);
+ [#"../02_iter_mut.rs" 85 26 85 27] v <- { v with current = ( ^ _6) ; };
+ [#"../02_iter_mut.rs" 85 17 85 28] _5 <- ([#"../02_iter_mut.rs" 85 17 85 28] iter_mut0 _6);
_6 <- any borrowed (Alloc_Vec_Vec_Type.t_vec usize (Alloc_Alloc_Global_Type.t_global));
goto BB1
}
BB1 {
- [#"../02_iter_mut.rs" 79 17 79 40] it <- ([#"../02_iter_mut.rs" 79 17 79 40] into_iter0 _5);
+ [#"../02_iter_mut.rs" 85 17 85 40] it <- ([#"../02_iter_mut.rs" 85 17 85 40] into_iter0 _5);
_5 <- any C02IterMut_IterMut_Type.t_itermut usize;
goto BB2
}
BB2 {
- [#"../02_iter_mut.rs" 80 19 80 29] iter_old <- ([#"../02_iter_mut.rs" 80 19 80 29] Ghost.new it);
+ [#"../02_iter_mut.rs" 86 19 86 29] iter_old <- ([#"../02_iter_mut.rs" 86 19 86 29] Ghost.new it);
goto BB3
}
BB3 {
- [#"../02_iter_mut.rs" 81 23 81 41] produced <- ([#"../02_iter_mut.rs" 81 23 81 41] Ghost.new (Seq.empty ));
+ [#"../02_iter_mut.rs" 87 23 87 41] produced <- ([#"../02_iter_mut.rs" 87 23 87 41] Ghost.new (Seq.empty ));
goto BB4
}
BB4 {
goto BB5
}
BB5 {
- invariant { [#"../02_iter_mut.rs" 82 16 82 23] inv0 it };
- invariant { [#"../02_iter_mut.rs" 83 16 83 55] produces0 (Ghost.inner iter_old) (Ghost.inner produced) it };
- invariant { [#"../02_iter_mut.rs" 82 4 82 25] forall i : int . 0 <= i /\ i < Seq.length (Ghost.inner produced) -> UIntSize.to_int ( ^ index_logic0 produced i) = 0 };
+ invariant { [#"../02_iter_mut.rs" 88 16 88 23] inv0 it };
+ invariant { [#"../02_iter_mut.rs" 89 16 89 55] produces0 (Ghost.inner iter_old) (Ghost.inner produced) it };
+ invariant { [#"../02_iter_mut.rs" 88 4 88 25] forall i : int . 0 <= i /\ i < Seq.length (Ghost.inner produced) -> UIntSize.to_int ( ^ index_logic0 produced i) = 0 };
goto BB6
}
BB6 {
- [#"../02_iter_mut.rs" 86 14 86 23] _16 <- Borrow.borrow_mut it;
- [#"../02_iter_mut.rs" 86 14 86 23] it <- ^ _16;
+ [#"../02_iter_mut.rs" 92 14 92 23] _16 <- Borrow.borrow_mut it;
+ [#"../02_iter_mut.rs" 92 14 92 23] it <- ^ _16;
assume { inv0 ( ^ _16) };
- [#"../02_iter_mut.rs" 86 14 86 23] _15 <- ([#"../02_iter_mut.rs" 86 14 86 23] next0 _16);
+ [#"../02_iter_mut.rs" 92 14 92 23] _15 <- ([#"../02_iter_mut.rs" 92 14 92 23] next0 _16);
_16 <- any borrowed (C02IterMut_IterMut_Type.t_itermut usize);
goto BB7
}
@@ -1020,7 +1011,7 @@ module C02IterMut_AllZero
end
}
BB8 {
- [#"../02_iter_mut.rs" 91 20 91 25] _0 <- ([#"../02_iter_mut.rs" 91 20 91 25] ());
+ [#"../02_iter_mut.rs" 97 20 97 25] _0 <- ([#"../02_iter_mut.rs" 97 20 97 25] ());
assume { resolve1 v };
return _0
}
@@ -1029,19 +1020,19 @@ module C02IterMut_AllZero
}
BB10 {
assume { resolve1 v };
- assert { [#"../02_iter_mut.rs" 86 14 86 23] false };
+ assert { [#"../02_iter_mut.rs" 92 14 92 23] false };
absurd
}
BB11 {
- [#"../02_iter_mut.rs" 87 17 87 18] x <- ([#"../02_iter_mut.rs" 87 17 87 18] Core_Option_Option_Type.some_0 _15);
- [#"../02_iter_mut.rs" 87 17 87 18] _15 <- (let Core_Option_Option_Type.C_Some x0 = _15 in Core_Option_Option_Type.C_Some (any borrowed usize));
- [#"../02_iter_mut.rs" 88 27 88 69] _19 <- ([#"../02_iter_mut.rs" 88 27 88 69] Ghost.new (Seq.(++) (Ghost.inner produced) (Seq.singleton x)));
+ [#"../02_iter_mut.rs" 93 17 93 18] x <- ([#"../02_iter_mut.rs" 93 17 93 18] Core_Option_Option_Type.some_0 _15);
+ [#"../02_iter_mut.rs" 93 17 93 18] _15 <- (let Core_Option_Option_Type.C_Some x0 = _15 in Core_Option_Option_Type.C_Some (any borrowed usize));
+ [#"../02_iter_mut.rs" 94 27 94 69] _19 <- ([#"../02_iter_mut.rs" 94 27 94 69] Ghost.new (Seq.(++) (Ghost.inner produced) (Seq.singleton x)));
goto BB12
}
BB12 {
- [#"../02_iter_mut.rs" 88 16 88 69] produced <- ([#"../02_iter_mut.rs" 88 16 88 69] _19);
- [#"../02_iter_mut.rs" 88 16 88 69] _19 <- any Ghost.ghost_ty (Seq.seq (borrowed usize));
- [#"../02_iter_mut.rs" 89 16 89 22] x <- { x with current = ([#"../02_iter_mut.rs" 89 16 89 22] [#"../02_iter_mut.rs" 89 21 89 22] (0 : usize)) };
+ [#"../02_iter_mut.rs" 94 16 94 69] produced <- ([#"../02_iter_mut.rs" 94 16 94 69] _19);
+ [#"../02_iter_mut.rs" 94 16 94 69] _19 <- any Ghost.ghost_ty (Seq.seq (borrowed usize));
+ [#"../02_iter_mut.rs" 95 16 95 22] x <- { x with current = ([#"../02_iter_mut.rs" 95 16 95 22] [#"../02_iter_mut.rs" 95 21 95 22] (0 : usize)) ; };
assume { resolve0 x };
goto BB5
}
@@ -1145,13 +1136,8 @@ module C02IterMut_Impl1
val shallow_model0 (self : borrowed (slice t)) : Seq.seq t
ensures { result = shallow_model0 self }
- predicate resolve0 (self : borrowed (C02IterMut_IterMut_Type.t_itermut t)) =
- [#"../../../../../creusot-contracts/src/resolve.rs" 25 20 25 34] ^ self = * self
- val resolve0 (self : borrowed (C02IterMut_IterMut_Type.t_itermut t)) : bool
- ensures { result = resolve0 self }
-
predicate completed0 [#"../02_iter_mut.rs" 31 4 31 35] (self : borrowed (C02IterMut_IterMut_Type.t_itermut t)) =
- [#"../02_iter_mut.rs" 32 8 32 70] resolve0 self /\ Seq.(==) (shallow_model0 (C02IterMut_IterMut_Type.itermut_inner ( * self))) (Seq.empty )
+ [#"../02_iter_mut.rs" 32 8 32 88] shallow_model0 (C02IterMut_IterMut_Type.itermut_inner ( * self)) = shallow_model0 (C02IterMut_IterMut_Type.itermut_inner ( ^ self)) /\ Seq.(==) (shallow_model0 (C02IterMut_IterMut_Type.itermut_inner ( * self))) (Seq.empty )
val completed0 [#"../02_iter_mut.rs" 31 4 31 35] (self : borrowed (C02IterMut_IterMut_Type.t_itermut t)) : bool
ensures { result = completed0 self }
@@ -1163,7 +1149,6 @@ module C02IterMut_Impl1
val index_logic1 [@inline:trivial] (self : slice t) (ix : int) : t
ensures { result = index_logic1 self ix }
- use seq.Seq
use seq.Seq
function to_mut_seq0 (self : borrowed (slice t)) : Seq.seq (borrowed t)
val to_mut_seq0 (self : borrowed (slice t)) : Seq.seq (borrowed t)
@@ -1174,18 +1159,18 @@ module C02IterMut_Impl1
predicate produces0 [#"../02_iter_mut.rs" 37 4 37 65] (self : C02IterMut_IterMut_Type.t_itermut t) (visited : Seq.seq (borrowed t)) (tl : C02IterMut_IterMut_Type.t_itermut t)
=
- [#"../02_iter_mut.rs" 36 4 36 16] Seq.(==) (to_mut_seq0 (C02IterMut_IterMut_Type.itermut_inner self)) (Seq.(++) visited (to_mut_seq0 (C02IterMut_IterMut_Type.itermut_inner tl)))
+ [#"../02_iter_mut.rs" 39 12 43 13] Seq.length (shallow_model0 (C02IterMut_IterMut_Type.itermut_inner self)) = Seq.length visited + Seq.length (shallow_model0 (C02IterMut_IterMut_Type.itermut_inner tl)) /\ (forall i : int . 0 <= i /\ i < Seq.length (shallow_model0 (C02IterMut_IterMut_Type.itermut_inner self)) -> * Seq.get (to_mut_seq0 (C02IterMut_IterMut_Type.itermut_inner self)) i = * Seq.get (Seq.(++) visited (to_mut_seq0 (C02IterMut_IterMut_Type.itermut_inner tl))) i /\ ^ Seq.get (to_mut_seq0 (C02IterMut_IterMut_Type.itermut_inner self)) i = ^ Seq.get (Seq.(++) visited (to_mut_seq0 (C02IterMut_IterMut_Type.itermut_inner tl))) i)
val produces0 [#"../02_iter_mut.rs" 37 4 37 65] (self : C02IterMut_IterMut_Type.t_itermut t) (visited : Seq.seq (borrowed t)) (tl : C02IterMut_IterMut_Type.t_itermut t) : bool
ensures { result = produces0 self visited tl }
use seq.Seq
- goal produces_refl_refn : [#"../02_iter_mut.rs" 44 4 44 29] forall a : C02IterMut_IterMut_Type.t_itermut t . inv0 a -> inv0 a /\ (forall result : () . produces0 a (Seq.empty ) a -> produces0 a (Seq.empty ) a)
- goal next_refn : [#"../02_iter_mut.rs" 57 4 57 44] forall self : borrowed (C02IterMut_IterMut_Type.t_itermut t) . inv1 self -> inv1 self /\ (forall result : Core_Option_Option_Type.t_option (borrowed t) . inv2 result /\ match result with
+ goal produces_refl_refn : [#"../02_iter_mut.rs" 50 4 50 29] forall a : C02IterMut_IterMut_Type.t_itermut t . inv0 a -> inv0 a /\ (forall result : () . produces0 a (Seq.empty ) a -> produces0 a (Seq.empty ) a)
+ goal next_refn : [#"../02_iter_mut.rs" 63 4 63 44] forall self : borrowed (C02IterMut_IterMut_Type.t_itermut t) . inv1 self -> inv1 self /\ (forall result : Core_Option_Option_Type.t_option (borrowed t) . inv2 result /\ match result with
| Core_Option_Option_Type.C_None -> completed0 self
| Core_Option_Option_Type.C_Some v -> produces0 ( * self) (Seq.singleton v) ( ^ self)
end -> inv2 result /\ match result with
| Core_Option_Option_Type.C_None -> completed0 self
| Core_Option_Option_Type.C_Some v -> produces0 ( * self) (Seq.singleton v) ( ^ self)
end)
- goal produces_trans_refn : [#"../02_iter_mut.rs" 51 4 51 90] forall a : C02IterMut_IterMut_Type.t_itermut t . forall ab : Seq.seq (borrowed t) . forall b : C02IterMut_IterMut_Type.t_itermut t . forall bc : Seq.seq (borrowed t) . forall c : C02IterMut_IterMut_Type.t_itermut t . inv0 c /\ inv3 bc /\ inv0 b /\ inv3 ab /\ inv0 a /\ produces0 b bc c /\ produces0 a ab b -> inv0 c /\ inv3 bc /\ inv0 b /\ inv3 ab /\ inv0 a /\ produces0 b bc c /\ produces0 a ab b /\ (forall result : () . produces0 a (Seq.(++) ab bc) c -> produces0 a (Seq.(++) ab bc) c)
+ goal produces_trans_refn : [#"../02_iter_mut.rs" 57 4 57 90] forall a : C02IterMut_IterMut_Type.t_itermut t . forall ab : Seq.seq (borrowed t) . forall b : C02IterMut_IterMut_Type.t_itermut t . forall bc : Seq.seq (borrowed t) . forall c : C02IterMut_IterMut_Type.t_itermut t . inv0 c /\ inv3 bc /\ inv0 b /\ inv3 ab /\ inv0 a /\ produces0 b bc c /\ produces0 a ab b -> inv0 c /\ inv3 bc /\ inv0 b /\ inv3 ab /\ inv0 a /\ produces0 b bc c /\ produces0 a ab b /\ (forall result : () . produces0 a (Seq.(++) ab bc) c -> produces0 a (Seq.(++) ab bc) c)
end
diff --git a/creusot/tests/should_succeed/iterators/02_iter_mut/why3session.xml b/creusot/tests/should_succeed/iterators/02_iter_mut/why3session.xml
index 68ffa706f4..957db5723f 100644
--- a/creusot/tests/should_succeed/iterators/02_iter_mut/why3session.xml
+++ b/creusot/tests/should_succeed/iterators/02_iter_mut/why3session.xml
@@ -2,35 +2,42 @@
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
-
+
@@ -42,47 +49,47 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/creusot/tests/should_succeed/iterators/02_iter_mut/why3shapes.gz b/creusot/tests/should_succeed/iterators/02_iter_mut/why3shapes.gz
index 96d1eac811..911f05aa9d 100644
Binary files a/creusot/tests/should_succeed/iterators/02_iter_mut/why3shapes.gz and b/creusot/tests/should_succeed/iterators/02_iter_mut/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/iterators/03_std_iterators.mlcfg b/creusot/tests/should_succeed/iterators/03_std_iterators.mlcfg
index d0f1661acd..5540bcb06f 100644
--- a/creusot/tests/should_succeed/iterators/03_std_iterators.mlcfg
+++ b/creusot/tests/should_succeed/iterators/03_std_iterators.mlcfg
@@ -302,8 +302,8 @@ module C03StdIterators_SliceIter
BB6 {
[#"../03_std_iterators.rs" 8 4 8 38] _19 <- Borrow.borrow_mut iter;
[#"../03_std_iterators.rs" 8 4 8 38] iter <- ^ _19;
- [#"../03_std_iterators.rs" 8 4 8 38] _18 <- Borrow.borrow_mut ( * _19);
- [#"../03_std_iterators.rs" 8 4 8 38] _19 <- { _19 with current = ^ _18 };
+ [#"../03_std_iterators.rs" 8 4 8 38] _18 <- Borrow.borrow_final ( * _19) (Borrow.get_id _19);
+ [#"../03_std_iterators.rs" 8 4 8 38] _19 <- { _19 with current = ( ^ _18) ; };
[#"../03_std_iterators.rs" 8 4 8 38] _17 <- ([#"../03_std_iterators.rs" 8 4 8 38] next0 _18);
_18 <- any borrowed (Core_Slice_Iter_Iter_Type.t_iter t);
goto BB7
@@ -674,8 +674,8 @@ module C03StdIterators_VecIter
BB5 {
[#"../03_std_iterators.rs" 19 4 19 38] _18 <- Borrow.borrow_mut iter;
[#"../03_std_iterators.rs" 19 4 19 38] iter <- ^ _18;
- [#"../03_std_iterators.rs" 19 4 19 38] _17 <- Borrow.borrow_mut ( * _18);
- [#"../03_std_iterators.rs" 19 4 19 38] _18 <- { _18 with current = ^ _17 };
+ [#"../03_std_iterators.rs" 19 4 19 38] _17 <- Borrow.borrow_final ( * _18) (Borrow.get_id _18);
+ [#"../03_std_iterators.rs" 19 4 19 38] _18 <- { _18 with current = ( ^ _17) ; };
[#"../03_std_iterators.rs" 19 4 19 38] _16 <- ([#"../03_std_iterators.rs" 19 4 19 38] next0 _17);
_17 <- any borrowed (Core_Slice_Iter_Iter_Type.t_iter t);
goto BB6
@@ -1012,15 +1012,15 @@ module C03StdIterators_AllZero
goto BB0
}
BB0 {
- [#"../03_std_iterators.rs" 30 13 30 25] _8 <- Borrow.borrow_mut ( * v);
- [#"../03_std_iterators.rs" 30 13 30 25] v <- { v with current = ^ _8 };
+ [#"../03_std_iterators.rs" 30 13 30 25] _8 <- Borrow.borrow_final ( * v) (Borrow.get_id v);
+ [#"../03_std_iterators.rs" 30 13 30 25] v <- { v with current = ( ^ _8) ; };
[#"../03_std_iterators.rs" 30 13 30 25] _7 <- ([#"../03_std_iterators.rs" 30 13 30 25] deref_mut0 _8);
_8 <- any borrowed (Alloc_Vec_Vec_Type.t_vec usize (Alloc_Alloc_Global_Type.t_global));
goto BB1
}
BB1 {
- [#"../03_std_iterators.rs" 30 13 30 25] _6 <- Borrow.borrow_mut ( * _7);
- [#"../03_std_iterators.rs" 30 13 30 25] _7 <- { _7 with current = ^ _6 };
+ [#"../03_std_iterators.rs" 30 13 30 25] _6 <- Borrow.borrow_final ( * _7) (Borrow.get_id _7);
+ [#"../03_std_iterators.rs" 30 13 30 25] _7 <- { _7 with current = ( ^ _6) ; };
[#"../03_std_iterators.rs" 30 13 30 25] _5 <- ([#"../03_std_iterators.rs" 30 13 30 25] iter_mut0 _6);
_6 <- any borrowed (slice usize);
goto BB2
@@ -1051,8 +1051,8 @@ module C03StdIterators_AllZero
BB7 {
[#"../03_std_iterators.rs" 29 4 29 87] _19 <- Borrow.borrow_mut iter;
[#"../03_std_iterators.rs" 29 4 29 87] iter <- ^ _19;
- [#"../03_std_iterators.rs" 29 4 29 87] _18 <- Borrow.borrow_mut ( * _19);
- [#"../03_std_iterators.rs" 29 4 29 87] _19 <- { _19 with current = ^ _18 };
+ [#"../03_std_iterators.rs" 29 4 29 87] _18 <- Borrow.borrow_final ( * _19) (Borrow.get_id _19);
+ [#"../03_std_iterators.rs" 29 4 29 87] _19 <- { _19 with current = ( ^ _18) ; };
[#"../03_std_iterators.rs" 29 4 29 87] _17 <- ([#"../03_std_iterators.rs" 29 4 29 87] next0 _18);
_18 <- any borrowed (Core_Slice_Iter_IterMut_Type.t_itermut usize);
goto BB8
@@ -1090,7 +1090,7 @@ module C03StdIterators_AllZero
[#"../03_std_iterators.rs" 29 4 29 87] _22 <- any Ghost.ghost_ty (Seq.seq (borrowed usize));
[#"../../../../../creusot-contracts-proc/src/lib.rs" 664 0 664 51] x <- ([#"../../../../../creusot-contracts-proc/src/lib.rs" 664 0 664 51] __creusot_proc_iter_elem);
[#"../../../../../creusot-contracts-proc/src/lib.rs" 664 0 664 51] __creusot_proc_iter_elem <- any borrowed usize;
- [#"../03_std_iterators.rs" 31 8 31 14] x <- { x with current = ([#"../03_std_iterators.rs" 31 8 31 14] [#"../03_std_iterators.rs" 31 13 31 14] (0 : usize)) };
+ [#"../03_std_iterators.rs" 31 8 31 14] x <- { x with current = ([#"../03_std_iterators.rs" 31 8 31 14] [#"../03_std_iterators.rs" 31 13 31 14] (0 : usize)) ; };
assume { resolve2 x };
goto BB6
}
@@ -1496,7 +1496,7 @@ module C03StdIterators_Counter_Closure0
goto BB0
}
BB0 {
- [#"../03_std_iterators.rs" 50 16 50 24] _1 <- { _1 with current = (let C03StdIterators_Counter_Closure0.C03StdIterators_Counter_Closure0 x0 = * _1 in C03StdIterators_Counter_Closure0.C03StdIterators_Counter_Closure0 ({ (field_00 ( * _1)) with current = ([#"../03_std_iterators.rs" 50 16 50 24] * field_00 ( * _1) + ([#"../03_std_iterators.rs" 50 23 50 24] [#"../03_std_iterators.rs" 50 23 50 24] (1 : usize))) })) };
+ [#"../03_std_iterators.rs" 50 16 50 24] _1 <- { _1 with current = (let C03StdIterators_Counter_Closure0.C03StdIterators_Counter_Closure0 x0 = * _1 in C03StdIterators_Counter_Closure0.C03StdIterators_Counter_Closure0 ({ (field_00 ( * _1)) with current = ([#"../03_std_iterators.rs" 50 16 50 24] * field_00 ( * _1) + ([#"../03_std_iterators.rs" 50 23 50 24] [#"../03_std_iterators.rs" 50 23 50 24] (1 : usize))) ; })) ; };
assume { resolve0 _1 };
[#"../03_std_iterators.rs" 51 16 51 18] res1 <- ([#"../03_std_iterators.rs" 51 16 51 18] x);
[#"../03_std_iterators.rs" 47 12 47 67] res <- ([#"../03_std_iterators.rs" 47 12 47 67] res1);
@@ -1902,7 +1902,7 @@ module C03StdIterators_Counter
predicate completed0 (self : borrowed (CreusotContracts_Std1_Iter_MapInv_MapInv_Type.t_mapinv (Core_Slice_Iter_Iter_Type.t_iter uint32) uint32 C03StdIterators_Counter_Closure0.c03stditerators_counter_closure0))
=
- [#"../../../../../creusot-contracts/src/std/iter/map_inv.rs" 15 8 18 9] Ghost.inner (CreusotContracts_Std1_Iter_MapInv_MapInv_Type.mapinv_produced ( ^ self)) = Seq.empty /\ completed1 {current = CreusotContracts_Std1_Iter_MapInv_MapInv_Type.mapinv_iter ( * self); final = CreusotContracts_Std1_Iter_MapInv_MapInv_Type.mapinv_iter ( ^ self)} /\ CreusotContracts_Std1_Iter_MapInv_MapInv_Type.mapinv_func ( * self) = CreusotContracts_Std1_Iter_MapInv_MapInv_Type.mapinv_func ( ^ self)
+ [#"../../../../../creusot-contracts/src/std/iter/map_inv.rs" 15 8 18 9] Ghost.inner (CreusotContracts_Std1_Iter_MapInv_MapInv_Type.mapinv_produced ( ^ self)) = Seq.empty /\ completed1 (Borrow.borrow_logic (CreusotContracts_Std1_Iter_MapInv_MapInv_Type.mapinv_iter ( * self)) (CreusotContracts_Std1_Iter_MapInv_MapInv_Type.mapinv_iter ( ^ self)) (Borrow.inherit_id (Borrow.get_id self) 1)) /\ CreusotContracts_Std1_Iter_MapInv_MapInv_Type.mapinv_func ( * self) = CreusotContracts_Std1_Iter_MapInv_MapInv_Type.mapinv_func ( ^ self)
val completed0 (self : borrowed (CreusotContracts_Std1_Iter_MapInv_MapInv_Type.t_mapinv (Core_Slice_Iter_Iter_Type.t_iter uint32) uint32 C03StdIterators_Counter_Closure0.c03stditerators_counter_closure0)) : bool
ensures { result = completed0 self }
@@ -2201,8 +2201,8 @@ module C03StdIterators_SumRange
BB5 {
[#"../03_std_iterators.rs" 65 4 65 48] _19 <- Borrow.borrow_mut iter;
[#"../03_std_iterators.rs" 65 4 65 48] iter <- ^ _19;
- [#"../03_std_iterators.rs" 65 4 65 48] _18 <- Borrow.borrow_mut ( * _19);
- [#"../03_std_iterators.rs" 65 4 65 48] _19 <- { _19 with current = ^ _18 };
+ [#"../03_std_iterators.rs" 65 4 65 48] _18 <- Borrow.borrow_final ( * _19) (Borrow.get_id _19);
+ [#"../03_std_iterators.rs" 65 4 65 48] _19 <- { _19 with current = ( ^ _18) ; };
[#"../03_std_iterators.rs" 65 4 65 48] _17 <- ([#"../03_std_iterators.rs" 65 4 65 48] next0 _18);
_18 <- any borrowed (Core_Ops_Range_Range_Type.t_range isize);
goto BB6
@@ -2549,8 +2549,8 @@ module C03StdIterators_EnumerateRange
[#"../03_std_iterators.rs" 73 4 73 96] _14 <- Borrow.borrow_mut iter;
[#"../03_std_iterators.rs" 73 4 73 96] iter <- ^ _14;
assume { inv0 ( ^ _14) };
- [#"../03_std_iterators.rs" 73 4 73 96] _13 <- Borrow.borrow_mut ( * _14);
- [#"../03_std_iterators.rs" 73 4 73 96] _14 <- { _14 with current = ^ _13 };
+ [#"../03_std_iterators.rs" 73 4 73 96] _13 <- Borrow.borrow_final ( * _14) (Borrow.get_id _14);
+ [#"../03_std_iterators.rs" 73 4 73 96] _14 <- { _14 with current = ( ^ _13) ; };
assume { inv0 ( ^ _13) };
[#"../03_std_iterators.rs" 73 4 73 96] _12 <- ([#"../03_std_iterators.rs" 73 4 73 96] next0 _13);
_13 <- any borrowed (Core_Iter_Adapters_Enumerate_Enumerate_Type.t_enumerate (Core_Ops_Range_Range_Type.t_range usize));
@@ -3058,8 +3058,8 @@ module C03StdIterators_MyReverse
BB10 {
[#"../03_std_iterators.rs" 97 4 97 36] _30 <- Borrow.borrow_mut iter;
[#"../03_std_iterators.rs" 97 4 97 36] iter <- ^ _30;
- [#"../03_std_iterators.rs" 97 4 97 36] _29 <- Borrow.borrow_mut ( * _30);
- [#"../03_std_iterators.rs" 97 4 97 36] _30 <- { _30 with current = ^ _29 };
+ [#"../03_std_iterators.rs" 97 4 97 36] _29 <- Borrow.borrow_final ( * _30) (Borrow.get_id _30);
+ [#"../03_std_iterators.rs" 97 4 97 36] _30 <- { _30 with current = ( ^ _29) ; };
[#"../03_std_iterators.rs" 97 4 97 36] _28 <- ([#"../03_std_iterators.rs" 97 4 97 36] next0 _29);
_29 <- any borrowed (Core_Iter_Adapters_Zip_Zip_Type.t_zip (Core_Ops_Range_Range_Type.t_range usize) (Core_Ops_Range_Range_Type.t_range usize));
goto BB11
@@ -3098,7 +3098,7 @@ module C03StdIterators_MyReverse
[#"../03_std_iterators.rs" 101 12 101 13] j <- ([#"../03_std_iterators.rs" 101 12 101 13] let (_, a) = __creusot_proc_iter_elem in a);
assume { resolve2 __creusot_proc_iter_elem };
[#"../03_std_iterators.rs" 102 8 102 32] _38 <- Borrow.borrow_mut ( * slice);
- [#"../03_std_iterators.rs" 102 8 102 32] slice <- { slice with current = ^ _38 };
+ [#"../03_std_iterators.rs" 102 8 102 32] slice <- { slice with current = ( ^ _38) ; };
assume { inv2 ( ^ _38) };
[#"../03_std_iterators.rs" 102 8 102 32] _37 <- ([#"../03_std_iterators.rs" 102 8 102 32] swap0 _38 ([#"../03_std_iterators.rs" 102 19 102 20] i) ([#"../03_std_iterators.rs" 102 22 102 31] ([#"../03_std_iterators.rs" 102 22 102 27] ([#"../03_std_iterators.rs" 102 22 102 23] n) - ([#"../03_std_iterators.rs" 102 26 102 27] j)) - ([#"../03_std_iterators.rs" 102 30 102 31] [#"../03_std_iterators.rs" 102 30 102 31] (1 : usize))));
_38 <- any borrowed (slice t);
diff --git a/creusot/tests/should_succeed/iterators/03_std_iterators/why3session.xml b/creusot/tests/should_succeed/iterators/03_std_iterators/why3session.xml
index 4468384e0d..8c35a91dae 100644
--- a/creusot/tests/should_succeed/iterators/03_std_iterators/why3session.xml
+++ b/creusot/tests/should_succeed/iterators/03_std_iterators/why3session.xml
@@ -10,27 +10,27 @@
-
+
-
+
-
+
-
+
-
+
@@ -43,16 +43,16 @@
-
+
-
+
-
+
-
+
@@ -61,134 +61,134 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/creusot/tests/should_succeed/iterators/03_std_iterators/why3shapes.gz b/creusot/tests/should_succeed/iterators/03_std_iterators/why3shapes.gz
index 0b7722c5b3..9b12054063 100644
Binary files a/creusot/tests/should_succeed/iterators/03_std_iterators/why3shapes.gz and b/creusot/tests/should_succeed/iterators/03_std_iterators/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/iterators/04_skip.mlcfg b/creusot/tests/should_succeed/iterators/04_skip.mlcfg
index e1fd2bb325..2841fb98cf 100644
--- a/creusot/tests/should_succeed/iterators/04_skip.mlcfg
+++ b/creusot/tests/should_succeed/iterators/04_skip.mlcfg
@@ -421,10 +421,10 @@ module C04Skip_Impl0_Next
BB1 {
assert { [@expl:type invariant] inv0 old_self };
assume { resolve0 old_self };
- [#"../04_skip.rs" 65 35 65 46] _7 <- Borrow.borrow_mut (C04Skip_Skip_Type.skip_n ( * self));
- [#"../04_skip.rs" 65 35 65 46] self <- { self with current = (let C04Skip_Skip_Type.C_Skip x0 x1 = * self in C04Skip_Skip_Type.C_Skip x0 ( ^ _7)) };
- [#"../04_skip.rs" 65 35 65 46] _6 <- Borrow.borrow_mut ( * _7);
- [#"../04_skip.rs" 65 35 65 46] _7 <- { _7 with current = ^ _6 };
+ [#"../04_skip.rs" 65 35 65 46] _7 <- Borrow.borrow_final (C04Skip_Skip_Type.skip_n ( * self)) (Borrow.inherit_id (Borrow.get_id self) 2);
+ [#"../04_skip.rs" 65 35 65 46] self <- { self with current = (let C04Skip_Skip_Type.C_Skip x0 x1 = * self in C04Skip_Skip_Type.C_Skip x0 ( ^ _7)) ; };
+ [#"../04_skip.rs" 65 35 65 46] _6 <- Borrow.borrow_final ( * _7) (Borrow.get_id _7);
+ [#"../04_skip.rs" 65 35 65 46] _7 <- { _7 with current = ( ^ _6) ; };
[#"../04_skip.rs" 65 20 65 47] n <- ([#"../04_skip.rs" 65 20 65 47] take0 _6);
_6 <- any borrowed usize;
goto BB2
@@ -449,7 +449,7 @@ module C04Skip_Impl0_Next
}
BB5 {
[#"../04_skip.rs" 73 20 73 36] _18 <- Borrow.borrow_mut (C04Skip_Skip_Type.skip_iter ( * self));
- [#"../04_skip.rs" 73 20 73 36] self <- { self with current = (let C04Skip_Skip_Type.C_Skip x0 x1 = * self in C04Skip_Skip_Type.C_Skip ( ^ _18) x1) };
+ [#"../04_skip.rs" 73 20 73 36] self <- { self with current = (let C04Skip_Skip_Type.C_Skip x0 x1 = * self in C04Skip_Skip_Type.C_Skip ( ^ _18) x1) ; };
assume { inv3 ( ^ _18) };
[#"../04_skip.rs" 73 20 73 36] r <- ([#"../04_skip.rs" 73 20 73 36] next0 _18);
_18 <- any borrowed i;
diff --git a/creusot/tests/should_succeed/iterators/04_skip/why3session.xml b/creusot/tests/should_succeed/iterators/04_skip/why3session.xml
index 8d898be371..7f260b991d 100644
--- a/creusot/tests/should_succeed/iterators/04_skip/why3session.xml
+++ b/creusot/tests/should_succeed/iterators/04_skip/why3session.xml
@@ -22,7 +22,7 @@
-
+
diff --git a/creusot/tests/should_succeed/iterators/04_skip/why3shapes.gz b/creusot/tests/should_succeed/iterators/04_skip/why3shapes.gz
index b32e82af21..993334679a 100644
Binary files a/creusot/tests/should_succeed/iterators/04_skip/why3shapes.gz and b/creusot/tests/should_succeed/iterators/04_skip/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/iterators/05_map.mlcfg b/creusot/tests/should_succeed/iterators/05_map.mlcfg
index aa8f490f77..2e27433b3f 100644
--- a/creusot/tests/should_succeed/iterators/05_map.mlcfg
+++ b/creusot/tests/should_succeed/iterators/05_map.mlcfg
@@ -1216,7 +1216,7 @@ module C05Map_Impl0_Next
axiom produces_one0_spec : forall self : C05Map_Map_Type.t_map i b f, visited : b, succ : C05Map_Map_Type.t_map i b f . ([#"../05_map.rs" 117 20 117 24] inv6 self) -> ([#"../05_map.rs" 117 26 117 33] inv8 visited) -> ([#"../05_map.rs" 117 38 117 42] inv6 succ) -> ([#"../05_map.rs" 116 14 116 68] produces_one0 self visited succ = produces1 self (Seq.singleton visited) succ)
predicate completed0 [#"../05_map.rs" 22 4 22 35] (self : borrowed (C05Map_Map_Type.t_map i b f)) =
- [#"../05_map.rs" 23 8 23 75] completed1 {current = C05Map_Map_Type.map_iter ( * self); final = C05Map_Map_Type.map_iter ( ^ self)} /\ C05Map_Map_Type.map_func ( * self) = C05Map_Map_Type.map_func ( ^ self)
+ [#"../05_map.rs" 23 8 23 75] completed1 (Borrow.borrow_logic (C05Map_Map_Type.map_iter ( * self)) (C05Map_Map_Type.map_iter ( ^ self)) (Borrow.inherit_id (Borrow.get_id self) 1)) /\ C05Map_Map_Type.map_func ( * self) = C05Map_Map_Type.map_func ( ^ self)
val completed0 [#"../05_map.rs" 22 4 22 35] (self : borrowed (C05Map_Map_Type.t_map i b f)) : bool
ensures { result = completed0 self }
@@ -1285,8 +1285,8 @@ module C05Map_Impl0_Next
goto BB0
}
BB0 {
- [#"../05_map.rs" 61 14 61 30] _4 <- Borrow.borrow_mut (C05Map_Map_Type.map_iter ( * self));
- [#"../05_map.rs" 61 14 61 30] self <- { self with current = (let C05Map_Map_Type.C_Map x0 x1 = * self in C05Map_Map_Type.C_Map ( ^ _4) x1) };
+ [#"../05_map.rs" 61 14 61 30] _4 <- Borrow.borrow_final (C05Map_Map_Type.map_iter ( * self)) (Borrow.inherit_id (Borrow.get_id self) 1);
+ [#"../05_map.rs" 61 14 61 30] self <- { self with current = (let C05Map_Map_Type.C_Map x0 x1 = * self in C05Map_Map_Type.C_Map ( ^ _4) x1) ; };
assume { inv0 ( ^ _4) };
[#"../05_map.rs" 61 14 61 30] _3 <- ([#"../05_map.rs" 61 14 61 30] next0 _4);
_4 <- any borrowed i;
@@ -1331,8 +1331,8 @@ module C05Map_Impl0_Next
}
BB7 {
assume { resolve1 _9 };
- [#"../05_map.rs" 65 21 65 32] _12 <- Borrow.borrow_mut (C05Map_Map_Type.map_func ( * self));
- [#"../05_map.rs" 65 21 65 32] self <- { self with current = (let C05Map_Map_Type.C_Map x0 x1 = * self in C05Map_Map_Type.C_Map x0 ( ^ _12)) };
+ [#"../05_map.rs" 65 21 65 32] _12 <- Borrow.borrow_final (C05Map_Map_Type.map_func ( * self)) (Borrow.inherit_id (Borrow.get_id self) 2);
+ [#"../05_map.rs" 65 21 65 32] self <- { self with current = (let C05Map_Map_Type.C_Map x0 x1 = * self in C05Map_Map_Type.C_Map x0 ( ^ _12)) ; };
assume { inv2 ( ^ _12) };
[#"../05_map.rs" 65 21 65 35] _11 <- ([#"../05_map.rs" 65 21 65 35] call_mut0 _12 ([#"../05_map.rs" 65 21 65 35] (([#"../05_map.rs" 65 33 65 34] v))));
_12 <- any borrowed f;
@@ -1789,7 +1789,7 @@ module C05Map_Impl0
axiom produces_one0_spec : forall self : C05Map_Map_Type.t_map i b f, visited : b, succ : C05Map_Map_Type.t_map i b f . ([#"../05_map.rs" 117 20 117 24] inv0 self) -> ([#"../05_map.rs" 117 26 117 33] inv6 visited) -> ([#"../05_map.rs" 117 38 117 42] inv0 succ) -> ([#"../05_map.rs" 116 14 116 68] produces_one0 self visited succ = produces0 self (Seq.singleton visited) succ)
predicate completed0 [#"../05_map.rs" 22 4 22 35] (self : borrowed (C05Map_Map_Type.t_map i b f)) =
- [#"../05_map.rs" 23 8 23 75] completed1 {current = C05Map_Map_Type.map_iter ( * self); final = C05Map_Map_Type.map_iter ( ^ self)} /\ C05Map_Map_Type.map_func ( * self) = C05Map_Map_Type.map_func ( ^ self)
+ [#"../05_map.rs" 23 8 23 75] completed1 (Borrow.borrow_logic (C05Map_Map_Type.map_iter ( * self)) (C05Map_Map_Type.map_iter ( ^ self)) (Borrow.inherit_id (Borrow.get_id self) 1)) /\ C05Map_Map_Type.map_func ( * self) = C05Map_Map_Type.map_func ( ^ self)
val completed0 [#"../05_map.rs" 22 4 22 35] (self : borrowed (C05Map_Map_Type.t_map i b f)) : bool
ensures { result = completed0 self }
diff --git a/creusot/tests/should_succeed/iterators/05_map/why3session.xml b/creusot/tests/should_succeed/iterators/05_map/why3session.xml
index da7f1cab24..cb6a4b742d 100644
--- a/creusot/tests/should_succeed/iterators/05_map/why3session.xml
+++ b/creusot/tests/should_succeed/iterators/05_map/why3session.xml
@@ -18,7 +18,7 @@
-
+
@@ -63,7 +63,7 @@
-
+
@@ -75,10 +75,10 @@
-
+
-
+
@@ -143,7 +143,7 @@
-
+
@@ -158,13 +158,13 @@
-
+
-
+
-
+
@@ -175,40 +175,40 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -223,7 +223,7 @@
-
+
diff --git a/creusot/tests/should_succeed/iterators/05_map/why3shapes.gz b/creusot/tests/should_succeed/iterators/05_map/why3shapes.gz
index eec9d731a8..7ee97d5a13 100644
Binary files a/creusot/tests/should_succeed/iterators/05_map/why3shapes.gz and b/creusot/tests/should_succeed/iterators/05_map/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/iterators/06_map_precond.mlcfg b/creusot/tests/should_succeed/iterators/06_map_precond.mlcfg
index 098d388e3c..0045a54cb4 100644
--- a/creusot/tests/should_succeed/iterators/06_map_precond.mlcfg
+++ b/creusot/tests/should_succeed/iterators/06_map_precond.mlcfg
@@ -171,19 +171,19 @@ module C06MapPrecond_Impl1_PreservationInv_Impl
use prelude.Ghost
use seq.Seq
- predicate preservation0 [#"../06_map_precond.rs" 106 4 106 45] (iter : i) (func : f) =
- [#"../06_map_precond.rs" 107 8 114 9] forall i : i . forall b : b . forall f : borrowed f . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv0 i -> inv3 b -> inv4 f -> inv5 e2 -> inv5 e1 -> inv2 s -> unnest0 func ( * f) -> produces0 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new s) -> postcondition_mut0 f (e1, Ghost.new s) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc s e1))
- val preservation0 [#"../06_map_precond.rs" 106 4 106 45] (iter : i) (func : f) : bool
+ predicate preservation0 [#"../06_map_precond.rs" 105 4 105 45] (iter : i) (func : f) =
+ [#"../06_map_precond.rs" 106 8 113 9] forall i : i . forall b : b . forall f : borrowed f . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv0 i -> inv3 b -> inv4 f -> inv5 e2 -> inv5 e1 -> inv2 s -> unnest0 func ( * f) -> produces0 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new s) -> postcondition_mut0 f (e1, Ghost.new s) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc s e1))
+ val preservation0 [#"../06_map_precond.rs" 105 4 105 45] (iter : i) (func : f) : bool
ensures { result = preservation0 iter func }
- let rec ghost predicate preservation_inv [#"../06_map_precond.rs" 94 4 94 73] (iter : i) (func : f) (produced : Seq.seq item0)
- requires {[#"../06_map_precond.rs" 94 24 94 28] inv0 iter}
- requires {[#"../06_map_precond.rs" 94 33 94 37] inv1 func}
- requires {[#"../06_map_precond.rs" 94 42 94 50] inv2 produced}
- ensures { [#"../06_map_precond.rs" 93 4 93 83] produced = Seq.empty -> result = preservation0 iter func }
+ let rec ghost predicate preservation_inv [#"../06_map_precond.rs" 93 4 93 73] (iter : i) (func : f) (produced : Seq.seq item0)
+ requires {[#"../06_map_precond.rs" 93 24 93 28] inv0 iter}
+ requires {[#"../06_map_precond.rs" 93 33 93 37] inv1 func}
+ requires {[#"../06_map_precond.rs" 93 42 93 50] inv2 produced}
+ ensures { [#"../06_map_precond.rs" 92 4 92 83] produced = Seq.empty -> result = preservation0 iter func }
= [@vc:do_not_keep_trace] [@vc:sp]
- [#"../06_map_precond.rs" 95 8 102 9] pure {forall i : i . forall b : b . forall f : borrowed f . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv0 i -> inv3 b -> inv4 f -> inv5 e2 -> inv5 e1 -> inv2 s -> unnest0 func ( * f) -> produces0 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new (Seq.(++) produced s)) -> postcondition_mut0 f (e1, Ghost.new (Seq.(++) produced s)) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc (Seq.(++) produced s) e1))}
+ [#"../06_map_precond.rs" 94 8 101 9] pure {forall i : i . forall b : b . forall f : borrowed f . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv0 i -> inv3 b -> inv4 f -> inv5 e2 -> inv5 e1 -> inv2 s -> unnest0 func ( * f) -> produces0 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new (Seq.(++) produced s)) -> postcondition_mut0 f (e1, Ghost.new (Seq.(++) produced s)) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc (Seq.(++) produced s) e1))}
end
module C06MapPrecond_Impl0_ProducesRefl_Impl
type i
@@ -363,40 +363,40 @@ module C06MapPrecond_Impl0_ProducesRefl_Impl
use prelude.Ghost
use seq.Seq
- predicate next_precondition0 [#"../06_map_precond.rs" 84 4 84 74] (iter : i) (func : f) (produced : Seq.seq item0) =
- [#"../06_map_precond.rs" 85 8 89 9] forall i : i . forall e : item0 . inv3 i -> inv10 e -> produces1 iter (Seq.singleton e) i -> precondition0 func (e, Ghost.new produced)
- val next_precondition0 [#"../06_map_precond.rs" 84 4 84 74] (iter : i) (func : f) (produced : Seq.seq item0) : bool
+ predicate next_precondition0 [#"../06_map_precond.rs" 83 4 83 74] (iter : i) (func : f) (produced : Seq.seq item0) =
+ [#"../06_map_precond.rs" 84 8 88 9] forall i : i . forall e : item0 . inv3 i -> inv10 e -> produces1 iter (Seq.singleton e) i -> precondition0 func (e, Ghost.new produced)
+ val next_precondition0 [#"../06_map_precond.rs" 83 4 83 74] (iter : i) (func : f) (produced : Seq.seq item0) : bool
ensures { result = next_precondition0 iter func produced }
use seq.Seq
- predicate preservation0 [#"../06_map_precond.rs" 106 4 106 45] (iter : i) (func : f) =
- [#"../06_map_precond.rs" 107 8 114 9] forall i : i . forall b : b . forall f : borrowed f . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv3 i -> inv8 b -> inv6 f -> inv10 e2 -> inv10 e1 -> inv1 s -> unnest0 func ( * f) -> produces1 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new s) -> postcondition_mut0 f (e1, Ghost.new s) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc s e1))
- val preservation0 [#"../06_map_precond.rs" 106 4 106 45] (iter : i) (func : f) : bool
+ predicate preservation0 [#"../06_map_precond.rs" 105 4 105 45] (iter : i) (func : f) =
+ [#"../06_map_precond.rs" 106 8 113 9] forall i : i . forall b : b . forall f : borrowed f . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv3 i -> inv8 b -> inv6 f -> inv10 e2 -> inv10 e1 -> inv1 s -> unnest0 func ( * f) -> produces1 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new s) -> postcondition_mut0 f (e1, Ghost.new s) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc s e1))
+ val preservation0 [#"../06_map_precond.rs" 105 4 105 45] (iter : i) (func : f) : bool
ensures { result = preservation0 iter func }
- predicate preservation_inv0 [#"../06_map_precond.rs" 94 4 94 73] (iter : i) (func : f) (produced : Seq.seq item0) =
- [#"../06_map_precond.rs" 95 8 102 9] forall i : i . forall b : b . forall f : borrowed f . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv3 i -> inv8 b -> inv6 f -> inv10 e2 -> inv10 e1 -> inv1 s -> unnest0 func ( * f) -> produces1 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new (Seq.(++) produced s)) -> postcondition_mut0 f (e1, Ghost.new (Seq.(++) produced s)) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc (Seq.(++) produced s) e1))
- val preservation_inv0 [#"../06_map_precond.rs" 94 4 94 73] (iter : i) (func : f) (produced : Seq.seq item0) : bool
- requires {[#"../06_map_precond.rs" 94 24 94 28] inv3 iter}
- requires {[#"../06_map_precond.rs" 94 33 94 37] inv4 func}
- requires {[#"../06_map_precond.rs" 94 42 94 50] inv1 produced}
+ predicate preservation_inv0 [#"../06_map_precond.rs" 93 4 93 73] (iter : i) (func : f) (produced : Seq.seq item0) =
+ [#"../06_map_precond.rs" 94 8 101 9] forall i : i . forall b : b . forall f : borrowed f . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv3 i -> inv8 b -> inv6 f -> inv10 e2 -> inv10 e1 -> inv1 s -> unnest0 func ( * f) -> produces1 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new (Seq.(++) produced s)) -> postcondition_mut0 f (e1, Ghost.new (Seq.(++) produced s)) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc (Seq.(++) produced s) e1))
+ val preservation_inv0 [#"../06_map_precond.rs" 93 4 93 73] (iter : i) (func : f) (produced : Seq.seq item0) : bool
+ requires {[#"../06_map_precond.rs" 93 24 93 28] inv3 iter}
+ requires {[#"../06_map_precond.rs" 93 33 93 37] inv4 func}
+ requires {[#"../06_map_precond.rs" 93 42 93 50] inv1 produced}
ensures { result = preservation_inv0 iter func produced }
- axiom preservation_inv0_spec : forall iter : i, func : f, produced : Seq.seq item0 . ([#"../06_map_precond.rs" 94 24 94 28] inv3 iter) -> ([#"../06_map_precond.rs" 94 33 94 37] inv4 func) -> ([#"../06_map_precond.rs" 94 42 94 50] inv1 produced) -> ([#"../06_map_precond.rs" 93 4 93 83] produced = Seq.empty -> preservation_inv0 iter func produced = preservation0 iter func)
+ axiom preservation_inv0_spec : forall iter : i, func : f, produced : Seq.seq item0 . ([#"../06_map_precond.rs" 93 24 93 28] inv3 iter) -> ([#"../06_map_precond.rs" 93 33 93 37] inv4 func) -> ([#"../06_map_precond.rs" 93 42 93 50] inv1 produced) -> ([#"../06_map_precond.rs" 92 4 92 83] produced = Seq.empty -> preservation_inv0 iter func produced = preservation0 iter func)
use prelude.Ghost
predicate completed0 [#"../common.rs" 11 4 11 36] (self : borrowed i)
val completed0 [#"../common.rs" 11 4 11 36] (self : borrowed i) : bool
ensures { result = completed0 self }
- predicate reinitialize0 [#"../06_map_precond.rs" 118 4 118 29] (_1 : ()) =
- [#"../06_map_precond.rs" 119 8 124 9] forall func : f . forall iter : borrowed i . inv4 func -> inv9 iter -> completed0 iter -> next_precondition0 ( ^ iter) func (Seq.empty ) /\ preservation0 ( ^ iter) func
- val reinitialize0 [#"../06_map_precond.rs" 118 4 118 29] (_1 : ()) : bool
+ predicate reinitialize0 [#"../06_map_precond.rs" 117 4 117 29] (_1 : ()) =
+ [#"../06_map_precond.rs" 118 8 123 9] forall func : f . forall iter : borrowed i . inv4 func -> inv9 iter -> completed0 iter -> next_precondition0 ( ^ iter) func (Seq.empty ) /\ preservation0 ( ^ iter) func
+ val reinitialize0 [#"../06_map_precond.rs" 117 4 117 29] (_1 : ()) : bool
ensures { result = reinitialize0 _1 }
use C06MapPrecond_Map_Type as C06MapPrecond_Map_Type
- predicate invariant0 [#"../06_map_precond.rs" 158 4 158 30] (self : C06MapPrecond_Map_Type.t_map i b f item0) =
- [#"../06_map_precond.rs" 160 12 162 73] reinitialize0 () /\ preservation_inv0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self)) /\ next_precondition0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self))
- val invariant0 [#"../06_map_precond.rs" 158 4 158 30] (self : C06MapPrecond_Map_Type.t_map i b f item0) : bool
+ predicate invariant0 [#"../06_map_precond.rs" 157 4 157 30] (self : C06MapPrecond_Map_Type.t_map i b f item0) =
+ [#"../06_map_precond.rs" 159 12 161 73] reinitialize0 () /\ preservation_inv0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self)) /\ next_precondition0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self))
+ val invariant0 [#"../06_map_precond.rs" 157 4 157 30] (self : C06MapPrecond_Map_Type.t_map i b f item0) : bool
ensures { result = invariant0 self }
predicate inv0 (_x : C06MapPrecond_Map_Type.t_map i b f item0)
@@ -621,40 +621,40 @@ module C06MapPrecond_Impl0_ProducesTrans_Impl
use prelude.Ghost
use seq.Seq
- predicate next_precondition0 [#"../06_map_precond.rs" 84 4 84 74] (iter : i) (func : f) (produced : Seq.seq item0) =
- [#"../06_map_precond.rs" 85 8 89 9] forall i : i . forall e : item0 . inv4 i -> inv11 e -> produces1 iter (Seq.singleton e) i -> precondition0 func (e, Ghost.new produced)
- val next_precondition0 [#"../06_map_precond.rs" 84 4 84 74] (iter : i) (func : f) (produced : Seq.seq item0) : bool
+ predicate next_precondition0 [#"../06_map_precond.rs" 83 4 83 74] (iter : i) (func : f) (produced : Seq.seq item0) =
+ [#"../06_map_precond.rs" 84 8 88 9] forall i : i . forall e : item0 . inv4 i -> inv11 e -> produces1 iter (Seq.singleton e) i -> precondition0 func (e, Ghost.new produced)
+ val next_precondition0 [#"../06_map_precond.rs" 83 4 83 74] (iter : i) (func : f) (produced : Seq.seq item0) : bool
ensures { result = next_precondition0 iter func produced }
use seq.Seq
- predicate preservation0 [#"../06_map_precond.rs" 106 4 106 45] (iter : i) (func : f) =
- [#"../06_map_precond.rs" 107 8 114 9] forall i : i . forall b : b . forall f : borrowed f . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv4 i -> inv9 b -> inv7 f -> inv11 e2 -> inv11 e1 -> inv2 s -> unnest0 func ( * f) -> produces1 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new s) -> postcondition_mut0 f (e1, Ghost.new s) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc s e1))
- val preservation0 [#"../06_map_precond.rs" 106 4 106 45] (iter : i) (func : f) : bool
+ predicate preservation0 [#"../06_map_precond.rs" 105 4 105 45] (iter : i) (func : f) =
+ [#"../06_map_precond.rs" 106 8 113 9] forall i : i . forall b : b . forall f : borrowed f . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv4 i -> inv9 b -> inv7 f -> inv11 e2 -> inv11 e1 -> inv2 s -> unnest0 func ( * f) -> produces1 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new s) -> postcondition_mut0 f (e1, Ghost.new s) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc s e1))
+ val preservation0 [#"../06_map_precond.rs" 105 4 105 45] (iter : i) (func : f) : bool
ensures { result = preservation0 iter func }
- predicate preservation_inv0 [#"../06_map_precond.rs" 94 4 94 73] (iter : i) (func : f) (produced : Seq.seq item0) =
- [#"../06_map_precond.rs" 95 8 102 9] forall i : i . forall b : b . forall f : borrowed f . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv4 i -> inv9 b -> inv7 f -> inv11 e2 -> inv11 e1 -> inv2 s -> unnest0 func ( * f) -> produces1 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new (Seq.(++) produced s)) -> postcondition_mut0 f (e1, Ghost.new (Seq.(++) produced s)) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc (Seq.(++) produced s) e1))
- val preservation_inv0 [#"../06_map_precond.rs" 94 4 94 73] (iter : i) (func : f) (produced : Seq.seq item0) : bool
- requires {[#"../06_map_precond.rs" 94 24 94 28] inv4 iter}
- requires {[#"../06_map_precond.rs" 94 33 94 37] inv5 func}
- requires {[#"../06_map_precond.rs" 94 42 94 50] inv2 produced}
+ predicate preservation_inv0 [#"../06_map_precond.rs" 93 4 93 73] (iter : i) (func : f) (produced : Seq.seq item0) =
+ [#"../06_map_precond.rs" 94 8 101 9] forall i : i . forall b : b . forall f : borrowed f . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv4 i -> inv9 b -> inv7 f -> inv11 e2 -> inv11 e1 -> inv2 s -> unnest0 func ( * f) -> produces1 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new (Seq.(++) produced s)) -> postcondition_mut0 f (e1, Ghost.new (Seq.(++) produced s)) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc (Seq.(++) produced s) e1))
+ val preservation_inv0 [#"../06_map_precond.rs" 93 4 93 73] (iter : i) (func : f) (produced : Seq.seq item0) : bool
+ requires {[#"../06_map_precond.rs" 93 24 93 28] inv4 iter}
+ requires {[#"../06_map_precond.rs" 93 33 93 37] inv5 func}
+ requires {[#"../06_map_precond.rs" 93 42 93 50] inv2 produced}
ensures { result = preservation_inv0 iter func produced }
- axiom preservation_inv0_spec : forall iter : i, func : f, produced : Seq.seq item0 . ([#"../06_map_precond.rs" 94 24 94 28] inv4 iter) -> ([#"../06_map_precond.rs" 94 33 94 37] inv5 func) -> ([#"../06_map_precond.rs" 94 42 94 50] inv2 produced) -> ([#"../06_map_precond.rs" 93 4 93 83] produced = Seq.empty -> preservation_inv0 iter func produced = preservation0 iter func)
+ axiom preservation_inv0_spec : forall iter : i, func : f, produced : Seq.seq item0 . ([#"../06_map_precond.rs" 93 24 93 28] inv4 iter) -> ([#"../06_map_precond.rs" 93 33 93 37] inv5 func) -> ([#"../06_map_precond.rs" 93 42 93 50] inv2 produced) -> ([#"../06_map_precond.rs" 92 4 92 83] produced = Seq.empty -> preservation_inv0 iter func produced = preservation0 iter func)
use prelude.Ghost
predicate completed0 [#"../common.rs" 11 4 11 36] (self : borrowed i)
val completed0 [#"../common.rs" 11 4 11 36] (self : borrowed i) : bool
ensures { result = completed0 self }
- predicate reinitialize0 [#"../06_map_precond.rs" 118 4 118 29] (_1 : ()) =
- [#"../06_map_precond.rs" 119 8 124 9] forall func : f . forall iter : borrowed i . inv5 func -> inv10 iter -> completed0 iter -> next_precondition0 ( ^ iter) func (Seq.empty ) /\ preservation0 ( ^ iter) func
- val reinitialize0 [#"../06_map_precond.rs" 118 4 118 29] (_1 : ()) : bool
+ predicate reinitialize0 [#"../06_map_precond.rs" 117 4 117 29] (_1 : ()) =
+ [#"../06_map_precond.rs" 118 8 123 9] forall func : f . forall iter : borrowed i . inv5 func -> inv10 iter -> completed0 iter -> next_precondition0 ( ^ iter) func (Seq.empty ) /\ preservation0 ( ^ iter) func
+ val reinitialize0 [#"../06_map_precond.rs" 117 4 117 29] (_1 : ()) : bool
ensures { result = reinitialize0 _1 }
use C06MapPrecond_Map_Type as C06MapPrecond_Map_Type
- predicate invariant0 [#"../06_map_precond.rs" 158 4 158 30] (self : C06MapPrecond_Map_Type.t_map i b f item0) =
- [#"../06_map_precond.rs" 160 12 162 73] reinitialize0 () /\ preservation_inv0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self)) /\ next_precondition0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self))
- val invariant0 [#"../06_map_precond.rs" 158 4 158 30] (self : C06MapPrecond_Map_Type.t_map i b f item0) : bool
+ predicate invariant0 [#"../06_map_precond.rs" 157 4 157 30] (self : C06MapPrecond_Map_Type.t_map i b f item0) =
+ [#"../06_map_precond.rs" 159 12 161 73] reinitialize0 () /\ preservation_inv0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self)) /\ next_precondition0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self))
+ val invariant0 [#"../06_map_precond.rs" 157 4 157 30] (self : C06MapPrecond_Map_Type.t_map i b f item0) : bool
ensures { result = invariant0 self }
predicate inv0 (_x : C06MapPrecond_Map_Type.t_map i b f item0)
@@ -946,52 +946,52 @@ module C06MapPrecond_Impl1_ProducesOne_Impl
axiom inv1 : forall x : b . inv1 x = true
use seq.Seq
- predicate next_precondition0 [#"../06_map_precond.rs" 84 4 84 74] (iter : i) (func : f) (produced : Seq.seq item0) =
- [#"../06_map_precond.rs" 85 8 89 9] forall i : i . forall e : item0 . inv6 i -> inv3 e -> produces1 iter (Seq.singleton e) i -> precondition0 func (e, Ghost.new produced)
- val next_precondition0 [#"../06_map_precond.rs" 84 4 84 74] (iter : i) (func : f) (produced : Seq.seq item0) : bool
+ predicate next_precondition0 [#"../06_map_precond.rs" 83 4 83 74] (iter : i) (func : f) (produced : Seq.seq item0) =
+ [#"../06_map_precond.rs" 84 8 88 9] forall i : i . forall e : item0 . inv6 i -> inv3 e -> produces1 iter (Seq.singleton e) i -> precondition0 func (e, Ghost.new produced)
+ val next_precondition0 [#"../06_map_precond.rs" 83 4 83 74] (iter : i) (func : f) (produced : Seq.seq item0) : bool
ensures { result = next_precondition0 iter func produced }
use seq.Seq
- predicate preservation0 [#"../06_map_precond.rs" 106 4 106 45] (iter : i) (func : f) =
- [#"../06_map_precond.rs" 107 8 114 9] forall i : i . forall b : b . forall f : borrowed f . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv6 i -> inv1 b -> inv2 f -> inv3 e2 -> inv3 e1 -> inv4 s -> unnest0 func ( * f) -> produces1 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new s) -> postcondition_mut0 f (e1, Ghost.new s) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc s e1))
- val preservation0 [#"../06_map_precond.rs" 106 4 106 45] (iter : i) (func : f) : bool
+ predicate preservation0 [#"../06_map_precond.rs" 105 4 105 45] (iter : i) (func : f) =
+ [#"../06_map_precond.rs" 106 8 113 9] forall i : i . forall b : b . forall f : borrowed f . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv6 i -> inv1 b -> inv2 f -> inv3 e2 -> inv3 e1 -> inv4 s -> unnest0 func ( * f) -> produces1 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new s) -> postcondition_mut0 f (e1, Ghost.new s) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc s e1))
+ val preservation0 [#"../06_map_precond.rs" 105 4 105 45] (iter : i) (func : f) : bool
ensures { result = preservation0 iter func }
- predicate preservation_inv0 [#"../06_map_precond.rs" 94 4 94 73] (iter : i) (func : f) (produced : Seq.seq item0) =
- [#"../06_map_precond.rs" 95 8 102 9] forall i : i . forall b : b . forall f : borrowed f . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv6 i -> inv1 b -> inv2 f -> inv3 e2 -> inv3 e1 -> inv4 s -> unnest0 func ( * f) -> produces1 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new (Seq.(++) produced s)) -> postcondition_mut0 f (e1, Ghost.new (Seq.(++) produced s)) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc (Seq.(++) produced s) e1))
- val preservation_inv0 [#"../06_map_precond.rs" 94 4 94 73] (iter : i) (func : f) (produced : Seq.seq item0) : bool
- requires {[#"../06_map_precond.rs" 94 24 94 28] inv6 iter}
- requires {[#"../06_map_precond.rs" 94 33 94 37] inv7 func}
- requires {[#"../06_map_precond.rs" 94 42 94 50] inv4 produced}
+ predicate preservation_inv0 [#"../06_map_precond.rs" 93 4 93 73] (iter : i) (func : f) (produced : Seq.seq item0) =
+ [#"../06_map_precond.rs" 94 8 101 9] forall i : i . forall b : b . forall f : borrowed f . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv6 i -> inv1 b -> inv2 f -> inv3 e2 -> inv3 e1 -> inv4 s -> unnest0 func ( * f) -> produces1 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new (Seq.(++) produced s)) -> postcondition_mut0 f (e1, Ghost.new (Seq.(++) produced s)) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc (Seq.(++) produced s) e1))
+ val preservation_inv0 [#"../06_map_precond.rs" 93 4 93 73] (iter : i) (func : f) (produced : Seq.seq item0) : bool
+ requires {[#"../06_map_precond.rs" 93 24 93 28] inv6 iter}
+ requires {[#"../06_map_precond.rs" 93 33 93 37] inv7 func}
+ requires {[#"../06_map_precond.rs" 93 42 93 50] inv4 produced}
ensures { result = preservation_inv0 iter func produced }
- axiom preservation_inv0_spec : forall iter : i, func : f, produced : Seq.seq item0 . ([#"../06_map_precond.rs" 94 24 94 28] inv6 iter) -> ([#"../06_map_precond.rs" 94 33 94 37] inv7 func) -> ([#"../06_map_precond.rs" 94 42 94 50] inv4 produced) -> ([#"../06_map_precond.rs" 93 4 93 83] produced = Seq.empty -> preservation_inv0 iter func produced = preservation0 iter func)
+ axiom preservation_inv0_spec : forall iter : i, func : f, produced : Seq.seq item0 . ([#"../06_map_precond.rs" 93 24 93 28] inv6 iter) -> ([#"../06_map_precond.rs" 93 33 93 37] inv7 func) -> ([#"../06_map_precond.rs" 93 42 93 50] inv4 produced) -> ([#"../06_map_precond.rs" 92 4 92 83] produced = Seq.empty -> preservation_inv0 iter func produced = preservation0 iter func)
predicate completed0 [#"../common.rs" 11 4 11 36] (self : borrowed i)
val completed0 [#"../common.rs" 11 4 11 36] (self : borrowed i) : bool
ensures { result = completed0 self }
- predicate reinitialize0 [#"../06_map_precond.rs" 118 4 118 29] (_1 : ()) =
- [#"../06_map_precond.rs" 119 8 124 9] forall func : f . forall iter : borrowed i . inv7 func -> inv11 iter -> completed0 iter -> next_precondition0 ( ^ iter) func (Seq.empty ) /\ preservation0 ( ^ iter) func
- val reinitialize0 [#"../06_map_precond.rs" 118 4 118 29] (_1 : ()) : bool
+ predicate reinitialize0 [#"../06_map_precond.rs" 117 4 117 29] (_1 : ()) =
+ [#"../06_map_precond.rs" 118 8 123 9] forall func : f . forall iter : borrowed i . inv7 func -> inv11 iter -> completed0 iter -> next_precondition0 ( ^ iter) func (Seq.empty ) /\ preservation0 ( ^ iter) func
+ val reinitialize0 [#"../06_map_precond.rs" 117 4 117 29] (_1 : ()) : bool
ensures { result = reinitialize0 _1 }
- predicate invariant0 [#"../06_map_precond.rs" 158 4 158 30] (self : C06MapPrecond_Map_Type.t_map i b f item0) =
- [#"../06_map_precond.rs" 160 12 162 73] reinitialize0 () /\ preservation_inv0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self)) /\ next_precondition0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self))
- val invariant0 [#"../06_map_precond.rs" 158 4 158 30] (self : C06MapPrecond_Map_Type.t_map i b f item0) : bool
+ predicate invariant0 [#"../06_map_precond.rs" 157 4 157 30] (self : C06MapPrecond_Map_Type.t_map i b f item0) =
+ [#"../06_map_precond.rs" 159 12 161 73] reinitialize0 () /\ preservation_inv0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self)) /\ next_precondition0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self))
+ val invariant0 [#"../06_map_precond.rs" 157 4 157 30] (self : C06MapPrecond_Map_Type.t_map i b f item0) : bool
ensures { result = invariant0 self }
axiom inv0 : forall x : C06MapPrecond_Map_Type.t_map i b f item0 . inv0 x = (invariant0 x /\ match x with
| C06MapPrecond_Map_Type.C_Map iter func produced -> true
end)
use seq.Seq
- let rec ghost predicate produces_one [#"../06_map_precond.rs" 143 4 143 57] (self : C06MapPrecond_Map_Type.t_map i b f item0) (visited : b) (succ : C06MapPrecond_Map_Type.t_map i b f item0)
- requires {[#"../06_map_precond.rs" 143 20 143 24] inv0 self}
- requires {[#"../06_map_precond.rs" 143 26 143 33] inv1 visited}
- requires {[#"../06_map_precond.rs" 143 38 143 42] inv0 succ}
- ensures { [#"../06_map_precond.rs" 142 14 142 68] result = produces0 self (Seq.singleton visited) succ }
+ let rec ghost predicate produces_one [#"../06_map_precond.rs" 142 4 142 57] (self : C06MapPrecond_Map_Type.t_map i b f item0) (visited : b) (succ : C06MapPrecond_Map_Type.t_map i b f item0)
+ requires {[#"../06_map_precond.rs" 142 20 142 24] inv0 self}
+ requires {[#"../06_map_precond.rs" 142 26 142 33] inv1 visited}
+ requires {[#"../06_map_precond.rs" 142 38 142 42] inv0 succ}
+ ensures { [#"../06_map_precond.rs" 141 14 141 68] result = produces0 self (Seq.singleton visited) succ }
= [@vc:do_not_keep_trace] [@vc:sp]
- [#"../06_map_precond.rs" 144 8 150 9] pure {exists f : borrowed f . inv2 f /\ * f = C06MapPrecond_Map_Type.map_func self /\ ^ f = C06MapPrecond_Map_Type.map_func succ /\ (exists e : item0 . inv3 e /\ produces1 (C06MapPrecond_Map_Type.map_iter self) (Seq.singleton e) (C06MapPrecond_Map_Type.map_iter succ) /\ Ghost.inner (C06MapPrecond_Map_Type.map_produced succ) = Seq.snoc (Ghost.inner (C06MapPrecond_Map_Type.map_produced self)) e /\ precondition0 ( * f) (e, C06MapPrecond_Map_Type.map_produced self) /\ postcondition_mut0 f (e, C06MapPrecond_Map_Type.map_produced self) visited)}
+ [#"../06_map_precond.rs" 143 8 149 9] pure {exists f : borrowed f . inv2 f /\ * f = C06MapPrecond_Map_Type.map_func self /\ ^ f = C06MapPrecond_Map_Type.map_func succ /\ (exists e : item0 . inv3 e /\ produces1 (C06MapPrecond_Map_Type.map_iter self) (Seq.singleton e) (C06MapPrecond_Map_Type.map_iter succ) /\ Ghost.inner (C06MapPrecond_Map_Type.map_produced succ) = Seq.snoc (Ghost.inner (C06MapPrecond_Map_Type.map_produced self)) e /\ precondition0 ( * f) (e, C06MapPrecond_Map_Type.map_produced self) /\ postcondition_mut0 f (e, C06MapPrecond_Map_Type.map_produced self) visited)}
end
module C06MapPrecond_Impl1_ProducesOneInvariant_Impl
type i
@@ -1092,9 +1092,9 @@ module C06MapPrecond_Impl1_ProducesOneInvariant_Impl
ensures { result = produces0 self visited _o }
use seq.Seq
- predicate next_precondition0 [#"../06_map_precond.rs" 84 4 84 74] (iter : i) (func : f) (produced : Seq.seq item0) =
- [#"../06_map_precond.rs" 85 8 89 9] forall i : i . forall e : item0 . inv4 i -> inv1 e -> produces0 iter (Seq.singleton e) i -> precondition0 func (e, Ghost.new produced)
- val next_precondition0 [#"../06_map_precond.rs" 84 4 84 74] (iter : i) (func : f) (produced : Seq.seq item0) : bool
+ predicate next_precondition0 [#"../06_map_precond.rs" 83 4 83 74] (iter : i) (func : f) (produced : Seq.seq item0) =
+ [#"../06_map_precond.rs" 84 8 88 9] forall i : i . forall e : item0 . inv4 i -> inv1 e -> produces0 iter (Seq.singleton e) i -> precondition0 func (e, Ghost.new produced)
+ val next_precondition0 [#"../06_map_precond.rs" 83 4 83 74] (iter : i) (func : f) (produced : Seq.seq item0) : bool
ensures { result = next_precondition0 iter func produced }
predicate postcondition_mut0 (self : borrowed f) (_2 : (item0, Ghost.ghost_ty (Seq.seq item0))) (_3 : b)
@@ -1107,35 +1107,35 @@ module C06MapPrecond_Impl1_ProducesOneInvariant_Impl
val unnest0 (self : f) (_2 : f) : bool
ensures { result = unnest0 self _2 }
- predicate preservation0 [#"../06_map_precond.rs" 106 4 106 45] (iter : i) (func : f) =
- [#"../06_map_precond.rs" 107 8 114 9] forall i : i . forall b : b . forall f : borrowed f . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv4 i -> inv2 b -> inv3 f -> inv1 e2 -> inv1 e1 -> inv5 s -> unnest0 func ( * f) -> produces0 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new s) -> postcondition_mut0 f (e1, Ghost.new s) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc s e1))
- val preservation0 [#"../06_map_precond.rs" 106 4 106 45] (iter : i) (func : f) : bool
+ predicate preservation0 [#"../06_map_precond.rs" 105 4 105 45] (iter : i) (func : f) =
+ [#"../06_map_precond.rs" 106 8 113 9] forall i : i . forall b : b . forall f : borrowed f . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv4 i -> inv2 b -> inv3 f -> inv1 e2 -> inv1 e1 -> inv5 s -> unnest0 func ( * f) -> produces0 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new s) -> postcondition_mut0 f (e1, Ghost.new s) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc s e1))
+ val preservation0 [#"../06_map_precond.rs" 105 4 105 45] (iter : i) (func : f) : bool
ensures { result = preservation0 iter func }
use seq.Seq
- predicate preservation_inv0 [#"../06_map_precond.rs" 94 4 94 73] (iter : i) (func : f) (produced : Seq.seq item0) =
- [#"../06_map_precond.rs" 95 8 102 9] forall i : i . forall b : b . forall f : borrowed f . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv4 i -> inv2 b -> inv3 f -> inv1 e2 -> inv1 e1 -> inv5 s -> unnest0 func ( * f) -> produces0 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new (Seq.(++) produced s)) -> postcondition_mut0 f (e1, Ghost.new (Seq.(++) produced s)) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc (Seq.(++) produced s) e1))
- val preservation_inv0 [#"../06_map_precond.rs" 94 4 94 73] (iter : i) (func : f) (produced : Seq.seq item0) : bool
- requires {[#"../06_map_precond.rs" 94 24 94 28] inv4 iter}
- requires {[#"../06_map_precond.rs" 94 33 94 37] inv6 func}
- requires {[#"../06_map_precond.rs" 94 42 94 50] inv5 produced}
+ predicate preservation_inv0 [#"../06_map_precond.rs" 93 4 93 73] (iter : i) (func : f) (produced : Seq.seq item0) =
+ [#"../06_map_precond.rs" 94 8 101 9] forall i : i . forall b : b . forall f : borrowed f . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv4 i -> inv2 b -> inv3 f -> inv1 e2 -> inv1 e1 -> inv5 s -> unnest0 func ( * f) -> produces0 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new (Seq.(++) produced s)) -> postcondition_mut0 f (e1, Ghost.new (Seq.(++) produced s)) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc (Seq.(++) produced s) e1))
+ val preservation_inv0 [#"../06_map_precond.rs" 93 4 93 73] (iter : i) (func : f) (produced : Seq.seq item0) : bool
+ requires {[#"../06_map_precond.rs" 93 24 93 28] inv4 iter}
+ requires {[#"../06_map_precond.rs" 93 33 93 37] inv6 func}
+ requires {[#"../06_map_precond.rs" 93 42 93 50] inv5 produced}
ensures { result = preservation_inv0 iter func produced }
- axiom preservation_inv0_spec : forall iter : i, func : f, produced : Seq.seq item0 . ([#"../06_map_precond.rs" 94 24 94 28] inv4 iter) -> ([#"../06_map_precond.rs" 94 33 94 37] inv6 func) -> ([#"../06_map_precond.rs" 94 42 94 50] inv5 produced) -> ([#"../06_map_precond.rs" 93 4 93 83] produced = Seq.empty -> preservation_inv0 iter func produced = preservation0 iter func)
+ axiom preservation_inv0_spec : forall iter : i, func : f, produced : Seq.seq item0 . ([#"../06_map_precond.rs" 93 24 93 28] inv4 iter) -> ([#"../06_map_precond.rs" 93 33 93 37] inv6 func) -> ([#"../06_map_precond.rs" 93 42 93 50] inv5 produced) -> ([#"../06_map_precond.rs" 92 4 92 83] produced = Seq.empty -> preservation_inv0 iter func produced = preservation0 iter func)
use prelude.Ghost
predicate completed0 [#"../common.rs" 11 4 11 36] (self : borrowed i)
val completed0 [#"../common.rs" 11 4 11 36] (self : borrowed i) : bool
ensures { result = completed0 self }
- predicate reinitialize0 [#"../06_map_precond.rs" 118 4 118 29] (_1 : ()) =
- [#"../06_map_precond.rs" 119 8 124 9] forall func : f . forall iter : borrowed i . inv6 func -> inv9 iter -> completed0 iter -> next_precondition0 ( ^ iter) func (Seq.empty ) /\ preservation0 ( ^ iter) func
- val reinitialize0 [#"../06_map_precond.rs" 118 4 118 29] (_1 : ()) : bool
+ predicate reinitialize0 [#"../06_map_precond.rs" 117 4 117 29] (_1 : ()) =
+ [#"../06_map_precond.rs" 118 8 123 9] forall func : f . forall iter : borrowed i . inv6 func -> inv9 iter -> completed0 iter -> next_precondition0 ( ^ iter) func (Seq.empty ) /\ preservation0 ( ^ iter) func
+ val reinitialize0 [#"../06_map_precond.rs" 117 4 117 29] (_1 : ()) : bool
ensures { result = reinitialize0 _1 }
use C06MapPrecond_Map_Type as C06MapPrecond_Map_Type
- predicate invariant0 [#"../06_map_precond.rs" 158 4 158 30] (self : C06MapPrecond_Map_Type.t_map i b f item0) =
- [#"../06_map_precond.rs" 160 12 162 73] reinitialize0 () /\ preservation_inv0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self)) /\ next_precondition0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self))
- val invariant0 [#"../06_map_precond.rs" 158 4 158 30] (self : C06MapPrecond_Map_Type.t_map i b f item0) : bool
+ predicate invariant0 [#"../06_map_precond.rs" 157 4 157 30] (self : C06MapPrecond_Map_Type.t_map i b f item0) =
+ [#"../06_map_precond.rs" 159 12 161 73] reinitialize0 () /\ preservation_inv0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self)) /\ next_precondition0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self))
+ val invariant0 [#"../06_map_precond.rs" 157 4 157 30] (self : C06MapPrecond_Map_Type.t_map i b f item0) : bool
ensures { result = invariant0 self }
predicate inv0 (_x : C06MapPrecond_Map_Type.t_map i b f item0)
@@ -1205,20 +1205,20 @@ module C06MapPrecond_Impl1_ProducesOneInvariant_Impl
ensures { result = produces_refl0 a }
axiom produces_refl0_spec : forall a : i . ([#"../common.rs" 15 21 15 22] inv4 a) -> ([#"../common.rs" 14 14 14 39] produces0 a (Seq.empty ) a)
- let rec ghost function produces_one_invariant [#"../06_map_precond.rs" 133 4 133 73] (self : C06MapPrecond_Map_Type.t_map i b f item0) (e : item0) (r : b) (f : borrowed f) (iter : i) : ()
- requires {[#"../06_map_precond.rs" 128 4 128 60] produces0 (C06MapPrecond_Map_Type.map_iter self) (Seq.singleton e) iter}
- requires {[#"../06_map_precond.rs" 129 15 129 30] * f = C06MapPrecond_Map_Type.map_func self}
- requires {[#"../06_map_precond.rs" 130 15 130 57] postcondition_mut0 f (e, C06MapPrecond_Map_Type.map_produced self) r}
- requires {[#"../06_map_precond.rs" 133 30 133 34] inv0 self}
- requires {[#"../06_map_precond.rs" 133 36 133 37] inv1 e}
- requires {[#"../06_map_precond.rs" 133 48 133 49] inv2 r}
- requires {[#"../06_map_precond.rs" 133 54 133 55] inv3 f}
- requires {[#"../06_map_precond.rs" 133 65 133 69] inv4 iter}
- ensures { [#"../06_map_precond.rs" 131 14 131 69] preservation_inv0 iter ( ^ f) (Seq.snoc (Ghost.inner (C06MapPrecond_Map_Type.map_produced self)) e) }
- ensures { [#"../06_map_precond.rs" 132 14 132 70] next_precondition0 iter ( ^ f) (Seq.snoc (Ghost.inner (C06MapPrecond_Map_Type.map_produced self)) e) }
+ let rec ghost function produces_one_invariant [#"../06_map_precond.rs" 132 4 132 73] (self : C06MapPrecond_Map_Type.t_map i b f item0) (e : item0) (r : b) (f : borrowed f) (iter : i) : ()
+ requires {[#"../06_map_precond.rs" 127 4 127 60] produces0 (C06MapPrecond_Map_Type.map_iter self) (Seq.singleton e) iter}
+ requires {[#"../06_map_precond.rs" 128 15 128 30] * f = C06MapPrecond_Map_Type.map_func self}
+ requires {[#"../06_map_precond.rs" 129 15 129 57] postcondition_mut0 f (e, C06MapPrecond_Map_Type.map_produced self) r}
+ requires {[#"../06_map_precond.rs" 132 30 132 34] inv0 self}
+ requires {[#"../06_map_precond.rs" 132 36 132 37] inv1 e}
+ requires {[#"../06_map_precond.rs" 132 48 132 49] inv2 r}
+ requires {[#"../06_map_precond.rs" 132 54 132 55] inv3 f}
+ requires {[#"../06_map_precond.rs" 132 65 132 69] inv4 iter}
+ ensures { [#"../06_map_precond.rs" 130 14 130 69] preservation_inv0 iter ( ^ f) (Seq.snoc (Ghost.inner (C06MapPrecond_Map_Type.map_produced self)) e) }
+ ensures { [#"../06_map_precond.rs" 131 14 131 70] next_precondition0 iter ( ^ f) (Seq.snoc (Ghost.inner (C06MapPrecond_Map_Type.map_produced self)) e) }
= [@vc:do_not_keep_trace] [@vc:sp]
- [#"../06_map_precond.rs" 127 4 127 12] let _ = let a = pure {forall i : i . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv4 i -> inv1 e2 -> inv1 e1 -> inv5 s -> produces0 iter (Seq.snoc (Seq.snoc s e1) e2) i -> produces0 (C06MapPrecond_Map_Type.map_iter self) (Seq.snoc (Seq.snoc (Seq.(++) (Seq.singleton e) s) e1) e2) i} in assert {a} in ()
+ [#"../06_map_precond.rs" 126 4 126 12] let _ = let a = pure {forall i : i . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv4 i -> inv1 e2 -> inv1 e1 -> inv5 s -> produces0 iter (Seq.snoc (Seq.snoc s e1) e2) i -> produces0 (C06MapPrecond_Map_Type.map_iter self) (Seq.snoc (Seq.snoc (Seq.(++) (Seq.singleton e) s) e1) e2) i} in assert {a} in ()
end
module C06MapPrecond_Impl0_Next
type i
@@ -1277,9 +1277,9 @@ module C06MapPrecond_Impl0_Next
ensures { result = produces0 self visited _o }
use seq.Seq
- predicate next_precondition0 [#"../06_map_precond.rs" 84 4 84 74] (iter : i) (func : f) (produced : Seq.seq item0) =
- [#"../06_map_precond.rs" 85 8 89 9] forall i : i . forall e : item0 . inv0 i -> inv11 e -> produces0 iter (Seq.singleton e) i -> precondition0 func (e, Ghost.new produced)
- val next_precondition0 [#"../06_map_precond.rs" 84 4 84 74] (iter : i) (func : f) (produced : Seq.seq item0) : bool
+ predicate next_precondition0 [#"../06_map_precond.rs" 83 4 83 74] (iter : i) (func : f) (produced : Seq.seq item0) =
+ [#"../06_map_precond.rs" 84 8 88 9] forall i : i . forall e : item0 . inv0 i -> inv11 e -> produces0 iter (Seq.singleton e) i -> precondition0 func (e, Ghost.new produced)
+ val next_precondition0 [#"../06_map_precond.rs" 83 4 83 74] (iter : i) (func : f) (produced : Seq.seq item0) : bool
ensures { result = next_precondition0 iter func produced }
predicate postcondition_mut0 (self : borrowed f) (_2 : (item0, Ghost.ghost_ty (Seq.seq item0))) (_3 : b)
@@ -1300,21 +1300,21 @@ module C06MapPrecond_Impl0_Next
val inv9 (_x : b) : bool
ensures { result = inv9 _x }
- predicate preservation0 [#"../06_map_precond.rs" 106 4 106 45] (iter : i) (func : f) =
- [#"../06_map_precond.rs" 107 8 114 9] forall i : i . forall b : b . forall f : borrowed f . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv0 i -> inv9 b -> inv7 f -> inv11 e2 -> inv11 e1 -> inv12 s -> unnest0 func ( * f) -> produces0 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new s) -> postcondition_mut0 f (e1, Ghost.new s) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc s e1))
- val preservation0 [#"../06_map_precond.rs" 106 4 106 45] (iter : i) (func : f) : bool
+ predicate preservation0 [#"../06_map_precond.rs" 105 4 105 45] (iter : i) (func : f) =
+ [#"../06_map_precond.rs" 106 8 113 9] forall i : i . forall b : b . forall f : borrowed f . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv0 i -> inv9 b -> inv7 f -> inv11 e2 -> inv11 e1 -> inv12 s -> unnest0 func ( * f) -> produces0 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new s) -> postcondition_mut0 f (e1, Ghost.new s) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc s e1))
+ val preservation0 [#"../06_map_precond.rs" 105 4 105 45] (iter : i) (func : f) : bool
ensures { result = preservation0 iter func }
use seq.Seq
- predicate preservation_inv0 [#"../06_map_precond.rs" 94 4 94 73] (iter : i) (func : f) (produced : Seq.seq item0) =
- [#"../06_map_precond.rs" 95 8 102 9] forall i : i . forall b : b . forall f : borrowed f . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv0 i -> inv9 b -> inv7 f -> inv11 e2 -> inv11 e1 -> inv12 s -> unnest0 func ( * f) -> produces0 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new (Seq.(++) produced s)) -> postcondition_mut0 f (e1, Ghost.new (Seq.(++) produced s)) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc (Seq.(++) produced s) e1))
- val preservation_inv0 [#"../06_map_precond.rs" 94 4 94 73] (iter : i) (func : f) (produced : Seq.seq item0) : bool
- requires {[#"../06_map_precond.rs" 94 24 94 28] inv0 iter}
- requires {[#"../06_map_precond.rs" 94 33 94 37] inv2 func}
- requires {[#"../06_map_precond.rs" 94 42 94 50] inv12 produced}
+ predicate preservation_inv0 [#"../06_map_precond.rs" 93 4 93 73] (iter : i) (func : f) (produced : Seq.seq item0) =
+ [#"../06_map_precond.rs" 94 8 101 9] forall i : i . forall b : b . forall f : borrowed f . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv0 i -> inv9 b -> inv7 f -> inv11 e2 -> inv11 e1 -> inv12 s -> unnest0 func ( * f) -> produces0 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new (Seq.(++) produced s)) -> postcondition_mut0 f (e1, Ghost.new (Seq.(++) produced s)) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc (Seq.(++) produced s) e1))
+ val preservation_inv0 [#"../06_map_precond.rs" 93 4 93 73] (iter : i) (func : f) (produced : Seq.seq item0) : bool
+ requires {[#"../06_map_precond.rs" 93 24 93 28] inv0 iter}
+ requires {[#"../06_map_precond.rs" 93 33 93 37] inv2 func}
+ requires {[#"../06_map_precond.rs" 93 42 93 50] inv12 produced}
ensures { result = preservation_inv0 iter func produced }
- axiom preservation_inv0_spec : forall iter : i, func : f, produced : Seq.seq item0 . ([#"../06_map_precond.rs" 94 24 94 28] inv0 iter) -> ([#"../06_map_precond.rs" 94 33 94 37] inv2 func) -> ([#"../06_map_precond.rs" 94 42 94 50] inv12 produced) -> ([#"../06_map_precond.rs" 93 4 93 83] produced = Seq.empty -> preservation_inv0 iter func produced = preservation0 iter func)
+ axiom preservation_inv0_spec : forall iter : i, func : f, produced : Seq.seq item0 . ([#"../06_map_precond.rs" 93 24 93 28] inv0 iter) -> ([#"../06_map_precond.rs" 93 33 93 37] inv2 func) -> ([#"../06_map_precond.rs" 93 42 93 50] inv12 produced) -> ([#"../06_map_precond.rs" 92 4 92 83] produced = Seq.empty -> preservation_inv0 iter func produced = preservation0 iter func)
use prelude.Ghost
predicate completed1 [#"../common.rs" 11 4 11 36] (self : borrowed i)
val completed1 [#"../common.rs" 11 4 11 36] (self : borrowed i) : bool
@@ -1324,15 +1324,15 @@ module C06MapPrecond_Impl0_Next
val inv6 (_x : borrowed i) : bool
ensures { result = inv6 _x }
- predicate reinitialize0 [#"../06_map_precond.rs" 118 4 118 29] (_1 : ()) =
- [#"../06_map_precond.rs" 119 8 124 9] forall func : f . forall iter : borrowed i . inv2 func -> inv6 iter -> completed1 iter -> next_precondition0 ( ^ iter) func (Seq.empty ) /\ preservation0 ( ^ iter) func
- val reinitialize0 [#"../06_map_precond.rs" 118 4 118 29] (_1 : ()) : bool
+ predicate reinitialize0 [#"../06_map_precond.rs" 117 4 117 29] (_1 : ()) =
+ [#"../06_map_precond.rs" 118 8 123 9] forall func : f . forall iter : borrowed i . inv2 func -> inv6 iter -> completed1 iter -> next_precondition0 ( ^ iter) func (Seq.empty ) /\ preservation0 ( ^ iter) func
+ val reinitialize0 [#"../06_map_precond.rs" 117 4 117 29] (_1 : ()) : bool
ensures { result = reinitialize0 _1 }
use C06MapPrecond_Map_Type as C06MapPrecond_Map_Type
- predicate invariant10 [#"../06_map_precond.rs" 158 4 158 30] (self : C06MapPrecond_Map_Type.t_map i b f item0) =
- [#"../06_map_precond.rs" 160 12 162 73] reinitialize0 () /\ preservation_inv0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self)) /\ next_precondition0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self))
- val invariant10 [#"../06_map_precond.rs" 158 4 158 30] (self : C06MapPrecond_Map_Type.t_map i b f item0) : bool
+ predicate invariant10 [#"../06_map_precond.rs" 157 4 157 30] (self : C06MapPrecond_Map_Type.t_map i b f item0) =
+ [#"../06_map_precond.rs" 159 12 161 73] reinitialize0 () /\ preservation_inv0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self)) /\ next_precondition0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self))
+ val invariant10 [#"../06_map_precond.rs" 157 4 157 30] (self : C06MapPrecond_Map_Type.t_map i b f item0) : bool
ensures { result = invariant10 self }
predicate inv10 (_x : C06MapPrecond_Map_Type.t_map i b f item0)
@@ -1490,47 +1490,47 @@ module C06MapPrecond_Impl0_Next
ensures { result = produces1 self visited succ }
use seq.Seq
- predicate produces_one0 [#"../06_map_precond.rs" 143 4 143 57] (self : C06MapPrecond_Map_Type.t_map i b f item0) (visited : b) (succ : C06MapPrecond_Map_Type.t_map i b f item0)
+ predicate produces_one0 [#"../06_map_precond.rs" 142 4 142 57] (self : C06MapPrecond_Map_Type.t_map i b f item0) (visited : b) (succ : C06MapPrecond_Map_Type.t_map i b f item0)
=
- [#"../06_map_precond.rs" 144 8 150 9] exists f : borrowed f . inv7 f /\ * f = C06MapPrecond_Map_Type.map_func self /\ ^ f = C06MapPrecond_Map_Type.map_func succ /\ (exists e : item0 . inv11 e /\ produces0 (C06MapPrecond_Map_Type.map_iter self) (Seq.singleton e) (C06MapPrecond_Map_Type.map_iter succ) /\ Ghost.inner (C06MapPrecond_Map_Type.map_produced succ) = Seq.snoc (Ghost.inner (C06MapPrecond_Map_Type.map_produced self)) e /\ precondition0 ( * f) (e, C06MapPrecond_Map_Type.map_produced self) /\ postcondition_mut0 f (e, C06MapPrecond_Map_Type.map_produced self) visited)
- val produces_one0 [#"../06_map_precond.rs" 143 4 143 57] (self : C06MapPrecond_Map_Type.t_map i b f item0) (visited : b) (succ : C06MapPrecond_Map_Type.t_map i b f item0) : bool
- requires {[#"../06_map_precond.rs" 143 20 143 24] inv10 self}
- requires {[#"../06_map_precond.rs" 143 26 143 33] inv9 visited}
- requires {[#"../06_map_precond.rs" 143 38 143 42] inv10 succ}
+ [#"../06_map_precond.rs" 143 8 149 9] exists f : borrowed f . inv7 f /\ * f = C06MapPrecond_Map_Type.map_func self /\ ^ f = C06MapPrecond_Map_Type.map_func succ /\ (exists e : item0 . inv11 e /\ produces0 (C06MapPrecond_Map_Type.map_iter self) (Seq.singleton e) (C06MapPrecond_Map_Type.map_iter succ) /\ Ghost.inner (C06MapPrecond_Map_Type.map_produced succ) = Seq.snoc (Ghost.inner (C06MapPrecond_Map_Type.map_produced self)) e /\ precondition0 ( * f) (e, C06MapPrecond_Map_Type.map_produced self) /\ postcondition_mut0 f (e, C06MapPrecond_Map_Type.map_produced self) visited)
+ val produces_one0 [#"../06_map_precond.rs" 142 4 142 57] (self : C06MapPrecond_Map_Type.t_map i b f item0) (visited : b) (succ : C06MapPrecond_Map_Type.t_map i b f item0) : bool
+ requires {[#"../06_map_precond.rs" 142 20 142 24] inv10 self}
+ requires {[#"../06_map_precond.rs" 142 26 142 33] inv9 visited}
+ requires {[#"../06_map_precond.rs" 142 38 142 42] inv10 succ}
ensures { result = produces_one0 self visited succ }
- axiom produces_one0_spec : forall self : C06MapPrecond_Map_Type.t_map i b f item0, visited : b, succ : C06MapPrecond_Map_Type.t_map i b f item0 . ([#"../06_map_precond.rs" 143 20 143 24] inv10 self) -> ([#"../06_map_precond.rs" 143 26 143 33] inv9 visited) -> ([#"../06_map_precond.rs" 143 38 143 42] inv10 succ) -> ([#"../06_map_precond.rs" 142 14 142 68] produces_one0 self visited succ = produces1 self (Seq.singleton visited) succ)
+ axiom produces_one0_spec : forall self : C06MapPrecond_Map_Type.t_map i b f item0, visited : b, succ : C06MapPrecond_Map_Type.t_map i b f item0 . ([#"../06_map_precond.rs" 142 20 142 24] inv10 self) -> ([#"../06_map_precond.rs" 142 26 142 33] inv9 visited) -> ([#"../06_map_precond.rs" 142 38 142 42] inv10 succ) -> ([#"../06_map_precond.rs" 141 14 141 68] produces_one0 self visited succ = produces1 self (Seq.singleton visited) succ)
predicate completed0 [#"../06_map_precond.rs" 21 4 21 35] (self : borrowed (C06MapPrecond_Map_Type.t_map i b f item0))
=
- [#"../06_map_precond.rs" 22 8 25 9] Ghost.inner (C06MapPrecond_Map_Type.map_produced ( ^ self)) = Seq.empty /\ completed1 {current = C06MapPrecond_Map_Type.map_iter ( * self); final = C06MapPrecond_Map_Type.map_iter ( ^ self)} /\ C06MapPrecond_Map_Type.map_func ( * self) = C06MapPrecond_Map_Type.map_func ( ^ self)
+ [#"../06_map_precond.rs" 22 8 25 9] Ghost.inner (C06MapPrecond_Map_Type.map_produced ( ^ self)) = Seq.empty /\ completed1 (Borrow.borrow_logic (C06MapPrecond_Map_Type.map_iter ( * self)) (C06MapPrecond_Map_Type.map_iter ( ^ self)) (Borrow.inherit_id (Borrow.get_id self) 1)) /\ C06MapPrecond_Map_Type.map_func ( * self) = C06MapPrecond_Map_Type.map_func ( ^ self)
val completed0 [#"../06_map_precond.rs" 21 4 21 35] (self : borrowed (C06MapPrecond_Map_Type.t_map i b f item0)) : bool
ensures { result = completed0 self }
- predicate resolve3 (self : borrowed (C06MapPrecond_Map_Type.t_map i b f item0)) =
- [#"../../../../../creusot-contracts/src/resolve.rs" 25 20 25 34] ^ self = * self
- val resolve3 (self : borrowed (C06MapPrecond_Map_Type.t_map i b f item0)) : bool
+ predicate resolve3 (self : Ghost.ghost_ty ())
+ val resolve3 (self : Ghost.ghost_ty ()) : bool
ensures { result = resolve3 self }
- predicate resolve2 (self : Ghost.ghost_ty ())
- val resolve2 (self : Ghost.ghost_ty ()) : bool
- ensures { result = resolve2 self }
-
use prelude.Ghost
- function produces_one_invariant0 [#"../06_map_precond.rs" 133 4 133 73] (self : C06MapPrecond_Map_Type.t_map i b f item0) (e : item0) (r : b) (f : borrowed f) (iter : i) : ()
-
- val produces_one_invariant0 [#"../06_map_precond.rs" 133 4 133 73] (self : C06MapPrecond_Map_Type.t_map i b f item0) (e : item0) (r : b) (f : borrowed f) (iter : i) : ()
- requires {[#"../06_map_precond.rs" 128 4 128 60] produces0 (C06MapPrecond_Map_Type.map_iter self) (Seq.singleton e) iter}
- requires {[#"../06_map_precond.rs" 129 15 129 30] * f = C06MapPrecond_Map_Type.map_func self}
- requires {[#"../06_map_precond.rs" 130 15 130 57] postcondition_mut0 f (e, C06MapPrecond_Map_Type.map_produced self) r}
- requires {[#"../06_map_precond.rs" 133 30 133 34] inv10 self}
- requires {[#"../06_map_precond.rs" 133 36 133 37] inv11 e}
- requires {[#"../06_map_precond.rs" 133 48 133 49] inv9 r}
- requires {[#"../06_map_precond.rs" 133 54 133 55] inv7 f}
- requires {[#"../06_map_precond.rs" 133 65 133 69] inv0 iter}
+ function produces_one_invariant0 [#"../06_map_precond.rs" 132 4 132 73] (self : C06MapPrecond_Map_Type.t_map i b f item0) (e : item0) (r : b) (f : borrowed f) (iter : i) : ()
+
+ val produces_one_invariant0 [#"../06_map_precond.rs" 132 4 132 73] (self : C06MapPrecond_Map_Type.t_map i b f item0) (e : item0) (r : b) (f : borrowed f) (iter : i) : ()
+ requires {[#"../06_map_precond.rs" 127 4 127 60] produces0 (C06MapPrecond_Map_Type.map_iter self) (Seq.singleton e) iter}
+ requires {[#"../06_map_precond.rs" 128 15 128 30] * f = C06MapPrecond_Map_Type.map_func self}
+ requires {[#"../06_map_precond.rs" 129 15 129 57] postcondition_mut0 f (e, C06MapPrecond_Map_Type.map_produced self) r}
+ requires {[#"../06_map_precond.rs" 132 30 132 34] inv10 self}
+ requires {[#"../06_map_precond.rs" 132 36 132 37] inv11 e}
+ requires {[#"../06_map_precond.rs" 132 48 132 49] inv9 r}
+ requires {[#"../06_map_precond.rs" 132 54 132 55] inv7 f}
+ requires {[#"../06_map_precond.rs" 132 65 132 69] inv0 iter}
ensures { result = produces_one_invariant0 self e r f iter }
- axiom produces_one_invariant0_spec : forall self : C06MapPrecond_Map_Type.t_map i b f item0, e : item0, r : b, f : borrowed f, iter : i . ([#"../06_map_precond.rs" 128 4 128 60] produces0 (C06MapPrecond_Map_Type.map_iter self) (Seq.singleton e) iter) -> ([#"../06_map_precond.rs" 129 15 129 30] * f = C06MapPrecond_Map_Type.map_func self) -> ([#"../06_map_precond.rs" 130 15 130 57] postcondition_mut0 f (e, C06MapPrecond_Map_Type.map_produced self) r) -> ([#"../06_map_precond.rs" 133 30 133 34] inv10 self) -> ([#"../06_map_precond.rs" 133 36 133 37] inv11 e) -> ([#"../06_map_precond.rs" 133 48 133 49] inv9 r) -> ([#"../06_map_precond.rs" 133 54 133 55] inv7 f) -> ([#"../06_map_precond.rs" 133 65 133 69] inv0 iter) -> ([#"../06_map_precond.rs" 132 14 132 70] next_precondition0 iter ( ^ f) (Seq.snoc (Ghost.inner (C06MapPrecond_Map_Type.map_produced self)) e)) && ([#"../06_map_precond.rs" 131 14 131 69] preservation_inv0 iter ( ^ f) (Seq.snoc (Ghost.inner (C06MapPrecond_Map_Type.map_produced self)) e))
+ axiom produces_one_invariant0_spec : forall self : C06MapPrecond_Map_Type.t_map i b f item0, e : item0, r : b, f : borrowed f, iter : i . ([#"../06_map_precond.rs" 127 4 127 60] produces0 (C06MapPrecond_Map_Type.map_iter self) (Seq.singleton e) iter) -> ([#"../06_map_precond.rs" 128 15 128 30] * f = C06MapPrecond_Map_Type.map_func self) -> ([#"../06_map_precond.rs" 129 15 129 57] postcondition_mut0 f (e, C06MapPrecond_Map_Type.map_produced self) r) -> ([#"../06_map_precond.rs" 132 30 132 34] inv10 self) -> ([#"../06_map_precond.rs" 132 36 132 37] inv11 e) -> ([#"../06_map_precond.rs" 132 48 132 49] inv9 r) -> ([#"../06_map_precond.rs" 132 54 132 55] inv7 f) -> ([#"../06_map_precond.rs" 132 65 132 69] inv0 iter) -> ([#"../06_map_precond.rs" 131 14 131 70] next_precondition0 iter ( ^ f) (Seq.snoc (Ghost.inner (C06MapPrecond_Map_Type.map_produced self)) e)) && ([#"../06_map_precond.rs" 130 14 130 69] preservation_inv0 iter ( ^ f) (Seq.snoc (Ghost.inner (C06MapPrecond_Map_Type.map_produced self)) e))
+ predicate resolve2 (self : borrowed (C06MapPrecond_Map_Type.t_map i b f item0)) =
+ [#"../../../../../creusot-contracts/src/resolve.rs" 25 20 25 34] ^ self = * self
+ val resolve2 (self : borrowed (C06MapPrecond_Map_Type.t_map i b f item0)) : bool
+ ensures { result = resolve2 self }
+
predicate resolve1 (self : Ghost.ghost_ty (Seq.seq item0))
val resolve1 (self : Ghost.ghost_ty (Seq.seq item0)) : bool
ensures { result = resolve1 self }
@@ -1577,8 +1577,8 @@ module C06MapPrecond_Impl0_Next
goto BB0
}
BB0 {
- [#"../06_map_precond.rs" 64 14 64 30] _4 <- Borrow.borrow_mut (C06MapPrecond_Map_Type.map_iter ( * self));
- [#"../06_map_precond.rs" 64 14 64 30] self <- { self with current = (let C06MapPrecond_Map_Type.C_Map x0 x1 x2 = * self in C06MapPrecond_Map_Type.C_Map ( ^ _4) x1 x2) };
+ [#"../06_map_precond.rs" 64 14 64 30] _4 <- Borrow.borrow_final (C06MapPrecond_Map_Type.map_iter ( * self)) (Borrow.inherit_id (Borrow.get_id self) 1);
+ [#"../06_map_precond.rs" 64 14 64 30] self <- { self with current = (let C06MapPrecond_Map_Type.C_Map x0 x1 x2 = * self in C06MapPrecond_Map_Type.C_Map ( ^ _4) x1 x2) ; };
assume { inv0 ( ^ _4) };
[#"../06_map_precond.rs" 64 14 64 30] _3 <- ([#"../06_map_precond.rs" 64 14 64 30] next0 _4);
_4 <- any borrowed i;
@@ -1593,7 +1593,7 @@ module C06MapPrecond_Impl0_Next
BB2 {
assert { [@expl:type invariant] inv1 _3 };
assume { resolve0 _3 };
- [#"../06_map_precond.rs" 75 32 75 50] _20 <- ([#"../06_map_precond.rs" 75 32 75 50] Ghost.new (Seq.empty ));
+ [#"../06_map_precond.rs" 74 32 74 50] _20 <- ([#"../06_map_precond.rs" 74 32 74 50] Ghost.new (Seq.empty ));
goto BB14
}
BB3 {
@@ -1603,7 +1603,7 @@ module C06MapPrecond_Impl0_Next
assert { [@expl:type invariant] inv1 _3 };
assume { resolve0 _3 };
assert { [@expl:type invariant] inv4 self };
- assume { resolve3 self };
+ assume { resolve2 self };
assert { [#"../06_map_precond.rs" 64 14 64 30] false };
absurd
}
@@ -1620,8 +1620,8 @@ module C06MapPrecond_Impl0_Next
goto BB7
}
BB7 {
- [#"../06_map_precond.rs" 68 24 68 35] _12 <- Borrow.borrow_mut (C06MapPrecond_Map_Type.map_func ( * self));
- [#"../06_map_precond.rs" 68 24 68 35] self <- { self with current = (let C06MapPrecond_Map_Type.C_Map x0 x1 x2 = * self in C06MapPrecond_Map_Type.C_Map x0 ( ^ _12) x2) };
+ [#"../06_map_precond.rs" 68 24 68 35] _12 <- Borrow.borrow_final (C06MapPrecond_Map_Type.map_func ( * self)) (Borrow.inherit_id (Borrow.get_id self) 2);
+ [#"../06_map_precond.rs" 68 24 68 35] self <- { self with current = (let C06MapPrecond_Map_Type.C_Map x0 x1 x2 = * self in C06MapPrecond_Map_Type.C_Map x0 ( ^ _12) x2) ; };
assume { inv2 ( ^ _12) };
[#"../06_map_precond.rs" 68 24 68 53] r <- ([#"../06_map_precond.rs" 68 24 68 53] call_mut0 _12 ([#"../06_map_precond.rs" 68 24 68 53] (([#"../06_map_precond.rs" 68 36 68 37] v), ([#"../06_map_precond.rs" 68 39 68 52] C06MapPrecond_Map_Type.map_produced ( * self)))));
_12 <- any borrowed f;
@@ -1634,16 +1634,18 @@ module C06MapPrecond_Impl0_Next
BB9 {
assert { [@expl:type invariant] inv3 produced };
assume { resolve1 produced };
- [#"../06_map_precond.rs" 69 16 69 40] self <- { self with current = (let C06MapPrecond_Map_Type.C_Map x0 x1 x2 = * self in C06MapPrecond_Map_Type.C_Map x0 x1 ([#"../06_map_precond.rs" 69 32 69 40] produced)) };
+ [#"../06_map_precond.rs" 69 16 69 40] self <- { self with current = (let C06MapPrecond_Map_Type.C_Map x0 x1 x2 = * self in C06MapPrecond_Map_Type.C_Map x0 x1 ([#"../06_map_precond.rs" 69 32 69 40] produced)) ; };
+ assert { [@expl:type invariant] inv3 (C06MapPrecond_Map_Type.map_produced ( * self)) };
+ assume { resolve1 (C06MapPrecond_Map_Type.map_produced ( * self)) };
+ assert { [@expl:type invariant] inv4 self };
+ assume { resolve2 self };
[#"../06_map_precond.rs" 70 16 70 52] _17 <- ([#"../06_map_precond.rs" 70 16 70 52] Ghost.new ());
goto BB10
}
BB10 {
- assume { resolve2 _17 };
- assert { [@expl:type invariant] inv4 self };
- assume { resolve3 self };
- [#"../06_map_precond.rs" 72 16 72 23] _0 <- ([#"../06_map_precond.rs" 72 16 72 23] Core_Option_Option_Type.C_Some ([#"../06_map_precond.rs" 72 21 72 22] r));
- [#"../06_map_precond.rs" 72 21 72 22] r <- any b;
+ assume { resolve3 _17 };
+ [#"../06_map_precond.rs" 71 16 71 23] _0 <- ([#"../06_map_precond.rs" 71 16 71 23] Core_Option_Option_Type.C_Some ([#"../06_map_precond.rs" 71 21 71 22] r));
+ [#"../06_map_precond.rs" 71 21 71 22] r <- any b;
goto BB11
}
BB11 {
@@ -1656,13 +1658,13 @@ module C06MapPrecond_Impl0_Next
goto BB15
}
BB14 {
- [#"../06_map_precond.rs" 75 16 75 50] self <- { self with current = (let C06MapPrecond_Map_Type.C_Map x0 x1 x2 = * self in C06MapPrecond_Map_Type.C_Map x0 x1 ([#"../06_map_precond.rs" 75 16 75 50] _20)) };
- [#"../06_map_precond.rs" 75 16 75 50] _20 <- any Ghost.ghost_ty (Seq.seq item0);
+ [#"../06_map_precond.rs" 74 16 74 50] self <- { self with current = (let C06MapPrecond_Map_Type.C_Map x0 x1 x2 = * self in C06MapPrecond_Map_Type.C_Map x0 x1 ([#"../06_map_precond.rs" 74 16 74 50] _20)) ; };
+ [#"../06_map_precond.rs" 74 16 74 50] _20 <- any Ghost.ghost_ty (Seq.seq item0);
assert { [@expl:type invariant] inv3 (C06MapPrecond_Map_Type.map_produced ( * self)) };
assume { resolve1 (C06MapPrecond_Map_Type.map_produced ( * self)) };
assert { [@expl:type invariant] inv4 self };
- assume { resolve3 self };
- [#"../06_map_precond.rs" 76 16 76 20] _0 <- ([#"../06_map_precond.rs" 76 16 76 20] Core_Option_Option_Type.C_None);
+ assume { resolve2 self };
+ [#"../06_map_precond.rs" 75 16 75 20] _0 <- ([#"../06_map_precond.rs" 75 16 75 20] Core_Option_Option_Type.C_None);
goto BB15
}
BB15 {
@@ -1806,42 +1808,42 @@ module C06MapPrecond_Map
val inv1 (_x : item0) : bool
ensures { result = inv1 _x }
- predicate next_precondition0 [#"../06_map_precond.rs" 84 4 84 74] (iter : i) (func : f) (produced : Seq.seq item0) =
- [#"../06_map_precond.rs" 85 8 89 9] forall i : i . forall e : item0 . inv0 i -> inv1 e -> produces0 iter (Seq.singleton e) i -> precondition0 func (e, Ghost.new produced)
- val next_precondition0 [#"../06_map_precond.rs" 84 4 84 74] (iter : i) (func : f) (produced : Seq.seq item0) : bool
+ predicate next_precondition0 [#"../06_map_precond.rs" 83 4 83 74] (iter : i) (func : f) (produced : Seq.seq item0) =
+ [#"../06_map_precond.rs" 84 8 88 9] forall i : i . forall e : item0 . inv0 i -> inv1 e -> produces0 iter (Seq.singleton e) i -> precondition0 func (e, Ghost.new produced)
+ val next_precondition0 [#"../06_map_precond.rs" 83 4 83 74] (iter : i) (func : f) (produced : Seq.seq item0) : bool
ensures { result = next_precondition0 iter func produced }
use seq.Seq
use seq.Seq
- predicate preservation0 [#"../06_map_precond.rs" 106 4 106 45] (iter : i) (func : f) =
- [#"../06_map_precond.rs" 107 8 114 9] forall i : i . forall b : b . forall f : borrowed f . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv0 i -> inv5 b -> inv6 f -> inv1 e2 -> inv1 e1 -> inv7 s -> unnest0 func ( * f) -> produces0 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new s) -> postcondition_mut0 f (e1, Ghost.new s) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc s e1))
- val preservation0 [#"../06_map_precond.rs" 106 4 106 45] (iter : i) (func : f) : bool
+ predicate preservation0 [#"../06_map_precond.rs" 105 4 105 45] (iter : i) (func : f) =
+ [#"../06_map_precond.rs" 106 8 113 9] forall i : i . forall b : b . forall f : borrowed f . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv0 i -> inv5 b -> inv6 f -> inv1 e2 -> inv1 e1 -> inv7 s -> unnest0 func ( * f) -> produces0 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new s) -> postcondition_mut0 f (e1, Ghost.new s) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc s e1))
+ val preservation0 [#"../06_map_precond.rs" 105 4 105 45] (iter : i) (func : f) : bool
ensures { result = preservation0 iter func }
use seq.Seq
- predicate preservation_inv0 [#"../06_map_precond.rs" 94 4 94 73] (iter : i) (func : f) (produced : Seq.seq item0) =
- [#"../06_map_precond.rs" 95 8 102 9] forall i : i . forall b : b . forall f : borrowed f . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv0 i -> inv5 b -> inv6 f -> inv1 e2 -> inv1 e1 -> inv7 s -> unnest0 func ( * f) -> produces0 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new (Seq.(++) produced s)) -> postcondition_mut0 f (e1, Ghost.new (Seq.(++) produced s)) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc (Seq.(++) produced s) e1))
- val preservation_inv0 [#"../06_map_precond.rs" 94 4 94 73] (iter : i) (func : f) (produced : Seq.seq item0) : bool
- requires {[#"../06_map_precond.rs" 94 24 94 28] inv0 iter}
- requires {[#"../06_map_precond.rs" 94 33 94 37] inv2 func}
- requires {[#"../06_map_precond.rs" 94 42 94 50] inv7 produced}
+ predicate preservation_inv0 [#"../06_map_precond.rs" 93 4 93 73] (iter : i) (func : f) (produced : Seq.seq item0) =
+ [#"../06_map_precond.rs" 94 8 101 9] forall i : i . forall b : b . forall f : borrowed f . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv0 i -> inv5 b -> inv6 f -> inv1 e2 -> inv1 e1 -> inv7 s -> unnest0 func ( * f) -> produces0 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new (Seq.(++) produced s)) -> postcondition_mut0 f (e1, Ghost.new (Seq.(++) produced s)) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc (Seq.(++) produced s) e1))
+ val preservation_inv0 [#"../06_map_precond.rs" 93 4 93 73] (iter : i) (func : f) (produced : Seq.seq item0) : bool
+ requires {[#"../06_map_precond.rs" 93 24 93 28] inv0 iter}
+ requires {[#"../06_map_precond.rs" 93 33 93 37] inv2 func}
+ requires {[#"../06_map_precond.rs" 93 42 93 50] inv7 produced}
ensures { result = preservation_inv0 iter func produced }
- axiom preservation_inv0_spec : forall iter : i, func : f, produced : Seq.seq item0 . ([#"../06_map_precond.rs" 94 24 94 28] inv0 iter) -> ([#"../06_map_precond.rs" 94 33 94 37] inv2 func) -> ([#"../06_map_precond.rs" 94 42 94 50] inv7 produced) -> ([#"../06_map_precond.rs" 93 4 93 83] produced = Seq.empty -> preservation_inv0 iter func produced = preservation0 iter func)
+ axiom preservation_inv0_spec : forall iter : i, func : f, produced : Seq.seq item0 . ([#"../06_map_precond.rs" 93 24 93 28] inv0 iter) -> ([#"../06_map_precond.rs" 93 33 93 37] inv2 func) -> ([#"../06_map_precond.rs" 93 42 93 50] inv7 produced) -> ([#"../06_map_precond.rs" 92 4 92 83] produced = Seq.empty -> preservation_inv0 iter func produced = preservation0 iter func)
use prelude.Ghost
predicate completed0 [#"../common.rs" 11 4 11 36] (self : borrowed i)
val completed0 [#"../common.rs" 11 4 11 36] (self : borrowed i) : bool
ensures { result = completed0 self }
- predicate reinitialize0 [#"../06_map_precond.rs" 118 4 118 29] (_1 : ()) =
- [#"../06_map_precond.rs" 119 8 124 9] forall func : f . forall iter : borrowed i . inv2 func -> inv4 iter -> completed0 iter -> next_precondition0 ( ^ iter) func (Seq.empty ) /\ preservation0 ( ^ iter) func
- val reinitialize0 [#"../06_map_precond.rs" 118 4 118 29] (_1 : ()) : bool
+ predicate reinitialize0 [#"../06_map_precond.rs" 117 4 117 29] (_1 : ()) =
+ [#"../06_map_precond.rs" 118 8 123 9] forall func : f . forall iter : borrowed i . inv2 func -> inv4 iter -> completed0 iter -> next_precondition0 ( ^ iter) func (Seq.empty ) /\ preservation0 ( ^ iter) func
+ val reinitialize0 [#"../06_map_precond.rs" 117 4 117 29] (_1 : ()) : bool
ensures { result = reinitialize0 _1 }
use C06MapPrecond_Map_Type as C06MapPrecond_Map_Type
- predicate invariant3 [#"../06_map_precond.rs" 158 4 158 30] (self : C06MapPrecond_Map_Type.t_map i b f item0) =
- [#"../06_map_precond.rs" 160 12 162 73] reinitialize0 () /\ preservation_inv0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self)) /\ next_precondition0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self))
- val invariant3 [#"../06_map_precond.rs" 158 4 158 30] (self : C06MapPrecond_Map_Type.t_map i b f item0) : bool
+ predicate invariant3 [#"../06_map_precond.rs" 157 4 157 30] (self : C06MapPrecond_Map_Type.t_map i b f item0) =
+ [#"../06_map_precond.rs" 159 12 161 73] reinitialize0 () /\ preservation_inv0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self)) /\ next_precondition0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self))
+ val invariant3 [#"../06_map_precond.rs" 157 4 157 30] (self : C06MapPrecond_Map_Type.t_map i b f item0) : bool
ensures { result = invariant3 self }
predicate inv3 (_x : C06MapPrecond_Map_Type.t_map i b f item0)
@@ -1885,14 +1887,14 @@ module C06MapPrecond_Map
ensures { result = produces_refl0 a }
axiom produces_refl0_spec : forall a : i . ([#"../common.rs" 15 21 15 22] inv0 a) -> ([#"../common.rs" 14 14 14 39] produces0 a (Seq.empty ) a)
- let rec cfg map [#"../06_map_precond.rs" 171 0 174 17] [@cfg:stackify] [@cfg:subregion_analysis] (iter : i) (func : f) : C06MapPrecond_Map_Type.t_map i b f item0
- requires {[#"../06_map_precond.rs" 167 0 167 128] forall i2 : i . forall e : item0 . inv0 i2 -> inv1 e -> produces0 iter (Seq.singleton e) i2 -> precondition0 func (e, Ghost.new (Seq.empty ))}
- requires {[#"../06_map_precond.rs" 168 11 168 41] reinitialize0 ()}
- requires {[#"../06_map_precond.rs" 169 11 169 51] preservation0 iter func}
- requires {[#"../06_map_precond.rs" 172 4 172 8] inv0 iter}
- requires {[#"../06_map_precond.rs" 173 4 173 8] inv2 func}
- ensures { [#"../06_map_precond.rs" 170 10 170 72] result = C06MapPrecond_Map_Type.C_Map iter func (Ghost.new (Seq.empty )) }
- ensures { [#"../06_map_precond.rs" 174 5 174 17] inv3 result }
+ let rec cfg map [#"../06_map_precond.rs" 170 0 173 17] [@cfg:stackify] [@cfg:subregion_analysis] (iter : i) (func : f) : C06MapPrecond_Map_Type.t_map i b f item0
+ requires {[#"../06_map_precond.rs" 166 0 166 128] forall i2 : i . forall e : item0 . inv0 i2 -> inv1 e -> produces0 iter (Seq.singleton e) i2 -> precondition0 func (e, Ghost.new (Seq.empty ))}
+ requires {[#"../06_map_precond.rs" 167 11 167 41] reinitialize0 ()}
+ requires {[#"../06_map_precond.rs" 168 11 168 51] preservation0 iter func}
+ requires {[#"../06_map_precond.rs" 171 4 171 8] inv0 iter}
+ requires {[#"../06_map_precond.rs" 172 4 172 8] inv2 func}
+ ensures { [#"../06_map_precond.rs" 169 10 169 72] result = C06MapPrecond_Map_Type.C_Map iter func (Ghost.new (Seq.empty )) }
+ ensures { [#"../06_map_precond.rs" 173 5 173 17] inv3 result }
= [@vc:do_not_keep_trace] [@vc:sp]
var _0 : C06MapPrecond_Map_Type.t_map i b f item0;
@@ -1912,13 +1914,13 @@ module C06MapPrecond_Map
goto BB3
}
BB3 {
- [#"../06_map_precond.rs" 175 32 175 48] _9 <- ([#"../06_map_precond.rs" 175 32 175 48] Ghost.new (Seq.empty ));
+ [#"../06_map_precond.rs" 174 32 174 48] _9 <- ([#"../06_map_precond.rs" 174 32 174 48] Ghost.new (Seq.empty ));
goto BB4
}
BB4 {
- [#"../06_map_precond.rs" 175 4 175 50] _0 <- ([#"../06_map_precond.rs" 175 4 175 50] C06MapPrecond_Map_Type.C_Map ([#"../06_map_precond.rs" 175 10 175 14] iter) ([#"../06_map_precond.rs" 175 16 175 20] func) _9);
- [#"../06_map_precond.rs" 175 10 175 14] iter <- any i;
- [#"../06_map_precond.rs" 175 16 175 20] func <- any f;
+ [#"../06_map_precond.rs" 174 4 174 50] _0 <- ([#"../06_map_precond.rs" 174 4 174 50] C06MapPrecond_Map_Type.C_Map ([#"../06_map_precond.rs" 174 10 174 14] iter) ([#"../06_map_precond.rs" 174 16 174 20] func) _9);
+ [#"../06_map_precond.rs" 174 10 174 14] iter <- any i;
+ [#"../06_map_precond.rs" 174 16 174 20] func <- any f;
_9 <- any Ghost.ghost_ty (Seq.seq item0);
goto BB5
}
@@ -2014,7 +2016,7 @@ module C06MapPrecond_Identity_Closure0
axiom produces_refl0_spec : forall a : i . ([#"../common.rs" 15 21 15 22] inv2 a) -> ([#"../common.rs" 14 14 14 39] produces0 a (Seq.empty ) a)
use prelude.Int16
use C06MapPrecond_Identity_Closure0_Type as C06MapPrecond_Identity_Closure0
- predicate unnest0 [#"../06_map_precond.rs" 179 14 179 20] (self : C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i) (_2 : C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i)
+ predicate unnest0 [#"../06_map_precond.rs" 178 14 178 20] (self : C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i) (_2 : C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i)
=
true
@@ -2028,11 +2030,11 @@ module C06MapPrecond_Identity_Closure0
val resolve0 (self : Ghost.ghost_ty (Seq.seq item0)) : bool
ensures { result = resolve0 self }
- let rec cfg c06MapPrecond_Identity_Closure0 [#"../06_map_precond.rs" 179 14 179 20] [@cfg:stackify] [@cfg:subregion_analysis] (_1 : borrowed (C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i)) (x : item0) (_3 : Ghost.ghost_ty (Seq.seq item0)) : item0
- requires {[#"../06_map_precond.rs" 179 15 179 16] inv1 x}
+ let rec cfg c06MapPrecond_Identity_Closure0 [#"../06_map_precond.rs" 178 14 178 20] [@cfg:stackify] [@cfg:subregion_analysis] (_1 : borrowed (C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i)) (x : item0) (_3 : Ghost.ghost_ty (Seq.seq item0)) : item0
+ requires {[#"../06_map_precond.rs" 178 15 178 16] inv1 x}
requires {inv0 _3}
ensures { unnest0 ( * _1) ( ^ _1) }
- ensures { [#"../06_map_precond.rs" 179 14 179 20] inv1 result }
+ ensures { [#"../06_map_precond.rs" 178 14 178 20] inv1 result }
= [@vc:do_not_keep_trace] [@vc:sp]
var _0 : item0;
@@ -2043,8 +2045,8 @@ module C06MapPrecond_Identity_Closure0
goto BB0
}
BB0 {
- [#"../06_map_precond.rs" 179 21 179 22] _0 <- ([#"../06_map_precond.rs" 179 21 179 22] x);
- [#"../06_map_precond.rs" 179 21 179 22] x <- any item0;
+ [#"../06_map_precond.rs" 178 21 178 22] _0 <- ([#"../06_map_precond.rs" 178 21 178 22] x);
+ [#"../06_map_precond.rs" 178 21 178 22] x <- any item0;
assert { [@expl:type invariant] inv0 _3 };
assume { resolve0 _3 };
assume { resolve1 _1 };
@@ -2151,62 +2153,62 @@ module C06MapPrecond_Identity
ensures { result = produces_refl0 a }
axiom produces_refl0_spec : forall a : i . ([#"../common.rs" 15 21 15 22] inv1 a) -> ([#"../common.rs" 14 14 14 39] produces0 a (Seq.empty ) a)
- predicate precondition0 [#"../06_map_precond.rs" 179 14 179 20] (self : C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i) (args : (item0, Ghost.ghost_ty (Seq.seq item0)))
+ predicate precondition0 [#"../06_map_precond.rs" 178 14 178 20] (self : C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i) (args : (item0, Ghost.ghost_ty (Seq.seq item0)))
=
let (x, _3) = args in true
use prelude.Ghost
use seq.Seq
- predicate next_precondition0 [#"../06_map_precond.rs" 84 4 84 74] (iter : i) (func : C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i) (produced : Seq.seq item0)
+ predicate next_precondition0 [#"../06_map_precond.rs" 83 4 83 74] (iter : i) (func : C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i) (produced : Seq.seq item0)
=
- [#"../06_map_precond.rs" 85 8 89 9] forall i : i . forall e : item0 . inv1 i -> inv2 e -> produces0 iter (Seq.singleton e) i -> precondition0 func (e, Ghost.new produced)
- val next_precondition0 [#"../06_map_precond.rs" 84 4 84 74] (iter : i) (func : C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i) (produced : Seq.seq item0) : bool
+ [#"../06_map_precond.rs" 84 8 88 9] forall i : i . forall e : item0 . inv1 i -> inv2 e -> produces0 iter (Seq.singleton e) i -> precondition0 func (e, Ghost.new produced)
+ val next_precondition0 [#"../06_map_precond.rs" 83 4 83 74] (iter : i) (func : C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i) (produced : Seq.seq item0) : bool
ensures { result = next_precondition0 iter func produced }
- predicate unnest0 [#"../06_map_precond.rs" 179 14 179 20] (self : C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i) (_2 : C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i)
+ predicate unnest0 [#"../06_map_precond.rs" 178 14 178 20] (self : C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i) (_2 : C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i)
=
true
- predicate postcondition_mut0 [#"../06_map_precond.rs" 179 14 179 20] (self : borrowed (C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i)) (args : (item0, Ghost.ghost_ty (Seq.seq item0))) (result : item0)
+ predicate postcondition_mut0 [#"../06_map_precond.rs" 178 14 178 20] (self : borrowed (C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i)) (args : (item0, Ghost.ghost_ty (Seq.seq item0))) (result : item0)
=
(let (x, _3) = args in true) /\ unnest0 ( * self) ( ^ self)
use seq.Seq
- predicate preservation0 [#"../06_map_precond.rs" 106 4 106 45] (iter : i) (func : C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i)
+ predicate preservation0 [#"../06_map_precond.rs" 105 4 105 45] (iter : i) (func : C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i)
=
- [#"../06_map_precond.rs" 107 8 114 9] forall i : i . forall b : item0 . forall f : borrowed (C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i) . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv1 i -> inv2 b -> inv5 f -> inv2 e2 -> inv2 e1 -> inv6 s -> unnest0 func ( * f) -> produces0 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new s) -> postcondition_mut0 f (e1, Ghost.new s) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc s e1))
- val preservation0 [#"../06_map_precond.rs" 106 4 106 45] (iter : i) (func : C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i) : bool
+ [#"../06_map_precond.rs" 106 8 113 9] forall i : i . forall b : item0 . forall f : borrowed (C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i) . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv1 i -> inv2 b -> inv5 f -> inv2 e2 -> inv2 e1 -> inv6 s -> unnest0 func ( * f) -> produces0 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new s) -> postcondition_mut0 f (e1, Ghost.new s) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc s e1))
+ val preservation0 [#"../06_map_precond.rs" 105 4 105 45] (iter : i) (func : C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i) : bool
ensures { result = preservation0 iter func }
- predicate preservation_inv0 [#"../06_map_precond.rs" 94 4 94 73] (iter : i) (func : C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i) (produced : Seq.seq item0)
+ predicate preservation_inv0 [#"../06_map_precond.rs" 93 4 93 73] (iter : i) (func : C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i) (produced : Seq.seq item0)
=
- [#"../06_map_precond.rs" 95 8 102 9] forall i : i . forall b : item0 . forall f : borrowed (C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i) . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv1 i -> inv2 b -> inv5 f -> inv2 e2 -> inv2 e1 -> inv6 s -> unnest0 func ( * f) -> produces0 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new (Seq.(++) produced s)) -> postcondition_mut0 f (e1, Ghost.new (Seq.(++) produced s)) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc (Seq.(++) produced s) e1))
- val preservation_inv0 [#"../06_map_precond.rs" 94 4 94 73] (iter : i) (func : C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i) (produced : Seq.seq item0) : bool
- requires {[#"../06_map_precond.rs" 94 24 94 28] inv1 iter}
- requires {[#"../06_map_precond.rs" 94 33 94 37] inv3 func}
- requires {[#"../06_map_precond.rs" 94 42 94 50] inv6 produced}
+ [#"../06_map_precond.rs" 94 8 101 9] forall i : i . forall b : item0 . forall f : borrowed (C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i) . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv1 i -> inv2 b -> inv5 f -> inv2 e2 -> inv2 e1 -> inv6 s -> unnest0 func ( * f) -> produces0 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new (Seq.(++) produced s)) -> postcondition_mut0 f (e1, Ghost.new (Seq.(++) produced s)) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc (Seq.(++) produced s) e1))
+ val preservation_inv0 [#"../06_map_precond.rs" 93 4 93 73] (iter : i) (func : C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i) (produced : Seq.seq item0) : bool
+ requires {[#"../06_map_precond.rs" 93 24 93 28] inv1 iter}
+ requires {[#"../06_map_precond.rs" 93 33 93 37] inv3 func}
+ requires {[#"../06_map_precond.rs" 93 42 93 50] inv6 produced}
ensures { result = preservation_inv0 iter func produced }
- axiom preservation_inv0_spec : forall iter : i, func : C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i, produced : Seq.seq item0 . ([#"../06_map_precond.rs" 94 24 94 28] inv1 iter) -> ([#"../06_map_precond.rs" 94 33 94 37] inv3 func) -> ([#"../06_map_precond.rs" 94 42 94 50] inv6 produced) -> ([#"../06_map_precond.rs" 93 4 93 83] produced = Seq.empty -> preservation_inv0 iter func produced = preservation0 iter func)
+ axiom preservation_inv0_spec : forall iter : i, func : C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i, produced : Seq.seq item0 . ([#"../06_map_precond.rs" 93 24 93 28] inv1 iter) -> ([#"../06_map_precond.rs" 93 33 93 37] inv3 func) -> ([#"../06_map_precond.rs" 93 42 93 50] inv6 produced) -> ([#"../06_map_precond.rs" 92 4 92 83] produced = Seq.empty -> preservation_inv0 iter func produced = preservation0 iter func)
use prelude.Ghost
predicate completed0 [#"../common.rs" 11 4 11 36] (self : borrowed i)
val completed0 [#"../common.rs" 11 4 11 36] (self : borrowed i) : bool
ensures { result = completed0 self }
- predicate reinitialize0 [#"../06_map_precond.rs" 118 4 118 29] (_1 : ()) =
- [#"../06_map_precond.rs" 119 8 124 9] forall func : C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i . forall iter : borrowed i . inv3 func -> inv4 iter -> completed0 iter -> next_precondition0 ( ^ iter) func (Seq.empty ) /\ preservation0 ( ^ iter) func
- val reinitialize0 [#"../06_map_precond.rs" 118 4 118 29] (_1 : ()) : bool
+ predicate reinitialize0 [#"../06_map_precond.rs" 117 4 117 29] (_1 : ()) =
+ [#"../06_map_precond.rs" 118 8 123 9] forall func : C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i . forall iter : borrowed i . inv3 func -> inv4 iter -> completed0 iter -> next_precondition0 ( ^ iter) func (Seq.empty ) /\ preservation0 ( ^ iter) func
+ val reinitialize0 [#"../06_map_precond.rs" 117 4 117 29] (_1 : ()) : bool
ensures { result = reinitialize0 _1 }
use C06MapPrecond_Map_Type as C06MapPrecond_Map_Type
- predicate invariant0 [#"../06_map_precond.rs" 158 4 158 30] (self : C06MapPrecond_Map_Type.t_map i item0 (C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i) item0)
+ predicate invariant0 [#"../06_map_precond.rs" 157 4 157 30] (self : C06MapPrecond_Map_Type.t_map i item0 (C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i) item0)
=
- [#"../06_map_precond.rs" 160 12 162 73] reinitialize0 () /\ preservation_inv0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self)) /\ next_precondition0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self))
- val invariant0 [#"../06_map_precond.rs" 158 4 158 30] (self : C06MapPrecond_Map_Type.t_map i item0 (C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i) item0) : bool
+ [#"../06_map_precond.rs" 159 12 161 73] reinitialize0 () /\ preservation_inv0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self)) /\ next_precondition0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self))
+ val invariant0 [#"../06_map_precond.rs" 157 4 157 30] (self : C06MapPrecond_Map_Type.t_map i item0 (C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i) item0) : bool
ensures { result = invariant0 self }
predicate inv0 (_x : C06MapPrecond_Map_Type.t_map i item0 (C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i) item0)
@@ -2222,17 +2224,17 @@ module C06MapPrecond_Identity
val resolve0 (self : C06MapPrecond_Map_Type.t_map i item0 (C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i) item0) : bool
ensures { result = resolve0 self }
- val map0 [#"../06_map_precond.rs" 171 0 174 17] (iter : i) (func : C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i) : C06MapPrecond_Map_Type.t_map i item0 (C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i) item0
- requires {[#"../06_map_precond.rs" 167 0 167 128] forall i2 : i . forall e : item0 . inv1 i2 -> inv2 e -> produces0 iter (Seq.singleton e) i2 -> precondition0 func (e, Ghost.new (Seq.empty ))}
- requires {[#"../06_map_precond.rs" 168 11 168 41] reinitialize0 ()}
- requires {[#"../06_map_precond.rs" 169 11 169 51] preservation0 iter func}
- requires {[#"../06_map_precond.rs" 172 4 172 8] inv1 iter}
- requires {[#"../06_map_precond.rs" 173 4 173 8] inv3 func}
- ensures { [#"../06_map_precond.rs" 170 10 170 72] result = C06MapPrecond_Map_Type.C_Map iter func (Ghost.new (Seq.empty )) }
- ensures { [#"../06_map_precond.rs" 174 5 174 17] inv0 result }
+ val map0 [#"../06_map_precond.rs" 170 0 173 17] (iter : i) (func : C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i) : C06MapPrecond_Map_Type.t_map i item0 (C06MapPrecond_Identity_Closure0.c06mapprecond_identity_closure0 i) item0
+ requires {[#"../06_map_precond.rs" 166 0 166 128] forall i2 : i . forall e : item0 . inv1 i2 -> inv2 e -> produces0 iter (Seq.singleton e) i2 -> precondition0 func (e, Ghost.new (Seq.empty ))}
+ requires {[#"../06_map_precond.rs" 167 11 167 41] reinitialize0 ()}
+ requires {[#"../06_map_precond.rs" 168 11 168 51] preservation0 iter func}
+ requires {[#"../06_map_precond.rs" 171 4 171 8] inv1 iter}
+ requires {[#"../06_map_precond.rs" 172 4 172 8] inv3 func}
+ ensures { [#"../06_map_precond.rs" 169 10 169 72] result = C06MapPrecond_Map_Type.C_Map iter func (Ghost.new (Seq.empty )) }
+ ensures { [#"../06_map_precond.rs" 173 5 173 17] inv0 result }
- let rec cfg identity [#"../06_map_precond.rs" 178 0 178 37] [@cfg:stackify] [@cfg:subregion_analysis] (iter : i) : ()
- requires {[#"../06_map_precond.rs" 178 29 178 33] inv1 iter}
+ let rec cfg identity [#"../06_map_precond.rs" 177 0 177 37] [@cfg:stackify] [@cfg:subregion_analysis] (iter : i) : ()
+ requires {[#"../06_map_precond.rs" 177 29 177 33] inv1 iter}
= [@vc:do_not_keep_trace] [@vc:sp]
var _0 : ();
@@ -2242,8 +2244,8 @@ module C06MapPrecond_Identity
goto BB0
}
BB0 {
- [#"../06_map_precond.rs" 179 4 179 23] _2 <- ([#"../06_map_precond.rs" 179 4 179 23] map0 ([#"../06_map_precond.rs" 179 8 179 12] iter) ([#"../06_map_precond.rs" 179 14 179 22] C06MapPrecond_Identity_Closure0.C06MapPrecond_Identity_Closure0));
- [#"../06_map_precond.rs" 179 8 179 12] iter <- any i;
+ [#"../06_map_precond.rs" 178 4 178 23] _2 <- ([#"../06_map_precond.rs" 178 4 178 23] map0 ([#"../06_map_precond.rs" 178 8 178 12] iter) ([#"../06_map_precond.rs" 178 14 178 22] C06MapPrecond_Identity_Closure0.C06MapPrecond_Identity_Closure0));
+ [#"../06_map_precond.rs" 178 8 178 12] iter <- any i;
goto BB1
}
BB1 {
@@ -2252,7 +2254,7 @@ module C06MapPrecond_Identity
goto BB2
}
BB2 {
- [#"../06_map_precond.rs" 178 38 180 1] _0 <- ([#"../06_map_precond.rs" 178 38 180 1] ());
+ [#"../06_map_precond.rs" 177 38 179 1] _0 <- ([#"../06_map_precond.rs" 177 38 179 1] ());
goto BB3
}
BB3 {
@@ -2276,7 +2278,7 @@ module C06MapPrecond_Increment_Closure2
use seq.Seq
use prelude.Ghost
use C06MapPrecond_Increment_Closure2_Type as C06MapPrecond_Increment_Closure2
- predicate unnest0 [#"../06_map_precond.rs" 190 8 190 35] (self : C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u) (_2 : C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u)
+ predicate unnest0 [#"../06_map_precond.rs" 189 8 189 35] (self : C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u) (_2 : C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u)
=
true
@@ -2288,9 +2290,9 @@ module C06MapPrecond_Increment_Closure2
val resolve0 (self : borrowed (C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u)) : bool
ensures { result = resolve0 self }
- let rec cfg c06MapPrecond_Increment_Closure2 [#"../06_map_precond.rs" 190 8 190 35] [@cfg:stackify] [@cfg:subregion_analysis] (_1 : borrowed (C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u)) (x : uint32) (_3 : Ghost.ghost_ty (Seq.seq uint32)) : uint32
- requires {[#"../06_map_precond.rs" 189 19 189 27] UInt32.to_int x <= 15}
- ensures { [#"../06_map_precond.rs" 190 18 190 33] UInt32.to_int result = UInt32.to_int x + 1 }
+ let rec cfg c06MapPrecond_Increment_Closure2 [#"../06_map_precond.rs" 189 8 189 35] [@cfg:stackify] [@cfg:subregion_analysis] (_1 : borrowed (C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u)) (x : uint32) (_3 : Ghost.ghost_ty (Seq.seq uint32)) : uint32
+ requires {[#"../06_map_precond.rs" 188 19 188 27] UInt32.to_int x <= 15}
+ ensures { [#"../06_map_precond.rs" 189 18 189 33] UInt32.to_int result = UInt32.to_int x + 1 }
ensures { unnest0 ( * _1) ( ^ _1) }
= [@vc:do_not_keep_trace] [@vc:sp]
@@ -2304,9 +2306,9 @@ module C06MapPrecond_Increment_Closure2
}
BB0 {
assume { resolve0 _1 };
- [#"../06_map_precond.rs" 191 20 191 25] res1 <- ([#"../06_map_precond.rs" 191 20 191 25] ([#"../06_map_precond.rs" 191 20 191 21] x) + ([#"../06_map_precond.rs" 191 24 191 25] [#"../06_map_precond.rs" 191 24 191 25] (1 : uint32)));
- [#"../06_map_precond.rs" 189 8 189 29] res <- ([#"../06_map_precond.rs" 189 8 189 29] res1);
- [#"../06_map_precond.rs" 190 8 190 35] _0 <- ([#"../06_map_precond.rs" 190 8 190 35] res);
+ [#"../06_map_precond.rs" 190 20 190 25] res1 <- ([#"../06_map_precond.rs" 190 20 190 25] ([#"../06_map_precond.rs" 190 20 190 21] x) + ([#"../06_map_precond.rs" 190 24 190 25] [#"../06_map_precond.rs" 190 24 190 25] (1 : uint32)));
+ [#"../06_map_precond.rs" 188 8 188 29] res <- ([#"../06_map_precond.rs" 188 8 188 29] res1);
+ [#"../06_map_precond.rs" 189 8 189 35] _0 <- ([#"../06_map_precond.rs" 189 8 189 35] res);
return _0
}
@@ -2429,20 +2431,20 @@ module C06MapPrecond_Increment
val inv0 (_x : C06MapPrecond_Map_Type.t_map u uint32 (C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u) uint32) : bool
ensures { result = inv0 _x }
- predicate unnest0 [#"../06_map_precond.rs" 190 8 190 35] (self : C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u) (_2 : C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u)
+ predicate unnest0 [#"../06_map_precond.rs" 189 8 189 35] (self : C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u) (_2 : C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u)
=
true
use prelude.UInt32
use prelude.Int
- predicate postcondition_mut0 [#"../06_map_precond.rs" 190 8 190 35] (self : borrowed (C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u)) (args : (uint32, Ghost.ghost_ty (Seq.seq uint32))) (result : uint32)
+ predicate postcondition_mut0 [#"../06_map_precond.rs" 189 8 189 35] (self : borrowed (C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u)) (args : (uint32, Ghost.ghost_ty (Seq.seq uint32))) (result : uint32)
=
(let (x, _3) = args in UInt32.to_int result = UInt32.to_int x + 1) /\ unnest0 ( * self) ( ^ self)
- predicate precondition0 [#"../06_map_precond.rs" 190 8 190 35] (self : C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u) (args : (uint32, Ghost.ghost_ty (Seq.seq uint32)))
+ predicate precondition0 [#"../06_map_precond.rs" 189 8 189 35] (self : C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u) (args : (uint32, Ghost.ghost_ty (Seq.seq uint32)))
=
- [#"../06_map_precond.rs" 189 19 189 27] let (x, _3) = args in UInt32.to_int x <= 15
+ [#"../06_map_precond.rs" 188 19 188 27] let (x, _3) = args in UInt32.to_int x <= 15
use prelude.Ghost
use seq_ext.SeqExt
use seq.Seq
@@ -2487,46 +2489,46 @@ module C06MapPrecond_Increment
axiom produces_refl0_spec : forall a : C06MapPrecond_Map_Type.t_map u uint32 (C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u) uint32 . ([#"../06_map_precond.rs" 31 21 31 22] inv0 a) -> ([#"../06_map_precond.rs" 30 14 30 39] produces0 a (Seq.empty ) a)
use seq.Seq
- predicate next_precondition0 [#"../06_map_precond.rs" 84 4 84 74] (iter : u) (func : C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u) (produced : Seq.seq uint32)
+ predicate next_precondition0 [#"../06_map_precond.rs" 83 4 83 74] (iter : u) (func : C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u) (produced : Seq.seq uint32)
=
- [#"../06_map_precond.rs" 85 8 89 9] forall i : u . forall e : uint32 . inv2 i -> inv3 e -> produces1 iter (Seq.singleton e) i -> precondition0 func (e, Ghost.new produced)
- val next_precondition0 [#"../06_map_precond.rs" 84 4 84 74] (iter : u) (func : C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u) (produced : Seq.seq uint32) : bool
+ [#"../06_map_precond.rs" 84 8 88 9] forall i : u . forall e : uint32 . inv2 i -> inv3 e -> produces1 iter (Seq.singleton e) i -> precondition0 func (e, Ghost.new produced)
+ val next_precondition0 [#"../06_map_precond.rs" 83 4 83 74] (iter : u) (func : C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u) (produced : Seq.seq uint32) : bool
ensures { result = next_precondition0 iter func produced }
use seq.Seq
- predicate preservation0 [#"../06_map_precond.rs" 106 4 106 45] (iter : u) (func : C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u)
+ predicate preservation0 [#"../06_map_precond.rs" 105 4 105 45] (iter : u) (func : C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u)
=
- [#"../06_map_precond.rs" 107 8 114 9] forall i : u . forall b : uint32 . forall f : borrowed (C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u) . forall e2 : uint32 . forall e1 : uint32 . forall s : Seq.seq uint32 . inv2 i -> inv3 b -> inv7 f -> inv3 e2 -> inv3 e1 -> inv5 s -> unnest0 func ( * f) -> produces1 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new s) -> postcondition_mut0 f (e1, Ghost.new s) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc s e1))
- val preservation0 [#"../06_map_precond.rs" 106 4 106 45] (iter : u) (func : C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u) : bool
+ [#"../06_map_precond.rs" 106 8 113 9] forall i : u . forall b : uint32 . forall f : borrowed (C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u) . forall e2 : uint32 . forall e1 : uint32 . forall s : Seq.seq uint32 . inv2 i -> inv3 b -> inv7 f -> inv3 e2 -> inv3 e1 -> inv5 s -> unnest0 func ( * f) -> produces1 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new s) -> postcondition_mut0 f (e1, Ghost.new s) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc s e1))
+ val preservation0 [#"../06_map_precond.rs" 105 4 105 45] (iter : u) (func : C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u) : bool
ensures { result = preservation0 iter func }
- predicate preservation_inv0 [#"../06_map_precond.rs" 94 4 94 73] (iter : u) (func : C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u) (produced : Seq.seq uint32)
+ predicate preservation_inv0 [#"../06_map_precond.rs" 93 4 93 73] (iter : u) (func : C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u) (produced : Seq.seq uint32)
=
- [#"../06_map_precond.rs" 95 8 102 9] forall i : u . forall b : uint32 . forall f : borrowed (C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u) . forall e2 : uint32 . forall e1 : uint32 . forall s : Seq.seq uint32 . inv2 i -> inv3 b -> inv7 f -> inv3 e2 -> inv3 e1 -> inv5 s -> unnest0 func ( * f) -> produces1 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new (Seq.(++) produced s)) -> postcondition_mut0 f (e1, Ghost.new (Seq.(++) produced s)) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc (Seq.(++) produced s) e1))
- val preservation_inv0 [#"../06_map_precond.rs" 94 4 94 73] (iter : u) (func : C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u) (produced : Seq.seq uint32) : bool
- requires {[#"../06_map_precond.rs" 94 24 94 28] inv2 iter}
- requires {[#"../06_map_precond.rs" 94 33 94 37] inv4 func}
- requires {[#"../06_map_precond.rs" 94 42 94 50] inv5 produced}
+ [#"../06_map_precond.rs" 94 8 101 9] forall i : u . forall b : uint32 . forall f : borrowed (C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u) . forall e2 : uint32 . forall e1 : uint32 . forall s : Seq.seq uint32 . inv2 i -> inv3 b -> inv7 f -> inv3 e2 -> inv3 e1 -> inv5 s -> unnest0 func ( * f) -> produces1 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new (Seq.(++) produced s)) -> postcondition_mut0 f (e1, Ghost.new (Seq.(++) produced s)) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc (Seq.(++) produced s) e1))
+ val preservation_inv0 [#"../06_map_precond.rs" 93 4 93 73] (iter : u) (func : C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u) (produced : Seq.seq uint32) : bool
+ requires {[#"../06_map_precond.rs" 93 24 93 28] inv2 iter}
+ requires {[#"../06_map_precond.rs" 93 33 93 37] inv4 func}
+ requires {[#"../06_map_precond.rs" 93 42 93 50] inv5 produced}
ensures { result = preservation_inv0 iter func produced }
- axiom preservation_inv0_spec : forall iter : u, func : C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u, produced : Seq.seq uint32 . ([#"../06_map_precond.rs" 94 24 94 28] inv2 iter) -> ([#"../06_map_precond.rs" 94 33 94 37] inv4 func) -> ([#"../06_map_precond.rs" 94 42 94 50] inv5 produced) -> ([#"../06_map_precond.rs" 93 4 93 83] produced = Seq.empty -> preservation_inv0 iter func produced = preservation0 iter func)
+ axiom preservation_inv0_spec : forall iter : u, func : C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u, produced : Seq.seq uint32 . ([#"../06_map_precond.rs" 93 24 93 28] inv2 iter) -> ([#"../06_map_precond.rs" 93 33 93 37] inv4 func) -> ([#"../06_map_precond.rs" 93 42 93 50] inv5 produced) -> ([#"../06_map_precond.rs" 92 4 92 83] produced = Seq.empty -> preservation_inv0 iter func produced = preservation0 iter func)
predicate completed0 [#"../common.rs" 11 4 11 36] (self : borrowed u)
val completed0 [#"../common.rs" 11 4 11 36] (self : borrowed u) : bool
ensures { result = completed0 self }
- predicate reinitialize0 [#"../06_map_precond.rs" 118 4 118 29] (_1 : ()) =
- [#"../06_map_precond.rs" 119 8 124 9] forall func : C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u . forall iter : borrowed u . inv4 func -> inv1 iter -> completed0 iter -> next_precondition0 ( ^ iter) func (Seq.empty ) /\ preservation0 ( ^ iter) func
- val reinitialize0 [#"../06_map_precond.rs" 118 4 118 29] (_1 : ()) : bool
+ predicate reinitialize0 [#"../06_map_precond.rs" 117 4 117 29] (_1 : ()) =
+ [#"../06_map_precond.rs" 118 8 123 9] forall func : C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u . forall iter : borrowed u . inv4 func -> inv1 iter -> completed0 iter -> next_precondition0 ( ^ iter) func (Seq.empty ) /\ preservation0 ( ^ iter) func
+ val reinitialize0 [#"../06_map_precond.rs" 117 4 117 29] (_1 : ()) : bool
ensures { result = reinitialize0 _1 }
- predicate invariant0 [#"../06_map_precond.rs" 158 4 158 30] (self : C06MapPrecond_Map_Type.t_map u uint32 (C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u) uint32)
+ predicate invariant0 [#"../06_map_precond.rs" 157 4 157 30] (self : C06MapPrecond_Map_Type.t_map u uint32 (C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u) uint32)
=
- [#"../06_map_precond.rs" 160 12 162 73] reinitialize0 () /\ preservation_inv0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self)) /\ next_precondition0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self))
- val invariant0 [#"../06_map_precond.rs" 158 4 158 30] (self : C06MapPrecond_Map_Type.t_map u uint32 (C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u) uint32) : bool
+ [#"../06_map_precond.rs" 159 12 161 73] reinitialize0 () /\ preservation_inv0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self)) /\ next_precondition0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self))
+ val invariant0 [#"../06_map_precond.rs" 157 4 157 30] (self : C06MapPrecond_Map_Type.t_map u uint32 (C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u) uint32) : bool
ensures { result = invariant0 self }
axiom inv0 : forall x : C06MapPrecond_Map_Type.t_map u uint32 (C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u) uint32 . inv0 x = (invariant0 x /\ match x with
@@ -2537,19 +2539,19 @@ module C06MapPrecond_Increment
val resolve0 (self : C06MapPrecond_Map_Type.t_map u uint32 (C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u) uint32) : bool
ensures { result = resolve0 self }
- val map0 [#"../06_map_precond.rs" 171 0 174 17] (iter : u) (func : C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u) : C06MapPrecond_Map_Type.t_map u uint32 (C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u) uint32
- requires {[#"../06_map_precond.rs" 167 0 167 128] forall i2 : u . forall e : uint32 . inv2 i2 -> inv3 e -> produces1 iter (Seq.singleton e) i2 -> precondition0 func (e, Ghost.new (Seq.empty ))}
- requires {[#"../06_map_precond.rs" 168 11 168 41] reinitialize0 ()}
- requires {[#"../06_map_precond.rs" 169 11 169 51] preservation0 iter func}
- requires {[#"../06_map_precond.rs" 172 4 172 8] inv2 iter}
- requires {[#"../06_map_precond.rs" 173 4 173 8] inv4 func}
- ensures { [#"../06_map_precond.rs" 170 10 170 72] result = C06MapPrecond_Map_Type.C_Map iter func (Ghost.new (Seq.empty )) }
- ensures { [#"../06_map_precond.rs" 174 5 174 17] inv0 result }
+ val map0 [#"../06_map_precond.rs" 170 0 173 17] (iter : u) (func : C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u) : C06MapPrecond_Map_Type.t_map u uint32 (C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u) uint32
+ requires {[#"../06_map_precond.rs" 166 0 166 128] forall i2 : u . forall e : uint32 . inv2 i2 -> inv3 e -> produces1 iter (Seq.singleton e) i2 -> precondition0 func (e, Ghost.new (Seq.empty ))}
+ requires {[#"../06_map_precond.rs" 167 11 167 41] reinitialize0 ()}
+ requires {[#"../06_map_precond.rs" 168 11 168 51] preservation0 iter func}
+ requires {[#"../06_map_precond.rs" 171 4 171 8] inv2 iter}
+ requires {[#"../06_map_precond.rs" 172 4 172 8] inv4 func}
+ ensures { [#"../06_map_precond.rs" 169 10 169 72] result = C06MapPrecond_Map_Type.C_Map iter func (Ghost.new (Seq.empty )) }
+ ensures { [#"../06_map_precond.rs" 173 5 173 17] inv0 result }
- let rec cfg increment [#"../06_map_precond.rs" 186 0 186 50] [@cfg:stackify] [@cfg:subregion_analysis] (iter : u) : ()
- requires {[#"../06_map_precond.rs" 182 0 182 162] forall done_ : borrowed u . inv1 done_ -> completed0 done_ -> (forall steps : Seq.seq uint32 . forall next : u . inv2 next -> produces1 ( ^ done_) steps next -> steps = Seq.empty /\ ^ done_ = next)}
- requires {[#"../06_map_precond.rs" 183 0 185 2] forall fin : u . forall prod : Seq.seq uint32 . inv2 fin -> produces1 iter prod fin -> (forall x : int . 0 <= x /\ x < Seq.length prod -> Seq.get prod x <= (10 : uint32))}
- requires {[#"../06_map_precond.rs" 186 42 186 46] inv2 iter}
+ let rec cfg increment [#"../06_map_precond.rs" 185 0 185 50] [@cfg:stackify] [@cfg:subregion_analysis] (iter : u) : ()
+ requires {[#"../06_map_precond.rs" 181 0 181 162] forall done_ : borrowed u . inv1 done_ -> completed0 done_ -> (forall steps : Seq.seq uint32 . forall next : u . inv2 next -> produces1 ( ^ done_) steps next -> steps = Seq.empty /\ ^ done_ = next)}
+ requires {[#"../06_map_precond.rs" 182 0 184 2] forall fin : u . forall prod : Seq.seq uint32 . inv2 fin -> produces1 iter prod fin -> (forall x : int . 0 <= x /\ x < Seq.length prod -> Seq.get prod x <= (10 : uint32))}
+ requires {[#"../06_map_precond.rs" 185 42 185 46] inv2 iter}
= [@vc:do_not_keep_trace] [@vc:sp]
var _0 : ();
@@ -2562,18 +2564,18 @@ module C06MapPrecond_Increment
goto BB1
}
BB1 {
- [#"../06_map_precond.rs" 187 12 192 5] i <- ([#"../06_map_precond.rs" 187 12 192 5] map0 ([#"../06_map_precond.rs" 188 8 188 12] iter) ([#"../06_map_precond.rs" 190 8 190 35] C06MapPrecond_Increment_Closure2.C06MapPrecond_Increment_Closure2));
- [#"../06_map_precond.rs" 188 8 188 12] iter <- any u;
+ [#"../06_map_precond.rs" 186 12 191 5] i <- ([#"../06_map_precond.rs" 186 12 191 5] map0 ([#"../06_map_precond.rs" 187 8 187 12] iter) ([#"../06_map_precond.rs" 189 8 189 35] C06MapPrecond_Increment_Closure2.C06MapPrecond_Increment_Closure2));
+ [#"../06_map_precond.rs" 187 8 187 12] iter <- any u;
goto BB2
}
BB2 {
assert { [@expl:type invariant] inv0 i };
assume { resolve0 i };
- assert { [@expl:assertion] [#"../06_map_precond.rs" 194 4 197 5] forall fin : C06MapPrecond_Map_Type.t_map u uint32 (C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u) uint32 . forall prod : Seq.seq uint32 . inv0 fin -> produces0 i prod fin -> (forall x : int . 0 <= x /\ x < Seq.length prod -> Seq.get prod x <= (11 : uint32)) };
+ assert { [@expl:assertion] [#"../06_map_precond.rs" 193 4 196 5] forall fin : C06MapPrecond_Map_Type.t_map u uint32 (C06MapPrecond_Increment_Closure2.c06mapprecond_increment_closure2 u) uint32 . forall prod : Seq.seq uint32 . inv0 fin -> produces0 i prod fin -> (forall x : int . 0 <= x /\ x < Seq.length prod -> Seq.get prod x <= (11 : uint32)) };
goto BB3
}
BB3 {
- [#"../06_map_precond.rs" 186 51 198 1] _0 <- ([#"../06_map_precond.rs" 186 51 198 1] ());
+ [#"../06_map_precond.rs" 185 51 197 1] _0 <- ([#"../06_map_precond.rs" 185 51 197 1] ());
goto BB4
}
BB4 {
@@ -2606,14 +2608,14 @@ module C06MapPrecond_Counter_Closure2
use prelude.UIntSize
use prelude.Borrow
use C06MapPrecond_Counter_Closure2_Type as C06MapPrecond_Counter_Closure2
- function field_00 [#"../06_map_precond.rs" 207 8 207 41] (self : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) : borrowed usize
+ function field_00 [#"../06_map_precond.rs" 206 8 206 41] (self : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) : borrowed usize
=
let C06MapPrecond_Counter_Closure2.C06MapPrecond_Counter_Closure2 a = self in a
- val field_00 [#"../06_map_precond.rs" 207 8 207 41] (self : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) : borrowed usize
+ val field_00 [#"../06_map_precond.rs" 206 8 206 41] (self : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) : borrowed usize
ensures { result = field_00 self }
- predicate unnest0 [#"../06_map_precond.rs" 207 8 207 41] (self : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) (_2 : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i)
+ predicate unnest0 [#"../06_map_precond.rs" 206 8 206 41] (self : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) (_2 : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i)
=
^ field_00 _2 = ^ field_00 self
@@ -2627,9 +2629,9 @@ module C06MapPrecond_Counter_Closure2
val resolve0 (self : borrowed (C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i)) : bool
ensures { result = resolve0 self }
- let rec cfg c06MapPrecond_Counter_Closure2 [#"../06_map_precond.rs" 207 8 207 41] [@cfg:stackify] [@cfg:subregion_analysis] (_1 : borrowed (C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i)) (x : uint32) (_prod : Ghost.ghost_ty (Seq.seq uint32)) : uint32
- requires {[#"../06_map_precond.rs" 206 19 206 61] UIntSize.to_int ( * field_00 ( * _1)) = Seq.length (Ghost.inner _prod) /\ * field_00 ( * _1) < max0}
- ensures { [#"../06_map_precond.rs" 207 18 207 39] UIntSize.to_int ( * field_00 ( ^ _1)) = UIntSize.to_int ( * field_00 ( * _1)) + 1 }
+ let rec cfg c06MapPrecond_Counter_Closure2 [#"../06_map_precond.rs" 206 8 206 41] [@cfg:stackify] [@cfg:subregion_analysis] (_1 : borrowed (C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i)) (x : uint32) (_prod : Ghost.ghost_ty (Seq.seq uint32)) : uint32
+ requires {[#"../06_map_precond.rs" 205 19 205 61] UIntSize.to_int ( * field_00 ( * _1)) = Seq.length (Ghost.inner _prod) /\ * field_00 ( * _1) < max0}
+ ensures { [#"../06_map_precond.rs" 206 18 206 39] UIntSize.to_int ( * field_00 ( ^ _1)) = UIntSize.to_int ( * field_00 ( * _1)) + 1 }
ensures { unnest0 ( * _1) ( ^ _1) }
= [@vc:do_not_keep_trace] [@vc:sp]
@@ -2642,11 +2644,11 @@ module C06MapPrecond_Counter_Closure2
goto BB0
}
BB0 {
- [#"../06_map_precond.rs" 209 12 209 20] _1 <- { _1 with current = (let C06MapPrecond_Counter_Closure2.C06MapPrecond_Counter_Closure2 x0 = * _1 in C06MapPrecond_Counter_Closure2.C06MapPrecond_Counter_Closure2 ({ (field_00 ( * _1)) with current = ([#"../06_map_precond.rs" 209 12 209 20] * field_00 ( * _1) + ([#"../06_map_precond.rs" 209 19 209 20] [#"../06_map_precond.rs" 209 19 209 20] (1 : usize))) })) };
+ [#"../06_map_precond.rs" 208 12 208 20] _1 <- { _1 with current = (let C06MapPrecond_Counter_Closure2.C06MapPrecond_Counter_Closure2 x0 = * _1 in C06MapPrecond_Counter_Closure2.C06MapPrecond_Counter_Closure2 ({ (field_00 ( * _1)) with current = ([#"../06_map_precond.rs" 208 12 208 20] * field_00 ( * _1) + ([#"../06_map_precond.rs" 208 19 208 20] [#"../06_map_precond.rs" 208 19 208 20] (1 : usize))) ; })) ; };
assume { resolve0 _1 };
- [#"../06_map_precond.rs" 210 12 210 13] res1 <- ([#"../06_map_precond.rs" 210 12 210 13] x);
- [#"../06_map_precond.rs" 206 8 206 63] res <- ([#"../06_map_precond.rs" 206 8 206 63] res1);
- [#"../06_map_precond.rs" 207 8 207 41] _0 <- ([#"../06_map_precond.rs" 207 8 207 41] res);
+ [#"../06_map_precond.rs" 209 12 209 13] res1 <- ([#"../06_map_precond.rs" 209 12 209 13] x);
+ [#"../06_map_precond.rs" 205 8 205 63] res <- ([#"../06_map_precond.rs" 205 8 205 63] res1);
+ [#"../06_map_precond.rs" 206 8 206 41] _0 <- ([#"../06_map_precond.rs" 206 8 206 41] res);
return _0
}
@@ -2759,68 +2761,68 @@ module C06MapPrecond_Counter
use seq.Seq
use prelude.Ghost
use prelude.UIntSize
- function field_00 [#"../06_map_precond.rs" 207 8 207 41] (self : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) : borrowed usize
+ function field_00 [#"../06_map_precond.rs" 206 8 206 41] (self : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) : borrowed usize
=
let C06MapPrecond_Counter_Closure2.C06MapPrecond_Counter_Closure2 a = self in a
- val field_00 [#"../06_map_precond.rs" 207 8 207 41] (self : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) : borrowed usize
+ val field_00 [#"../06_map_precond.rs" 206 8 206 41] (self : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) : borrowed usize
ensures { result = field_00 self }
- predicate precondition0 [#"../06_map_precond.rs" 207 8 207 41] (self : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) (args : (uint32, Ghost.ghost_ty (Seq.seq uint32)))
+ predicate precondition0 [#"../06_map_precond.rs" 206 8 206 41] (self : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) (args : (uint32, Ghost.ghost_ty (Seq.seq uint32)))
=
- [#"../06_map_precond.rs" 206 19 206 61] let (x, _prod) = args in UIntSize.to_int ( * field_00 self) = Seq.length (Ghost.inner _prod) /\ * field_00 self < max0
+ [#"../06_map_precond.rs" 205 19 205 61] let (x, _prod) = args in UIntSize.to_int ( * field_00 self) = Seq.length (Ghost.inner _prod) /\ * field_00 self < max0
use prelude.Ghost
use seq.Seq
- predicate next_precondition0 [#"../06_map_precond.rs" 84 4 84 74] (iter : i) (func : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) (produced : Seq.seq uint32)
+ predicate next_precondition0 [#"../06_map_precond.rs" 83 4 83 74] (iter : i) (func : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) (produced : Seq.seq uint32)
=
- [#"../06_map_precond.rs" 85 8 89 9] forall i : i . forall e : uint32 . inv2 i -> inv3 e -> produces0 iter (Seq.singleton e) i -> precondition0 func (e, Ghost.new produced)
- val next_precondition0 [#"../06_map_precond.rs" 84 4 84 74] (iter : i) (func : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) (produced : Seq.seq uint32) : bool
+ [#"../06_map_precond.rs" 84 8 88 9] forall i : i . forall e : uint32 . inv2 i -> inv3 e -> produces0 iter (Seq.singleton e) i -> precondition0 func (e, Ghost.new produced)
+ val next_precondition0 [#"../06_map_precond.rs" 83 4 83 74] (iter : i) (func : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) (produced : Seq.seq uint32) : bool
ensures { result = next_precondition0 iter func produced }
- predicate unnest0 [#"../06_map_precond.rs" 207 8 207 41] (self : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) (_2 : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i)
+ predicate unnest0 [#"../06_map_precond.rs" 206 8 206 41] (self : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) (_2 : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i)
=
^ field_00 _2 = ^ field_00 self
- predicate postcondition_mut0 [#"../06_map_precond.rs" 207 8 207 41] (self : borrowed (C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i)) (args : (uint32, Ghost.ghost_ty (Seq.seq uint32))) (result : uint32)
+ predicate postcondition_mut0 [#"../06_map_precond.rs" 206 8 206 41] (self : borrowed (C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i)) (args : (uint32, Ghost.ghost_ty (Seq.seq uint32))) (result : uint32)
=
(let (x, _prod) = args in UIntSize.to_int ( * field_00 ( ^ self)) = UIntSize.to_int ( * field_00 ( * self)) + 1) /\ unnest0 ( * self) ( ^ self)
use seq.Seq
- predicate preservation0 [#"../06_map_precond.rs" 106 4 106 45] (iter : i) (func : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i)
+ predicate preservation0 [#"../06_map_precond.rs" 105 4 105 45] (iter : i) (func : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i)
=
- [#"../06_map_precond.rs" 107 8 114 9] forall i : i . forall b : uint32 . forall f : borrowed (C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) . forall e2 : uint32 . forall e1 : uint32 . forall s : Seq.seq uint32 . inv2 i -> inv3 b -> inv5 f -> inv3 e2 -> inv3 e1 -> inv6 s -> unnest0 func ( * f) -> produces0 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new s) -> postcondition_mut0 f (e1, Ghost.new s) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc s e1))
- val preservation0 [#"../06_map_precond.rs" 106 4 106 45] (iter : i) (func : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) : bool
+ [#"../06_map_precond.rs" 106 8 113 9] forall i : i . forall b : uint32 . forall f : borrowed (C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) . forall e2 : uint32 . forall e1 : uint32 . forall s : Seq.seq uint32 . inv2 i -> inv3 b -> inv5 f -> inv3 e2 -> inv3 e1 -> inv6 s -> unnest0 func ( * f) -> produces0 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new s) -> postcondition_mut0 f (e1, Ghost.new s) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc s e1))
+ val preservation0 [#"../06_map_precond.rs" 105 4 105 45] (iter : i) (func : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) : bool
ensures { result = preservation0 iter func }
- predicate preservation_inv0 [#"../06_map_precond.rs" 94 4 94 73] (iter : i) (func : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) (produced : Seq.seq uint32)
+ predicate preservation_inv0 [#"../06_map_precond.rs" 93 4 93 73] (iter : i) (func : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) (produced : Seq.seq uint32)
=
- [#"../06_map_precond.rs" 95 8 102 9] forall i : i . forall b : uint32 . forall f : borrowed (C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) . forall e2 : uint32 . forall e1 : uint32 . forall s : Seq.seq uint32 . inv2 i -> inv3 b -> inv5 f -> inv3 e2 -> inv3 e1 -> inv6 s -> unnest0 func ( * f) -> produces0 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new (Seq.(++) produced s)) -> postcondition_mut0 f (e1, Ghost.new (Seq.(++) produced s)) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc (Seq.(++) produced s) e1))
- val preservation_inv0 [#"../06_map_precond.rs" 94 4 94 73] (iter : i) (func : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) (produced : Seq.seq uint32) : bool
- requires {[#"../06_map_precond.rs" 94 24 94 28] inv2 iter}
- requires {[#"../06_map_precond.rs" 94 33 94 37] inv4 func}
- requires {[#"../06_map_precond.rs" 94 42 94 50] inv6 produced}
+ [#"../06_map_precond.rs" 94 8 101 9] forall i : i . forall b : uint32 . forall f : borrowed (C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) . forall e2 : uint32 . forall e1 : uint32 . forall s : Seq.seq uint32 . inv2 i -> inv3 b -> inv5 f -> inv3 e2 -> inv3 e1 -> inv6 s -> unnest0 func ( * f) -> produces0 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new (Seq.(++) produced s)) -> postcondition_mut0 f (e1, Ghost.new (Seq.(++) produced s)) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc (Seq.(++) produced s) e1))
+ val preservation_inv0 [#"../06_map_precond.rs" 93 4 93 73] (iter : i) (func : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) (produced : Seq.seq uint32) : bool
+ requires {[#"../06_map_precond.rs" 93 24 93 28] inv2 iter}
+ requires {[#"../06_map_precond.rs" 93 33 93 37] inv4 func}
+ requires {[#"../06_map_precond.rs" 93 42 93 50] inv6 produced}
ensures { result = preservation_inv0 iter func produced }
- axiom preservation_inv0_spec : forall iter : i, func : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i, produced : Seq.seq uint32 . ([#"../06_map_precond.rs" 94 24 94 28] inv2 iter) -> ([#"../06_map_precond.rs" 94 33 94 37] inv4 func) -> ([#"../06_map_precond.rs" 94 42 94 50] inv6 produced) -> ([#"../06_map_precond.rs" 93 4 93 83] produced = Seq.empty -> preservation_inv0 iter func produced = preservation0 iter func)
+ axiom preservation_inv0_spec : forall iter : i, func : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i, produced : Seq.seq uint32 . ([#"../06_map_precond.rs" 93 24 93 28] inv2 iter) -> ([#"../06_map_precond.rs" 93 33 93 37] inv4 func) -> ([#"../06_map_precond.rs" 93 42 93 50] inv6 produced) -> ([#"../06_map_precond.rs" 92 4 92 83] produced = Seq.empty -> preservation_inv0 iter func produced = preservation0 iter func)
predicate completed0 [#"../common.rs" 11 4 11 36] (self : borrowed i)
val completed0 [#"../common.rs" 11 4 11 36] (self : borrowed i) : bool
ensures { result = completed0 self }
- predicate reinitialize0 [#"../06_map_precond.rs" 118 4 118 29] (_1 : ()) =
- [#"../06_map_precond.rs" 119 8 124 9] forall func : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i . forall iter : borrowed i . inv4 func -> inv1 iter -> completed0 iter -> next_precondition0 ( ^ iter) func (Seq.empty ) /\ preservation0 ( ^ iter) func
- val reinitialize0 [#"../06_map_precond.rs" 118 4 118 29] (_1 : ()) : bool
+ predicate reinitialize0 [#"../06_map_precond.rs" 117 4 117 29] (_1 : ()) =
+ [#"../06_map_precond.rs" 118 8 123 9] forall func : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i . forall iter : borrowed i . inv4 func -> inv1 iter -> completed0 iter -> next_precondition0 ( ^ iter) func (Seq.empty ) /\ preservation0 ( ^ iter) func
+ val reinitialize0 [#"../06_map_precond.rs" 117 4 117 29] (_1 : ()) : bool
ensures { result = reinitialize0 _1 }
use C06MapPrecond_Map_Type as C06MapPrecond_Map_Type
- predicate invariant0 [#"../06_map_precond.rs" 158 4 158 30] (self : C06MapPrecond_Map_Type.t_map i uint32 (C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) uint32)
+ predicate invariant0 [#"../06_map_precond.rs" 157 4 157 30] (self : C06MapPrecond_Map_Type.t_map i uint32 (C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) uint32)
=
- [#"../06_map_precond.rs" 160 12 162 73] reinitialize0 () /\ preservation_inv0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self)) /\ next_precondition0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self))
- val invariant0 [#"../06_map_precond.rs" 158 4 158 30] (self : C06MapPrecond_Map_Type.t_map i uint32 (C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) uint32) : bool
+ [#"../06_map_precond.rs" 159 12 161 73] reinitialize0 () /\ preservation_inv0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self)) /\ next_precondition0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self))
+ val invariant0 [#"../06_map_precond.rs" 157 4 157 30] (self : C06MapPrecond_Map_Type.t_map i uint32 (C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) uint32) : bool
ensures { result = invariant0 self }
predicate inv0 (_x : C06MapPrecond_Map_Type.t_map i uint32 (C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) uint32)
@@ -2836,19 +2838,19 @@ module C06MapPrecond_Counter
val resolve0 (self : C06MapPrecond_Map_Type.t_map i uint32 (C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) uint32) : bool
ensures { result = resolve0 self }
- val map0 [#"../06_map_precond.rs" 171 0 174 17] (iter : i) (func : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) : C06MapPrecond_Map_Type.t_map i uint32 (C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) uint32
- requires {[#"../06_map_precond.rs" 167 0 167 128] forall i2 : i . forall e : uint32 . inv2 i2 -> inv3 e -> produces0 iter (Seq.singleton e) i2 -> precondition0 func (e, Ghost.new (Seq.empty ))}
- requires {[#"../06_map_precond.rs" 168 11 168 41] reinitialize0 ()}
- requires {[#"../06_map_precond.rs" 169 11 169 51] preservation0 iter func}
- requires {[#"../06_map_precond.rs" 172 4 172 8] inv2 iter}
- requires {[#"../06_map_precond.rs" 173 4 173 8] inv4 func}
- ensures { [#"../06_map_precond.rs" 170 10 170 72] result = C06MapPrecond_Map_Type.C_Map iter func (Ghost.new (Seq.empty )) }
- ensures { [#"../06_map_precond.rs" 174 5 174 17] inv0 result }
+ val map0 [#"../06_map_precond.rs" 170 0 173 17] (iter : i) (func : C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) : C06MapPrecond_Map_Type.t_map i uint32 (C06MapPrecond_Counter_Closure2.c06mapprecond_counter_closure2 i) uint32
+ requires {[#"../06_map_precond.rs" 166 0 166 128] forall i2 : i . forall e : uint32 . inv2 i2 -> inv3 e -> produces0 iter (Seq.singleton e) i2 -> precondition0 func (e, Ghost.new (Seq.empty ))}
+ requires {[#"../06_map_precond.rs" 167 11 167 41] reinitialize0 ()}
+ requires {[#"../06_map_precond.rs" 168 11 168 51] preservation0 iter func}
+ requires {[#"../06_map_precond.rs" 171 4 171 8] inv2 iter}
+ requires {[#"../06_map_precond.rs" 172 4 172 8] inv4 func}
+ ensures { [#"../06_map_precond.rs" 169 10 169 72] result = C06MapPrecond_Map_Type.C_Map iter func (Ghost.new (Seq.empty )) }
+ ensures { [#"../06_map_precond.rs" 173 5 173 17] inv0 result }
- let rec cfg counter [#"../06_map_precond.rs" 202 0 202 48] [@cfg:stackify] [@cfg:subregion_analysis] (iter : i) : ()
- requires {[#"../06_map_precond.rs" 200 0 200 162] forall done_ : borrowed i . inv1 done_ -> completed0 done_ -> (forall steps : Seq.seq uint32 . forall next : i . inv2 next -> produces0 ( ^ done_) steps next -> steps = Seq.empty /\ ^ done_ = next)}
- requires {[#"../06_map_precond.rs" 201 0 201 92] forall fin : i . forall prod : Seq.seq uint32 . inv2 fin -> produces0 iter prod fin -> Seq.length prod <= UIntSize.to_int max0}
- requires {[#"../06_map_precond.rs" 202 40 202 44] inv2 iter}
+ let rec cfg counter [#"../06_map_precond.rs" 201 0 201 48] [@cfg:stackify] [@cfg:subregion_analysis] (iter : i) : ()
+ requires {[#"../06_map_precond.rs" 199 0 199 162] forall done_ : borrowed i . inv1 done_ -> completed0 done_ -> (forall steps : Seq.seq uint32 . forall next : i . inv2 next -> produces0 ( ^ done_) steps next -> steps = Seq.empty /\ ^ done_ = next)}
+ requires {[#"../06_map_precond.rs" 200 0 200 92] forall fin : i . forall prod : Seq.seq uint32 . inv2 fin -> produces0 iter prod fin -> Seq.length prod <= UIntSize.to_int max0}
+ requires {[#"../06_map_precond.rs" 201 40 201 44] inv2 iter}
= [@vc:do_not_keep_trace] [@vc:sp]
var _0 : ();
@@ -2863,11 +2865,11 @@ module C06MapPrecond_Counter
goto BB1
}
BB1 {
- [#"../06_map_precond.rs" 203 18 203 19] cnt <- ([#"../06_map_precond.rs" 203 18 203 19] [#"../06_map_precond.rs" 203 18 203 19] (0 : usize));
- [#"../06_map_precond.rs" 207 8 207 41] _8 <- Borrow.borrow_mut cnt;
- [#"../06_map_precond.rs" 207 8 207 41] cnt <- ^ _8;
- [#"../06_map_precond.rs" 204 4 212 5] _5 <- ([#"../06_map_precond.rs" 204 4 212 5] map0 ([#"../06_map_precond.rs" 205 8 205 12] iter) ([#"../06_map_precond.rs" 207 8 207 41] C06MapPrecond_Counter_Closure2.C06MapPrecond_Counter_Closure2 _8));
- [#"../06_map_precond.rs" 205 8 205 12] iter <- any i;
+ [#"../06_map_precond.rs" 202 18 202 19] cnt <- ([#"../06_map_precond.rs" 202 18 202 19] [#"../06_map_precond.rs" 202 18 202 19] (0 : usize));
+ [#"../06_map_precond.rs" 206 8 206 41] _8 <- Borrow.borrow_mut cnt;
+ [#"../06_map_precond.rs" 206 8 206 41] cnt <- ^ _8;
+ [#"../06_map_precond.rs" 203 4 211 5] _5 <- ([#"../06_map_precond.rs" 203 4 211 5] map0 ([#"../06_map_precond.rs" 204 8 204 12] iter) ([#"../06_map_precond.rs" 206 8 206 41] C06MapPrecond_Counter_Closure2.C06MapPrecond_Counter_Closure2 _8));
+ [#"../06_map_precond.rs" 204 8 204 12] iter <- any i;
_8 <- any borrowed usize;
goto BB2
}
@@ -2877,7 +2879,7 @@ module C06MapPrecond_Counter
goto BB3
}
BB3 {
- [#"../06_map_precond.rs" 202 49 213 1] _0 <- ([#"../06_map_precond.rs" 202 49 213 1] ());
+ [#"../06_map_precond.rs" 201 49 212 1] _0 <- ([#"../06_map_precond.rs" 201 49 212 1] ());
goto BB4
}
BB4 {
@@ -3017,9 +3019,9 @@ module C06MapPrecond_Impl0
ensures { result = produces1 self visited _o }
use seq.Seq
- predicate next_precondition0 [#"../06_map_precond.rs" 84 4 84 74] (iter : i) (func : f) (produced : Seq.seq item0) =
- [#"../06_map_precond.rs" 85 8 89 9] forall i : i . forall e : item0 . inv9 i -> inv8 e -> produces1 iter (Seq.singleton e) i -> precondition0 func (e, Ghost.new produced)
- val next_precondition0 [#"../06_map_precond.rs" 84 4 84 74] (iter : i) (func : f) (produced : Seq.seq item0) : bool
+ predicate next_precondition0 [#"../06_map_precond.rs" 83 4 83 74] (iter : i) (func : f) (produced : Seq.seq item0) =
+ [#"../06_map_precond.rs" 84 8 88 9] forall i : i . forall e : item0 . inv9 i -> inv8 e -> produces1 iter (Seq.singleton e) i -> precondition0 func (e, Ghost.new produced)
+ val next_precondition0 [#"../06_map_precond.rs" 83 4 83 74] (iter : i) (func : f) (produced : Seq.seq item0) : bool
ensures { result = next_precondition0 iter func produced }
predicate postcondition_mut0 (self : borrowed f) (_2 : (item0, Ghost.ghost_ty (Seq.seq item0))) (_3 : b)
@@ -3032,34 +3034,34 @@ module C06MapPrecond_Impl0
val unnest0 (self : f) (_2 : f) : bool
ensures { result = unnest0 self _2 }
- predicate preservation0 [#"../06_map_precond.rs" 106 4 106 45] (iter : i) (func : f) =
- [#"../06_map_precond.rs" 107 8 114 9] forall i : i . forall b : b . forall f : borrowed f . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv9 i -> inv6 b -> inv7 f -> inv8 e2 -> inv8 e1 -> inv4 s -> unnest0 func ( * f) -> produces1 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new s) -> postcondition_mut0 f (e1, Ghost.new s) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc s e1))
- val preservation0 [#"../06_map_precond.rs" 106 4 106 45] (iter : i) (func : f) : bool
+ predicate preservation0 [#"../06_map_precond.rs" 105 4 105 45] (iter : i) (func : f) =
+ [#"../06_map_precond.rs" 106 8 113 9] forall i : i . forall b : b . forall f : borrowed f . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv9 i -> inv6 b -> inv7 f -> inv8 e2 -> inv8 e1 -> inv4 s -> unnest0 func ( * f) -> produces1 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new s) -> postcondition_mut0 f (e1, Ghost.new s) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc s e1))
+ val preservation0 [#"../06_map_precond.rs" 105 4 105 45] (iter : i) (func : f) : bool
ensures { result = preservation0 iter func }
use seq.Seq
- predicate preservation_inv0 [#"../06_map_precond.rs" 94 4 94 73] (iter : i) (func : f) (produced : Seq.seq item0) =
- [#"../06_map_precond.rs" 95 8 102 9] forall i : i . forall b : b . forall f : borrowed f . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv9 i -> inv6 b -> inv7 f -> inv8 e2 -> inv8 e1 -> inv4 s -> unnest0 func ( * f) -> produces1 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new (Seq.(++) produced s)) -> postcondition_mut0 f (e1, Ghost.new (Seq.(++) produced s)) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc (Seq.(++) produced s) e1))
- val preservation_inv0 [#"../06_map_precond.rs" 94 4 94 73] (iter : i) (func : f) (produced : Seq.seq item0) : bool
- requires {[#"../06_map_precond.rs" 94 24 94 28] inv9 iter}
- requires {[#"../06_map_precond.rs" 94 33 94 37] inv10 func}
- requires {[#"../06_map_precond.rs" 94 42 94 50] inv4 produced}
+ predicate preservation_inv0 [#"../06_map_precond.rs" 93 4 93 73] (iter : i) (func : f) (produced : Seq.seq item0) =
+ [#"../06_map_precond.rs" 94 8 101 9] forall i : i . forall b : b . forall f : borrowed f . forall e2 : item0 . forall e1 : item0 . forall s : Seq.seq item0 . inv9 i -> inv6 b -> inv7 f -> inv8 e2 -> inv8 e1 -> inv4 s -> unnest0 func ( * f) -> produces1 iter (Seq.snoc (Seq.snoc s e1) e2) i -> precondition0 ( * f) (e1, Ghost.new (Seq.(++) produced s)) -> postcondition_mut0 f (e1, Ghost.new (Seq.(++) produced s)) b -> precondition0 ( ^ f) (e2, Ghost.new (Seq.snoc (Seq.(++) produced s) e1))
+ val preservation_inv0 [#"../06_map_precond.rs" 93 4 93 73] (iter : i) (func : f) (produced : Seq.seq item0) : bool
+ requires {[#"../06_map_precond.rs" 93 24 93 28] inv9 iter}
+ requires {[#"../06_map_precond.rs" 93 33 93 37] inv10 func}
+ requires {[#"../06_map_precond.rs" 93 42 93 50] inv4 produced}
ensures { result = preservation_inv0 iter func produced }
- axiom preservation_inv0_spec : forall iter : i, func : f, produced : Seq.seq item0 . ([#"../06_map_precond.rs" 94 24 94 28] inv9 iter) -> ([#"../06_map_precond.rs" 94 33 94 37] inv10 func) -> ([#"../06_map_precond.rs" 94 42 94 50] inv4 produced) -> ([#"../06_map_precond.rs" 93 4 93 83] produced = Seq.empty -> preservation_inv0 iter func produced = preservation0 iter func)
+ axiom preservation_inv0_spec : forall iter : i, func : f, produced : Seq.seq item0 . ([#"../06_map_precond.rs" 93 24 93 28] inv9 iter) -> ([#"../06_map_precond.rs" 93 33 93 37] inv10 func) -> ([#"../06_map_precond.rs" 93 42 93 50] inv4 produced) -> ([#"../06_map_precond.rs" 92 4 92 83] produced = Seq.empty -> preservation_inv0 iter func produced = preservation0 iter func)
use prelude.Ghost
predicate completed1 [#"../common.rs" 11 4 11 36] (self : borrowed i)
val completed1 [#"../common.rs" 11 4 11 36] (self : borrowed i) : bool
ensures { result = completed1 self }
- predicate reinitialize0 [#"../06_map_precond.rs" 118 4 118 29] (_1 : ()) =
- [#"../06_map_precond.rs" 119 8 124 9] forall func : f . forall iter : borrowed i . inv10 func -> inv12 iter -> completed1 iter -> next_precondition0 ( ^ iter) func (Seq.empty ) /\ preservation0 ( ^ iter) func
- val reinitialize0 [#"../06_map_precond.rs" 118 4 118 29] (_1 : ()) : bool
+ predicate reinitialize0 [#"../06_map_precond.rs" 117 4 117 29] (_1 : ()) =
+ [#"../06_map_precond.rs" 118 8 123 9] forall func : f . forall iter : borrowed i . inv10 func -> inv12 iter -> completed1 iter -> next_precondition0 ( ^ iter) func (Seq.empty ) /\ preservation0 ( ^ iter) func
+ val reinitialize0 [#"../06_map_precond.rs" 117 4 117 29] (_1 : ()) : bool
ensures { result = reinitialize0 _1 }
- predicate invariant0 [#"../06_map_precond.rs" 158 4 158 30] (self : C06MapPrecond_Map_Type.t_map i b f item0) =
- [#"../06_map_precond.rs" 160 12 162 73] reinitialize0 () /\ preservation_inv0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self)) /\ next_precondition0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self))
- val invariant0 [#"../06_map_precond.rs" 158 4 158 30] (self : C06MapPrecond_Map_Type.t_map i b f item0) : bool
+ predicate invariant0 [#"../06_map_precond.rs" 157 4 157 30] (self : C06MapPrecond_Map_Type.t_map i b f item0) =
+ [#"../06_map_precond.rs" 159 12 161 73] reinitialize0 () /\ preservation_inv0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self)) /\ next_precondition0 (C06MapPrecond_Map_Type.map_iter self) (C06MapPrecond_Map_Type.map_func self) (Ghost.inner (C06MapPrecond_Map_Type.map_produced self))
+ val invariant0 [#"../06_map_precond.rs" 157 4 157 30] (self : C06MapPrecond_Map_Type.t_map i b f item0) : bool
ensures { result = invariant0 self }
axiom inv0 : forall x : C06MapPrecond_Map_Type.t_map i b f item0 . inv0 x = (invariant0 x /\ match x with
@@ -3087,20 +3089,20 @@ module C06MapPrecond_Impl0
val produces0 [@inline:trivial] [#"../06_map_precond.rs" 43 4 43 67] (self : C06MapPrecond_Map_Type.t_map i b f item0) (visited : Seq.seq b) (succ : C06MapPrecond_Map_Type.t_map i b f item0) : bool
ensures { result = produces0 self visited succ }
- predicate produces_one0 [#"../06_map_precond.rs" 143 4 143 57] (self : C06MapPrecond_Map_Type.t_map i b f item0) (visited : b) (succ : C06MapPrecond_Map_Type.t_map i b f item0)
+ predicate produces_one0 [#"../06_map_precond.rs" 142 4 142 57] (self : C06MapPrecond_Map_Type.t_map i b f item0) (visited : b) (succ : C06MapPrecond_Map_Type.t_map i b f item0)
=
- [#"../06_map_precond.rs" 144 8 150 9] exists f : borrowed f . inv7 f /\ * f = C06MapPrecond_Map_Type.map_func self /\ ^ f = C06MapPrecond_Map_Type.map_func succ /\ (exists e : item0 . inv8 e /\ produces1 (C06MapPrecond_Map_Type.map_iter self) (Seq.singleton e) (C06MapPrecond_Map_Type.map_iter succ) /\ Ghost.inner (C06MapPrecond_Map_Type.map_produced succ) = Seq.snoc (Ghost.inner (C06MapPrecond_Map_Type.map_produced self)) e /\ precondition0 ( * f) (e, C06MapPrecond_Map_Type.map_produced self) /\ postcondition_mut0 f (e, C06MapPrecond_Map_Type.map_produced self) visited)
- val produces_one0 [#"../06_map_precond.rs" 143 4 143 57] (self : C06MapPrecond_Map_Type.t_map i b f item0) (visited : b) (succ : C06MapPrecond_Map_Type.t_map i b f item0) : bool
- requires {[#"../06_map_precond.rs" 143 20 143 24] inv0 self}
- requires {[#"../06_map_precond.rs" 143 26 143 33] inv6 visited}
- requires {[#"../06_map_precond.rs" 143 38 143 42] inv0 succ}
+ [#"../06_map_precond.rs" 143 8 149 9] exists f : borrowed f . inv7 f /\ * f = C06MapPrecond_Map_Type.map_func self /\ ^ f = C06MapPrecond_Map_Type.map_func succ /\ (exists e : item0 . inv8 e /\ produces1 (C06MapPrecond_Map_Type.map_iter self) (Seq.singleton e) (C06MapPrecond_Map_Type.map_iter succ) /\ Ghost.inner (C06MapPrecond_Map_Type.map_produced succ) = Seq.snoc (Ghost.inner (C06MapPrecond_Map_Type.map_produced self)) e /\ precondition0 ( * f) (e, C06MapPrecond_Map_Type.map_produced self) /\ postcondition_mut0 f (e, C06MapPrecond_Map_Type.map_produced self) visited)
+ val produces_one0 [#"../06_map_precond.rs" 142 4 142 57] (self : C06MapPrecond_Map_Type.t_map i b f item0) (visited : b) (succ : C06MapPrecond_Map_Type.t_map i b f item0) : bool
+ requires {[#"../06_map_precond.rs" 142 20 142 24] inv0 self}
+ requires {[#"../06_map_precond.rs" 142 26 142 33] inv6 visited}
+ requires {[#"../06_map_precond.rs" 142 38 142 42] inv0 succ}
ensures { result = produces_one0 self visited succ }
- axiom produces_one0_spec : forall self : C06MapPrecond_Map_Type.t_map i b f item0, visited : b, succ : C06MapPrecond_Map_Type.t_map i b f item0 . ([#"../06_map_precond.rs" 143 20 143 24] inv0 self) -> ([#"../06_map_precond.rs" 143 26 143 33] inv6 visited) -> ([#"../06_map_precond.rs" 143 38 143 42] inv0 succ) -> ([#"../06_map_precond.rs" 142 14 142 68] produces_one0 self visited succ = produces0 self (Seq.singleton visited) succ)
+ axiom produces_one0_spec : forall self : C06MapPrecond_Map_Type.t_map i b f item0, visited : b, succ : C06MapPrecond_Map_Type.t_map i b f item0 . ([#"../06_map_precond.rs" 142 20 142 24] inv0 self) -> ([#"../06_map_precond.rs" 142 26 142 33] inv6 visited) -> ([#"../06_map_precond.rs" 142 38 142 42] inv0 succ) -> ([#"../06_map_precond.rs" 141 14 141 68] produces_one0 self visited succ = produces0 self (Seq.singleton visited) succ)
predicate completed0 [#"../06_map_precond.rs" 21 4 21 35] (self : borrowed (C06MapPrecond_Map_Type.t_map i b f item0))
=
- [#"../06_map_precond.rs" 22 8 25 9] Ghost.inner (C06MapPrecond_Map_Type.map_produced ( ^ self)) = Seq.empty /\ completed1 {current = C06MapPrecond_Map_Type.map_iter ( * self); final = C06MapPrecond_Map_Type.map_iter ( ^ self)} /\ C06MapPrecond_Map_Type.map_func ( * self) = C06MapPrecond_Map_Type.map_func ( ^ self)
+ [#"../06_map_precond.rs" 22 8 25 9] Ghost.inner (C06MapPrecond_Map_Type.map_produced ( ^ self)) = Seq.empty /\ completed1 (Borrow.borrow_logic (C06MapPrecond_Map_Type.map_iter ( * self)) (C06MapPrecond_Map_Type.map_iter ( ^ self)) (Borrow.inherit_id (Borrow.get_id self) 1)) /\ C06MapPrecond_Map_Type.map_func ( * self) = C06MapPrecond_Map_Type.map_func ( ^ self)
val completed0 [#"../06_map_precond.rs" 21 4 21 35] (self : borrowed (C06MapPrecond_Map_Type.t_map i b f item0)) : bool
ensures { result = completed0 self }
diff --git a/creusot/tests/should_succeed/iterators/06_map_precond/why3session.xml b/creusot/tests/should_succeed/iterators/06_map_precond/why3session.xml
index fe3e0c37ce..2bc88e4ac6 100644
--- a/creusot/tests/should_succeed/iterators/06_map_precond/why3session.xml
+++ b/creusot/tests/should_succeed/iterators/06_map_precond/why3session.xml
@@ -11,7 +11,7 @@
-
+
@@ -24,7 +24,7 @@
-
+
@@ -84,7 +84,7 @@
-
+
@@ -93,7 +93,7 @@
-
+
@@ -108,7 +108,7 @@
-
+
@@ -147,25 +147,25 @@
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
@@ -175,45 +175,45 @@
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
@@ -221,8 +221,8 @@
-
-
+
+
@@ -241,7 +241,7 @@
-
+
@@ -256,13 +256,13 @@
-
+
-
+
-
+
@@ -273,53 +273,56 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
-
+
+
-
+
+
+
+
-
+
@@ -359,14 +362,14 @@
-
+
-
+
@@ -379,7 +382,7 @@
-
+
diff --git a/creusot/tests/should_succeed/iterators/06_map_precond/why3shapes.gz b/creusot/tests/should_succeed/iterators/06_map_precond/why3shapes.gz
index 9c64aade76..8583c0cd0c 100644
Binary files a/creusot/tests/should_succeed/iterators/06_map_precond/why3shapes.gz and b/creusot/tests/should_succeed/iterators/06_map_precond/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/iterators/07_fuse.mlcfg b/creusot/tests/should_succeed/iterators/07_fuse.mlcfg
index cb3a31d5f6..7d70f017ad 100644
--- a/creusot/tests/should_succeed/iterators/07_fuse.mlcfg
+++ b/creusot/tests/should_succeed/iterators/07_fuse.mlcfg
@@ -189,8 +189,8 @@ module C07Fuse_Impl0_Next
goto BB0
}
BB0 {
- [#"../07_fuse.rs" 40 14 40 28] _3 <- Borrow.borrow_mut (C07Fuse_Fuse_Type.fuse_iter ( * self));
- [#"../07_fuse.rs" 40 14 40 28] self <- { self with current = (let C07Fuse_Fuse_Type.C_Fuse x0 = * self in C07Fuse_Fuse_Type.C_Fuse ( ^ _3)) };
+ [#"../07_fuse.rs" 40 14 40 28] _3 <- Borrow.borrow_final (C07Fuse_Fuse_Type.fuse_iter ( * self)) (Borrow.inherit_id (Borrow.get_id self) 1);
+ [#"../07_fuse.rs" 40 14 40 28] self <- { self with current = (let C07Fuse_Fuse_Type.C_Fuse x0 = * self in C07Fuse_Fuse_Type.C_Fuse ( ^ _3)) ; };
assume { inv0 ( ^ _3) };
switch ( * _3)
| Core_Option_Option_Type.C_None -> goto BB1
@@ -201,11 +201,11 @@ module C07Fuse_Impl0_Next
goto BB4
}
BB2 {
- [#"../07_fuse.rs" 42 17 42 21] iter <- Borrow.borrow_mut (Core_Option_Option_Type.some_0 ( * _3));
- [#"../07_fuse.rs" 42 17 42 21] _3 <- { _3 with current = (let Core_Option_Option_Type.C_Some x0 = * _3 in Core_Option_Option_Type.C_Some ( ^ iter)) };
+ [#"../07_fuse.rs" 42 17 42 21] iter <- Borrow.borrow_final (Core_Option_Option_Type.some_0 ( * _3)) (Borrow.inherit_id (Borrow.get_id _3) 1);
+ [#"../07_fuse.rs" 42 17 42 21] _3 <- { _3 with current = (let Core_Option_Option_Type.C_Some x0 = * _3 in Core_Option_Option_Type.C_Some ( ^ iter)) ; };
assume { inv3 ( ^ iter) };
- [#"../07_fuse.rs" 42 32 42 43] _7 <- Borrow.borrow_mut ( * iter);
- [#"../07_fuse.rs" 42 32 42 43] iter <- { iter with current = ^ _7 };
+ [#"../07_fuse.rs" 42 32 42 43] _7 <- Borrow.borrow_final ( * iter) (Borrow.get_id iter);
+ [#"../07_fuse.rs" 42 32 42 43] iter <- { iter with current = ( ^ _7) ; };
assume { inv3 ( ^ _7) };
[#"../07_fuse.rs" 42 32 42 43] _6 <- ([#"../07_fuse.rs" 42 32 42 43] next0 _7);
_7 <- any borrowed i;
@@ -255,7 +255,7 @@ module C07Fuse_Impl0_Next
goto BB9
}
BB9 {
- [#"../07_fuse.rs" 44 20 44 29] self <- { self with current = (let C07Fuse_Fuse_Type.C_Fuse x0 = * self in C07Fuse_Fuse_Type.C_Fuse ([#"../07_fuse.rs" 44 32 44 36] Core_Option_Option_Type.C_None)) };
+ [#"../07_fuse.rs" 44 20 44 29] self <- { self with current = (let C07Fuse_Fuse_Type.C_Fuse x0 = * self in C07Fuse_Fuse_Type.C_Fuse ([#"../07_fuse.rs" 44 32 44 36] Core_Option_Option_Type.C_None)) ; };
assert { [@expl:type invariant] inv0 (C07Fuse_Fuse_Type.fuse_iter ( * self)) };
assume { resolve4 (C07Fuse_Fuse_Type.fuse_iter ( * self)) };
assert { [@expl:type invariant] inv2 self };
diff --git a/creusot/tests/should_succeed/iterators/07_fuse/why3session.xml b/creusot/tests/should_succeed/iterators/07_fuse/why3session.xml
index 3432c79dd2..ad07cedb8b 100644
--- a/creusot/tests/should_succeed/iterators/07_fuse/why3session.xml
+++ b/creusot/tests/should_succeed/iterators/07_fuse/why3session.xml
@@ -8,7 +8,7 @@
-
+
@@ -26,7 +26,7 @@
-
+
diff --git a/creusot/tests/should_succeed/iterators/07_fuse/why3shapes.gz b/creusot/tests/should_succeed/iterators/07_fuse/why3shapes.gz
index b8cd72f9ab..8fce346ab2 100644
Binary files a/creusot/tests/should_succeed/iterators/07_fuse/why3shapes.gz and b/creusot/tests/should_succeed/iterators/07_fuse/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/iterators/08_collect_extend.mlcfg b/creusot/tests/should_succeed/iterators/08_collect_extend.mlcfg
index 42933b799e..4f1d2fb47e 100644
--- a/creusot/tests/should_succeed/iterators/08_collect_extend.mlcfg
+++ b/creusot/tests/should_succeed/iterators/08_collect_extend.mlcfg
@@ -348,8 +348,8 @@ module C08CollectExtend_Extend
[#"../08_collect_extend.rs" 27 4 27 35] _19 <- Borrow.borrow_mut iter1;
[#"../08_collect_extend.rs" 27 4 27 35] iter1 <- ^ _19;
assume { inv3 ( ^ _19) };
- [#"../08_collect_extend.rs" 27 4 27 35] _18 <- Borrow.borrow_mut ( * _19);
- [#"../08_collect_extend.rs" 27 4 27 35] _19 <- { _19 with current = ^ _18 };
+ [#"../08_collect_extend.rs" 27 4 27 35] _18 <- Borrow.borrow_final ( * _19) (Borrow.get_id _19);
+ [#"../08_collect_extend.rs" 27 4 27 35] _19 <- { _19 with current = ( ^ _18) ; };
assume { inv3 ( ^ _18) };
[#"../08_collect_extend.rs" 27 4 27 35] _17 <- ([#"../08_collect_extend.rs" 27 4 27 35] next0 _18);
_18 <- any borrowed i;
@@ -402,7 +402,7 @@ module C08CollectExtend_Extend
[#"../../../../../creusot-contracts-proc/src/lib.rs" 664 0 664 51] x <- ([#"../../../../../creusot-contracts-proc/src/lib.rs" 664 0 664 51] __creusot_proc_iter_elem);
[#"../../../../../creusot-contracts-proc/src/lib.rs" 664 0 664 51] __creusot_proc_iter_elem <- any t;
[#"../08_collect_extend.rs" 30 8 30 19] _26 <- Borrow.borrow_mut ( * vec);
- [#"../08_collect_extend.rs" 30 8 30 19] vec <- { vec with current = ^ _26 };
+ [#"../08_collect_extend.rs" 30 8 30 19] vec <- { vec with current = ( ^ _26) ; };
assume { inv6 ( ^ _26) };
[#"../08_collect_extend.rs" 30 8 30 19] _25 <- ([#"../08_collect_extend.rs" 30 8 30 19] push0 _26 ([#"../08_collect_extend.rs" 30 17 30 18] x));
_26 <- any borrowed (Alloc_Vec_Vec_Type.t_vec t (Alloc_Alloc_Global_Type.t_global));
@@ -718,8 +718,8 @@ module C08CollectExtend_Collect
[#"../08_collect_extend.rs" 45 4 45 40] _17 <- Borrow.borrow_mut iter1;
[#"../08_collect_extend.rs" 45 4 45 40] iter1 <- ^ _17;
assume { inv2 ( ^ _17) };
- [#"../08_collect_extend.rs" 45 4 45 40] _16 <- Borrow.borrow_mut ( * _17);
- [#"../08_collect_extend.rs" 45 4 45 40] _17 <- { _17 with current = ^ _16 };
+ [#"../08_collect_extend.rs" 45 4 45 40] _16 <- Borrow.borrow_final ( * _17) (Borrow.get_id _17);
+ [#"../08_collect_extend.rs" 45 4 45 40] _17 <- { _17 with current = ( ^ _16) ; };
assume { inv2 ( ^ _16) };
[#"../08_collect_extend.rs" 45 4 45 40] _15 <- ([#"../08_collect_extend.rs" 45 4 45 40] next0 _16);
_16 <- any borrowed i;
@@ -1091,8 +1091,8 @@ module C08CollectExtend_ExtendIndex
BB2 {
[#"../08_collect_extend.rs" 55 11 55 18] _9 <- Borrow.borrow_mut v1;
[#"../08_collect_extend.rs" 55 11 55 18] v1 <- ^ _9;
- [#"../08_collect_extend.rs" 55 11 55 18] _8 <- Borrow.borrow_mut ( * _9);
- [#"../08_collect_extend.rs" 55 11 55 18] _9 <- { _9 with current = ^ _8 };
+ [#"../08_collect_extend.rs" 55 11 55 18] _8 <- Borrow.borrow_final ( * _9) (Borrow.get_id _9);
+ [#"../08_collect_extend.rs" 55 11 55 18] _9 <- { _9 with current = ( ^ _8) ; };
[#"../08_collect_extend.rs" 55 20 55 34] _10 <- ([#"../08_collect_extend.rs" 55 20 55 34] into_iter0 ([#"../08_collect_extend.rs" 55 20 55 22] v2));
[#"../08_collect_extend.rs" 55 20 55 22] v2 <- any Alloc_Vec_Vec_Type.t_vec uint32 (Alloc_Alloc_Global_Type.t_global);
goto BB3
diff --git a/creusot/tests/should_succeed/iterators/08_collect_extend/why3session.xml b/creusot/tests/should_succeed/iterators/08_collect_extend/why3session.xml
index 156d75f02c..27d4fc54eb 100644
--- a/creusot/tests/should_succeed/iterators/08_collect_extend/why3session.xml
+++ b/creusot/tests/should_succeed/iterators/08_collect_extend/why3session.xml
@@ -33,52 +33,52 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -108,53 +108,53 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/creusot/tests/should_succeed/iterators/08_collect_extend/why3shapes.gz b/creusot/tests/should_succeed/iterators/08_collect_extend/why3shapes.gz
index c6dc966381..dd3cdebfa3 100644
Binary files a/creusot/tests/should_succeed/iterators/08_collect_extend/why3shapes.gz and b/creusot/tests/should_succeed/iterators/08_collect_extend/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/iterators/09_empty/why3session.xml b/creusot/tests/should_succeed/iterators/09_empty/why3session.xml
index 17e60e574e..aa5a4de574 100644
--- a/creusot/tests/should_succeed/iterators/09_empty/why3session.xml
+++ b/creusot/tests/should_succeed/iterators/09_empty/why3session.xml
@@ -12,7 +12,7 @@
-
+
diff --git a/creusot/tests/should_succeed/iterators/09_empty/why3shapes.gz b/creusot/tests/should_succeed/iterators/09_empty/why3shapes.gz
index 4414424b20..d7a57fcd7f 100644
Binary files a/creusot/tests/should_succeed/iterators/09_empty/why3shapes.gz and b/creusot/tests/should_succeed/iterators/09_empty/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/iterators/10_once.mlcfg b/creusot/tests/should_succeed/iterators/10_once.mlcfg
index a3af720a86..7b3c072c61 100644
--- a/creusot/tests/should_succeed/iterators/10_once.mlcfg
+++ b/creusot/tests/should_succeed/iterators/10_once.mlcfg
@@ -191,8 +191,8 @@ module C10Once_Impl0_Next
goto BB0
}
BB0 {
- [#"../10_once.rs" 45 8 45 21] _3 <- Borrow.borrow_mut (C10Once_Once_Type.once_0 ( * self));
- [#"../10_once.rs" 45 8 45 21] self <- { self with current = (let C10Once_Once_Type.C_Once x0 = * self in C10Once_Once_Type.C_Once ( ^ _3)) };
+ [#"../10_once.rs" 45 8 45 21] _3 <- Borrow.borrow_final (C10Once_Once_Type.once_0 ( * self)) (Borrow.inherit_id (Borrow.get_id self) 1);
+ [#"../10_once.rs" 45 8 45 21] self <- { self with current = (let C10Once_Once_Type.C_Once x0 = * self in C10Once_Once_Type.C_Once ( ^ _3)) ; };
assume { inv0 ( ^ _3) };
[#"../10_once.rs" 45 8 45 21] _0 <- ([#"../10_once.rs" 45 8 45 21] take0 _3);
_3 <- any borrowed (Core_Option_Option_Type.t_option t);
diff --git a/creusot/tests/should_succeed/iterators/10_once/why3session.xml b/creusot/tests/should_succeed/iterators/10_once/why3session.xml
index 6b27b19463..01828c4b5a 100644
--- a/creusot/tests/should_succeed/iterators/10_once/why3session.xml
+++ b/creusot/tests/should_succeed/iterators/10_once/why3session.xml
@@ -14,14 +14,14 @@
-
+
-
+
diff --git a/creusot/tests/should_succeed/iterators/10_once/why3shapes.gz b/creusot/tests/should_succeed/iterators/10_once/why3shapes.gz
index af1d12fbf8..22af7df85b 100644
Binary files a/creusot/tests/should_succeed/iterators/10_once/why3shapes.gz and b/creusot/tests/should_succeed/iterators/10_once/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/iterators/11_repeat/why3shapes.gz b/creusot/tests/should_succeed/iterators/11_repeat/why3shapes.gz
index 23747f6897..95c7eed615 100644
Binary files a/creusot/tests/should_succeed/iterators/11_repeat/why3shapes.gz and b/creusot/tests/should_succeed/iterators/11_repeat/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/iterators/12_zip.mlcfg b/creusot/tests/should_succeed/iterators/12_zip.mlcfg
index 0b9388a92d..67a05db24f 100644
--- a/creusot/tests/should_succeed/iterators/12_zip.mlcfg
+++ b/creusot/tests/should_succeed/iterators/12_zip.mlcfg
@@ -473,7 +473,7 @@ module C12Zip_Impl0_Next
ensures { result = completed1 self }
predicate completed0 [#"../12_zip.rs" 18 4 18 35] (self : borrowed (C12Zip_Zip_Type.t_zip a b)) =
- [#"../12_zip.rs" 20 13 22 67] completed1 {current = C12Zip_Zip_Type.zip_a ( * self); final = C12Zip_Zip_Type.zip_a ( ^ self)} /\ C12Zip_Zip_Type.zip_b ( * self) = C12Zip_Zip_Type.zip_b ( ^ self) \/ (exists x : item0 . inv5 x /\ produces1 (C12Zip_Zip_Type.zip_a ( * self)) (Seq.singleton x) (C12Zip_Zip_Type.zip_a ( ^ self)) /\ resolve3 x /\ completed2 {current = C12Zip_Zip_Type.zip_b ( * self); final = C12Zip_Zip_Type.zip_b ( ^ self)})
+ [#"../12_zip.rs" 20 13 22 67] completed1 (Borrow.borrow_logic (C12Zip_Zip_Type.zip_a ( * self)) (C12Zip_Zip_Type.zip_a ( ^ self)) (Borrow.inherit_id (Borrow.get_id self) 1)) /\ C12Zip_Zip_Type.zip_b ( * self) = C12Zip_Zip_Type.zip_b ( ^ self) \/ (exists x : item0 . inv5 x /\ produces1 (C12Zip_Zip_Type.zip_a ( * self)) (Seq.singleton x) (C12Zip_Zip_Type.zip_a ( ^ self)) /\ resolve3 x /\ completed2 (Borrow.borrow_logic (C12Zip_Zip_Type.zip_b ( * self)) (C12Zip_Zip_Type.zip_b ( ^ self)) (Borrow.inherit_id (Borrow.get_id self) 2)))
val completed0 [#"../12_zip.rs" 18 4 18 35] (self : borrowed (C12Zip_Zip_Type.t_zip a b)) : bool
ensures { result = completed0 self }
@@ -530,8 +530,8 @@ module C12Zip_Impl0_Next
goto BB0
}
BB0 {
- [#"../12_zip.rs" 55 22 55 35] _5 <- Borrow.borrow_mut (C12Zip_Zip_Type.zip_a ( * self));
- [#"../12_zip.rs" 55 22 55 35] self <- { self with current = (let C12Zip_Zip_Type.C_Zip x0 x1 = * self in C12Zip_Zip_Type.C_Zip ( ^ _5) x1) };
+ [#"../12_zip.rs" 55 22 55 35] _5 <- Borrow.borrow_final (C12Zip_Zip_Type.zip_a ( * self)) (Borrow.inherit_id (Borrow.get_id self) 1);
+ [#"../12_zip.rs" 55 22 55 35] self <- { self with current = (let C12Zip_Zip_Type.C_Zip x0 x1 = * self in C12Zip_Zip_Type.C_Zip ( ^ _5) x1) ; };
assume { inv0 ( ^ _5) };
[#"../12_zip.rs" 55 22 55 35] _4 <- ([#"../12_zip.rs" 55 22 55 35] next0 _5);
_5 <- any borrowed a;
@@ -571,8 +571,8 @@ module C12Zip_Impl0_Next
goto BB7
}
BB7 {
- [#"../12_zip.rs" 59 22 59 35] _11 <- Borrow.borrow_mut (C12Zip_Zip_Type.zip_b ( * self));
- [#"../12_zip.rs" 59 22 59 35] self <- { self with current = (let C12Zip_Zip_Type.C_Zip x0 x1 = * self in C12Zip_Zip_Type.C_Zip x0 ( ^ _11)) };
+ [#"../12_zip.rs" 59 22 59 35] _11 <- Borrow.borrow_final (C12Zip_Zip_Type.zip_b ( * self)) (Borrow.inherit_id (Borrow.get_id self) 2);
+ [#"../12_zip.rs" 59 22 59 35] self <- { self with current = (let C12Zip_Zip_Type.C_Zip x0 x1 = * self in C12Zip_Zip_Type.C_Zip x0 ( ^ _11)) ; };
assume { inv3 ( ^ _11) };
[#"../12_zip.rs" 59 22 59 35] _10 <- ([#"../12_zip.rs" 59 22 59 35] next1 _11);
_11 <- any borrowed b;
@@ -749,7 +749,7 @@ module C12Zip_Impl0
ensures { result = completed1 self }
predicate completed0 [#"../12_zip.rs" 18 4 18 35] (self : borrowed (C12Zip_Zip_Type.t_zip a b)) =
- [#"../12_zip.rs" 20 13 22 67] completed1 {current = C12Zip_Zip_Type.zip_a ( * self); final = C12Zip_Zip_Type.zip_a ( ^ self)} /\ C12Zip_Zip_Type.zip_b ( * self) = C12Zip_Zip_Type.zip_b ( ^ self) \/ (exists x : item0 . inv6 x /\ produces1 (C12Zip_Zip_Type.zip_a ( * self)) (Seq.singleton x) (C12Zip_Zip_Type.zip_a ( ^ self)) /\ resolve0 x /\ completed2 {current = C12Zip_Zip_Type.zip_b ( * self); final = C12Zip_Zip_Type.zip_b ( ^ self)})
+ [#"../12_zip.rs" 20 13 22 67] completed1 (Borrow.borrow_logic (C12Zip_Zip_Type.zip_a ( * self)) (C12Zip_Zip_Type.zip_a ( ^ self)) (Borrow.inherit_id (Borrow.get_id self) 1)) /\ C12Zip_Zip_Type.zip_b ( * self) = C12Zip_Zip_Type.zip_b ( ^ self) \/ (exists x : item0 . inv6 x /\ produces1 (C12Zip_Zip_Type.zip_a ( * self)) (Seq.singleton x) (C12Zip_Zip_Type.zip_a ( ^ self)) /\ resolve0 x /\ completed2 (Borrow.borrow_logic (C12Zip_Zip_Type.zip_b ( * self)) (C12Zip_Zip_Type.zip_b ( ^ self)) (Borrow.inherit_id (Borrow.get_id self) 2)))
val completed0 [#"../12_zip.rs" 18 4 18 35] (self : borrowed (C12Zip_Zip_Type.t_zip a b)) : bool
ensures { result = completed0 self }
diff --git a/creusot/tests/should_succeed/iterators/12_zip/why3session.xml b/creusot/tests/should_succeed/iterators/12_zip/why3session.xml
index 5f48b1144d..982695965e 100644
--- a/creusot/tests/should_succeed/iterators/12_zip/why3session.xml
+++ b/creusot/tests/should_succeed/iterators/12_zip/why3session.xml
@@ -8,7 +8,7 @@
-
+
@@ -72,18 +72,18 @@
-
+
-
+
-
+
-
+
diff --git a/creusot/tests/should_succeed/iterators/12_zip/why3shapes.gz b/creusot/tests/should_succeed/iterators/12_zip/why3shapes.gz
index 8a244de8a6..b5093cc438 100644
Binary files a/creusot/tests/should_succeed/iterators/12_zip/why3shapes.gz and b/creusot/tests/should_succeed/iterators/12_zip/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/iterators/13_cloned.mlcfg b/creusot/tests/should_succeed/iterators/13_cloned.mlcfg
index 7078fcd60e..18e5dd6cae 100644
--- a/creusot/tests/should_succeed/iterators/13_cloned.mlcfg
+++ b/creusot/tests/should_succeed/iterators/13_cloned.mlcfg
@@ -295,7 +295,7 @@ module C13Cloned_Impl0_Next
ensures { result = completed1 self }
predicate completed0 [#"../13_cloned.rs" 22 4 22 35] (self : borrowed (C13Cloned_Cloned_Type.t_cloned i)) =
- [#"../13_cloned.rs" 23 8 23 43] completed1 {current = C13Cloned_Cloned_Type.cloned_iter ( * self); final = C13Cloned_Cloned_Type.cloned_iter ( ^ self)}
+ [#"../13_cloned.rs" 23 8 23 43] completed1 (Borrow.borrow_logic (C13Cloned_Cloned_Type.cloned_iter ( * self)) (C13Cloned_Cloned_Type.cloned_iter ( ^ self)) (Borrow.inherit_id (Borrow.get_id self) 1))
val completed0 [#"../13_cloned.rs" 22 4 22 35] (self : borrowed (C13Cloned_Cloned_Type.t_cloned i)) : bool
ensures { result = completed0 self }
@@ -336,8 +336,8 @@ module C13Cloned_Impl0_Next
goto BB0
}
BB0 {
- [#"../13_cloned.rs" 53 8 53 24] _4 <- Borrow.borrow_mut (C13Cloned_Cloned_Type.cloned_iter ( * self));
- [#"../13_cloned.rs" 53 8 53 24] self <- { self with current = (let C13Cloned_Cloned_Type.C_Cloned x0 = * self in C13Cloned_Cloned_Type.C_Cloned ( ^ _4)) };
+ [#"../13_cloned.rs" 53 8 53 24] _4 <- Borrow.borrow_final (C13Cloned_Cloned_Type.cloned_iter ( * self)) (Borrow.inherit_id (Borrow.get_id self) 1);
+ [#"../13_cloned.rs" 53 8 53 24] self <- { self with current = (let C13Cloned_Cloned_Type.C_Cloned x0 = * self in C13Cloned_Cloned_Type.C_Cloned ( ^ _4)) ; };
assume { inv0 ( ^ _4) };
[#"../13_cloned.rs" 53 8 53 24] _3 <- ([#"../13_cloned.rs" 53 8 53 24] next0 _4);
_4 <- any borrowed i;
@@ -432,7 +432,7 @@ module C13Cloned_Impl0
ensures { result = completed1 self }
predicate completed0 [#"../13_cloned.rs" 22 4 22 35] (self : borrowed (C13Cloned_Cloned_Type.t_cloned i)) =
- [#"../13_cloned.rs" 23 8 23 43] completed1 {current = C13Cloned_Cloned_Type.cloned_iter ( * self); final = C13Cloned_Cloned_Type.cloned_iter ( ^ self)}
+ [#"../13_cloned.rs" 23 8 23 43] completed1 (Borrow.borrow_logic (C13Cloned_Cloned_Type.cloned_iter ( * self)) (C13Cloned_Cloned_Type.cloned_iter ( ^ self)) (Borrow.inherit_id (Borrow.get_id self) 1))
val completed0 [#"../13_cloned.rs" 22 4 22 35] (self : borrowed (C13Cloned_Cloned_Type.t_cloned i)) : bool
ensures { result = completed0 self }
diff --git a/creusot/tests/should_succeed/iterators/13_cloned/why3session.xml b/creusot/tests/should_succeed/iterators/13_cloned/why3session.xml
index 273f287cbb..5dce17a2da 100644
--- a/creusot/tests/should_succeed/iterators/13_cloned/why3session.xml
+++ b/creusot/tests/should_succeed/iterators/13_cloned/why3session.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/creusot/tests/should_succeed/iterators/13_cloned/why3shapes.gz b/creusot/tests/should_succeed/iterators/13_cloned/why3shapes.gz
index 3eed97215b..1e5d8f8dd3 100644
Binary files a/creusot/tests/should_succeed/iterators/13_cloned/why3shapes.gz and b/creusot/tests/should_succeed/iterators/13_cloned/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/iterators/14_copied.mlcfg b/creusot/tests/should_succeed/iterators/14_copied.mlcfg
index f101739fda..a9cbb8ca4a 100644
--- a/creusot/tests/should_succeed/iterators/14_copied.mlcfg
+++ b/creusot/tests/should_succeed/iterators/14_copied.mlcfg
@@ -295,7 +295,7 @@ module C14Copied_Impl0_Next
ensures { result = completed1 self }
predicate completed0 [#"../14_copied.rs" 22 4 22 35] (self : borrowed (C14Copied_Copied_Type.t_copied i)) =
- [#"../14_copied.rs" 23 8 23 43] completed1 {current = C14Copied_Copied_Type.copied_iter ( * self); final = C14Copied_Copied_Type.copied_iter ( ^ self)}
+ [#"../14_copied.rs" 23 8 23 43] completed1 (Borrow.borrow_logic (C14Copied_Copied_Type.copied_iter ( * self)) (C14Copied_Copied_Type.copied_iter ( ^ self)) (Borrow.inherit_id (Borrow.get_id self) 1))
val completed0 [#"../14_copied.rs" 22 4 22 35] (self : borrowed (C14Copied_Copied_Type.t_copied i)) : bool
ensures { result = completed0 self }
@@ -336,8 +336,8 @@ module C14Copied_Impl0_Next
goto BB0
}
BB0 {
- [#"../14_copied.rs" 53 8 53 24] _4 <- Borrow.borrow_mut (C14Copied_Copied_Type.copied_iter ( * self));
- [#"../14_copied.rs" 53 8 53 24] self <- { self with current = (let C14Copied_Copied_Type.C_Copied x0 = * self in C14Copied_Copied_Type.C_Copied ( ^ _4)) };
+ [#"../14_copied.rs" 53 8 53 24] _4 <- Borrow.borrow_final (C14Copied_Copied_Type.copied_iter ( * self)) (Borrow.inherit_id (Borrow.get_id self) 1);
+ [#"../14_copied.rs" 53 8 53 24] self <- { self with current = (let C14Copied_Copied_Type.C_Copied x0 = * self in C14Copied_Copied_Type.C_Copied ( ^ _4)) ; };
assume { inv0 ( ^ _4) };
[#"../14_copied.rs" 53 8 53 24] _3 <- ([#"../14_copied.rs" 53 8 53 24] next0 _4);
_4 <- any borrowed i;
@@ -432,7 +432,7 @@ module C14Copied_Impl0
ensures { result = completed1 self }
predicate completed0 [#"../14_copied.rs" 22 4 22 35] (self : borrowed (C14Copied_Copied_Type.t_copied i)) =
- [#"../14_copied.rs" 23 8 23 43] completed1 {current = C14Copied_Copied_Type.copied_iter ( * self); final = C14Copied_Copied_Type.copied_iter ( ^ self)}
+ [#"../14_copied.rs" 23 8 23 43] completed1 (Borrow.borrow_logic (C14Copied_Copied_Type.copied_iter ( * self)) (C14Copied_Copied_Type.copied_iter ( ^ self)) (Borrow.inherit_id (Borrow.get_id self) 1))
val completed0 [#"../14_copied.rs" 22 4 22 35] (self : borrowed (C14Copied_Copied_Type.t_copied i)) : bool
ensures { result = completed0 self }
diff --git a/creusot/tests/should_succeed/iterators/14_copied/why3session.xml b/creusot/tests/should_succeed/iterators/14_copied/why3session.xml
index ec701e6900..2116119155 100644
--- a/creusot/tests/should_succeed/iterators/14_copied/why3session.xml
+++ b/creusot/tests/should_succeed/iterators/14_copied/why3session.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/creusot/tests/should_succeed/iterators/14_copied/why3shapes.gz b/creusot/tests/should_succeed/iterators/14_copied/why3shapes.gz
index 196f278a69..18cc43f568 100644
Binary files a/creusot/tests/should_succeed/iterators/14_copied/why3shapes.gz and b/creusot/tests/should_succeed/iterators/14_copied/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/iterators/15_enumerate.mlcfg b/creusot/tests/should_succeed/iterators/15_enumerate.mlcfg
index f4bee820aa..d359dc8122 100644
--- a/creusot/tests/should_succeed/iterators/15_enumerate.mlcfg
+++ b/creusot/tests/should_succeed/iterators/15_enumerate.mlcfg
@@ -357,7 +357,7 @@ module C15Enumerate_Impl0_Next
use seq.Seq
predicate completed0 [#"../15_enumerate.rs" 22 4 22 35] (self : borrowed (C15Enumerate_Enumerate_Type.t_enumerate i))
=
- [#"../15_enumerate.rs" 23 8 23 43] completed1 {current = C15Enumerate_Enumerate_Type.enumerate_iter ( * self); final = C15Enumerate_Enumerate_Type.enumerate_iter ( ^ self)}
+ [#"../15_enumerate.rs" 23 8 23 43] completed1 (Borrow.borrow_logic (C15Enumerate_Enumerate_Type.enumerate_iter ( * self)) (C15Enumerate_Enumerate_Type.enumerate_iter ( ^ self)) (Borrow.inherit_id (Borrow.get_id self) 1))
val completed0 [#"../15_enumerate.rs" 22 4 22 35] (self : borrowed (C15Enumerate_Enumerate_Type.t_enumerate i)) : bool
ensures { result = completed0 self }
@@ -398,8 +398,8 @@ module C15Enumerate_Impl0_Next
goto BB0
}
BB0 {
- [#"../15_enumerate.rs" 54 14 54 30] _4 <- Borrow.borrow_mut (C15Enumerate_Enumerate_Type.enumerate_iter ( * self));
- [#"../15_enumerate.rs" 54 14 54 30] self <- { self with current = (let C15Enumerate_Enumerate_Type.C_Enumerate x0 x1 = * self in C15Enumerate_Enumerate_Type.C_Enumerate ( ^ _4) x1) };
+ [#"../15_enumerate.rs" 54 14 54 30] _4 <- Borrow.borrow_final (C15Enumerate_Enumerate_Type.enumerate_iter ( * self)) (Borrow.inherit_id (Borrow.get_id self) 1);
+ [#"../15_enumerate.rs" 54 14 54 30] self <- { self with current = (let C15Enumerate_Enumerate_Type.C_Enumerate x0 x1 = * self in C15Enumerate_Enumerate_Type.C_Enumerate ( ^ _4) x1) ; };
assume { inv0 ( ^ _4) };
[#"../15_enumerate.rs" 54 14 54 30] _3 <- ([#"../15_enumerate.rs" 54 14 54 30] next0 _4);
_4 <- any borrowed i;
@@ -420,7 +420,7 @@ module C15Enumerate_Impl0_Next
assert { [@expl:type invariant] inv1 _3 };
assume { resolve0 _3 };
[#"../15_enumerate.rs" 57 24 57 34] n <- ([#"../15_enumerate.rs" 57 24 57 34] C15Enumerate_Enumerate_Type.enumerate_count ( * self));
- [#"../15_enumerate.rs" 58 16 58 31] self <- { self with current = (let C15Enumerate_Enumerate_Type.C_Enumerate x0 x1 = * self in C15Enumerate_Enumerate_Type.C_Enumerate x0 ([#"../15_enumerate.rs" 58 16 58 31] C15Enumerate_Enumerate_Type.enumerate_count ( * self) + ([#"../15_enumerate.rs" 58 30 58 31] [#"../15_enumerate.rs" 58 30 58 31] (1 : usize)))) };
+ [#"../15_enumerate.rs" 58 16 58 31] self <- { self with current = (let C15Enumerate_Enumerate_Type.C_Enumerate x0 x1 = * self in C15Enumerate_Enumerate_Type.C_Enumerate x0 ([#"../15_enumerate.rs" 58 16 58 31] C15Enumerate_Enumerate_Type.enumerate_count ( * self) + ([#"../15_enumerate.rs" 58 30 58 31] [#"../15_enumerate.rs" 58 30 58 31] (1 : usize)))) ; };
assert { [@expl:type invariant] inv2 self };
assume { resolve1 self };
goto BB6
@@ -672,7 +672,7 @@ module C15Enumerate_Impl0
use seq.Seq
predicate completed0 [#"../15_enumerate.rs" 22 4 22 35] (self : borrowed (C15Enumerate_Enumerate_Type.t_enumerate i))
=
- [#"../15_enumerate.rs" 23 8 23 43] completed1 {current = C15Enumerate_Enumerate_Type.enumerate_iter ( * self); final = C15Enumerate_Enumerate_Type.enumerate_iter ( ^ self)}
+ [#"../15_enumerate.rs" 23 8 23 43] completed1 (Borrow.borrow_logic (C15Enumerate_Enumerate_Type.enumerate_iter ( * self)) (C15Enumerate_Enumerate_Type.enumerate_iter ( ^ self)) (Borrow.inherit_id (Borrow.get_id self) 1))
val completed0 [#"../15_enumerate.rs" 22 4 22 35] (self : borrowed (C15Enumerate_Enumerate_Type.t_enumerate i)) : bool
ensures { result = completed0 self }
diff --git a/creusot/tests/should_succeed/iterators/15_enumerate/why3session.xml b/creusot/tests/should_succeed/iterators/15_enumerate/why3session.xml
index dbd8c63b2a..f17ddf67a3 100644
--- a/creusot/tests/should_succeed/iterators/15_enumerate/why3session.xml
+++ b/creusot/tests/should_succeed/iterators/15_enumerate/why3session.xml
@@ -8,43 +8,43 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/creusot/tests/should_succeed/iterators/15_enumerate/why3shapes.gz b/creusot/tests/should_succeed/iterators/15_enumerate/why3shapes.gz
index f6baf22220..31edfbf73f 100644
Binary files a/creusot/tests/should_succeed/iterators/15_enumerate/why3shapes.gz and b/creusot/tests/should_succeed/iterators/15_enumerate/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/iterators/16_take.mlcfg b/creusot/tests/should_succeed/iterators/16_take.mlcfg
index 09235defd8..aeedfb0b9d 100644
--- a/creusot/tests/should_succeed/iterators/16_take.mlcfg
+++ b/creusot/tests/should_succeed/iterators/16_take.mlcfg
@@ -272,7 +272,7 @@ module C16Take_Impl0_Next
ensures { result = resolve0 self }
predicate completed0 [#"../16_take.rs" 22 4 22 35] (self : borrowed (C16Take_Take_Type.t_take i)) =
- [#"../16_take.rs" 23 8 26 9] UIntSize.to_int (C16Take_Take_Type.take_n ( * self)) = 0 /\ resolve0 self \/ UIntSize.to_int (C16Take_Take_Type.take_n ( * self)) > 0 /\ UIntSize.to_int (C16Take_Take_Type.take_n ( * self)) = UIntSize.to_int (C16Take_Take_Type.take_n ( ^ self)) + 1 /\ completed1 {current = C16Take_Take_Type.take_iter ( * self); final = C16Take_Take_Type.take_iter ( ^ self)}
+ [#"../16_take.rs" 23 8 26 9] UIntSize.to_int (C16Take_Take_Type.take_n ( * self)) = 0 /\ resolve0 self \/ UIntSize.to_int (C16Take_Take_Type.take_n ( * self)) > 0 /\ UIntSize.to_int (C16Take_Take_Type.take_n ( * self)) = UIntSize.to_int (C16Take_Take_Type.take_n ( ^ self)) + 1 /\ completed1 (Borrow.borrow_logic (C16Take_Take_Type.take_iter ( * self)) (C16Take_Take_Type.take_iter ( ^ self)) (Borrow.inherit_id (Borrow.get_id self) 1))
val completed0 [#"../16_take.rs" 22 4 22 35] (self : borrowed (C16Take_Take_Type.t_take i)) : bool
ensures { result = completed0 self }
@@ -307,9 +307,9 @@ module C16Take_Impl0_Next
end
}
BB1 {
- [#"../16_take.rs" 55 12 55 23] self <- { self with current = (let C16Take_Take_Type.C_Take x0 x1 = * self in C16Take_Take_Type.C_Take x0 ([#"../16_take.rs" 55 12 55 23] C16Take_Take_Type.take_n ( * self) - ([#"../16_take.rs" 55 22 55 23] [#"../16_take.rs" 55 22 55 23] (1 : usize)))) };
- [#"../16_take.rs" 56 12 56 28] _5 <- Borrow.borrow_mut (C16Take_Take_Type.take_iter ( * self));
- [#"../16_take.rs" 56 12 56 28] self <- { self with current = (let C16Take_Take_Type.C_Take x0 x1 = * self in C16Take_Take_Type.C_Take ( ^ _5) x1) };
+ [#"../16_take.rs" 55 12 55 23] self <- { self with current = (let C16Take_Take_Type.C_Take x0 x1 = * self in C16Take_Take_Type.C_Take x0 ([#"../16_take.rs" 55 12 55 23] C16Take_Take_Type.take_n ( * self) - ([#"../16_take.rs" 55 22 55 23] [#"../16_take.rs" 55 22 55 23] (1 : usize)))) ; };
+ [#"../16_take.rs" 56 12 56 28] _5 <- Borrow.borrow_final (C16Take_Take_Type.take_iter ( * self)) (Borrow.inherit_id (Borrow.get_id self) 1);
+ [#"../16_take.rs" 56 12 56 28] self <- { self with current = (let C16Take_Take_Type.C_Take x0 x1 = * self in C16Take_Take_Type.C_Take ( ^ _5) x1) ; };
assume { inv1 ( ^ _5) };
[#"../16_take.rs" 56 12 56 28] _0 <- ([#"../16_take.rs" 56 12 56 28] next0 _5);
_5 <- any borrowed i;
@@ -402,7 +402,7 @@ module C16Take_Impl0
ensures { result = resolve0 self }
predicate completed0 [#"../16_take.rs" 22 4 22 35] (self : borrowed (C16Take_Take_Type.t_take i)) =
- [#"../16_take.rs" 23 8 26 9] UIntSize.to_int (C16Take_Take_Type.take_n ( * self)) = 0 /\ resolve0 self \/ UIntSize.to_int (C16Take_Take_Type.take_n ( * self)) > 0 /\ UIntSize.to_int (C16Take_Take_Type.take_n ( * self)) = UIntSize.to_int (C16Take_Take_Type.take_n ( ^ self)) + 1 /\ completed1 {current = C16Take_Take_Type.take_iter ( * self); final = C16Take_Take_Type.take_iter ( ^ self)}
+ [#"../16_take.rs" 23 8 26 9] UIntSize.to_int (C16Take_Take_Type.take_n ( * self)) = 0 /\ resolve0 self \/ UIntSize.to_int (C16Take_Take_Type.take_n ( * self)) > 0 /\ UIntSize.to_int (C16Take_Take_Type.take_n ( * self)) = UIntSize.to_int (C16Take_Take_Type.take_n ( ^ self)) + 1 /\ completed1 (Borrow.borrow_logic (C16Take_Take_Type.take_iter ( * self)) (C16Take_Take_Type.take_iter ( ^ self)) (Borrow.inherit_id (Borrow.get_id self) 1))
val completed0 [#"../16_take.rs" 22 4 22 35] (self : borrowed (C16Take_Take_Type.t_take i)) : bool
ensures { result = completed0 self }
diff --git a/creusot/tests/should_succeed/iterators/16_take/why3session.xml b/creusot/tests/should_succeed/iterators/16_take/why3session.xml
index ff622322af..75950ea431 100644
--- a/creusot/tests/should_succeed/iterators/16_take/why3session.xml
+++ b/creusot/tests/should_succeed/iterators/16_take/why3session.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/creusot/tests/should_succeed/iterators/16_take/why3shapes.gz b/creusot/tests/should_succeed/iterators/16_take/why3shapes.gz
index 85972eb423..e24d940770 100644
Binary files a/creusot/tests/should_succeed/iterators/16_take/why3shapes.gz and b/creusot/tests/should_succeed/iterators/16_take/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/knapsack.mlcfg b/creusot/tests/should_succeed/knapsack.mlcfg
index 5b6fe5dc4b..f98c6ee3ef 100644
--- a/creusot/tests/should_succeed/knapsack.mlcfg
+++ b/creusot/tests/should_succeed/knapsack.mlcfg
@@ -779,14 +779,14 @@ module Knapsack_Knapsack01Dyn
goto BB31
}
BB31 {
- [#"../knapsack.rs" 77 12 77 29] _67 <- Borrow.borrow_mut ( * _68);
- [#"../knapsack.rs" 77 12 77 29] _68 <- { _68 with current = ^ _67 };
+ [#"../knapsack.rs" 77 12 77 29] _67 <- Borrow.borrow_final ( * _68) (Borrow.get_id _68);
+ [#"../knapsack.rs" 77 12 77 29] _68 <- { _68 with current = ( ^ _67) ; };
[#"../knapsack.rs" 77 12 77 32] _66 <- ([#"../knapsack.rs" 77 12 77 32] index_mut1 _67 ([#"../knapsack.rs" 77 30 77 31] w));
_67 <- any borrowed (Alloc_Vec_Vec_Type.t_vec usize (Alloc_Alloc_Global_Type.t_global));
goto BB32
}
BB32 {
- [#"../knapsack.rs" 77 12 81 13] _66 <- { _66 with current = ([#"../knapsack.rs" 77 12 81 13] _38) };
+ [#"../knapsack.rs" 77 12 81 13] _66 <- { _66 with current = ([#"../knapsack.rs" 77 12 81 13] _38) ; };
[#"../knapsack.rs" 77 12 81 13] _38 <- any usize;
assume { resolve3 _66 };
assume { resolve4 _68 };
diff --git a/creusot/tests/should_succeed/knapsack/why3session.xml b/creusot/tests/should_succeed/knapsack/why3session.xml
index bd50be6250..001974b63d 100644
--- a/creusot/tests/should_succeed/knapsack/why3session.xml
+++ b/creusot/tests/should_succeed/knapsack/why3session.xml
@@ -13,7 +13,7 @@
-
+
@@ -29,11 +29,11 @@
-
+
-
+
@@ -43,14 +43,14 @@
-
+
-
-
+
+
-
+
@@ -63,14 +63,14 @@
-
+
-
+
@@ -83,7 +83,7 @@
-
+
@@ -93,7 +93,7 @@
-
+
@@ -105,18 +105,18 @@
-
+
-
+
-
+
-
+
@@ -126,7 +126,7 @@
-
+
@@ -145,14 +145,14 @@
-
+
-
+
-
+
@@ -165,10 +165,10 @@
-
+
-
+
@@ -177,49 +177,49 @@
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
@@ -229,7 +229,7 @@
-
+
@@ -254,32 +254,32 @@
-
-
+
+
-
+
-
+
-
+
-
+
-
+
@@ -292,16 +292,16 @@
-
+
-
+
-
-
+
+
@@ -313,8 +313,8 @@
-
-
+
+
diff --git a/creusot/tests/should_succeed/knapsack/why3shapes.gz b/creusot/tests/should_succeed/knapsack/why3shapes.gz
index c3ca6f5b71..518f1a88cf 100644
Binary files a/creusot/tests/should_succeed/knapsack/why3shapes.gz and b/creusot/tests/should_succeed/knapsack/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/knapsack_full.mlcfg b/creusot/tests/should_succeed/knapsack_full.mlcfg
index c2237d0fc7..d6a06c9366 100644
--- a/creusot/tests/should_succeed/knapsack_full.mlcfg
+++ b/creusot/tests/should_succeed/knapsack_full.mlcfg
@@ -1152,8 +1152,8 @@ module KnapsackFull_Knapsack01Dyn
BB13 {
[#"../knapsack_full.rs" 88 4 88 55] _34 <- Borrow.borrow_mut iter;
[#"../knapsack_full.rs" 88 4 88 55] iter <- ^ _34;
- [#"../knapsack_full.rs" 88 4 88 55] _33 <- Borrow.borrow_mut ( * _34);
- [#"../knapsack_full.rs" 88 4 88 55] _34 <- { _34 with current = ^ _33 };
+ [#"../knapsack_full.rs" 88 4 88 55] _33 <- Borrow.borrow_final ( * _34) (Borrow.get_id _34);
+ [#"../knapsack_full.rs" 88 4 88 55] _34 <- { _34 with current = ( ^ _33) ; };
[#"../knapsack_full.rs" 88 4 88 55] _32 <- ([#"../knapsack_full.rs" 88 4 88 55] next0 _33);
_33 <- any borrowed (Core_Ops_Range_Range_Type.t_range usize);
goto BB14
@@ -1239,8 +1239,8 @@ module KnapsackFull_Knapsack01Dyn
BB31 {
[#"../knapsack_full.rs" 98 8 98 59] _60 <- Borrow.borrow_mut iter1;
[#"../knapsack_full.rs" 98 8 98 59] iter1 <- ^ _60;
- [#"../knapsack_full.rs" 98 8 98 59] _59 <- Borrow.borrow_mut ( * _60);
- [#"../knapsack_full.rs" 98 8 98 59] _60 <- { _60 with current = ^ _59 };
+ [#"../knapsack_full.rs" 98 8 98 59] _59 <- Borrow.borrow_final ( * _60) (Borrow.get_id _60);
+ [#"../knapsack_full.rs" 98 8 98 59] _60 <- { _60 with current = ( ^ _59) ; };
[#"../knapsack_full.rs" 98 8 98 59] _58 <- ([#"../knapsack_full.rs" 98 8 98 59] next1 _59);
_59 <- any borrowed (Core_Ops_Range_RangeInclusive_Type.t_rangeinclusive usize);
goto BB32
@@ -1318,14 +1318,14 @@ module KnapsackFull_Knapsack01Dyn
goto BB47
}
BB47 {
- [#"../knapsack_full.rs" 111 12 111 29] _95 <- Borrow.borrow_mut ( * _96);
- [#"../knapsack_full.rs" 111 12 111 29] _96 <- { _96 with current = ^ _95 };
+ [#"../knapsack_full.rs" 111 12 111 29] _95 <- Borrow.borrow_final ( * _96) (Borrow.get_id _96);
+ [#"../knapsack_full.rs" 111 12 111 29] _96 <- { _96 with current = ( ^ _95) ; };
[#"../knapsack_full.rs" 111 12 111 32] _94 <- ([#"../knapsack_full.rs" 111 12 111 32] index_mut1 _95 ([#"../knapsack_full.rs" 111 30 111 31] w));
_95 <- any borrowed (Alloc_Vec_Vec_Type.t_vec usize (Alloc_Alloc_Global_Type.t_global));
goto BB48
}
BB48 {
- [#"../knapsack_full.rs" 111 12 115 13] _94 <- { _94 with current = ([#"../knapsack_full.rs" 111 12 115 13] _66) };
+ [#"../knapsack_full.rs" 111 12 115 13] _94 <- { _94 with current = ([#"../knapsack_full.rs" 111 12 115 13] _66) ; };
[#"../knapsack_full.rs" 111 12 115 13] _66 <- any usize;
assume { resolve3 _94 };
assume { resolve4 _96 };
diff --git a/creusot/tests/should_succeed/knapsack_full/why3session.xml b/creusot/tests/should_succeed/knapsack_full/why3session.xml
index 751b788275..c041741ee2 100644
--- a/creusot/tests/should_succeed/knapsack_full/why3session.xml
+++ b/creusot/tests/should_succeed/knapsack_full/why3session.xml
@@ -51,16 +51,16 @@
-
+
-
+
-
+
@@ -72,312 +72,315 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
diff --git a/creusot/tests/should_succeed/knapsack_full/why3shapes.gz b/creusot/tests/should_succeed/knapsack_full/why3shapes.gz
index 6b25542f0e..e3fe9c20d3 100644
Binary files a/creusot/tests/should_succeed/knapsack_full/why3shapes.gz and b/creusot/tests/should_succeed/knapsack_full/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/lang/branch_borrow_2.mlcfg b/creusot/tests/should_succeed/lang/branch_borrow_2.mlcfg
index 3836180856..1314a133cb 100644
--- a/creusot/tests/should_succeed/lang/branch_borrow_2.mlcfg
+++ b/creusot/tests/should_succeed/lang/branch_borrow_2.mlcfg
@@ -49,9 +49,9 @@ module BranchBorrow2_F
goto BB5
}
BB3 {
- [#"../branch_borrow_2.rs" 23 12 23 18] z <- { z with current = ([#"../branch_borrow_2.rs" 23 12 23 18] [#"../branch_borrow_2.rs" 23 17 23 18] (8 : int32)) };
- [#"../branch_borrow_2.rs" 24 16 24 17] _12 <- Borrow.borrow_mut ( * z);
- [#"../branch_borrow_2.rs" 24 16 24 17] z <- { z with current = ^ _12 };
+ [#"../branch_borrow_2.rs" 23 12 23 18] z <- { z with current = ([#"../branch_borrow_2.rs" 23 12 23 18] [#"../branch_borrow_2.rs" 23 17 23 18] (8 : int32)) ; };
+ [#"../branch_borrow_2.rs" 24 16 24 17] _12 <- Borrow.borrow_final ( * z) (Borrow.get_id z);
+ [#"../branch_borrow_2.rs" 24 16 24 17] z <- { z with current = ( ^ _12) ; };
[#"../branch_borrow_2.rs" 24 12 24 17] w <- ([#"../branch_borrow_2.rs" 24 12 24 17] _12);
[#"../branch_borrow_2.rs" 24 12 24 17] _12 <- any borrowed int32;
[#"../branch_borrow_2.rs" 22 13 25 9] _8 <- ([#"../branch_borrow_2.rs" 22 13 25 9] ());
@@ -60,7 +60,7 @@ module BranchBorrow2_F
BB4 {
assume { resolve0 z };
assume { resolve0 y };
- [#"../branch_borrow_2.rs" 15 12 15 18] x <- { x with current = ([#"../branch_borrow_2.rs" 15 12 15 18] [#"../branch_borrow_2.rs" 15 17 15 18] (6 : int32)) };
+ [#"../branch_borrow_2.rs" 15 12 15 18] x <- { x with current = ([#"../branch_borrow_2.rs" 15 12 15 18] [#"../branch_borrow_2.rs" 15 17 15 18] (6 : int32)) ; };
[#"../branch_borrow_2.rs" 16 12 16 17] w <- ([#"../branch_borrow_2.rs" 16 16 16 17] x);
[#"../branch_borrow_2.rs" 16 16 16 17] x <- any borrowed int32;
[#"../branch_borrow_2.rs" 14 13 17 9] _8 <- ([#"../branch_borrow_2.rs" 14 13 17 9] ());
@@ -68,16 +68,16 @@ module BranchBorrow2_F
}
BB5 {
assume { resolve0 z };
- [#"../branch_borrow_2.rs" 19 12 19 18] y <- { y with current = ([#"../branch_borrow_2.rs" 19 12 19 18] [#"../branch_borrow_2.rs" 19 17 19 18] (7 : int32)) };
- [#"../branch_borrow_2.rs" 20 16 20 17] _11 <- Borrow.borrow_mut ( * y);
- [#"../branch_borrow_2.rs" 20 16 20 17] y <- { y with current = ^ _11 };
+ [#"../branch_borrow_2.rs" 19 12 19 18] y <- { y with current = ([#"../branch_borrow_2.rs" 19 12 19 18] [#"../branch_borrow_2.rs" 19 17 19 18] (7 : int32)) ; };
+ [#"../branch_borrow_2.rs" 20 16 20 17] _11 <- Borrow.borrow_final ( * y) (Borrow.get_id y);
+ [#"../branch_borrow_2.rs" 20 16 20 17] y <- { y with current = ( ^ _11) ; };
[#"../branch_borrow_2.rs" 20 12 20 17] w <- ([#"../branch_borrow_2.rs" 20 12 20 17] _11);
[#"../branch_borrow_2.rs" 20 12 20 17] _11 <- any borrowed int32;
[#"../branch_borrow_2.rs" 18 13 21 9] _8 <- ([#"../branch_borrow_2.rs" 18 13 21 9] ());
goto BB6
}
BB6 {
- [#"../branch_borrow_2.rs" 28 4 28 10] w <- { w with current = ([#"../branch_borrow_2.rs" 28 4 28 10] [#"../branch_borrow_2.rs" 28 9 28 10] (5 : int32)) };
+ [#"../branch_borrow_2.rs" 28 4 28 10] w <- { w with current = ([#"../branch_borrow_2.rs" 28 4 28 10] [#"../branch_borrow_2.rs" 28 9 28 10] (5 : int32)) ; };
assume { resolve0 w };
assume { resolve0 z };
assume { resolve0 y };
@@ -159,10 +159,10 @@ module BranchBorrow2_G
[#"../branch_borrow_2.rs" 36 16 36 37] a <- ([#"../branch_borrow_2.rs" 36 16 36 37] (([#"../branch_borrow_2.rs" 36 17 36 26] BranchBorrow2_MyInt_Type.C_MyInt ([#"../branch_borrow_2.rs" 36 23 36 25] [#"../branch_borrow_2.rs" 36 23 36 25] (10 : usize))), ([#"../branch_borrow_2.rs" 36 28 36 36] BranchBorrow2_MyInt_Type.C_MyInt ([#"../branch_borrow_2.rs" 36 34 36 35] [#"../branch_borrow_2.rs" 36 34 36 35] (5 : usize)))));
[#"../branch_borrow_2.rs" 37 12 37 18] b <- Borrow.borrow_mut a;
[#"../branch_borrow_2.rs" 37 12 37 18] a <- ^ b;
- [#"../branch_borrow_2.rs" 39 12 39 20] c <- Borrow.borrow_mut (let (_, a) = * b in a);
- [#"../branch_borrow_2.rs" 39 12 39 20] b <- { b with current = (let (x0, x1) = * b in (x0, ^ c)) };
- [#"../branch_borrow_2.rs" 40 12 40 20] d <- Borrow.borrow_mut (let (a, _) = * b in a);
- [#"../branch_borrow_2.rs" 40 12 40 20] b <- { b with current = (let (x0, x1) = * b in ( ^ d, x1)) };
+ [#"../branch_borrow_2.rs" 39 12 39 20] c <- Borrow.borrow_final (let (_, a) = * b in a) (Borrow.inherit_id (Borrow.get_id b) 2);
+ [#"../branch_borrow_2.rs" 39 12 39 20] b <- { b with current = (let (x0, x1) = * b in (x0, ^ c)) ; };
+ [#"../branch_borrow_2.rs" 40 12 40 20] d <- Borrow.borrow_final (let (a, _) = * b in a) (Borrow.inherit_id (Borrow.get_id b) 1);
+ [#"../branch_borrow_2.rs" 40 12 40 20] b <- { b with current = (let (x0, x1) = * b in ( ^ d, x1)) ; };
assume { resolve0 c };
assume { resolve0 d };
assume { resolve1 b };
@@ -208,7 +208,7 @@ module BranchBorrow2_H
}
BB1 {
assume { resolve0 y };
- [#"../branch_borrow_2.rs" 53 8 53 14] x <- { x with current = ([#"../branch_borrow_2.rs" 53 8 53 14] [#"../branch_borrow_2.rs" 53 13 53 14] (5 : int32)) };
+ [#"../branch_borrow_2.rs" 53 8 53 14] x <- { x with current = ([#"../branch_borrow_2.rs" 53 8 53 14] [#"../branch_borrow_2.rs" 53 13 53 14] (5 : int32)) ; };
[#"../branch_borrow_2.rs" 54 8 54 13] w <- ([#"../branch_borrow_2.rs" 54 12 54 13] x);
[#"../branch_borrow_2.rs" 54 12 54 13] x <- any borrowed int32;
[#"../branch_borrow_2.rs" 52 12 55 5] _6 <- ([#"../branch_borrow_2.rs" 52 12 55 5] ());
@@ -216,9 +216,9 @@ module BranchBorrow2_H
}
BB2 {
assume { resolve0 x };
- [#"../branch_borrow_2.rs" 56 8 56 14] y <- { y with current = ([#"../branch_borrow_2.rs" 56 8 56 14] [#"../branch_borrow_2.rs" 56 13 56 14] (6 : int32)) };
- [#"../branch_borrow_2.rs" 57 12 57 13] _9 <- Borrow.borrow_mut ( * y);
- [#"../branch_borrow_2.rs" 57 12 57 13] y <- { y with current = ^ _9 };
+ [#"../branch_borrow_2.rs" 56 8 56 14] y <- { y with current = ([#"../branch_borrow_2.rs" 56 8 56 14] [#"../branch_borrow_2.rs" 56 13 56 14] (6 : int32)) ; };
+ [#"../branch_borrow_2.rs" 57 12 57 13] _9 <- Borrow.borrow_final ( * y) (Borrow.get_id y);
+ [#"../branch_borrow_2.rs" 57 12 57 13] y <- { y with current = ( ^ _9) ; };
[#"../branch_borrow_2.rs" 57 8 57 13] w <- ([#"../branch_borrow_2.rs" 57 8 57 13] _9);
[#"../branch_borrow_2.rs" 57 8 57 13] _9 <- any borrowed int32;
[#"../branch_borrow_2.rs" 55 11 60 5] _6 <- ([#"../branch_borrow_2.rs" 55 11 60 5] ());
diff --git a/creusot/tests/should_succeed/lang/move_path.mlcfg b/creusot/tests/should_succeed/lang/move_path.mlcfg
index 3532e951e0..bebe98b778 100644
--- a/creusot/tests/should_succeed/lang/move_path.mlcfg
+++ b/creusot/tests/should_succeed/lang/move_path.mlcfg
@@ -26,7 +26,7 @@ module MovePath_F
[#"../move_path.rs" 7 12 7 13] y <- any borrowed int32;
[#"../move_path.rs" 8 12 8 13] z <- ([#"../move_path.rs" 8 12 8 13] d);
[#"../move_path.rs" 8 12 8 13] d <- any borrowed int32;
- [#"../move_path.rs" 10 12 10 18] z <- { z with current = ([#"../move_path.rs" 10 12 10 18] [#"../move_path.rs" 10 17 10 18] (2 : int32)) };
+ [#"../move_path.rs" 10 12 10 18] z <- { z with current = ([#"../move_path.rs" 10 12 10 18] [#"../move_path.rs" 10 17 10 18] (2 : int32)) ; };
assume { resolve0 z };
[#"../move_path.rs" 3 11 15 1] _0 <- ([#"../move_path.rs" 3 11 15 1] ());
return _0
diff --git a/creusot/tests/should_succeed/lang/while_let.mlcfg b/creusot/tests/should_succeed/lang/while_let.mlcfg
index 3a9c3032b5..ed500058c6 100644
--- a/creusot/tests/should_succeed/lang/while_let.mlcfg
+++ b/creusot/tests/should_succeed/lang/while_let.mlcfg
@@ -43,7 +43,7 @@ module WhileLet_F
goto BB4
}
BB4 {
- [#"../while_let.rs" 10 8 10 17] b <- { b with current = ([#"../while_let.rs" 10 13 10 17] Core_Option_Option_Type.C_None) };
+ [#"../while_let.rs" 10 8 10 17] b <- { b with current = ([#"../while_let.rs" 10 13 10 17] Core_Option_Option_Type.C_None) ; };
goto BB1
}
BB5 {
diff --git a/creusot/tests/should_succeed/lang/while_let/why3shapes.gz b/creusot/tests/should_succeed/lang/while_let/why3shapes.gz
index 3f9ec8fa75..615bc29ba7 100644
Binary files a/creusot/tests/should_succeed/lang/while_let/why3shapes.gz and b/creusot/tests/should_succeed/lang/while_let/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/list_index_mut.mlcfg b/creusot/tests/should_succeed/list_index_mut.mlcfg
index 8aae0b348d..45b8d6c7c1 100644
--- a/creusot/tests/should_succeed/list_index_mut.mlcfg
+++ b/creusot/tests/should_succeed/list_index_mut.mlcfg
@@ -172,8 +172,8 @@ module ListIndexMut_IndexMut
end
}
BB5 {
- [#"../list_index_mut.rs" 50 12 50 24] _25 <- Borrow.borrow_mut (ListIndexMut_List_Type.list_1 ( * l));
- [#"../list_index_mut.rs" 50 12 50 24] l <- { l with current = (let ListIndexMut_List_Type.C_List x0 x1 = * l in ListIndexMut_List_Type.C_List x0 ( ^ _25)) };
+ [#"../list_index_mut.rs" 50 12 50 24] _25 <- Borrow.borrow_final (ListIndexMut_List_Type.list_1 ( * l)) (Borrow.inherit_id (Borrow.get_id l) 2);
+ [#"../list_index_mut.rs" 50 12 50 24] l <- { l with current = (let ListIndexMut_List_Type.C_List x0 x1 = * l in ListIndexMut_List_Type.C_List x0 ( ^ _25)) ; };
[#"../list_index_mut.rs" 50 12 50 24] _24 <- ([#"../list_index_mut.rs" 50 12 50 24] as_mut0 _25);
_25 <- any borrowed (Core_Option_Option_Type.t_option (ListIndexMut_List_Type.t_list));
goto BB6
@@ -185,7 +185,7 @@ module ListIndexMut_IndexMut
}
BB7 {
[#"../list_index_mut.rs" 50 12 50 33] _22 <- Borrow.borrow_mut ( * _23);
- [#"../list_index_mut.rs" 50 12 50 33] _23 <- { _23 with current = ^ _22 };
+ [#"../list_index_mut.rs" 50 12 50 33] _23 <- { _23 with current = ( ^ _22) ; };
assume { resolve1 l };
[#"../list_index_mut.rs" 50 8 50 33] l <- ([#"../list_index_mut.rs" 50 8 50 33] _22);
[#"../list_index_mut.rs" 50 8 50 33] _22 <- any borrowed (ListIndexMut_List_Type.t_list);
@@ -194,12 +194,12 @@ module ListIndexMut_IndexMut
goto BB3
}
BB8 {
- [#"../list_index_mut.rs" 55 4 55 12] _29 <- Borrow.borrow_mut (ListIndexMut_List_Type.list_0 ( * l));
- [#"../list_index_mut.rs" 55 4 55 12] l <- { l with current = (let ListIndexMut_List_Type.C_List x0 x1 = * l in ListIndexMut_List_Type.C_List ( ^ _29) x1) };
- [#"../list_index_mut.rs" 55 4 55 12] _3 <- Borrow.borrow_mut ( * _29);
- [#"../list_index_mut.rs" 55 4 55 12] _29 <- { _29 with current = ^ _3 };
- [#"../list_index_mut.rs" 55 4 55 12] _0 <- Borrow.borrow_mut ( * _3);
- [#"../list_index_mut.rs" 55 4 55 12] _3 <- { _3 with current = ^ _0 };
+ [#"../list_index_mut.rs" 55 4 55 12] _29 <- Borrow.borrow_final (ListIndexMut_List_Type.list_0 ( * l)) (Borrow.inherit_id (Borrow.get_id l) 1);
+ [#"../list_index_mut.rs" 55 4 55 12] l <- { l with current = (let ListIndexMut_List_Type.C_List x0 x1 = * l in ListIndexMut_List_Type.C_List ( ^ _29) x1) ; };
+ [#"../list_index_mut.rs" 55 4 55 12] _3 <- Borrow.borrow_final ( * _29) (Borrow.get_id _29);
+ [#"../list_index_mut.rs" 55 4 55 12] _29 <- { _29 with current = ( ^ _3) ; };
+ [#"../list_index_mut.rs" 55 4 55 12] _0 <- Borrow.borrow_final ( * _3) (Borrow.get_id _3);
+ [#"../list_index_mut.rs" 55 4 55 12] _3 <- { _3 with current = ( ^ _0) ; };
assume { resolve0 _29 };
assume { resolve0 _3 };
assume { resolve1 l };
@@ -271,14 +271,14 @@ module ListIndexMut_Write
goto BB0
}
BB0 {
- [#"../list_index_mut.rs" 64 15 64 16] _10 <- Borrow.borrow_mut ( * l);
- [#"../list_index_mut.rs" 64 15 64 16] l <- { l with current = ^ _10 };
+ [#"../list_index_mut.rs" 64 15 64 16] _10 <- Borrow.borrow_final ( * l) (Borrow.get_id l);
+ [#"../list_index_mut.rs" 64 15 64 16] l <- { l with current = ( ^ _10) ; };
[#"../list_index_mut.rs" 64 5 64 21] _9 <- ([#"../list_index_mut.rs" 64 5 64 21] index_mut0 _10 ([#"../list_index_mut.rs" 64 18 64 20] ix));
_10 <- any borrowed (ListIndexMut_List_Type.t_list);
goto BB1
}
BB1 {
- [#"../list_index_mut.rs" 64 4 64 25] _9 <- { _9 with current = ([#"../list_index_mut.rs" 64 24 64 25] v) };
+ [#"../list_index_mut.rs" 64 4 64 25] _9 <- { _9 with current = ([#"../list_index_mut.rs" 64 24 64 25] v) ; };
assume { resolve0 _9 };
assume { resolve1 l };
[#"../list_index_mut.rs" 63 46 65 1] _0 <- ([#"../list_index_mut.rs" 63 46 65 1] ());
@@ -353,8 +353,8 @@ module ListIndexMut_F
BB4 {
[#"../list_index_mut.rs" 69 10 69 16] _8 <- Borrow.borrow_mut l;
[#"../list_index_mut.rs" 69 10 69 16] l <- ^ _8;
- [#"../list_index_mut.rs" 69 10 69 16] _7 <- Borrow.borrow_mut ( * _8);
- [#"../list_index_mut.rs" 69 10 69 16] _8 <- { _8 with current = ^ _7 };
+ [#"../list_index_mut.rs" 69 10 69 16] _7 <- Borrow.borrow_final ( * _8) (Borrow.get_id _8);
+ [#"../list_index_mut.rs" 69 10 69 16] _8 <- { _8 with current = ( ^ _7) ; };
[#"../list_index_mut.rs" 69 4 69 23] _6 <- ([#"../list_index_mut.rs" 69 4 69 23] write0 _7 ([#"../list_index_mut.rs" 69 18 69 19] [#"../list_index_mut.rs" 69 18 69 19] (0 : usize)) ([#"../list_index_mut.rs" 69 21 69 22] [#"../list_index_mut.rs" 69 21 69 22] (2 : uint32)));
_7 <- any borrowed (ListIndexMut_List_Type.t_list);
goto BB5
diff --git a/creusot/tests/should_succeed/list_index_mut/why3session.xml b/creusot/tests/should_succeed/list_index_mut/why3session.xml
index c83a660b13..c3ba9246eb 100644
--- a/creusot/tests/should_succeed/list_index_mut/why3session.xml
+++ b/creusot/tests/should_succeed/list_index_mut/why3session.xml
@@ -7,17 +7,17 @@
-
+
-
+
-
+
diff --git a/creusot/tests/should_succeed/list_index_mut/why3shapes.gz b/creusot/tests/should_succeed/list_index_mut/why3shapes.gz
index 6dddbd1ae4..87654b51d6 100644
Binary files a/creusot/tests/should_succeed/list_index_mut/why3shapes.gz and b/creusot/tests/should_succeed/list_index_mut/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/list_reversal_lasso.mlcfg b/creusot/tests/should_succeed/list_reversal_lasso.mlcfg
index 7b2aad2834..b28584ceec 100644
--- a/creusot/tests/should_succeed/list_reversal_lasso.mlcfg
+++ b/creusot/tests/should_succeed/list_reversal_lasso.mlcfg
@@ -341,19 +341,19 @@ module ListReversalLasso_Impl2_IndexMut
goto BB0
}
BB0 {
- [#"../list_reversal_lasso.rs" 42 13 42 19] _11 <- Borrow.borrow_mut (ListReversalLasso_Memory_Type.memory_0 ( * self));
- [#"../list_reversal_lasso.rs" 42 13 42 19] self <- { self with current = (let ListReversalLasso_Memory_Type.C_Memory x0 = * self in ListReversalLasso_Memory_Type.C_Memory ( ^ _11)) };
+ [#"../list_reversal_lasso.rs" 42 13 42 19] _11 <- Borrow.borrow_final (ListReversalLasso_Memory_Type.memory_0 ( * self)) (Borrow.inherit_id (Borrow.get_id self) 1);
+ [#"../list_reversal_lasso.rs" 42 13 42 19] self <- { self with current = (let ListReversalLasso_Memory_Type.C_Memory x0 = * self in ListReversalLasso_Memory_Type.C_Memory ( ^ _11)) ; };
[#"../list_reversal_lasso.rs" 42 13 42 22] _10 <- ([#"../list_reversal_lasso.rs" 42 13 42 22] index_mut0 _11 ([#"../list_reversal_lasso.rs" 42 20 42 21] i));
_11 <- any borrowed (Alloc_Vec_Vec_Type.t_vec usize (Alloc_Alloc_Global_Type.t_global));
goto BB1
}
BB1 {
- [#"../list_reversal_lasso.rs" 42 8 42 22] _9 <- Borrow.borrow_mut ( * _10);
- [#"../list_reversal_lasso.rs" 42 8 42 22] _10 <- { _10 with current = ^ _9 };
- [#"../list_reversal_lasso.rs" 42 8 42 22] _3 <- Borrow.borrow_mut ( * _9);
- [#"../list_reversal_lasso.rs" 42 8 42 22] _9 <- { _9 with current = ^ _3 };
- [#"../list_reversal_lasso.rs" 42 8 42 22] _0 <- Borrow.borrow_mut ( * _3);
- [#"../list_reversal_lasso.rs" 42 8 42 22] _3 <- { _3 with current = ^ _0 };
+ [#"../list_reversal_lasso.rs" 42 8 42 22] _9 <- Borrow.borrow_final ( * _10) (Borrow.get_id _10);
+ [#"../list_reversal_lasso.rs" 42 8 42 22] _10 <- { _10 with current = ( ^ _9) ; };
+ [#"../list_reversal_lasso.rs" 42 8 42 22] _3 <- Borrow.borrow_final ( * _9) (Borrow.get_id _9);
+ [#"../list_reversal_lasso.rs" 42 8 42 22] _9 <- { _9 with current = ( ^ _3) ; };
+ [#"../list_reversal_lasso.rs" 42 8 42 22] _0 <- Borrow.borrow_final ( * _3) (Borrow.get_id _3);
+ [#"../list_reversal_lasso.rs" 42 8 42 22] _3 <- { _3 with current = ( ^ _0) ; };
assume { resolve0 _10 };
assume { resolve0 _9 };
assume { resolve0 _3 };
@@ -492,13 +492,13 @@ module ListReversalLasso_Impl4_ListReversalSafe
BB4 {
[#"../list_reversal_lasso.rs" 73 12 73 23] l <- ([#"../list_reversal_lasso.rs" 73 16 73 23] _16);
[#"../list_reversal_lasso.rs" 74 12 74 16] _21 <- Borrow.borrow_mut ( * self);
- [#"../list_reversal_lasso.rs" 74 12 74 16] self <- { self with current = ^ _21 };
+ [#"../list_reversal_lasso.rs" 74 12 74 16] self <- { self with current = ( ^ _21) ; };
[#"../list_reversal_lasso.rs" 74 12 74 21] _20 <- ([#"../list_reversal_lasso.rs" 74 12 74 21] index_mut0 _21 ([#"../list_reversal_lasso.rs" 74 17 74 20] tmp));
_21 <- any borrowed (ListReversalLasso_Memory_Type.t_memory);
goto BB5
}
BB5 {
- [#"../list_reversal_lasso.rs" 74 12 74 25] _20 <- { _20 with current = ([#"../list_reversal_lasso.rs" 74 24 74 25] r) };
+ [#"../list_reversal_lasso.rs" 74 12 74 25] _20 <- { _20 with current = ([#"../list_reversal_lasso.rs" 74 24 74 25] r) ; };
assume { resolve1 _20 };
[#"../list_reversal_lasso.rs" 75 12 75 19] r <- ([#"../list_reversal_lasso.rs" 75 16 75 19] tmp);
goto BB1
@@ -689,20 +689,20 @@ module ListReversalLasso_Impl4_ListReversalList
}
BB4 {
[#"../list_reversal_lasso.rs" 108 39 108 43] _21 <- Borrow.borrow_mut ( * self);
- [#"../list_reversal_lasso.rs" 108 39 108 43] self <- { self with current = ^ _21 };
+ [#"../list_reversal_lasso.rs" 108 39 108 43] self <- { self with current = ( ^ _21) ; };
[#"../list_reversal_lasso.rs" 108 39 108 46] _20 <- ([#"../list_reversal_lasso.rs" 108 39 108 46] index_mut0 _21 ([#"../list_reversal_lasso.rs" 108 44 108 45] l));
_21 <- any borrowed (ListReversalLasso_Memory_Type.t_memory);
goto BB5
}
BB5 {
- [#"../list_reversal_lasso.rs" 108 34 108 46] _19 <- Borrow.borrow_mut ( * _20);
- [#"../list_reversal_lasso.rs" 108 34 108 46] _20 <- { _20 with current = ^ _19 };
- [#"../list_reversal_lasso.rs" 108 34 108 46] _18 <- Borrow.borrow_mut ( * _19);
- [#"../list_reversal_lasso.rs" 108 34 108 46] _19 <- { _19 with current = ^ _18 };
+ [#"../list_reversal_lasso.rs" 108 34 108 46] _19 <- Borrow.borrow_final ( * _20) (Borrow.get_id _20);
+ [#"../list_reversal_lasso.rs" 108 34 108 46] _20 <- { _20 with current = ( ^ _19) ; };
+ [#"../list_reversal_lasso.rs" 108 34 108 46] _18 <- Borrow.borrow_final ( * _19) (Borrow.get_id _19);
+ [#"../list_reversal_lasso.rs" 108 34 108 46] _19 <- { _19 with current = ( ^ _18) ; };
[#"../list_reversal_lasso.rs" 108 66 108 72] _25 <- Borrow.borrow_mut r;
[#"../list_reversal_lasso.rs" 108 66 108 72] r <- ^ _25;
- [#"../list_reversal_lasso.rs" 108 66 108 72] _24 <- Borrow.borrow_mut ( * _25);
- [#"../list_reversal_lasso.rs" 108 66 108 72] _25 <- { _25 with current = ^ _24 };
+ [#"../list_reversal_lasso.rs" 108 66 108 72] _24 <- Borrow.borrow_final ( * _25) (Borrow.get_id _25);
+ [#"../list_reversal_lasso.rs" 108 66 108 72] _25 <- { _25 with current = ( ^ _24) ; };
[#"../list_reversal_lasso.rs" 108 48 108 76] _23 <- ([#"../list_reversal_lasso.rs" 108 48 108 76] replace0 _24 ([#"../list_reversal_lasso.rs" 108 74 108 75] l));
_24 <- any borrowed usize;
goto BB6
@@ -924,20 +924,20 @@ module ListReversalLasso_Impl4_ListReversalLoop
BB4 {
assert { [@expl:assertion] [#"../list_reversal_lasso.rs" 138 12 138 77] Ghost.inner n = Seq.length (Ghost.inner s) -> l = Seq.get (Reverse.reverse (Ghost.inner s)) (Seq.length (Ghost.inner s) - 1) };
[#"../list_reversal_lasso.rs" 139 39 139 43] _25 <- Borrow.borrow_mut ( * self);
- [#"../list_reversal_lasso.rs" 139 39 139 43] self <- { self with current = ^ _25 };
+ [#"../list_reversal_lasso.rs" 139 39 139 43] self <- { self with current = ( ^ _25) ; };
[#"../list_reversal_lasso.rs" 139 39 139 46] _24 <- ([#"../list_reversal_lasso.rs" 139 39 139 46] index_mut0 _25 ([#"../list_reversal_lasso.rs" 139 44 139 45] l));
_25 <- any borrowed (ListReversalLasso_Memory_Type.t_memory);
goto BB5
}
BB5 {
- [#"../list_reversal_lasso.rs" 139 34 139 46] _23 <- Borrow.borrow_mut ( * _24);
- [#"../list_reversal_lasso.rs" 139 34 139 46] _24 <- { _24 with current = ^ _23 };
- [#"../list_reversal_lasso.rs" 139 34 139 46] _22 <- Borrow.borrow_mut ( * _23);
- [#"../list_reversal_lasso.rs" 139 34 139 46] _23 <- { _23 with current = ^ _22 };
+ [#"../list_reversal_lasso.rs" 139 34 139 46] _23 <- Borrow.borrow_final ( * _24) (Borrow.get_id _24);
+ [#"../list_reversal_lasso.rs" 139 34 139 46] _24 <- { _24 with current = ( ^ _23) ; };
+ [#"../list_reversal_lasso.rs" 139 34 139 46] _22 <- Borrow.borrow_final ( * _23) (Borrow.get_id _23);
+ [#"../list_reversal_lasso.rs" 139 34 139 46] _23 <- { _23 with current = ( ^ _22) ; };
[#"../list_reversal_lasso.rs" 139 66 139 72] _29 <- Borrow.borrow_mut r;
[#"../list_reversal_lasso.rs" 139 66 139 72] r <- ^ _29;
- [#"../list_reversal_lasso.rs" 139 66 139 72] _28 <- Borrow.borrow_mut ( * _29);
- [#"../list_reversal_lasso.rs" 139 66 139 72] _29 <- { _29 with current = ^ _28 };
+ [#"../list_reversal_lasso.rs" 139 66 139 72] _28 <- Borrow.borrow_final ( * _29) (Borrow.get_id _29);
+ [#"../list_reversal_lasso.rs" 139 66 139 72] _29 <- { _29 with current = ( ^ _28) ; };
[#"../list_reversal_lasso.rs" 139 48 139 76] _27 <- ([#"../list_reversal_lasso.rs" 139 48 139 76] replace0 _28 ([#"../list_reversal_lasso.rs" 139 74 139 75] l));
_28 <- any borrowed usize;
goto BB6
@@ -1172,20 +1172,20 @@ module ListReversalLasso_Impl4_ListReversalLasso
}
BB4 {
[#"../list_reversal_lasso.rs" 191 39 191 43] _23 <- Borrow.borrow_mut ( * self);
- [#"../list_reversal_lasso.rs" 191 39 191 43] self <- { self with current = ^ _23 };
+ [#"../list_reversal_lasso.rs" 191 39 191 43] self <- { self with current = ( ^ _23) ; };
[#"../list_reversal_lasso.rs" 191 39 191 46] _22 <- ([#"../list_reversal_lasso.rs" 191 39 191 46] index_mut0 _23 ([#"../list_reversal_lasso.rs" 191 44 191 45] l));
_23 <- any borrowed (ListReversalLasso_Memory_Type.t_memory);
goto BB5
}
BB5 {
- [#"../list_reversal_lasso.rs" 191 34 191 46] _21 <- Borrow.borrow_mut ( * _22);
- [#"../list_reversal_lasso.rs" 191 34 191 46] _22 <- { _22 with current = ^ _21 };
- [#"../list_reversal_lasso.rs" 191 34 191 46] _20 <- Borrow.borrow_mut ( * _21);
- [#"../list_reversal_lasso.rs" 191 34 191 46] _21 <- { _21 with current = ^ _20 };
+ [#"../list_reversal_lasso.rs" 191 34 191 46] _21 <- Borrow.borrow_final ( * _22) (Borrow.get_id _22);
+ [#"../list_reversal_lasso.rs" 191 34 191 46] _22 <- { _22 with current = ( ^ _21) ; };
+ [#"../list_reversal_lasso.rs" 191 34 191 46] _20 <- Borrow.borrow_final ( * _21) (Borrow.get_id _21);
+ [#"../list_reversal_lasso.rs" 191 34 191 46] _21 <- { _21 with current = ( ^ _20) ; };
[#"../list_reversal_lasso.rs" 191 66 191 72] _27 <- Borrow.borrow_mut r;
[#"../list_reversal_lasso.rs" 191 66 191 72] r <- ^ _27;
- [#"../list_reversal_lasso.rs" 191 66 191 72] _26 <- Borrow.borrow_mut ( * _27);
- [#"../list_reversal_lasso.rs" 191 66 191 72] _27 <- { _27 with current = ^ _26 };
+ [#"../list_reversal_lasso.rs" 191 66 191 72] _26 <- Borrow.borrow_final ( * _27) (Borrow.get_id _27);
+ [#"../list_reversal_lasso.rs" 191 66 191 72] _27 <- { _27 with current = ( ^ _26) ; };
[#"../list_reversal_lasso.rs" 191 48 191 76] _25 <- ([#"../list_reversal_lasso.rs" 191 48 191 76] replace0 _26 ([#"../list_reversal_lasso.rs" 191 74 191 75] l));
_26 <- any borrowed usize;
goto BB6
diff --git a/creusot/tests/should_succeed/list_reversal_lasso/why3session.xml b/creusot/tests/should_succeed/list_reversal_lasso/why3session.xml
index 625f6663ce..2bc488ef5d 100644
--- a/creusot/tests/should_succeed/list_reversal_lasso/why3session.xml
+++ b/creusot/tests/should_succeed/list_reversal_lasso/why3session.xml
@@ -4,7 +4,6 @@
-
@@ -16,46 +15,46 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -64,16 +63,16 @@
-
+
-
+
-
+
-
+
@@ -82,7 +81,7 @@
-
+
@@ -91,19 +90,19 @@
-
+
-
+
-
+
-
+
-
+
@@ -116,7 +115,7 @@
-
+
@@ -125,10 +124,10 @@
-
+
-
+
@@ -141,7 +140,7 @@
-
+
@@ -150,7 +149,7 @@
-
+
@@ -165,55 +164,55 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -222,10 +221,10 @@
-
+
-
+
@@ -234,34 +233,34 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -272,31 +271,31 @@
-
+
-
+
-
+
-
+
-
+
@@ -305,29 +304,29 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -336,10 +335,10 @@
-
+
-
+
@@ -348,38 +347,38 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -388,31 +387,48 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
@@ -423,16 +439,16 @@
-
+
-
+
-
+
-
+
@@ -447,7 +463,7 @@
-
+
@@ -456,10 +472,10 @@
-
+
-
+
@@ -468,10 +484,10 @@
-
+
-
+
@@ -482,7 +498,7 @@
-
+
@@ -491,10 +507,10 @@
-
+
-
+
@@ -507,14 +523,14 @@
-
+
-
+
@@ -525,16 +541,16 @@
-
+
-
+
-
+
-
+
@@ -619,12 +635,12 @@
-
+
-
+
diff --git a/creusot/tests/should_succeed/list_reversal_lasso/why3shapes.gz b/creusot/tests/should_succeed/list_reversal_lasso/why3shapes.gz
index 19c2ba163d..f26b6314f3 100644
Binary files a/creusot/tests/should_succeed/list_reversal_lasso/why3shapes.gz and b/creusot/tests/should_succeed/list_reversal_lasso/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/loop.mlcfg b/creusot/tests/should_succeed/loop.mlcfg
index a1dbb9c526..c501790634 100644
--- a/creusot/tests/should_succeed/loop.mlcfg
+++ b/creusot/tests/should_succeed/loop.mlcfg
@@ -20,7 +20,7 @@ module Loop_F
[#"../loop.rs" 4 16 4 18] a <- ([#"../loop.rs" 4 16 4 18] [#"../loop.rs" 4 16 4 18] (10 : int32));
[#"../loop.rs" 5 12 5 18] b <- Borrow.borrow_mut a;
[#"../loop.rs" 5 12 5 18] a <- ^ b;
- [#"../loop.rs" 6 4 6 10] b <- { b with current = ([#"../loop.rs" 6 4 6 10] [#"../loop.rs" 6 9 6 10] (5 : int32)) };
+ [#"../loop.rs" 6 4 6 10] b <- { b with current = ([#"../loop.rs" 6 4 6 10] [#"../loop.rs" 6 9 6 10] (5 : int32)) ; };
assume { resolve0 b };
goto BB1
}
diff --git a/creusot/tests/should_succeed/mapping_test.mlcfg b/creusot/tests/should_succeed/mapping_test.mlcfg
index 4e84ba49a1..4b3c7df8f1 100644
--- a/creusot/tests/should_succeed/mapping_test.mlcfg
+++ b/creusot/tests/should_succeed/mapping_test.mlcfg
@@ -69,7 +69,7 @@ module MappingTest_Incr
goto BB1
}
BB1 {
- [#"../mapping_test.rs" 32 4 32 15] t <- { t with current = (let MappingTest_T_Type.C_T x0 = * t in MappingTest_T_Type.C_T ([#"../mapping_test.rs" 32 4 32 15] MappingTest_T_Type.t_a ( * t) + ([#"../mapping_test.rs" 32 14 32 15] [#"../mapping_test.rs" 32 14 32 15] (1 : int32)))) };
+ [#"../mapping_test.rs" 32 4 32 15] t <- { t with current = (let MappingTest_T_Type.C_T x0 = * t in MappingTest_T_Type.C_T ([#"../mapping_test.rs" 32 4 32 15] MappingTest_T_Type.t_a ( * t) + ([#"../mapping_test.rs" 32 14 32 15] [#"../mapping_test.rs" 32 14 32 15] (1 : int32)))) ; };
assume { resolve0 t };
assert { [@expl:assertion] [#"../mapping_test.rs" 35 19 35 50] shallow_model0 ( ^ t) = Map.set (shallow_model1 old_t) (Int32.to_int (MappingTest_T_Type.t_a ( * Ghost.inner old_t))) 1 };
[#"../mapping_test.rs" 30 19 36 1] _0 <- ([#"../mapping_test.rs" 30 19 36 1] ());
@@ -127,8 +127,8 @@ module MappingTest_F
assert { [@expl:assertion] [#"../mapping_test.rs" 41 19 41 34] Map.get (shallow_model0 x) 42 = 0 };
[#"../mapping_test.rs" 42 9 42 15] _8 <- Borrow.borrow_mut x;
[#"../mapping_test.rs" 42 9 42 15] x <- ^ _8;
- [#"../mapping_test.rs" 42 9 42 15] _7 <- Borrow.borrow_mut ( * _8);
- [#"../mapping_test.rs" 42 9 42 15] _8 <- { _8 with current = ^ _7 };
+ [#"../mapping_test.rs" 42 9 42 15] _7 <- Borrow.borrow_final ( * _8) (Borrow.get_id _8);
+ [#"../mapping_test.rs" 42 9 42 15] _8 <- { _8 with current = ( ^ _7) ; };
[#"../mapping_test.rs" 42 4 42 16] _6 <- ([#"../mapping_test.rs" 42 4 42 16] incr0 _7);
_7 <- any borrowed (MappingTest_T_Type.t_t);
goto BB1
diff --git a/creusot/tests/should_succeed/mapping_test/why3session.xml b/creusot/tests/should_succeed/mapping_test/why3session.xml
index 442a285958..22f5458dff 100644
--- a/creusot/tests/should_succeed/mapping_test/why3session.xml
+++ b/creusot/tests/should_succeed/mapping_test/why3session.xml
@@ -7,12 +7,12 @@
-
+
-
+
diff --git a/creusot/tests/should_succeed/mapping_test/why3shapes.gz b/creusot/tests/should_succeed/mapping_test/why3shapes.gz
index 2b597d68f4..37eb15ff7f 100644
Binary files a/creusot/tests/should_succeed/mapping_test/why3shapes.gz and b/creusot/tests/should_succeed/mapping_test/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/mutex/why3session.xml b/creusot/tests/should_succeed/mutex/why3session.xml
index 656231618e..5dd089c64f 100644
--- a/creusot/tests/should_succeed/mutex/why3session.xml
+++ b/creusot/tests/should_succeed/mutex/why3session.xml
@@ -9,12 +9,12 @@
-
+
-
+
diff --git a/creusot/tests/should_succeed/mutex/why3shapes.gz b/creusot/tests/should_succeed/mutex/why3shapes.gz
index 2b52a84038..8102782215 100644
Binary files a/creusot/tests/should_succeed/mutex/why3shapes.gz and b/creusot/tests/should_succeed/mutex/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/one_side_update.mlcfg b/creusot/tests/should_succeed/one_side_update.mlcfg
index d4e11bdb10..9837a61ac9 100644
--- a/creusot/tests/should_succeed/one_side_update.mlcfg
+++ b/creusot/tests/should_succeed/one_side_update.mlcfg
@@ -39,7 +39,7 @@ module OneSideUpdate_F
goto BB3
}
BB2 {
- [#"../one_side_update.rs" 11 8 11 21] b <- { b with current = ([#"../one_side_update.rs" 11 13 11 21] OneSideUpdate_MyInt_Type.C_MyInt ([#"../one_side_update.rs" 11 19 11 20] [#"../one_side_update.rs" 11 19 11 20] (5 : usize))) };
+ [#"../one_side_update.rs" 11 8 11 21] b <- { b with current = ([#"../one_side_update.rs" 11 13 11 21] OneSideUpdate_MyInt_Type.C_MyInt ([#"../one_side_update.rs" 11 19 11 20] [#"../one_side_update.rs" 11 19 11 20] (5 : usize))) ; };
assume { resolve0 b };
[#"../one_side_update.rs" 10 11 12 5] _0 <- ([#"../one_side_update.rs" 10 11 12 5] ());
goto BB3
diff --git a/creusot/tests/should_succeed/option.mlcfg b/creusot/tests/should_succeed/option.mlcfg
index dbc58c5ec0..e5c90d8cbb 100644
--- a/creusot/tests/should_succeed/option.mlcfg
+++ b/creusot/tests/should_succeed/option.mlcfg
@@ -484,7 +484,7 @@ module Option_TestOption
goto BB29
}
BB29 {
- [#"../option.rs" 24 4 24 31] _46 <- { _46 with current = ([#"../option.rs" 24 4 24 31] [#"../option.rs" 24 30 24 31] (2 : int32)) };
+ [#"../option.rs" 24 4 24 31] _46 <- { _46 with current = ([#"../option.rs" 24 4 24 31] [#"../option.rs" 24 30 24 31] (2 : int32)) ; };
assume { resolve0 _46 };
[#"../option.rs" 25 12 25 25] _52 <- ([#"../option.rs" 25 12 25 25] unwrap0 ([#"../option.rs" 25 12 25 16] some));
goto BB30
@@ -512,7 +512,7 @@ module Option_TestOption
goto BB34
}
BB34 {
- [#"../option.rs" 26 4 26 31] _55 <- { _55 with current = ([#"../option.rs" 26 4 26 31] [#"../option.rs" 26 30 26 31] (1 : int32)) };
+ [#"../option.rs" 26 4 26 31] _55 <- { _55 with current = ([#"../option.rs" 26 4 26 31] [#"../option.rs" 26 30 26 31] (1 : int32)) ; };
assume { resolve0 _55 };
[#"../option.rs" 27 12 27 25] _61 <- ([#"../option.rs" 27 12 27 25] unwrap0 ([#"../option.rs" 27 12 27 16] some));
goto BB35
diff --git a/creusot/tests/should_succeed/option/why3session.xml b/creusot/tests/should_succeed/option/why3session.xml
index 3419cc84fe..e07ab8a35d 100644
--- a/creusot/tests/should_succeed/option/why3session.xml
+++ b/creusot/tests/should_succeed/option/why3session.xml
@@ -7,7 +7,7 @@
-
+
diff --git a/creusot/tests/should_succeed/option/why3shapes.gz b/creusot/tests/should_succeed/option/why3shapes.gz
index 2a8bf738c9..9345a47ca6 100644
Binary files a/creusot/tests/should_succeed/option/why3shapes.gz and b/creusot/tests/should_succeed/option/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/ord_trait/why3session.xml b/creusot/tests/should_succeed/ord_trait/why3session.xml
index c6e08f7ff6..0779387395 100644
--- a/creusot/tests/should_succeed/ord_trait/why3session.xml
+++ b/creusot/tests/should_succeed/ord_trait/why3session.xml
@@ -8,7 +8,7 @@
-
+
diff --git a/creusot/tests/should_succeed/ord_trait/why3shapes.gz b/creusot/tests/should_succeed/ord_trait/why3shapes.gz
index 7bca9f2bdf..93cf50bfe2 100644
Binary files a/creusot/tests/should_succeed/ord_trait/why3shapes.gz and b/creusot/tests/should_succeed/ord_trait/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/projection_toggle.mlcfg b/creusot/tests/should_succeed/projection_toggle.mlcfg
index 8d08827e34..853bb9470e 100644
--- a/creusot/tests/should_succeed/projection_toggle.mlcfg
+++ b/creusot/tests/should_succeed/projection_toggle.mlcfg
@@ -55,11 +55,11 @@ module ProjectionToggle_ProjToggle
BB1 {
assert { [@expl:type invariant] inv0 b };
assume { resolve0 b };
- [#"../projection_toggle.rs" 7 8 7 9] _8 <- Borrow.borrow_mut ( * a);
- [#"../projection_toggle.rs" 7 8 7 9] a <- { a with current = ^ _8 };
+ [#"../projection_toggle.rs" 7 8 7 9] _8 <- Borrow.borrow_final ( * a) (Borrow.get_id a);
+ [#"../projection_toggle.rs" 7 8 7 9] a <- { a with current = ( ^ _8) ; };
assume { inv1 ( ^ _8) };
- [#"../projection_toggle.rs" 7 8 7 9] _6 <- Borrow.borrow_mut ( * _8);
- [#"../projection_toggle.rs" 7 8 7 9] _8 <- { _8 with current = ^ _6 };
+ [#"../projection_toggle.rs" 7 8 7 9] _6 <- Borrow.borrow_final ( * _8) (Borrow.get_id _8);
+ [#"../projection_toggle.rs" 7 8 7 9] _8 <- { _8 with current = ( ^ _6) ; };
assume { inv1 ( ^ _6) };
assert { [@expl:type invariant] inv0 _8 };
assume { resolve0 _8 };
@@ -68,17 +68,17 @@ module ProjectionToggle_ProjToggle
BB2 {
assert { [@expl:type invariant] inv0 a };
assume { resolve0 a };
- [#"../projection_toggle.rs" 9 8 9 9] _6 <- Borrow.borrow_mut ( * b);
- [#"../projection_toggle.rs" 9 8 9 9] b <- { b with current = ^ _6 };
+ [#"../projection_toggle.rs" 9 8 9 9] _6 <- Borrow.borrow_final ( * b) (Borrow.get_id b);
+ [#"../projection_toggle.rs" 9 8 9 9] b <- { b with current = ( ^ _6) ; };
assume { inv1 ( ^ _6) };
goto BB3
}
BB3 {
- [#"../projection_toggle.rs" 6 4 10 5] _4 <- Borrow.borrow_mut ( * _6);
- [#"../projection_toggle.rs" 6 4 10 5] _6 <- { _6 with current = ^ _4 };
+ [#"../projection_toggle.rs" 6 4 10 5] _4 <- Borrow.borrow_final ( * _6) (Borrow.get_id _6);
+ [#"../projection_toggle.rs" 6 4 10 5] _6 <- { _6 with current = ( ^ _4) ; };
assume { inv1 ( ^ _4) };
- [#"../projection_toggle.rs" 6 4 10 5] _0 <- Borrow.borrow_mut ( * _4);
- [#"../projection_toggle.rs" 6 4 10 5] _4 <- { _4 with current = ^ _0 };
+ [#"../projection_toggle.rs" 6 4 10 5] _0 <- Borrow.borrow_final ( * _4) (Borrow.get_id _4);
+ [#"../projection_toggle.rs" 6 4 10 5] _4 <- { _4 with current = ( ^ _0) ; };
assume { inv1 ( ^ _0) };
assert { [@expl:type invariant] inv0 _6 };
assume { resolve0 _6 };
@@ -139,12 +139,12 @@ module ProjectionToggle_F
[#"../projection_toggle.rs" 15 16 15 17] b <- ([#"../projection_toggle.rs" 15 16 15 17] [#"../projection_toggle.rs" 15 16 15 17] (5 : int32));
[#"../projection_toggle.rs" 17 30 17 36] _5 <- Borrow.borrow_mut a;
[#"../projection_toggle.rs" 17 30 17 36] a <- ^ _5;
- [#"../projection_toggle.rs" 17 30 17 36] _4 <- Borrow.borrow_mut ( * _5);
- [#"../projection_toggle.rs" 17 30 17 36] _5 <- { _5 with current = ^ _4 };
+ [#"../projection_toggle.rs" 17 30 17 36] _4 <- Borrow.borrow_final ( * _5) (Borrow.get_id _5);
+ [#"../projection_toggle.rs" 17 30 17 36] _5 <- { _5 with current = ( ^ _4) ; };
[#"../projection_toggle.rs" 17 38 17 44] _7 <- Borrow.borrow_mut b;
[#"../projection_toggle.rs" 17 38 17 44] b <- ^ _7;
- [#"../projection_toggle.rs" 17 38 17 44] _6 <- Borrow.borrow_mut ( * _7);
- [#"../projection_toggle.rs" 17 38 17 44] _7 <- { _7 with current = ^ _6 };
+ [#"../projection_toggle.rs" 17 38 17 44] _6 <- Borrow.borrow_final ( * _7) (Borrow.get_id _7);
+ [#"../projection_toggle.rs" 17 38 17 44] _7 <- { _7 with current = ( ^ _6) ; };
[#"../projection_toggle.rs" 17 12 17 45] x <- ([#"../projection_toggle.rs" 17 12 17 45] proj_toggle0 ([#"../projection_toggle.rs" 17 24 17 28] [#"../projection_toggle.rs" 17 24 17 28] true) _4 _6);
_4 <- any borrowed int32;
_6 <- any borrowed int32;
@@ -153,7 +153,7 @@ module ProjectionToggle_F
BB1 {
assume { resolve0 _7 };
assume { resolve0 _5 };
- [#"../projection_toggle.rs" 19 4 19 11] x <- { x with current = ([#"../projection_toggle.rs" 19 4 19 11] * x + ([#"../projection_toggle.rs" 19 10 19 11] [#"../projection_toggle.rs" 19 10 19 11] (5 : int32))) };
+ [#"../projection_toggle.rs" 19 4 19 11] x <- { x with current = ([#"../projection_toggle.rs" 19 4 19 11] * x + ([#"../projection_toggle.rs" 19 10 19 11] [#"../projection_toggle.rs" 19 10 19 11] (5 : int32))) ; };
assume { resolve0 x };
switch ([#"../projection_toggle.rs" 20 4 20 20] not ([#"../projection_toggle.rs" 20 12 20 19] ([#"../projection_toggle.rs" 20 12 20 13] a) = ([#"../projection_toggle.rs" 20 17 20 19] [#"../projection_toggle.rs" 20 17 20 19] (15 : int32))))
| False -> goto BB3
diff --git a/creusot/tests/should_succeed/projection_toggle/why3session.xml b/creusot/tests/should_succeed/projection_toggle/why3session.xml
index 2504fe914b..7c7ab723ec 100644
--- a/creusot/tests/should_succeed/projection_toggle/why3session.xml
+++ b/creusot/tests/should_succeed/projection_toggle/why3session.xml
@@ -8,12 +8,12 @@
-
+
-
+
diff --git a/creusot/tests/should_succeed/projection_toggle/why3shapes.gz b/creusot/tests/should_succeed/projection_toggle/why3shapes.gz
index c3d99d415b..84f85cfb30 100644
Binary files a/creusot/tests/should_succeed/projection_toggle/why3shapes.gz and b/creusot/tests/should_succeed/projection_toggle/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/projections.mlcfg b/creusot/tests/should_succeed/projections.mlcfg
index 10c0874b95..3d3c8dd4ef 100644
--- a/creusot/tests/should_succeed/projections.mlcfg
+++ b/creusot/tests/should_succeed/projections.mlcfg
@@ -140,9 +140,9 @@ module Projections_WriteIntoSum
absurd
}
BB4 {
- [#"../projections.rs" 18 13 18 14] y <- Borrow.borrow_mut (Core_Option_Option_Type.some_0 ( * x));
- [#"../projections.rs" 18 13 18 14] x <- { x with current = (let Core_Option_Option_Type.C_Some x0 = * x in Core_Option_Option_Type.C_Some ( ^ y)) };
- [#"../projections.rs" 18 19 18 26] y <- { y with current = ([#"../projections.rs" 18 19 18 26] [#"../projections.rs" 18 24 18 26] (10 : uint32)) };
+ [#"../projections.rs" 18 13 18 14] y <- Borrow.borrow_final (Core_Option_Option_Type.some_0 ( * x)) (Borrow.inherit_id (Borrow.get_id x) 1);
+ [#"../projections.rs" 18 13 18 14] x <- { x with current = (let Core_Option_Option_Type.C_Some x0 = * x in Core_Option_Option_Type.C_Some ( ^ y)) ; };
+ [#"../projections.rs" 18 19 18 26] y <- { y with current = ([#"../projections.rs" 18 19 18 26] [#"../projections.rs" 18 24 18 26] (10 : uint32)) ; };
assume { resolve0 y };
[#"../projections.rs" 18 19 18 26] _0 <- ([#"../projections.rs" 18 19 18 26] ());
assume { resolve1 x };
diff --git a/creusot/tests/should_succeed/prophecy.mlcfg b/creusot/tests/should_succeed/prophecy.mlcfg
index 578333e9da..3bfc023793 100644
--- a/creusot/tests/should_succeed/prophecy.mlcfg
+++ b/creusot/tests/should_succeed/prophecy.mlcfg
@@ -20,7 +20,7 @@ module Prophecy_F
[#"../prophecy.rs" 4 16 4 17] x <- ([#"../prophecy.rs" 4 16 4 17] [#"../prophecy.rs" 4 16 4 17] (0 : int32));
[#"../prophecy.rs" 5 12 5 18] y <- Borrow.borrow_mut x;
[#"../prophecy.rs" 5 12 5 18] x <- ^ y;
- [#"../prophecy.rs" 9 4 9 10] y <- { y with current = ([#"../prophecy.rs" 9 4 9 10] [#"../prophecy.rs" 9 9 9 10] (5 : int32)) };
+ [#"../prophecy.rs" 9 4 9 10] y <- { y with current = ([#"../prophecy.rs" 9 4 9 10] [#"../prophecy.rs" 9 9 9 10] (5 : int32)) ; };
assume { resolve0 y };
[#"../prophecy.rs" 3 11 10 1] _0 <- ([#"../prophecy.rs" 3 11 10 1] ());
return _0
diff --git a/creusot/tests/should_succeed/red_black_tree.mlcfg b/creusot/tests/should_succeed/red_black_tree.mlcfg
index c9b4e01b25..8f747b8523 100644
--- a/creusot/tests/should_succeed/red_black_tree.mlcfg
+++ b/creusot/tests/should_succeed/red_black_tree.mlcfg
@@ -1532,10 +1532,10 @@ module RedBlackTree_Impl14_RotateRight
assert { [@expl:type invariant] inv0 old_self };
assume { resolve0 old_self };
[#"../red_black_tree.rs" 421 35 421 54] _16 <- Borrow.borrow_mut (RedBlackTree_Tree_Type.tree_node (RedBlackTree_Node_Type.node_left ( * self)));
- [#"../red_black_tree.rs" 421 35 421 54] self <- { self with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * self in RedBlackTree_Node_Type.C_Node (let RedBlackTree_Tree_Type.C_Tree x0 = RedBlackTree_Node_Type.node_left ( * self) in RedBlackTree_Tree_Type.C_Tree ( ^ _16)) x1 x2 x3 x4) };
+ [#"../red_black_tree.rs" 421 35 421 54] self <- { self with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * self in RedBlackTree_Node_Type.C_Node (let RedBlackTree_Tree_Type.C_Tree x0 = RedBlackTree_Node_Type.node_left ( * self) in RedBlackTree_Tree_Type.C_Tree ( ^ _16)) x1 x2 x3 x4) ; };
assume { inv1 ( ^ _16) };
- [#"../red_black_tree.rs" 421 35 421 54] _15 <- Borrow.borrow_mut ( * _16);
- [#"../red_black_tree.rs" 421 35 421 54] _16 <- { _16 with current = ^ _15 };
+ [#"../red_black_tree.rs" 421 35 421 54] _15 <- Borrow.borrow_final ( * _16) (Borrow.get_id _16);
+ [#"../red_black_tree.rs" 421 35 421 54] _16 <- { _16 with current = ( ^ _15) ; };
assume { inv1 ( ^ _15) };
[#"../red_black_tree.rs" 421 20 421 55] _14 <- ([#"../red_black_tree.rs" 421 20 421 55] take0 _15);
_15 <- any borrowed (Core_Option_Option_Type.t_option (RedBlackTree_Node_Type.t_node k v));
@@ -1550,16 +1550,16 @@ module RedBlackTree_Impl14_RotateRight
}
BB3 {
[#"../red_black_tree.rs" 428 23 428 37] _19 <- Borrow.borrow_mut (RedBlackTree_Node_Type.node_left ( * self));
- [#"../red_black_tree.rs" 428 23 428 37] self <- { self with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * self in RedBlackTree_Node_Type.C_Node ( ^ _19) x1 x2 x3 x4) };
+ [#"../red_black_tree.rs" 428 23 428 37] self <- { self with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * self in RedBlackTree_Node_Type.C_Node ( ^ _19) x1 x2 x3 x4) ; };
assume { inv3 ( ^ _19) };
- [#"../red_black_tree.rs" 428 23 428 37] _18 <- Borrow.borrow_mut ( * _19);
- [#"../red_black_tree.rs" 428 23 428 37] _19 <- { _19 with current = ^ _18 };
+ [#"../red_black_tree.rs" 428 23 428 37] _18 <- Borrow.borrow_final ( * _19) (Borrow.get_id _19);
+ [#"../red_black_tree.rs" 428 23 428 37] _19 <- { _19 with current = ( ^ _18) ; };
assume { inv3 ( ^ _18) };
[#"../red_black_tree.rs" 428 39 428 51] _21 <- Borrow.borrow_mut (RedBlackTree_Node_Type.node_right x);
[#"../red_black_tree.rs" 428 39 428 51] x <- (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = x in RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 ( ^ _21));
assume { inv3 ( ^ _21) };
- [#"../red_black_tree.rs" 428 39 428 51] _20 <- Borrow.borrow_mut ( * _21);
- [#"../red_black_tree.rs" 428 39 428 51] _21 <- { _21 with current = ^ _20 };
+ [#"../red_black_tree.rs" 428 39 428 51] _20 <- Borrow.borrow_final ( * _21) (Borrow.get_id _21);
+ [#"../red_black_tree.rs" 428 39 428 51] _21 <- { _21 with current = ( ^ _20) ; };
assume { inv3 ( ^ _20) };
[#"../red_black_tree.rs" 428 8 428 52] _17 <- ([#"../red_black_tree.rs" 428 8 428 52] swap0 _18 _20);
_18 <- any borrowed (RedBlackTree_Tree_Type.t_tree k v);
@@ -1572,13 +1572,13 @@ module RedBlackTree_Impl14_RotateRight
assert { [@expl:type invariant] inv4 _19 };
assume { resolve2 _19 };
[#"../red_black_tree.rs" 434 23 434 27] _23 <- Borrow.borrow_mut ( * self);
- [#"../red_black_tree.rs" 434 23 434 27] self <- { self with current = ^ _23 };
+ [#"../red_black_tree.rs" 434 23 434 27] self <- { self with current = ( ^ _23) ; };
assume { inv5 ( ^ _23) };
[#"../red_black_tree.rs" 434 29 434 35] _25 <- Borrow.borrow_mut x;
[#"../red_black_tree.rs" 434 29 434 35] x <- ^ _25;
assume { inv6 ( ^ _25) };
[#"../red_black_tree.rs" 434 29 434 35] _24 <- Borrow.borrow_mut ( * _25);
- [#"../red_black_tree.rs" 434 29 434 35] _25 <- { _25 with current = ^ _24 };
+ [#"../red_black_tree.rs" 434 29 434 35] _25 <- { _25 with current = ( ^ _24) ; };
assume { inv5 ( ^ _24) };
[#"../red_black_tree.rs" 434 8 434 36] _22 <- ([#"../red_black_tree.rs" 434 8 434 36] swap1 _23 _24);
_23 <- any borrowed (RedBlackTree_Node_Type.t_node k v);
@@ -1588,14 +1588,14 @@ module RedBlackTree_Impl14_RotateRight
BB5 {
assert { [@expl:type invariant] inv7 _25 };
assume { resolve3 _25 };
- [#"../red_black_tree.rs" 435 23 435 38] _28 <- Borrow.borrow_mut (RedBlackTree_Node_Type.node_color ( * self));
- [#"../red_black_tree.rs" 435 23 435 38] self <- { self with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * self in RedBlackTree_Node_Type.C_Node x0 ( ^ _28) x2 x3 x4) };
- [#"../red_black_tree.rs" 435 23 435 38] _27 <- Borrow.borrow_mut ( * _28);
- [#"../red_black_tree.rs" 435 23 435 38] _28 <- { _28 with current = ^ _27 };
+ [#"../red_black_tree.rs" 435 23 435 38] _28 <- Borrow.borrow_final (RedBlackTree_Node_Type.node_color ( * self)) (Borrow.inherit_id (Borrow.get_id self) 2);
+ [#"../red_black_tree.rs" 435 23 435 38] self <- { self with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * self in RedBlackTree_Node_Type.C_Node x0 ( ^ _28) x2 x3 x4) ; };
+ [#"../red_black_tree.rs" 435 23 435 38] _27 <- Borrow.borrow_final ( * _28) (Borrow.get_id _28);
+ [#"../red_black_tree.rs" 435 23 435 38] _28 <- { _28 with current = ( ^ _27) ; };
[#"../red_black_tree.rs" 435 40 435 52] _30 <- Borrow.borrow_mut (RedBlackTree_Node_Type.node_color x);
[#"../red_black_tree.rs" 435 40 435 52] x <- (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = x in RedBlackTree_Node_Type.C_Node x0 ( ^ _30) x2 x3 x4);
- [#"../red_black_tree.rs" 435 40 435 52] _29 <- Borrow.borrow_mut ( * _30);
- [#"../red_black_tree.rs" 435 40 435 52] _30 <- { _30 with current = ^ _29 };
+ [#"../red_black_tree.rs" 435 40 435 52] _29 <- Borrow.borrow_final ( * _30) (Borrow.get_id _30);
+ [#"../red_black_tree.rs" 435 40 435 52] _30 <- { _30 with current = ( ^ _29) ; };
[#"../red_black_tree.rs" 435 8 435 53] _26 <- ([#"../red_black_tree.rs" 435 8 435 53] swap2 _27 _29);
_27 <- any borrowed (RedBlackTree_Color_Type.t_color);
_29 <- any borrowed (RedBlackTree_Color_Type.t_color);
@@ -1614,7 +1614,7 @@ module RedBlackTree_Impl14_RotateRight
goto BB9
}
BB9 {
- [#"../red_black_tree.rs" 442 8 442 18] self <- { self with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * self in RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 ([#"../red_black_tree.rs" 442 21 442 43] RedBlackTree_Tree_Type.C_Tree ([#"../red_black_tree.rs" 442 34 442 41] Core_Option_Option_Type.C_Some ([#"../red_black_tree.rs" 442 39 442 40] x)))) };
+ [#"../red_black_tree.rs" 442 8 442 18] self <- { self with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * self in RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 ([#"../red_black_tree.rs" 442 21 442 43] RedBlackTree_Tree_Type.C_Tree ([#"../red_black_tree.rs" 442 34 442 41] Core_Option_Option_Type.C_Some ([#"../red_black_tree.rs" 442 39 442 40] x)))) ; };
[#"../red_black_tree.rs" 442 39 442 40] x <- any RedBlackTree_Node_Type.t_node k v;
assert { [@expl:type invariant] inv3 (RedBlackTree_Node_Type.node_right ( * self)) };
assume { resolve5 (RedBlackTree_Node_Type.node_right ( * self)) };
@@ -2062,10 +2062,10 @@ module RedBlackTree_Impl14_RotateLeft
assert { [@expl:type invariant] inv0 old_self };
assume { resolve0 old_self };
[#"../red_black_tree.rs" 464 35 464 55] _16 <- Borrow.borrow_mut (RedBlackTree_Tree_Type.tree_node (RedBlackTree_Node_Type.node_right ( * self)));
- [#"../red_black_tree.rs" 464 35 464 55] self <- { self with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * self in RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 (let RedBlackTree_Tree_Type.C_Tree x0 = RedBlackTree_Node_Type.node_right ( * self) in RedBlackTree_Tree_Type.C_Tree ( ^ _16))) };
+ [#"../red_black_tree.rs" 464 35 464 55] self <- { self with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * self in RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 (let RedBlackTree_Tree_Type.C_Tree x0 = RedBlackTree_Node_Type.node_right ( * self) in RedBlackTree_Tree_Type.C_Tree ( ^ _16))) ; };
assume { inv1 ( ^ _16) };
- [#"../red_black_tree.rs" 464 35 464 55] _15 <- Borrow.borrow_mut ( * _16);
- [#"../red_black_tree.rs" 464 35 464 55] _16 <- { _16 with current = ^ _15 };
+ [#"../red_black_tree.rs" 464 35 464 55] _15 <- Borrow.borrow_final ( * _16) (Borrow.get_id _16);
+ [#"../red_black_tree.rs" 464 35 464 55] _16 <- { _16 with current = ( ^ _15) ; };
assume { inv1 ( ^ _15) };
[#"../red_black_tree.rs" 464 20 464 56] _14 <- ([#"../red_black_tree.rs" 464 20 464 56] take0 _15);
_15 <- any borrowed (Core_Option_Option_Type.t_option (RedBlackTree_Node_Type.t_node k v));
@@ -2080,16 +2080,16 @@ module RedBlackTree_Impl14_RotateLeft
}
BB3 {
[#"../red_black_tree.rs" 465 23 465 38] _19 <- Borrow.borrow_mut (RedBlackTree_Node_Type.node_right ( * self));
- [#"../red_black_tree.rs" 465 23 465 38] self <- { self with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * self in RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 ( ^ _19)) };
+ [#"../red_black_tree.rs" 465 23 465 38] self <- { self with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * self in RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 ( ^ _19)) ; };
assume { inv3 ( ^ _19) };
- [#"../red_black_tree.rs" 465 23 465 38] _18 <- Borrow.borrow_mut ( * _19);
- [#"../red_black_tree.rs" 465 23 465 38] _19 <- { _19 with current = ^ _18 };
+ [#"../red_black_tree.rs" 465 23 465 38] _18 <- Borrow.borrow_final ( * _19) (Borrow.get_id _19);
+ [#"../red_black_tree.rs" 465 23 465 38] _19 <- { _19 with current = ( ^ _18) ; };
assume { inv3 ( ^ _18) };
[#"../red_black_tree.rs" 465 40 465 51] _21 <- Borrow.borrow_mut (RedBlackTree_Node_Type.node_left x);
[#"../red_black_tree.rs" 465 40 465 51] x <- (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = x in RedBlackTree_Node_Type.C_Node ( ^ _21) x1 x2 x3 x4);
assume { inv3 ( ^ _21) };
- [#"../red_black_tree.rs" 465 40 465 51] _20 <- Borrow.borrow_mut ( * _21);
- [#"../red_black_tree.rs" 465 40 465 51] _21 <- { _21 with current = ^ _20 };
+ [#"../red_black_tree.rs" 465 40 465 51] _20 <- Borrow.borrow_final ( * _21) (Borrow.get_id _21);
+ [#"../red_black_tree.rs" 465 40 465 51] _21 <- { _21 with current = ( ^ _20) ; };
assume { inv3 ( ^ _20) };
[#"../red_black_tree.rs" 465 8 465 52] _17 <- ([#"../red_black_tree.rs" 465 8 465 52] swap0 _18 _20);
_18 <- any borrowed (RedBlackTree_Tree_Type.t_tree k v);
@@ -2102,13 +2102,13 @@ module RedBlackTree_Impl14_RotateLeft
assert { [@expl:type invariant] inv4 _19 };
assume { resolve2 _19 };
[#"../red_black_tree.rs" 466 23 466 27] _23 <- Borrow.borrow_mut ( * self);
- [#"../red_black_tree.rs" 466 23 466 27] self <- { self with current = ^ _23 };
+ [#"../red_black_tree.rs" 466 23 466 27] self <- { self with current = ( ^ _23) ; };
assume { inv5 ( ^ _23) };
[#"../red_black_tree.rs" 466 29 466 35] _25 <- Borrow.borrow_mut x;
[#"../red_black_tree.rs" 466 29 466 35] x <- ^ _25;
assume { inv6 ( ^ _25) };
[#"../red_black_tree.rs" 466 29 466 35] _24 <- Borrow.borrow_mut ( * _25);
- [#"../red_black_tree.rs" 466 29 466 35] _25 <- { _25 with current = ^ _24 };
+ [#"../red_black_tree.rs" 466 29 466 35] _25 <- { _25 with current = ( ^ _24) ; };
assume { inv5 ( ^ _24) };
[#"../red_black_tree.rs" 466 8 466 36] _22 <- ([#"../red_black_tree.rs" 466 8 466 36] swap1 _23 _24);
_23 <- any borrowed (RedBlackTree_Node_Type.t_node k v);
@@ -2118,14 +2118,14 @@ module RedBlackTree_Impl14_RotateLeft
BB5 {
assert { [@expl:type invariant] inv7 _25 };
assume { resolve3 _25 };
- [#"../red_black_tree.rs" 467 23 467 38] _28 <- Borrow.borrow_mut (RedBlackTree_Node_Type.node_color ( * self));
- [#"../red_black_tree.rs" 467 23 467 38] self <- { self with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * self in RedBlackTree_Node_Type.C_Node x0 ( ^ _28) x2 x3 x4) };
- [#"../red_black_tree.rs" 467 23 467 38] _27 <- Borrow.borrow_mut ( * _28);
- [#"../red_black_tree.rs" 467 23 467 38] _28 <- { _28 with current = ^ _27 };
+ [#"../red_black_tree.rs" 467 23 467 38] _28 <- Borrow.borrow_final (RedBlackTree_Node_Type.node_color ( * self)) (Borrow.inherit_id (Borrow.get_id self) 2);
+ [#"../red_black_tree.rs" 467 23 467 38] self <- { self with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * self in RedBlackTree_Node_Type.C_Node x0 ( ^ _28) x2 x3 x4) ; };
+ [#"../red_black_tree.rs" 467 23 467 38] _27 <- Borrow.borrow_final ( * _28) (Borrow.get_id _28);
+ [#"../red_black_tree.rs" 467 23 467 38] _28 <- { _28 with current = ( ^ _27) ; };
[#"../red_black_tree.rs" 467 40 467 52] _30 <- Borrow.borrow_mut (RedBlackTree_Node_Type.node_color x);
[#"../red_black_tree.rs" 467 40 467 52] x <- (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = x in RedBlackTree_Node_Type.C_Node x0 ( ^ _30) x2 x3 x4);
- [#"../red_black_tree.rs" 467 40 467 52] _29 <- Borrow.borrow_mut ( * _30);
- [#"../red_black_tree.rs" 467 40 467 52] _30 <- { _30 with current = ^ _29 };
+ [#"../red_black_tree.rs" 467 40 467 52] _29 <- Borrow.borrow_final ( * _30) (Borrow.get_id _30);
+ [#"../red_black_tree.rs" 467 40 467 52] _30 <- { _30 with current = ( ^ _29) ; };
[#"../red_black_tree.rs" 467 8 467 53] _26 <- ([#"../red_black_tree.rs" 467 8 467 53] swap2 _27 _29);
_27 <- any borrowed (RedBlackTree_Color_Type.t_color);
_29 <- any borrowed (RedBlackTree_Color_Type.t_color);
@@ -2144,7 +2144,7 @@ module RedBlackTree_Impl14_RotateLeft
goto BB9
}
BB9 {
- [#"../red_black_tree.rs" 469 8 469 17] self <- { self with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * self in RedBlackTree_Node_Type.C_Node ([#"../red_black_tree.rs" 469 20 469 42] RedBlackTree_Tree_Type.C_Tree ([#"../red_black_tree.rs" 469 33 469 40] Core_Option_Option_Type.C_Some ([#"../red_black_tree.rs" 469 38 469 39] x))) x1 x2 x3 x4) };
+ [#"../red_black_tree.rs" 469 8 469 17] self <- { self with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * self in RedBlackTree_Node_Type.C_Node ([#"../red_black_tree.rs" 469 20 469 42] RedBlackTree_Tree_Type.C_Tree ([#"../red_black_tree.rs" 469 33 469 40] Core_Option_Option_Type.C_Some ([#"../red_black_tree.rs" 469 38 469 39] x))) x1 x2 x3 x4) ; };
[#"../red_black_tree.rs" 469 38 469 39] x <- any RedBlackTree_Node_Type.t_node k v;
assert { [@expl:type invariant] inv3 (RedBlackTree_Node_Type.node_left ( * self)) };
assume { resolve5 (RedBlackTree_Node_Type.node_left ( * self)) };
@@ -2531,8 +2531,8 @@ module RedBlackTree_Impl14_FlipColors
goto BB0
}
BB0 {
- [#"../red_black_tree.rs" 487 8 487 31] _15 <- Borrow.borrow_mut (RedBlackTree_Tree_Type.tree_node (RedBlackTree_Node_Type.node_left ( * self)));
- [#"../red_black_tree.rs" 487 8 487 31] self <- { self with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * self in RedBlackTree_Node_Type.C_Node (let RedBlackTree_Tree_Type.C_Tree x0 = RedBlackTree_Node_Type.node_left ( * self) in RedBlackTree_Tree_Type.C_Tree ( ^ _15)) x1 x2 x3 x4) };
+ [#"../red_black_tree.rs" 487 8 487 31] _15 <- Borrow.borrow_final (RedBlackTree_Tree_Type.tree_node (RedBlackTree_Node_Type.node_left ( * self))) (Borrow.inherit_id (Borrow.inherit_id (Borrow.get_id self) 1) 1);
+ [#"../red_black_tree.rs" 487 8 487 31] self <- { self with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * self in RedBlackTree_Node_Type.C_Node (let RedBlackTree_Tree_Type.C_Tree x0 = RedBlackTree_Node_Type.node_left ( * self) in RedBlackTree_Tree_Type.C_Tree ( ^ _15)) x1 x2 x3 x4) ; };
assume { inv0 ( ^ _15) };
[#"../red_black_tree.rs" 487 8 487 31] _14 <- ([#"../red_black_tree.rs" 487 8 487 31] as_mut0 _15);
_15 <- any borrowed (Core_Option_Option_Type.t_option (RedBlackTree_Node_Type.t_node k v));
@@ -2544,15 +2544,15 @@ module RedBlackTree_Impl14_FlipColors
goto BB2
}
BB2 {
- [#"../red_black_tree.rs" 487 8 487 59] _13 <- { _13 with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * _13 in RedBlackTree_Node_Type.C_Node x0 ([#"../red_black_tree.rs" 487 49 487 59] RedBlackTree_Node_Type.node_color ( * self)) x2 x3 x4) };
+ [#"../red_black_tree.rs" 487 8 487 59] _13 <- { _13 with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * _13 in RedBlackTree_Node_Type.C_Node x0 ([#"../red_black_tree.rs" 487 49 487 59] RedBlackTree_Node_Type.node_color ( * self)) x2 x3 x4) ; };
assert { [@expl:type invariant] inv1 _13 };
assume { resolve0 _13 };
- [#"../red_black_tree.rs" 488 23 488 38] _18 <- Borrow.borrow_mut (RedBlackTree_Node_Type.node_color ( * self));
- [#"../red_black_tree.rs" 488 23 488 38] self <- { self with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * self in RedBlackTree_Node_Type.C_Node x0 ( ^ _18) x2 x3 x4) };
- [#"../red_black_tree.rs" 488 23 488 38] _17 <- Borrow.borrow_mut ( * _18);
- [#"../red_black_tree.rs" 488 23 488 38] _18 <- { _18 with current = ^ _17 };
- [#"../red_black_tree.rs" 488 45 488 69] _23 <- Borrow.borrow_mut (RedBlackTree_Tree_Type.tree_node (RedBlackTree_Node_Type.node_right ( * self)));
- [#"../red_black_tree.rs" 488 45 488 69] self <- { self with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * self in RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 (let RedBlackTree_Tree_Type.C_Tree x0 = RedBlackTree_Node_Type.node_right ( * self) in RedBlackTree_Tree_Type.C_Tree ( ^ _23))) };
+ [#"../red_black_tree.rs" 488 23 488 38] _18 <- Borrow.borrow_final (RedBlackTree_Node_Type.node_color ( * self)) (Borrow.inherit_id (Borrow.get_id self) 2);
+ [#"../red_black_tree.rs" 488 23 488 38] self <- { self with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * self in RedBlackTree_Node_Type.C_Node x0 ( ^ _18) x2 x3 x4) ; };
+ [#"../red_black_tree.rs" 488 23 488 38] _17 <- Borrow.borrow_final ( * _18) (Borrow.get_id _18);
+ [#"../red_black_tree.rs" 488 23 488 38] _18 <- { _18 with current = ( ^ _17) ; };
+ [#"../red_black_tree.rs" 488 45 488 69] _23 <- Borrow.borrow_final (RedBlackTree_Tree_Type.tree_node (RedBlackTree_Node_Type.node_right ( * self))) (Borrow.inherit_id (Borrow.inherit_id (Borrow.get_id self) 5) 1);
+ [#"../red_black_tree.rs" 488 45 488 69] self <- { self with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * self in RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 (let RedBlackTree_Tree_Type.C_Tree x0 = RedBlackTree_Node_Type.node_right ( * self) in RedBlackTree_Tree_Type.C_Tree ( ^ _23))) ; };
assume { inv0 ( ^ _23) };
[#"../red_black_tree.rs" 488 45 488 69] _22 <- ([#"../red_black_tree.rs" 488 45 488 69] as_mut0 _23);
_23 <- any borrowed (Core_Option_Option_Type.t_option (RedBlackTree_Node_Type.t_node k v));
@@ -2565,9 +2565,9 @@ module RedBlackTree_Impl14_FlipColors
}
BB4 {
[#"../red_black_tree.rs" 488 40 488 84] _20 <- Borrow.borrow_mut (RedBlackTree_Node_Type.node_color ( * _21));
- [#"../red_black_tree.rs" 488 40 488 84] _21 <- { _21 with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * _21 in RedBlackTree_Node_Type.C_Node x0 ( ^ _20) x2 x3 x4) };
- [#"../red_black_tree.rs" 488 40 488 84] _19 <- Borrow.borrow_mut ( * _20);
- [#"../red_black_tree.rs" 488 40 488 84] _20 <- { _20 with current = ^ _19 };
+ [#"../red_black_tree.rs" 488 40 488 84] _21 <- { _21 with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * _21 in RedBlackTree_Node_Type.C_Node x0 ( ^ _20) x2 x3 x4) ; };
+ [#"../red_black_tree.rs" 488 40 488 84] _19 <- Borrow.borrow_final ( * _20) (Borrow.get_id _20);
+ [#"../red_black_tree.rs" 488 40 488 84] _20 <- { _20 with current = ( ^ _19) ; };
[#"../red_black_tree.rs" 488 8 488 85] _16 <- ([#"../red_black_tree.rs" 488 8 488 85] swap0 _17 _19);
_17 <- any borrowed (RedBlackTree_Color_Type.t_color);
_19 <- any borrowed (RedBlackTree_Color_Type.t_color);
@@ -3060,7 +3060,7 @@ module RedBlackTree_Impl14_Balance
}
BB6 {
[#"../red_black_tree.rs" 512 12 512 30] _22 <- Borrow.borrow_mut ( * self);
- [#"../red_black_tree.rs" 512 12 512 30] self <- { self with current = ^ _22 };
+ [#"../red_black_tree.rs" 512 12 512 30] self <- { self with current = ( ^ _22) ; };
assume { inv0 ( ^ _22) };
[#"../red_black_tree.rs" 512 12 512 30] _21 <- ([#"../red_black_tree.rs" 512 12 512 30] rotate_left0 _22);
_22 <- any borrowed (RedBlackTree_Node_Type.t_node k v);
@@ -3116,7 +3116,7 @@ module RedBlackTree_Impl14_Balance
}
BB17 {
[#"../red_black_tree.rs" 516 12 516 31] _33 <- Borrow.borrow_mut ( * self);
- [#"../red_black_tree.rs" 516 12 516 31] self <- { self with current = ^ _33 };
+ [#"../red_black_tree.rs" 516 12 516 31] self <- { self with current = ( ^ _33) ; };
assume { inv0 ( ^ _33) };
[#"../red_black_tree.rs" 516 12 516 31] _32 <- ([#"../red_black_tree.rs" 516 12 516 31] rotate_right0 _33);
_33 <- any borrowed (RedBlackTree_Node_Type.t_node k v);
@@ -3160,8 +3160,8 @@ module RedBlackTree_Impl14_Balance
goto BB23
}
BB26 {
- [#"../red_black_tree.rs" 520 12 520 30] _40 <- Borrow.borrow_mut ( * self);
- [#"../red_black_tree.rs" 520 12 520 30] self <- { self with current = ^ _40 };
+ [#"../red_black_tree.rs" 520 12 520 30] _40 <- Borrow.borrow_final ( * self) (Borrow.get_id self);
+ [#"../red_black_tree.rs" 520 12 520 30] self <- { self with current = ( ^ _40) ; };
assume { inv0 ( ^ _40) };
[#"../red_black_tree.rs" 520 12 520 30] _39 <- ([#"../red_black_tree.rs" 520 12 520 30] flip_colors0 _40);
_40 <- any borrowed (RedBlackTree_Node_Type.t_node k v);
@@ -3640,7 +3640,7 @@ module RedBlackTree_Impl14_MoveRedLeft
}
BB0 {
[#"../red_black_tree.rs" 543 8 543 26] _16 <- Borrow.borrow_mut ( * self);
- [#"../red_black_tree.rs" 543 8 543 26] self <- { self with current = ^ _16 };
+ [#"../red_black_tree.rs" 543 8 543 26] self <- { self with current = ( ^ _16) ; };
assume { inv0 ( ^ _16) };
[#"../red_black_tree.rs" 543 8 543 26] _15 <- ([#"../red_black_tree.rs" 543 8 543 26] flip_colors0 _16);
_16 <- any borrowed (RedBlackTree_Node_Type.t_node k v);
@@ -3648,7 +3648,7 @@ module RedBlackTree_Impl14_MoveRedLeft
}
BB1 {
[#"../red_black_tree.rs" 544 11 544 35] _22 <- Borrow.borrow_mut (RedBlackTree_Tree_Type.tree_node (RedBlackTree_Node_Type.node_right ( * self)));
- [#"../red_black_tree.rs" 544 11 544 35] self <- { self with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * self in RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 (let RedBlackTree_Tree_Type.C_Tree x0 = RedBlackTree_Node_Type.node_right ( * self) in RedBlackTree_Tree_Type.C_Tree ( ^ _22))) };
+ [#"../red_black_tree.rs" 544 11 544 35] self <- { self with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * self in RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 (let RedBlackTree_Tree_Type.C_Tree x0 = RedBlackTree_Node_Type.node_right ( * self) in RedBlackTree_Tree_Type.C_Tree ( ^ _22))) ; };
assume { inv1 ( ^ _22) };
[#"../red_black_tree.rs" 544 11 544 35] _21 <- ([#"../red_black_tree.rs" 544 11 544 35] as_mut0 _22);
_22 <- any borrowed (Core_Option_Option_Type.t_option (RedBlackTree_Node_Type.t_node k v));
@@ -3673,7 +3673,7 @@ module RedBlackTree_Impl14_MoveRedLeft
}
BB5 {
[#"../red_black_tree.rs" 545 12 545 36] _28 <- Borrow.borrow_mut (RedBlackTree_Tree_Type.tree_node (RedBlackTree_Node_Type.node_right ( * self)));
- [#"../red_black_tree.rs" 545 12 545 36] self <- { self with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * self in RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 (let RedBlackTree_Tree_Type.C_Tree x0 = RedBlackTree_Node_Type.node_right ( * self) in RedBlackTree_Tree_Type.C_Tree ( ^ _28))) };
+ [#"../red_black_tree.rs" 545 12 545 36] self <- { self with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * self in RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 (let RedBlackTree_Tree_Type.C_Tree x0 = RedBlackTree_Node_Type.node_right ( * self) in RedBlackTree_Tree_Type.C_Tree ( ^ _28))) ; };
assume { inv1 ( ^ _28) };
[#"../red_black_tree.rs" 545 12 545 36] _27 <- ([#"../red_black_tree.rs" 545 12 545 36] as_mut0 _28);
_28 <- any borrowed (Core_Option_Option_Type.t_option (RedBlackTree_Node_Type.t_node k v));
@@ -3686,7 +3686,7 @@ module RedBlackTree_Impl14_MoveRedLeft
}
BB7 {
[#"../red_black_tree.rs" 545 12 545 60] _25 <- Borrow.borrow_mut ( * _26);
- [#"../red_black_tree.rs" 545 12 545 60] _26 <- { _26 with current = ^ _25 };
+ [#"../red_black_tree.rs" 545 12 545 60] _26 <- { _26 with current = ( ^ _25) ; };
assume { inv0 ( ^ _25) };
[#"../red_black_tree.rs" 545 12 545 60] _24 <- ([#"../red_black_tree.rs" 545 12 545 60] rotate_right0 _25);
_25 <- any borrowed (RedBlackTree_Node_Type.t_node k v);
@@ -3696,7 +3696,7 @@ module RedBlackTree_Impl14_MoveRedLeft
assert { [@expl:type invariant] inv2 _26 };
assume { resolve0 _26 };
[#"../red_black_tree.rs" 546 12 546 30] _30 <- Borrow.borrow_mut ( * self);
- [#"../red_black_tree.rs" 546 12 546 30] self <- { self with current = ^ _30 };
+ [#"../red_black_tree.rs" 546 12 546 30] self <- { self with current = ( ^ _30) ; };
assume { inv0 ( ^ _30) };
[#"../red_black_tree.rs" 546 12 546 30] _29 <- ([#"../red_black_tree.rs" 546 12 546 30] rotate_left0 _30);
_30 <- any borrowed (RedBlackTree_Node_Type.t_node k v);
@@ -3704,15 +3704,15 @@ module RedBlackTree_Impl14_MoveRedLeft
}
BB9 {
[#"../red_black_tree.rs" 547 12 547 30] _32 <- Borrow.borrow_mut ( * self);
- [#"../red_black_tree.rs" 547 12 547 30] self <- { self with current = ^ _32 };
+ [#"../red_black_tree.rs" 547 12 547 30] self <- { self with current = ( ^ _32) ; };
assume { inv0 ( ^ _32) };
[#"../red_black_tree.rs" 547 12 547 30] _31 <- ([#"../red_black_tree.rs" 547 12 547 30] flip_colors0 _32);
_32 <- any borrowed (RedBlackTree_Node_Type.t_node k v);
goto BB10
}
BB10 {
- [#"../red_black_tree.rs" 548 19 548 42] _35 <- Borrow.borrow_mut (RedBlackTree_Tree_Type.tree_node (RedBlackTree_Node_Type.node_left ( * self)));
- [#"../red_black_tree.rs" 548 19 548 42] self <- { self with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * self in RedBlackTree_Node_Type.C_Node (let RedBlackTree_Tree_Type.C_Tree x0 = RedBlackTree_Node_Type.node_left ( * self) in RedBlackTree_Tree_Type.C_Tree ( ^ _35)) x1 x2 x3 x4) };
+ [#"../red_black_tree.rs" 548 19 548 42] _35 <- Borrow.borrow_final (RedBlackTree_Tree_Type.tree_node (RedBlackTree_Node_Type.node_left ( * self))) (Borrow.inherit_id (Borrow.inherit_id (Borrow.get_id self) 1) 1);
+ [#"../red_black_tree.rs" 548 19 548 42] self <- { self with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * self in RedBlackTree_Node_Type.C_Node (let RedBlackTree_Tree_Type.C_Tree x0 = RedBlackTree_Node_Type.node_left ( * self) in RedBlackTree_Tree_Type.C_Tree ( ^ _35)) x1 x2 x3 x4) ; };
assume { inv1 ( ^ _35) };
[#"../red_black_tree.rs" 548 19 548 42] _34 <- ([#"../red_black_tree.rs" 548 19 548 42] as_mut0 _35);
_35 <- any borrowed (Core_Option_Option_Type.t_option (RedBlackTree_Node_Type.t_node k v));
@@ -3725,7 +3725,7 @@ module RedBlackTree_Impl14_MoveRedLeft
}
BB12 {
[#"../red_black_tree.rs" 548 19 548 51] _0 <- Borrow.borrow_mut ( * _33);
- [#"../red_black_tree.rs" 548 19 548 51] _33 <- { _33 with current = ^ _0 };
+ [#"../red_black_tree.rs" 548 19 548 51] _33 <- { _33 with current = ( ^ _0) ; };
assume { inv0 ( ^ _0) };
assert { [@expl:type invariant] inv2 _33 };
assume { resolve0 _33 };
@@ -4185,7 +4185,7 @@ module RedBlackTree_Impl14_MoveRedRight
}
BB0 {
[#"../red_black_tree.rs" 572 8 572 26] _16 <- Borrow.borrow_mut ( * self);
- [#"../red_black_tree.rs" 572 8 572 26] self <- { self with current = ^ _16 };
+ [#"../red_black_tree.rs" 572 8 572 26] self <- { self with current = ( ^ _16) ; };
assume { inv0 ( ^ _16) };
[#"../red_black_tree.rs" 572 8 572 26] _15 <- ([#"../red_black_tree.rs" 572 8 572 26] flip_colors0 _16);
_16 <- any borrowed (RedBlackTree_Node_Type.t_node k v);
@@ -4193,7 +4193,7 @@ module RedBlackTree_Impl14_MoveRedRight
}
BB1 {
[#"../red_black_tree.rs" 573 11 573 34] _22 <- Borrow.borrow_mut (RedBlackTree_Tree_Type.tree_node (RedBlackTree_Node_Type.node_left ( * self)));
- [#"../red_black_tree.rs" 573 11 573 34] self <- { self with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * self in RedBlackTree_Node_Type.C_Node (let RedBlackTree_Tree_Type.C_Tree x0 = RedBlackTree_Node_Type.node_left ( * self) in RedBlackTree_Tree_Type.C_Tree ( ^ _22)) x1 x2 x3 x4) };
+ [#"../red_black_tree.rs" 573 11 573 34] self <- { self with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * self in RedBlackTree_Node_Type.C_Node (let RedBlackTree_Tree_Type.C_Tree x0 = RedBlackTree_Node_Type.node_left ( * self) in RedBlackTree_Tree_Type.C_Tree ( ^ _22)) x1 x2 x3 x4) ; };
assume { inv1 ( ^ _22) };
[#"../red_black_tree.rs" 573 11 573 34] _21 <- ([#"../red_black_tree.rs" 573 11 573 34] as_mut0 _22);
_22 <- any borrowed (Core_Option_Option_Type.t_option (RedBlackTree_Node_Type.t_node k v));
@@ -4218,7 +4218,7 @@ module RedBlackTree_Impl14_MoveRedRight
}
BB5 {
[#"../red_black_tree.rs" 574 12 574 31] _25 <- Borrow.borrow_mut ( * self);
- [#"../red_black_tree.rs" 574 12 574 31] self <- { self with current = ^ _25 };
+ [#"../red_black_tree.rs" 574 12 574 31] self <- { self with current = ( ^ _25) ; };
assume { inv0 ( ^ _25) };
[#"../red_black_tree.rs" 574 12 574 31] _24 <- ([#"../red_black_tree.rs" 574 12 574 31] rotate_right0 _25);
_25 <- any borrowed (RedBlackTree_Node_Type.t_node k v);
@@ -4226,15 +4226,15 @@ module RedBlackTree_Impl14_MoveRedRight
}
BB6 {
[#"../red_black_tree.rs" 575 12 575 30] _27 <- Borrow.borrow_mut ( * self);
- [#"../red_black_tree.rs" 575 12 575 30] self <- { self with current = ^ _27 };
+ [#"../red_black_tree.rs" 575 12 575 30] self <- { self with current = ( ^ _27) ; };
assume { inv0 ( ^ _27) };
[#"../red_black_tree.rs" 575 12 575 30] _26 <- ([#"../red_black_tree.rs" 575 12 575 30] flip_colors0 _27);
_27 <- any borrowed (RedBlackTree_Node_Type.t_node k v);
goto BB7
}
BB7 {
- [#"../red_black_tree.rs" 576 19 576 43] _30 <- Borrow.borrow_mut (RedBlackTree_Tree_Type.tree_node (RedBlackTree_Node_Type.node_right ( * self)));
- [#"../red_black_tree.rs" 576 19 576 43] self <- { self with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * self in RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 (let RedBlackTree_Tree_Type.C_Tree x0 = RedBlackTree_Node_Type.node_right ( * self) in RedBlackTree_Tree_Type.C_Tree ( ^ _30))) };
+ [#"../red_black_tree.rs" 576 19 576 43] _30 <- Borrow.borrow_final (RedBlackTree_Tree_Type.tree_node (RedBlackTree_Node_Type.node_right ( * self))) (Borrow.inherit_id (Borrow.inherit_id (Borrow.get_id self) 5) 1);
+ [#"../red_black_tree.rs" 576 19 576 43] self <- { self with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * self in RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 (let RedBlackTree_Tree_Type.C_Tree x0 = RedBlackTree_Node_Type.node_right ( * self) in RedBlackTree_Tree_Type.C_Tree ( ^ _30))) ; };
assume { inv1 ( ^ _30) };
[#"../red_black_tree.rs" 576 19 576 43] _29 <- ([#"../red_black_tree.rs" 576 19 576 43] as_mut0 _30);
_30 <- any borrowed (Core_Option_Option_Type.t_option (RedBlackTree_Node_Type.t_node k v));
@@ -4247,7 +4247,7 @@ module RedBlackTree_Impl14_MoveRedRight
}
BB9 {
[#"../red_black_tree.rs" 576 19 576 52] _0 <- Borrow.borrow_mut ( * _28);
- [#"../red_black_tree.rs" 576 19 576 52] _28 <- { _28 with current = ^ _0 };
+ [#"../red_black_tree.rs" 576 19 576 52] _28 <- { _28 with current = ( ^ _0) ; };
assume { inv0 ( ^ _0) };
assert { [@expl:type invariant] inv2 _28 };
assume { resolve0 _28 };
@@ -4970,8 +4970,8 @@ module RedBlackTree_Impl15_InsertRec
goto BB2
}
BB2 {
- [#"../red_black_tree.rs" 601 28 601 42] _11 <- Borrow.borrow_mut (RedBlackTree_Tree_Type.tree_node ( * self));
- [#"../red_black_tree.rs" 601 28 601 42] self <- { self with current = (let RedBlackTree_Tree_Type.C_Tree x0 = * self in RedBlackTree_Tree_Type.C_Tree ( ^ _11)) };
+ [#"../red_black_tree.rs" 601 28 601 42] _11 <- Borrow.borrow_final (RedBlackTree_Tree_Type.tree_node ( * self)) (Borrow.inherit_id (Borrow.get_id self) 1);
+ [#"../red_black_tree.rs" 601 28 601 42] self <- { self with current = (let RedBlackTree_Tree_Type.C_Tree x0 = * self in RedBlackTree_Tree_Type.C_Tree ( ^ _11)) ; };
assume { inv0 ( ^ _11) };
switch ( * _11)
| Core_Option_Option_Type.C_Some _ -> goto BB3
@@ -4982,8 +4982,8 @@ module RedBlackTree_Impl15_InsertRec
goto BB4
}
BB4 {
- [#"../red_black_tree.rs" 601 20 601 24] node <- Borrow.borrow_mut (Core_Option_Option_Type.some_0 ( * _11));
- [#"../red_black_tree.rs" 601 20 601 24] _11 <- { _11 with current = (let Core_Option_Option_Type.C_Some x0 = * _11 in Core_Option_Option_Type.C_Some ( ^ node)) };
+ [#"../red_black_tree.rs" 601 20 601 24] node <- Borrow.borrow_final (Core_Option_Option_Type.some_0 ( * _11)) (Borrow.inherit_id (Borrow.get_id _11) 1);
+ [#"../red_black_tree.rs" 601 20 601 24] _11 <- { _11 with current = (let Core_Option_Option_Type.C_Some x0 = * _11 in Core_Option_Option_Type.C_Some ( ^ node)) ; };
assume { inv1 ( ^ node) };
[#"../red_black_tree.rs" 602 26 602 35] _18 <- ([#"../red_black_tree.rs" 602 26 602 35] RedBlackTree_Node_Type.node_key ( * node));
assert { [@expl:type invariant] inv2 _18 };
@@ -5006,7 +5006,7 @@ module RedBlackTree_Impl15_InsertRec
}
BB8 {
[#"../red_black_tree.rs" 608 27 608 58] _25 <- Borrow.borrow_mut (RedBlackTree_Node_Type.node_right ( * node));
- [#"../red_black_tree.rs" 608 27 608 58] node <- { node with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * node in RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 ( ^ _25)) };
+ [#"../red_black_tree.rs" 608 27 608 58] node <- { node with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * node in RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 ( ^ _25)) ; };
assume { inv3 ( ^ _25) };
[#"../red_black_tree.rs" 608 27 608 58] _14 <- ([#"../red_black_tree.rs" 608 27 608 58] insert_rec _25 ([#"../red_black_tree.rs" 608 49 608 52] key) ([#"../red_black_tree.rs" 608 54 608 57] val'));
_25 <- any borrowed (RedBlackTree_Tree_Type.t_tree k v);
@@ -5030,7 +5030,7 @@ module RedBlackTree_Impl15_InsertRec
}
BB10 {
[#"../red_black_tree.rs" 603 24 603 54] _20 <- Borrow.borrow_mut (RedBlackTree_Node_Type.node_left ( * node));
- [#"../red_black_tree.rs" 603 24 603 54] node <- { node with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * node in RedBlackTree_Node_Type.C_Node ( ^ _20) x1 x2 x3 x4) };
+ [#"../red_black_tree.rs" 603 24 603 54] node <- { node with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * node in RedBlackTree_Node_Type.C_Node ( ^ _20) x1 x2 x3 x4) ; };
assume { inv3 ( ^ _20) };
[#"../red_black_tree.rs" 603 24 603 54] _14 <- ([#"../red_black_tree.rs" 603 24 603 54] insert_rec _20 ([#"../red_black_tree.rs" 603 45 603 48] key) ([#"../red_black_tree.rs" 603 50 603 53] val'));
_20 <- any borrowed (RedBlackTree_Tree_Type.t_tree k v);
@@ -5047,7 +5047,7 @@ module RedBlackTree_Impl15_InsertRec
goto BB13
}
BB13 {
- [#"../red_black_tree.rs" 605 20 605 28] node <- { node with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * node in RedBlackTree_Node_Type.C_Node x0 x1 x2 ([#"../red_black_tree.rs" 605 31 605 34] val') x4) };
+ [#"../red_black_tree.rs" 605 20 605 28] node <- { node with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * node in RedBlackTree_Node_Type.C_Node x0 x1 x2 ([#"../red_black_tree.rs" 605 31 605 34] val') x4) ; };
[#"../red_black_tree.rs" 605 31 605 34] val' <- any v;
assert { [@expl:type invariant] inv5 (RedBlackTree_Node_Type.node_val ( * node)) };
assume { resolve2 (RedBlackTree_Node_Type.node_val ( * node)) };
@@ -5068,7 +5068,7 @@ module RedBlackTree_Impl15_InsertRec
}
BB17 {
[#"../red_black_tree.rs" 610 12 610 26] _29 <- Borrow.borrow_mut ( * node);
- [#"../red_black_tree.rs" 610 12 610 26] node <- { node with current = ^ _29 };
+ [#"../red_black_tree.rs" 610 12 610 26] node <- { node with current = ( ^ _29) ; };
assume { inv9 ( ^ _29) };
[#"../red_black_tree.rs" 610 12 610 26] _28 <- ([#"../red_black_tree.rs" 610 12 610 26] balance0 _29);
_29 <- any borrowed (RedBlackTree_Node_Type.t_node k v);
@@ -5114,7 +5114,7 @@ module RedBlackTree_Impl15_InsertRec
goto BB28
}
BB28 {
- [#"../red_black_tree.rs" 612 12 612 21] self <- { self with current = (let RedBlackTree_Tree_Type.C_Tree x0 = * self in RedBlackTree_Tree_Type.C_Tree ([#"../red_black_tree.rs" 612 24 618 15] Core_Option_Option_Type.C_Some ([#"../red_black_tree.rs" 612 38 618 13] RedBlackTree_Node_Type.C_Node ([#"../red_black_tree.rs" 613 22 613 41] RedBlackTree_Tree_Type.C_Tree ([#"../red_black_tree.rs" 613 35 613 39] Core_Option_Option_Type.C_None)) ([#"../red_black_tree.rs" 614 23 614 26] RedBlackTree_Color_Type.C_Red) ([#"../red_black_tree.rs" 615 16 615 19] key) ([#"../red_black_tree.rs" 616 16 616 19] val') ([#"../red_black_tree.rs" 617 23 617 42] RedBlackTree_Tree_Type.C_Tree ([#"../red_black_tree.rs" 617 36 617 40] Core_Option_Option_Type.C_None))))) };
+ [#"../red_black_tree.rs" 612 12 612 21] self <- { self with current = (let RedBlackTree_Tree_Type.C_Tree x0 = * self in RedBlackTree_Tree_Type.C_Tree ([#"../red_black_tree.rs" 612 24 618 15] Core_Option_Option_Type.C_Some ([#"../red_black_tree.rs" 612 38 618 13] RedBlackTree_Node_Type.C_Node ([#"../red_black_tree.rs" 613 22 613 41] RedBlackTree_Tree_Type.C_Tree ([#"../red_black_tree.rs" 613 35 613 39] Core_Option_Option_Type.C_None)) ([#"../red_black_tree.rs" 614 23 614 26] RedBlackTree_Color_Type.C_Red) ([#"../red_black_tree.rs" 615 16 615 19] key) ([#"../red_black_tree.rs" 616 16 616 19] val') ([#"../red_black_tree.rs" 617 23 617 42] RedBlackTree_Tree_Type.C_Tree ([#"../red_black_tree.rs" 617 36 617 40] Core_Option_Option_Type.C_None))))) ; };
[#"../red_black_tree.rs" 615 16 615 19] key <- any k;
[#"../red_black_tree.rs" 616 16 616 19] val' <- any v;
assert { [@expl:type invariant] inv0 (RedBlackTree_Tree_Type.tree_node ( * self)) };
@@ -5579,7 +5579,7 @@ module RedBlackTree_Impl15_Insert
}
BB1 {
[#"../red_black_tree.rs" 627 8 627 33] _8 <- Borrow.borrow_mut ( * self);
- [#"../red_black_tree.rs" 627 8 627 33] self <- { self with current = ^ _8 };
+ [#"../red_black_tree.rs" 627 8 627 33] self <- { self with current = ( ^ _8) ; };
assume { inv0 ( ^ _8) };
[#"../red_black_tree.rs" 627 8 627 33] _7 <- ([#"../red_black_tree.rs" 627 8 627 33] insert_rec0 _8 ([#"../red_black_tree.rs" 627 24 627 27] key) ([#"../red_black_tree.rs" 627 29 627 32] val'));
_8 <- any borrowed (RedBlackTree_Tree_Type.t_tree k v);
@@ -5588,8 +5588,8 @@ module RedBlackTree_Impl15_Insert
goto BB2
}
BB2 {
- [#"../red_black_tree.rs" 628 8 628 26] _14 <- Borrow.borrow_mut (RedBlackTree_Tree_Type.tree_node ( * self));
- [#"../red_black_tree.rs" 628 8 628 26] self <- { self with current = (let RedBlackTree_Tree_Type.C_Tree x0 = * self in RedBlackTree_Tree_Type.C_Tree ( ^ _14)) };
+ [#"../red_black_tree.rs" 628 8 628 26] _14 <- Borrow.borrow_final (RedBlackTree_Tree_Type.tree_node ( * self)) (Borrow.inherit_id (Borrow.get_id self) 1);
+ [#"../red_black_tree.rs" 628 8 628 26] self <- { self with current = (let RedBlackTree_Tree_Type.C_Tree x0 = * self in RedBlackTree_Tree_Type.C_Tree ( ^ _14)) ; };
assume { inv1 ( ^ _14) };
[#"../red_black_tree.rs" 628 8 628 26] _13 <- ([#"../red_black_tree.rs" 628 8 628 26] as_mut0 _14);
_14 <- any borrowed (Core_Option_Option_Type.t_option (RedBlackTree_Node_Type.t_node k v));
@@ -5601,7 +5601,7 @@ module RedBlackTree_Impl15_Insert
goto BB4
}
BB4 {
- [#"../red_black_tree.rs" 628 8 628 49] _12 <- { _12 with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * _12 in RedBlackTree_Node_Type.C_Node x0 ([#"../red_black_tree.rs" 628 44 628 49] RedBlackTree_Color_Type.C_Black) x2 x3 x4) };
+ [#"../red_black_tree.rs" 628 8 628 49] _12 <- { _12 with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * _12 in RedBlackTree_Node_Type.C_Node x0 ([#"../red_black_tree.rs" 628 44 628 49] RedBlackTree_Color_Type.C_Black) x2 x3 x4) ; };
assert { [@expl:type invariant] inv2 _12 };
assume { resolve0 _12 };
assert { [@expl:type invariant] inv3 self };
@@ -6196,7 +6196,7 @@ module RedBlackTree_Impl15_DeleteMaxRec
}
BB0 {
[#"../red_black_tree.rs" 644 23 644 41] _15 <- Borrow.borrow_mut (RedBlackTree_Tree_Type.tree_node ( * self));
- [#"../red_black_tree.rs" 644 23 644 41] self <- { self with current = (let RedBlackTree_Tree_Type.C_Tree x0 = * self in RedBlackTree_Tree_Type.C_Tree ( ^ _15)) };
+ [#"../red_black_tree.rs" 644 23 644 41] self <- { self with current = (let RedBlackTree_Tree_Type.C_Tree x0 = * self in RedBlackTree_Tree_Type.C_Tree ( ^ _15)) ; };
assume { inv0 ( ^ _15) };
[#"../red_black_tree.rs" 644 23 644 41] _14 <- ([#"../red_black_tree.rs" 644 23 644 41] as_mut0 _15);
_15 <- any borrowed (Core_Option_Option_Type.t_option (RedBlackTree_Node_Type.t_node k v));
@@ -6208,8 +6208,8 @@ module RedBlackTree_Impl15_DeleteMaxRec
goto BB2
}
BB2 {
- [#"../red_black_tree.rs" 644 23 644 59] _12 <- Borrow.borrow_mut ( * _13);
- [#"../red_black_tree.rs" 644 23 644 59] _13 <- { _13 with current = ^ _12 };
+ [#"../red_black_tree.rs" 644 23 644 59] _12 <- Borrow.borrow_final ( * _13) (Borrow.get_id _13);
+ [#"../red_black_tree.rs" 644 23 644 59] _13 <- { _13 with current = ( ^ _12) ; };
assume { inv1 ( ^ _12) };
[#"../red_black_tree.rs" 644 23 644 59] node <- ([#"../red_black_tree.rs" 644 23 644 59] as_mut1 _12);
_12 <- any borrowed (RedBlackTree_Node_Type.t_node k v);
@@ -6229,7 +6229,7 @@ module RedBlackTree_Impl15_DeleteMaxRec
}
BB5 {
[#"../red_black_tree.rs" 646 12 646 31] _19 <- Borrow.borrow_mut ( * node);
- [#"../red_black_tree.rs" 646 12 646 31] node <- { node with current = ^ _19 };
+ [#"../red_black_tree.rs" 646 12 646 31] node <- { node with current = ( ^ _19) ; };
assume { inv3 ( ^ _19) };
[#"../red_black_tree.rs" 646 12 646 31] _16 <- ([#"../red_black_tree.rs" 646 12 646 31] rotate_right0 _19);
_19 <- any borrowed (RedBlackTree_Node_Type.t_node k v);
@@ -6254,11 +6254,11 @@ module RedBlackTree_Impl15_DeleteMaxRec
BB10 {
assert { [@expl:type invariant] inv4 node };
assume { resolve1 node };
- [#"../red_black_tree.rs" 649 38 649 52] _26 <- Borrow.borrow_mut (RedBlackTree_Tree_Type.tree_node ( * self));
- [#"../red_black_tree.rs" 649 38 649 52] self <- { self with current = (let RedBlackTree_Tree_Type.C_Tree x0 = * self in RedBlackTree_Tree_Type.C_Tree ( ^ _26)) };
+ [#"../red_black_tree.rs" 649 38 649 52] _26 <- Borrow.borrow_final (RedBlackTree_Tree_Type.tree_node ( * self)) (Borrow.inherit_id (Borrow.get_id self) 1);
+ [#"../red_black_tree.rs" 649 38 649 52] self <- { self with current = (let RedBlackTree_Tree_Type.C_Tree x0 = * self in RedBlackTree_Tree_Type.C_Tree ( ^ _26)) ; };
assume { inv0 ( ^ _26) };
- [#"../red_black_tree.rs" 649 38 649 52] _25 <- Borrow.borrow_mut ( * _26);
- [#"../red_black_tree.rs" 649 38 649 52] _26 <- { _26 with current = ^ _25 };
+ [#"../red_black_tree.rs" 649 38 649 52] _25 <- Borrow.borrow_final ( * _26) (Borrow.get_id _26);
+ [#"../red_black_tree.rs" 649 38 649 52] _26 <- { _26 with current = ( ^ _25) ; };
assume { inv0 ( ^ _25) };
[#"../red_black_tree.rs" 649 23 649 53] _24 <- ([#"../red_black_tree.rs" 649 23 649 53] take0 _25);
_25 <- any borrowed (Core_Option_Option_Type.t_option (RedBlackTree_Node_Type.t_node k v));
@@ -6328,16 +6328,16 @@ module RedBlackTree_Impl15_DeleteMaxRec
goto BB18
}
BB23 {
- [#"../red_black_tree.rs" 653 19 653 40] _42 <- Borrow.borrow_mut ( * node);
- [#"../red_black_tree.rs" 653 19 653 40] node <- { node with current = ^ _42 };
+ [#"../red_black_tree.rs" 653 19 653 40] _42 <- Borrow.borrow_final ( * node) (Borrow.get_id node);
+ [#"../red_black_tree.rs" 653 19 653 40] node <- { node with current = ( ^ _42) ; };
assume { inv3 ( ^ _42) };
[#"../red_black_tree.rs" 653 19 653 40] _41 <- ([#"../red_black_tree.rs" 653 19 653 40] move_red_right0 _42);
_42 <- any borrowed (RedBlackTree_Node_Type.t_node k v);
goto BB24
}
BB24 {
- [#"../red_black_tree.rs" 653 19 653 40] _40 <- Borrow.borrow_mut ( * _41);
- [#"../red_black_tree.rs" 653 19 653 40] _41 <- { _41 with current = ^ _40 };
+ [#"../red_black_tree.rs" 653 19 653 40] _40 <- Borrow.borrow_final ( * _41) (Borrow.get_id _41);
+ [#"../red_black_tree.rs" 653 19 653 40] _41 <- { _41 with current = ( ^ _40) ; };
assume { inv3 ( ^ _40) };
assert { [@expl:type invariant] inv4 node };
assume { resolve1 node };
@@ -6354,15 +6354,15 @@ module RedBlackTree_Impl15_DeleteMaxRec
}
BB26 {
[#"../red_black_tree.rs" 655 16 655 43] _44 <- Borrow.borrow_mut (RedBlackTree_Node_Type.node_right ( * node));
- [#"../red_black_tree.rs" 655 16 655 43] node <- { node with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * node in RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 ( ^ _44)) };
+ [#"../red_black_tree.rs" 655 16 655 43] node <- { node with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * node in RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 ( ^ _44)) ; };
assume { inv8 ( ^ _44) };
[#"../red_black_tree.rs" 655 16 655 43] r <- ([#"../red_black_tree.rs" 655 16 655 43] delete_max_rec _44);
_44 <- any borrowed (RedBlackTree_Tree_Type.t_tree k v);
goto BB27
}
BB27 {
- [#"../red_black_tree.rs" 656 8 656 22] _46 <- Borrow.borrow_mut ( * node);
- [#"../red_black_tree.rs" 656 8 656 22] node <- { node with current = ^ _46 };
+ [#"../red_black_tree.rs" 656 8 656 22] _46 <- Borrow.borrow_final ( * node) (Borrow.get_id node);
+ [#"../red_black_tree.rs" 656 8 656 22] node <- { node with current = ( ^ _46) ; };
assume { inv3 ( ^ _46) };
[#"../red_black_tree.rs" 656 8 656 22] _45 <- ([#"../red_black_tree.rs" 656 8 656 22] balance0 _46);
_46 <- any borrowed (RedBlackTree_Node_Type.t_node k v);
@@ -6886,7 +6886,7 @@ module RedBlackTree_Impl15_DeleteMax
assert { [@expl:type invariant] inv0 old_self };
assume { resolve0 old_self };
[#"../red_black_tree.rs" 669 28 669 42] _8 <- Borrow.borrow_mut (RedBlackTree_Tree_Type.tree_node ( * self));
- [#"../red_black_tree.rs" 669 28 669 42] self <- { self with current = (let RedBlackTree_Tree_Type.C_Tree x0 = * self in RedBlackTree_Tree_Type.C_Tree ( ^ _8)) };
+ [#"../red_black_tree.rs" 669 28 669 42] self <- { self with current = (let RedBlackTree_Tree_Type.C_Tree x0 = * self in RedBlackTree_Tree_Type.C_Tree ( ^ _8)) ; };
assume { inv1 ( ^ _8) };
switch ( * _8)
| Core_Option_Option_Type.C_Some _ -> goto BB2
@@ -6897,8 +6897,8 @@ module RedBlackTree_Impl15_DeleteMax
goto BB3
}
BB3 {
- [#"../red_black_tree.rs" 669 20 669 24] node <- Borrow.borrow_mut (Core_Option_Option_Type.some_0 ( * _8));
- [#"../red_black_tree.rs" 669 20 669 24] _8 <- { _8 with current = (let Core_Option_Option_Type.C_Some x0 = * _8 in Core_Option_Option_Type.C_Some ( ^ node)) };
+ [#"../red_black_tree.rs" 669 20 669 24] node <- Borrow.borrow_final (Core_Option_Option_Type.some_0 ( * _8)) (Borrow.inherit_id (Borrow.get_id _8) 1);
+ [#"../red_black_tree.rs" 669 20 669 24] _8 <- { _8 with current = (let Core_Option_Option_Type.C_Some x0 = * _8 in Core_Option_Option_Type.C_Some ( ^ node)) ; };
assume { inv2 ( ^ node) };
[#"../red_black_tree.rs" 670 16 670 34] _12 <- ([#"../red_black_tree.rs" 670 16 670 34] is_red0 ([#"../red_black_tree.rs" 670 16 670 34] RedBlackTree_Node_Type.node_left ( * node)));
goto BB4
@@ -6910,7 +6910,7 @@ module RedBlackTree_Impl15_DeleteMax
end
}
BB5 {
- [#"../red_black_tree.rs" 671 16 671 32] node <- { node with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * node in RedBlackTree_Node_Type.C_Node x0 ([#"../red_black_tree.rs" 671 29 671 32] RedBlackTree_Color_Type.C_Red) x2 x3 x4) };
+ [#"../red_black_tree.rs" 671 16 671 32] node <- { node with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * node in RedBlackTree_Node_Type.C_Node x0 ([#"../red_black_tree.rs" 671 29 671 32] RedBlackTree_Color_Type.C_Red) x2 x3 x4) ; };
assert { [@expl:type invariant] inv3 node };
assume { resolve1 node };
assert { [@expl:type invariant] inv4 _8 };
@@ -6929,7 +6929,7 @@ module RedBlackTree_Impl15_DeleteMax
BB7 {
assert { [@expl:assertion] [#"../red_black_tree.rs" 676 24 676 53] same_mappings0 ( * Ghost.inner old_self) ( * self) };
[#"../red_black_tree.rs" 677 16 677 37] _19 <- Borrow.borrow_mut ( * self);
- [#"../red_black_tree.rs" 677 16 677 37] self <- { self with current = ^ _19 };
+ [#"../red_black_tree.rs" 677 16 677 37] self <- { self with current = ( ^ _19) ; };
assume { inv5 ( ^ _19) };
[#"../red_black_tree.rs" 677 16 677 37] r <- ([#"../red_black_tree.rs" 677 16 677 37] delete_max_rec0 _19);
_19 <- any borrowed (RedBlackTree_Tree_Type.t_tree k v);
@@ -6954,8 +6954,8 @@ module RedBlackTree_Impl15_DeleteMax
end
}
BB11 {
- [#"../red_black_tree.rs" 679 12 679 30] _26 <- Borrow.borrow_mut (RedBlackTree_Tree_Type.tree_node ( * self));
- [#"../red_black_tree.rs" 679 12 679 30] self <- { self with current = (let RedBlackTree_Tree_Type.C_Tree x0 = * self in RedBlackTree_Tree_Type.C_Tree ( ^ _26)) };
+ [#"../red_black_tree.rs" 679 12 679 30] _26 <- Borrow.borrow_final (RedBlackTree_Tree_Type.tree_node ( * self)) (Borrow.inherit_id (Borrow.get_id self) 1);
+ [#"../red_black_tree.rs" 679 12 679 30] self <- { self with current = (let RedBlackTree_Tree_Type.C_Tree x0 = * self in RedBlackTree_Tree_Type.C_Tree ( ^ _26)) ; };
assume { inv1 ( ^ _26) };
[#"../red_black_tree.rs" 679 12 679 30] _25 <- ([#"../red_black_tree.rs" 679 12 679 30] as_mut0 _26);
_26 <- any borrowed (Core_Option_Option_Type.t_option (RedBlackTree_Node_Type.t_node k v));
@@ -6967,7 +6967,7 @@ module RedBlackTree_Impl15_DeleteMax
goto BB13
}
BB13 {
- [#"../red_black_tree.rs" 679 12 679 53] _24 <- { _24 with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * _24 in RedBlackTree_Node_Type.C_Node x0 ([#"../red_black_tree.rs" 679 48 679 53] RedBlackTree_Color_Type.C_Black) x2 x3 x4) };
+ [#"../red_black_tree.rs" 679 12 679 53] _24 <- { _24 with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * _24 in RedBlackTree_Node_Type.C_Node x0 ([#"../red_black_tree.rs" 679 48 679 53] RedBlackTree_Color_Type.C_Black) x2 x3 x4) ; };
assert { [@expl:type invariant] inv3 _24 };
assume { resolve1 _24 };
assert { [@expl:type invariant] inv6 self };
@@ -7561,7 +7561,7 @@ module RedBlackTree_Impl15_DeleteMinRec
}
BB0 {
[#"../red_black_tree.rs" 697 23 697 41] _15 <- Borrow.borrow_mut (RedBlackTree_Tree_Type.tree_node ( * self));
- [#"../red_black_tree.rs" 697 23 697 41] self <- { self with current = (let RedBlackTree_Tree_Type.C_Tree x0 = * self in RedBlackTree_Tree_Type.C_Tree ( ^ _15)) };
+ [#"../red_black_tree.rs" 697 23 697 41] self <- { self with current = (let RedBlackTree_Tree_Type.C_Tree x0 = * self in RedBlackTree_Tree_Type.C_Tree ( ^ _15)) ; };
assume { inv0 ( ^ _15) };
[#"../red_black_tree.rs" 697 23 697 41] _14 <- ([#"../red_black_tree.rs" 697 23 697 41] as_mut0 _15);
_15 <- any borrowed (Core_Option_Option_Type.t_option (RedBlackTree_Node_Type.t_node k v));
@@ -7573,8 +7573,8 @@ module RedBlackTree_Impl15_DeleteMinRec
goto BB2
}
BB2 {
- [#"../red_black_tree.rs" 697 23 697 59] _12 <- Borrow.borrow_mut ( * _13);
- [#"../red_black_tree.rs" 697 23 697 59] _13 <- { _13 with current = ^ _12 };
+ [#"../red_black_tree.rs" 697 23 697 59] _12 <- Borrow.borrow_final ( * _13) (Borrow.get_id _13);
+ [#"../red_black_tree.rs" 697 23 697 59] _13 <- { _13 with current = ( ^ _12) ; };
assume { inv1 ( ^ _12) };
[#"../red_black_tree.rs" 697 23 697 59] node <- ([#"../red_black_tree.rs" 697 23 697 59] as_mut1 _12);
_12 <- any borrowed (RedBlackTree_Node_Type.t_node k v);
@@ -7594,11 +7594,11 @@ module RedBlackTree_Impl15_DeleteMinRec
BB5 {
assert { [@expl:type invariant] inv3 node };
assume { resolve1 node };
- [#"../red_black_tree.rs" 699 38 699 52] _22 <- Borrow.borrow_mut (RedBlackTree_Tree_Type.tree_node ( * self));
- [#"../red_black_tree.rs" 699 38 699 52] self <- { self with current = (let RedBlackTree_Tree_Type.C_Tree x0 = * self in RedBlackTree_Tree_Type.C_Tree ( ^ _22)) };
+ [#"../red_black_tree.rs" 699 38 699 52] _22 <- Borrow.borrow_final (RedBlackTree_Tree_Type.tree_node ( * self)) (Borrow.inherit_id (Borrow.get_id self) 1);
+ [#"../red_black_tree.rs" 699 38 699 52] self <- { self with current = (let RedBlackTree_Tree_Type.C_Tree x0 = * self in RedBlackTree_Tree_Type.C_Tree ( ^ _22)) ; };
assume { inv0 ( ^ _22) };
- [#"../red_black_tree.rs" 699 38 699 52] _21 <- Borrow.borrow_mut ( * _22);
- [#"../red_black_tree.rs" 699 38 699 52] _22 <- { _22 with current = ^ _21 };
+ [#"../red_black_tree.rs" 699 38 699 52] _21 <- Borrow.borrow_final ( * _22) (Borrow.get_id _22);
+ [#"../red_black_tree.rs" 699 38 699 52] _22 <- { _22 with current = ( ^ _21) ; };
assume { inv0 ( ^ _21) };
[#"../red_black_tree.rs" 699 23 699 53] _20 <- ([#"../red_black_tree.rs" 699 23 699 53] take0 _21);
_21 <- any borrowed (Core_Option_Option_Type.t_option (RedBlackTree_Node_Type.t_node k v));
@@ -7668,16 +7668,16 @@ module RedBlackTree_Impl15_DeleteMinRec
goto BB13
}
BB18 {
- [#"../red_black_tree.rs" 703 19 703 39] _38 <- Borrow.borrow_mut ( * node);
- [#"../red_black_tree.rs" 703 19 703 39] node <- { node with current = ^ _38 };
+ [#"../red_black_tree.rs" 703 19 703 39] _38 <- Borrow.borrow_final ( * node) (Borrow.get_id node);
+ [#"../red_black_tree.rs" 703 19 703 39] node <- { node with current = ( ^ _38) ; };
assume { inv7 ( ^ _38) };
[#"../red_black_tree.rs" 703 19 703 39] _37 <- ([#"../red_black_tree.rs" 703 19 703 39] move_red_left0 _38);
_38 <- any borrowed (RedBlackTree_Node_Type.t_node k v);
goto BB19
}
BB19 {
- [#"../red_black_tree.rs" 703 19 703 39] _36 <- Borrow.borrow_mut ( * _37);
- [#"../red_black_tree.rs" 703 19 703 39] _37 <- { _37 with current = ^ _36 };
+ [#"../red_black_tree.rs" 703 19 703 39] _36 <- Borrow.borrow_final ( * _37) (Borrow.get_id _37);
+ [#"../red_black_tree.rs" 703 19 703 39] _37 <- { _37 with current = ( ^ _36) ; };
assume { inv7 ( ^ _36) };
assert { [@expl:type invariant] inv3 node };
assume { resolve1 node };
@@ -7694,15 +7694,15 @@ module RedBlackTree_Impl15_DeleteMinRec
}
BB21 {
[#"../red_black_tree.rs" 705 16 705 42] _40 <- Borrow.borrow_mut (RedBlackTree_Node_Type.node_left ( * node));
- [#"../red_black_tree.rs" 705 16 705 42] node <- { node with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * node in RedBlackTree_Node_Type.C_Node ( ^ _40) x1 x2 x3 x4) };
+ [#"../red_black_tree.rs" 705 16 705 42] node <- { node with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * node in RedBlackTree_Node_Type.C_Node ( ^ _40) x1 x2 x3 x4) ; };
assume { inv8 ( ^ _40) };
[#"../red_black_tree.rs" 705 16 705 42] r <- ([#"../red_black_tree.rs" 705 16 705 42] delete_min_rec _40);
_40 <- any borrowed (RedBlackTree_Tree_Type.t_tree k v);
goto BB22
}
BB22 {
- [#"../red_black_tree.rs" 706 8 706 22] _42 <- Borrow.borrow_mut ( * node);
- [#"../red_black_tree.rs" 706 8 706 22] node <- { node with current = ^ _42 };
+ [#"../red_black_tree.rs" 706 8 706 22] _42 <- Borrow.borrow_final ( * node) (Borrow.get_id node);
+ [#"../red_black_tree.rs" 706 8 706 22] node <- { node with current = ( ^ _42) ; };
assume { inv7 ( ^ _42) };
[#"../red_black_tree.rs" 706 8 706 22] _41 <- ([#"../red_black_tree.rs" 706 8 706 22] balance0 _42);
_42 <- any borrowed (RedBlackTree_Node_Type.t_node k v);
@@ -8202,7 +8202,7 @@ module RedBlackTree_Impl15_DeleteMin
BB1 {
assume { resolve0 _5 };
[#"../red_black_tree.rs" 722 28 722 42] _8 <- Borrow.borrow_mut (RedBlackTree_Tree_Type.tree_node ( * self));
- [#"../red_black_tree.rs" 722 28 722 42] self <- { self with current = (let RedBlackTree_Tree_Type.C_Tree x0 = * self in RedBlackTree_Tree_Type.C_Tree ( ^ _8)) };
+ [#"../red_black_tree.rs" 722 28 722 42] self <- { self with current = (let RedBlackTree_Tree_Type.C_Tree x0 = * self in RedBlackTree_Tree_Type.C_Tree ( ^ _8)) ; };
assume { inv0 ( ^ _8) };
switch ( * _8)
| Core_Option_Option_Type.C_Some _ -> goto BB2
@@ -8213,8 +8213,8 @@ module RedBlackTree_Impl15_DeleteMin
goto BB3
}
BB3 {
- [#"../red_black_tree.rs" 722 20 722 24] node <- Borrow.borrow_mut (Core_Option_Option_Type.some_0 ( * _8));
- [#"../red_black_tree.rs" 722 20 722 24] _8 <- { _8 with current = (let Core_Option_Option_Type.C_Some x0 = * _8 in Core_Option_Option_Type.C_Some ( ^ node)) };
+ [#"../red_black_tree.rs" 722 20 722 24] node <- Borrow.borrow_final (Core_Option_Option_Type.some_0 ( * _8)) (Borrow.inherit_id (Borrow.get_id _8) 1);
+ [#"../red_black_tree.rs" 722 20 722 24] _8 <- { _8 with current = (let Core_Option_Option_Type.C_Some x0 = * _8 in Core_Option_Option_Type.C_Some ( ^ node)) ; };
assume { inv1 ( ^ node) };
[#"../red_black_tree.rs" 723 16 723 34] _12 <- ([#"../red_black_tree.rs" 723 16 723 34] is_red0 ([#"../red_black_tree.rs" 723 16 723 34] RedBlackTree_Node_Type.node_left ( * node)));
goto BB4
@@ -8226,7 +8226,7 @@ module RedBlackTree_Impl15_DeleteMin
end
}
BB5 {
- [#"../red_black_tree.rs" 724 16 724 32] node <- { node with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * node in RedBlackTree_Node_Type.C_Node x0 ([#"../red_black_tree.rs" 724 29 724 32] RedBlackTree_Color_Type.C_Red) x2 x3 x4) };
+ [#"../red_black_tree.rs" 724 16 724 32] node <- { node with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * node in RedBlackTree_Node_Type.C_Node x0 ([#"../red_black_tree.rs" 724 29 724 32] RedBlackTree_Color_Type.C_Red) x2 x3 x4) ; };
assert { [@expl:type invariant] inv2 node };
assume { resolve1 node };
assert { [@expl:type invariant] inv3 _8 };
@@ -8244,7 +8244,7 @@ module RedBlackTree_Impl15_DeleteMin
}
BB7 {
[#"../red_black_tree.rs" 729 16 729 37] _17 <- Borrow.borrow_mut ( * self);
- [#"../red_black_tree.rs" 729 16 729 37] self <- { self with current = ^ _17 };
+ [#"../red_black_tree.rs" 729 16 729 37] self <- { self with current = ( ^ _17) ; };
assume { inv4 ( ^ _17) };
[#"../red_black_tree.rs" 729 16 729 37] r <- ([#"../red_black_tree.rs" 729 16 729 37] delete_min_rec0 _17);
_17 <- any borrowed (RedBlackTree_Tree_Type.t_tree k v);
@@ -8269,8 +8269,8 @@ module RedBlackTree_Impl15_DeleteMin
end
}
BB11 {
- [#"../red_black_tree.rs" 731 12 731 30] _24 <- Borrow.borrow_mut (RedBlackTree_Tree_Type.tree_node ( * self));
- [#"../red_black_tree.rs" 731 12 731 30] self <- { self with current = (let RedBlackTree_Tree_Type.C_Tree x0 = * self in RedBlackTree_Tree_Type.C_Tree ( ^ _24)) };
+ [#"../red_black_tree.rs" 731 12 731 30] _24 <- Borrow.borrow_final (RedBlackTree_Tree_Type.tree_node ( * self)) (Borrow.inherit_id (Borrow.get_id self) 1);
+ [#"../red_black_tree.rs" 731 12 731 30] self <- { self with current = (let RedBlackTree_Tree_Type.C_Tree x0 = * self in RedBlackTree_Tree_Type.C_Tree ( ^ _24)) ; };
assume { inv0 ( ^ _24) };
[#"../red_black_tree.rs" 731 12 731 30] _23 <- ([#"../red_black_tree.rs" 731 12 731 30] as_mut0 _24);
_24 <- any borrowed (Core_Option_Option_Type.t_option (RedBlackTree_Node_Type.t_node k v));
@@ -8282,7 +8282,7 @@ module RedBlackTree_Impl15_DeleteMin
goto BB13
}
BB13 {
- [#"../red_black_tree.rs" 731 12 731 53] _22 <- { _22 with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * _22 in RedBlackTree_Node_Type.C_Node x0 ([#"../red_black_tree.rs" 731 48 731 53] RedBlackTree_Color_Type.C_Black) x2 x3 x4) };
+ [#"../red_black_tree.rs" 731 12 731 53] _22 <- { _22 with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * _22 in RedBlackTree_Node_Type.C_Node x0 ([#"../red_black_tree.rs" 731 48 731 53] RedBlackTree_Color_Type.C_Black) x2 x3 x4) ; };
assert { [@expl:type invariant] inv2 _22 };
assume { resolve1 _22 };
assert { [@expl:type invariant] inv5 self };
@@ -9129,7 +9129,7 @@ module RedBlackTree_Impl15_DeleteRec
}
BB0 {
[#"../red_black_tree.rs" 750 23 750 41] _16 <- Borrow.borrow_mut (RedBlackTree_Tree_Type.tree_node ( * self));
- [#"../red_black_tree.rs" 750 23 750 41] self <- { self with current = (let RedBlackTree_Tree_Type.C_Tree x0 = * self in RedBlackTree_Tree_Type.C_Tree ( ^ _16)) };
+ [#"../red_black_tree.rs" 750 23 750 41] self <- { self with current = (let RedBlackTree_Tree_Type.C_Tree x0 = * self in RedBlackTree_Tree_Type.C_Tree ( ^ _16)) ; };
assume { inv0 ( ^ _16) };
[#"../red_black_tree.rs" 750 23 750 41] _15 <- ([#"../red_black_tree.rs" 750 23 750 41] as_mut0 _16);
_16 <- any borrowed (Core_Option_Option_Type.t_option (RedBlackTree_Node_Type.t_node k v));
@@ -9141,8 +9141,8 @@ module RedBlackTree_Impl15_DeleteRec
goto BB2
}
BB2 {
- [#"../red_black_tree.rs" 750 23 750 59] _13 <- Borrow.borrow_mut ( * _14);
- [#"../red_black_tree.rs" 750 23 750 59] _14 <- { _14 with current = ^ _13 };
+ [#"../red_black_tree.rs" 750 23 750 59] _13 <- Borrow.borrow_final ( * _14) (Borrow.get_id _14);
+ [#"../red_black_tree.rs" 750 23 750 59] _14 <- { _14 with current = ( ^ _13) ; };
assume { inv1 ( ^ _13) };
[#"../red_black_tree.rs" 750 23 750 59] node <- ([#"../red_black_tree.rs" 750 23 750 59] as_mut1 _13);
_13 <- any borrowed (RedBlackTree_Node_Type.t_node k v);
@@ -9232,16 +9232,16 @@ module RedBlackTree_Impl15_DeleteRec
goto BB13
}
BB18 {
- [#"../red_black_tree.rs" 757 27 757 47] _40 <- Borrow.borrow_mut ( * node);
- [#"../red_black_tree.rs" 757 27 757 47] node <- { node with current = ^ _40 };
+ [#"../red_black_tree.rs" 757 27 757 47] _40 <- Borrow.borrow_final ( * node) (Borrow.get_id node);
+ [#"../red_black_tree.rs" 757 27 757 47] node <- { node with current = ( ^ _40) ; };
assume { inv5 ( ^ _40) };
[#"../red_black_tree.rs" 757 27 757 47] _39 <- ([#"../red_black_tree.rs" 757 27 757 47] move_red_left0 _40);
_40 <- any borrowed (RedBlackTree_Node_Type.t_node k v);
goto BB19
}
BB19 {
- [#"../red_black_tree.rs" 757 27 757 47] _38 <- Borrow.borrow_mut ( * _39);
- [#"../red_black_tree.rs" 757 27 757 47] _39 <- { _39 with current = ^ _38 };
+ [#"../red_black_tree.rs" 757 27 757 47] _38 <- Borrow.borrow_final ( * _39) (Borrow.get_id _39);
+ [#"../red_black_tree.rs" 757 27 757 47] _39 <- { _39 with current = ( ^ _38) ; };
assume { inv5 ( ^ _38) };
assert { [@expl:type invariant] inv6 node };
assume { resolve3 node };
@@ -9258,7 +9258,7 @@ module RedBlackTree_Impl15_DeleteRec
}
BB21 {
[#"../red_black_tree.rs" 759 20 759 45] _42 <- Borrow.borrow_mut (RedBlackTree_Node_Type.node_left ( * node));
- [#"../red_black_tree.rs" 759 20 759 45] node <- { node with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * node in RedBlackTree_Node_Type.C_Node ( ^ _42) x1 x2 x3 x4) };
+ [#"../red_black_tree.rs" 759 20 759 45] node <- { node with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * node in RedBlackTree_Node_Type.C_Node ( ^ _42) x1 x2 x3 x4) ; };
assume { inv7 ( ^ _42) };
assert { [@expl:type invariant] inv3 key };
assume { resolve1 key };
@@ -9286,7 +9286,7 @@ module RedBlackTree_Impl15_DeleteRec
}
BB27 {
[#"../red_black_tree.rs" 763 20 763 39] _48 <- Borrow.borrow_mut ( * node);
- [#"../red_black_tree.rs" 763 20 763 39] node <- { node with current = ^ _48 };
+ [#"../red_black_tree.rs" 763 20 763 39] node <- { node with current = ( ^ _48) ; };
assume { inv5 ( ^ _48) };
[#"../red_black_tree.rs" 763 20 763 39] _47 <- ([#"../red_black_tree.rs" 763 20 763 39] rotate_right0 _48);
_48 <- any borrowed (RedBlackTree_Node_Type.t_node k v);
@@ -9294,7 +9294,7 @@ module RedBlackTree_Impl15_DeleteRec
}
BB28 {
[#"../red_black_tree.rs" 764 24 764 50] _50 <- Borrow.borrow_mut (RedBlackTree_Node_Type.node_right ( * node));
- [#"../red_black_tree.rs" 764 24 764 50] node <- { node with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * node in RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 ( ^ _50)) };
+ [#"../red_black_tree.rs" 764 24 764 50] node <- { node with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * node in RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 ( ^ _50)) ; };
assume { inv7 ( ^ _50) };
assert { [@expl:type invariant] inv3 key };
assume { resolve1 key };
@@ -9344,11 +9344,11 @@ module RedBlackTree_Impl15_DeleteRec
goto BB73
}
BB38 {
- [#"../red_black_tree.rs" 770 50 770 64] _62 <- Borrow.borrow_mut (RedBlackTree_Tree_Type.tree_node ( * self));
- [#"../red_black_tree.rs" 770 50 770 64] self <- { self with current = (let RedBlackTree_Tree_Type.C_Tree x0 = * self in RedBlackTree_Tree_Type.C_Tree ( ^ _62)) };
+ [#"../red_black_tree.rs" 770 50 770 64] _62 <- Borrow.borrow_final (RedBlackTree_Tree_Type.tree_node ( * self)) (Borrow.inherit_id (Borrow.get_id self) 1);
+ [#"../red_black_tree.rs" 770 50 770 64] self <- { self with current = (let RedBlackTree_Tree_Type.C_Tree x0 = * self in RedBlackTree_Tree_Type.C_Tree ( ^ _62)) ; };
assume { inv0 ( ^ _62) };
- [#"../red_black_tree.rs" 770 50 770 64] _61 <- Borrow.borrow_mut ( * _62);
- [#"../red_black_tree.rs" 770 50 770 64] _62 <- { _62 with current = ^ _61 };
+ [#"../red_black_tree.rs" 770 50 770 64] _61 <- Borrow.borrow_final ( * _62) (Borrow.get_id _62);
+ [#"../red_black_tree.rs" 770 50 770 64] _62 <- { _62 with current = ( ^ _61) ; };
assume { inv0 ( ^ _61) };
[#"../red_black_tree.rs" 770 35 770 65] _60 <- ([#"../red_black_tree.rs" 770 35 770 65] take0 _61);
_61 <- any borrowed (Core_Option_Option_Type.t_option (RedBlackTree_Node_Type.t_node k v));
@@ -9402,16 +9402,16 @@ module RedBlackTree_Impl15_DeleteRec
end
}
BB48 {
- [#"../red_black_tree.rs" 774 31 774 52] _75 <- Borrow.borrow_mut ( * node);
- [#"../red_black_tree.rs" 774 31 774 52] node <- { node with current = ^ _75 };
+ [#"../red_black_tree.rs" 774 31 774 52] _75 <- Borrow.borrow_final ( * node) (Borrow.get_id node);
+ [#"../red_black_tree.rs" 774 31 774 52] node <- { node with current = ( ^ _75) ; };
assume { inv5 ( ^ _75) };
[#"../red_black_tree.rs" 774 31 774 52] _74 <- ([#"../red_black_tree.rs" 774 31 774 52] move_red_right0 _75);
_75 <- any borrowed (RedBlackTree_Node_Type.t_node k v);
goto BB49
}
BB49 {
- [#"../red_black_tree.rs" 774 31 774 52] _73 <- Borrow.borrow_mut ( * _74);
- [#"../red_black_tree.rs" 774 31 774 52] _74 <- { _74 with current = ^ _73 };
+ [#"../red_black_tree.rs" 774 31 774 52] _73 <- Borrow.borrow_final ( * _74) (Borrow.get_id _74);
+ [#"../red_black_tree.rs" 774 31 774 52] _74 <- { _74 with current = ( ^ _73) ; };
assume { inv5 ( ^ _73) };
assert { [@expl:type invariant] inv6 node };
assume { resolve3 node };
@@ -9439,7 +9439,7 @@ module RedBlackTree_Impl15_DeleteRec
assert { [@expl:type invariant] inv3 key };
assume { resolve1 key };
[#"../red_black_tree.rs" 777 37 777 64] _78 <- Borrow.borrow_mut (RedBlackTree_Node_Type.node_right ( * node));
- [#"../red_black_tree.rs" 777 37 777 64] node <- { node with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * node in RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 ( ^ _78)) };
+ [#"../red_black_tree.rs" 777 37 777 64] node <- { node with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * node in RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 ( ^ _78)) ; };
assume { inv7 ( ^ _78) };
[#"../red_black_tree.rs" 777 37 777 64] kv <- ([#"../red_black_tree.rs" 777 37 777 64] delete_min_rec0 _78);
_78 <- any borrowed (RedBlackTree_Tree_Type.t_tree k v);
@@ -9452,16 +9452,16 @@ module RedBlackTree_Impl15_DeleteRec
BB55 {
assume { resolve5 _79 };
[#"../red_black_tree.rs" 779 39 779 52] _83 <- Borrow.borrow_mut (RedBlackTree_Node_Type.node_key ( * node));
- [#"../red_black_tree.rs" 779 39 779 52] node <- { node with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * node in RedBlackTree_Node_Type.C_Node x0 x1 ( ^ _83) x3 x4) };
+ [#"../red_black_tree.rs" 779 39 779 52] node <- { node with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * node in RedBlackTree_Node_Type.C_Node x0 x1 ( ^ _83) x3 x4) ; };
assume { inv9 ( ^ _83) };
- [#"../red_black_tree.rs" 779 39 779 52] _82 <- Borrow.borrow_mut ( * _83);
- [#"../red_black_tree.rs" 779 39 779 52] _83 <- { _83 with current = ^ _82 };
+ [#"../red_black_tree.rs" 779 39 779 52] _82 <- Borrow.borrow_final ( * _83) (Borrow.get_id _83);
+ [#"../red_black_tree.rs" 779 39 779 52] _83 <- { _83 with current = ( ^ _82) ; };
assume { inv9 ( ^ _82) };
[#"../red_black_tree.rs" 779 54 779 63] _85 <- Borrow.borrow_mut (let (a, _) = kv in a);
[#"../red_black_tree.rs" 779 54 779 63] kv <- (let (x0, x1) = kv in ( ^ _85, x1));
assume { inv9 ( ^ _85) };
- [#"../red_black_tree.rs" 779 54 779 63] _84 <- Borrow.borrow_mut ( * _85);
- [#"../red_black_tree.rs" 779 54 779 63] _85 <- { _85 with current = ^ _84 };
+ [#"../red_black_tree.rs" 779 54 779 63] _84 <- Borrow.borrow_final ( * _85) (Borrow.get_id _85);
+ [#"../red_black_tree.rs" 779 54 779 63] _85 <- { _85 with current = ( ^ _84) ; };
assume { inv9 ( ^ _84) };
[#"../red_black_tree.rs" 779 24 779 64] _81 <- ([#"../red_black_tree.rs" 779 24 779 64] swap0 _82 _84);
_82 <- any borrowed k;
@@ -9474,16 +9474,16 @@ module RedBlackTree_Impl15_DeleteRec
assert { [@expl:type invariant] inv10 _83 };
assume { resolve6 _83 };
[#"../red_black_tree.rs" 780 39 780 52] _88 <- Borrow.borrow_mut (RedBlackTree_Node_Type.node_val ( * node));
- [#"../red_black_tree.rs" 780 39 780 52] node <- { node with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * node in RedBlackTree_Node_Type.C_Node x0 x1 x2 ( ^ _88) x4) };
+ [#"../red_black_tree.rs" 780 39 780 52] node <- { node with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * node in RedBlackTree_Node_Type.C_Node x0 x1 x2 ( ^ _88) x4) ; };
assume { inv11 ( ^ _88) };
- [#"../red_black_tree.rs" 780 39 780 52] _87 <- Borrow.borrow_mut ( * _88);
- [#"../red_black_tree.rs" 780 39 780 52] _88 <- { _88 with current = ^ _87 };
+ [#"../red_black_tree.rs" 780 39 780 52] _87 <- Borrow.borrow_final ( * _88) (Borrow.get_id _88);
+ [#"../red_black_tree.rs" 780 39 780 52] _88 <- { _88 with current = ( ^ _87) ; };
assume { inv11 ( ^ _87) };
[#"../red_black_tree.rs" 780 54 780 63] _90 <- Borrow.borrow_mut (let (_, a) = kv in a);
[#"../red_black_tree.rs" 780 54 780 63] kv <- (let (x0, x1) = kv in (x0, ^ _90));
assume { inv11 ( ^ _90) };
- [#"../red_black_tree.rs" 780 54 780 63] _89 <- Borrow.borrow_mut ( * _90);
- [#"../red_black_tree.rs" 780 54 780 63] _90 <- { _90 with current = ^ _89 };
+ [#"../red_black_tree.rs" 780 54 780 63] _89 <- Borrow.borrow_final ( * _90) (Borrow.get_id _90);
+ [#"../red_black_tree.rs" 780 54 780 63] _90 <- { _90 with current = ( ^ _89) ; };
assume { inv11 ( ^ _89) };
[#"../red_black_tree.rs" 780 24 780 64] _86 <- ([#"../red_black_tree.rs" 780 24 780 64] swap1 _87 _89);
_87 <- any borrowed v;
@@ -9514,7 +9514,7 @@ module RedBlackTree_Impl15_DeleteRec
}
BB63 {
[#"../red_black_tree.rs" 783 28 783 54] _94 <- Borrow.borrow_mut (RedBlackTree_Node_Type.node_right ( * node));
- [#"../red_black_tree.rs" 783 28 783 54] node <- { node with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * node in RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 ( ^ _94)) };
+ [#"../red_black_tree.rs" 783 28 783 54] node <- { node with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * node in RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 ( ^ _94)) ; };
assume { inv7 ( ^ _94) };
assert { [@expl:type invariant] inv3 key };
assume { resolve1 key };
@@ -9538,8 +9538,8 @@ module RedBlackTree_Impl15_DeleteRec
goto BB69
}
BB69 {
- [#"../red_black_tree.rs" 788 8 788 22] _97 <- Borrow.borrow_mut ( * node);
- [#"../red_black_tree.rs" 788 8 788 22] node <- { node with current = ^ _97 };
+ [#"../red_black_tree.rs" 788 8 788 22] _97 <- Borrow.borrow_final ( * node) (Borrow.get_id node);
+ [#"../red_black_tree.rs" 788 8 788 22] node <- { node with current = ( ^ _97) ; };
assume { inv5 ( ^ _97) };
[#"../red_black_tree.rs" 788 8 788 22] _96 <- ([#"../red_black_tree.rs" 788 8 788 22] balance0 _97);
_97 <- any borrowed (RedBlackTree_Node_Type.t_node k v);
@@ -10063,7 +10063,7 @@ module RedBlackTree_Impl15_Delete
BB1 {
assume { resolve0 _7 };
[#"../red_black_tree.rs" 803 28 803 42] _10 <- Borrow.borrow_mut (RedBlackTree_Tree_Type.tree_node ( * self));
- [#"../red_black_tree.rs" 803 28 803 42] self <- { self with current = (let RedBlackTree_Tree_Type.C_Tree x0 = * self in RedBlackTree_Tree_Type.C_Tree ( ^ _10)) };
+ [#"../red_black_tree.rs" 803 28 803 42] self <- { self with current = (let RedBlackTree_Tree_Type.C_Tree x0 = * self in RedBlackTree_Tree_Type.C_Tree ( ^ _10)) ; };
assume { inv0 ( ^ _10) };
switch ( * _10)
| Core_Option_Option_Type.C_Some _ -> goto BB2
@@ -10074,8 +10074,8 @@ module RedBlackTree_Impl15_Delete
goto BB3
}
BB3 {
- [#"../red_black_tree.rs" 803 20 803 24] node <- Borrow.borrow_mut (Core_Option_Option_Type.some_0 ( * _10));
- [#"../red_black_tree.rs" 803 20 803 24] _10 <- { _10 with current = (let Core_Option_Option_Type.C_Some x0 = * _10 in Core_Option_Option_Type.C_Some ( ^ node)) };
+ [#"../red_black_tree.rs" 803 20 803 24] node <- Borrow.borrow_final (Core_Option_Option_Type.some_0 ( * _10)) (Borrow.inherit_id (Borrow.get_id _10) 1);
+ [#"../red_black_tree.rs" 803 20 803 24] _10 <- { _10 with current = (let Core_Option_Option_Type.C_Some x0 = * _10 in Core_Option_Option_Type.C_Some ( ^ node)) ; };
assume { inv1 ( ^ node) };
[#"../red_black_tree.rs" 804 16 804 34] _14 <- ([#"../red_black_tree.rs" 804 16 804 34] is_red0 ([#"../red_black_tree.rs" 804 16 804 34] RedBlackTree_Node_Type.node_left ( * node)));
goto BB4
@@ -10087,7 +10087,7 @@ module RedBlackTree_Impl15_Delete
end
}
BB5 {
- [#"../red_black_tree.rs" 805 16 805 32] node <- { node with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * node in RedBlackTree_Node_Type.C_Node x0 ([#"../red_black_tree.rs" 805 29 805 32] RedBlackTree_Color_Type.C_Red) x2 x3 x4) };
+ [#"../red_black_tree.rs" 805 16 805 32] node <- { node with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * node in RedBlackTree_Node_Type.C_Node x0 ([#"../red_black_tree.rs" 805 29 805 32] RedBlackTree_Color_Type.C_Red) x2 x3 x4) ; };
assert { [@expl:type invariant] inv2 node };
assume { resolve1 node };
assert { [@expl:type invariant] inv3 _10 };
@@ -10105,7 +10105,7 @@ module RedBlackTree_Impl15_Delete
}
BB7 {
[#"../red_black_tree.rs" 810 16 810 36] _19 <- Borrow.borrow_mut ( * self);
- [#"../red_black_tree.rs" 810 16 810 36] self <- { self with current = ^ _19 };
+ [#"../red_black_tree.rs" 810 16 810 36] self <- { self with current = ( ^ _19) ; };
assume { inv4 ( ^ _19) };
assert { [@expl:type invariant] inv5 key };
assume { resolve3 key };
@@ -10134,8 +10134,8 @@ module RedBlackTree_Impl15_Delete
end
}
BB11 {
- [#"../red_black_tree.rs" 812 12 812 30] _27 <- Borrow.borrow_mut (RedBlackTree_Tree_Type.tree_node ( * self));
- [#"../red_black_tree.rs" 812 12 812 30] self <- { self with current = (let RedBlackTree_Tree_Type.C_Tree x0 = * self in RedBlackTree_Tree_Type.C_Tree ( ^ _27)) };
+ [#"../red_black_tree.rs" 812 12 812 30] _27 <- Borrow.borrow_final (RedBlackTree_Tree_Type.tree_node ( * self)) (Borrow.inherit_id (Borrow.get_id self) 1);
+ [#"../red_black_tree.rs" 812 12 812 30] self <- { self with current = (let RedBlackTree_Tree_Type.C_Tree x0 = * self in RedBlackTree_Tree_Type.C_Tree ( ^ _27)) ; };
assume { inv0 ( ^ _27) };
[#"../red_black_tree.rs" 812 12 812 30] _26 <- ([#"../red_black_tree.rs" 812 12 812 30] as_mut0 _27);
_27 <- any borrowed (Core_Option_Option_Type.t_option (RedBlackTree_Node_Type.t_node k v));
@@ -10147,7 +10147,7 @@ module RedBlackTree_Impl15_Delete
goto BB13
}
BB13 {
- [#"../red_black_tree.rs" 812 12 812 53] _25 <- { _25 with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * _25 in RedBlackTree_Node_Type.C_Node x0 ([#"../red_black_tree.rs" 812 48 812 53] RedBlackTree_Color_Type.C_Black) x2 x3 x4) };
+ [#"../red_black_tree.rs" 812 12 812 53] _25 <- { _25 with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * _25 in RedBlackTree_Node_Type.C_Node x0 ([#"../red_black_tree.rs" 812 48 812 53] RedBlackTree_Color_Type.C_Black) x2 x3 x4) ; };
assert { [@expl:type invariant] inv2 _25 };
assume { resolve1 _25 };
assert { [@expl:type invariant] inv6 self };
@@ -11175,8 +11175,8 @@ module RedBlackTree_Impl15_GetMut
goto BB4
}
BB4 {
- [#"../red_black_tree.rs" 862 31 862 45] _23 <- Borrow.borrow_mut (RedBlackTree_Tree_Type.tree_node ( * tree));
- [#"../red_black_tree.rs" 862 31 862 45] tree <- { tree with current = (let RedBlackTree_Tree_Type.C_Tree x0 = * tree in RedBlackTree_Tree_Type.C_Tree ( ^ _23)) };
+ [#"../red_black_tree.rs" 862 31 862 45] _23 <- Borrow.borrow_final (RedBlackTree_Tree_Type.tree_node ( * tree)) (Borrow.inherit_id (Borrow.get_id tree) 1);
+ [#"../red_black_tree.rs" 862 31 862 45] tree <- { tree with current = (let RedBlackTree_Tree_Type.C_Tree x0 = * tree in RedBlackTree_Tree_Type.C_Tree ( ^ _23)) ; };
assume { inv3 ( ^ _23) };
switch ( * _23)
| Core_Option_Option_Type.C_Some _ -> goto BB5
@@ -11187,8 +11187,8 @@ module RedBlackTree_Impl15_GetMut
goto BB6
}
BB6 {
- [#"../red_black_tree.rs" 862 23 862 27] node <- Borrow.borrow_mut (Core_Option_Option_Type.some_0 ( * _23));
- [#"../red_black_tree.rs" 862 23 862 27] _23 <- { _23 with current = (let Core_Option_Option_Type.C_Some x0 = * _23 in Core_Option_Option_Type.C_Some ( ^ node)) };
+ [#"../red_black_tree.rs" 862 23 862 27] node <- Borrow.borrow_final (Core_Option_Option_Type.some_0 ( * _23)) (Borrow.inherit_id (Borrow.get_id _23) 1);
+ [#"../red_black_tree.rs" 862 23 862 27] _23 <- { _23 with current = (let Core_Option_Option_Type.C_Some x0 = * _23 in Core_Option_Option_Type.C_Some ( ^ node)) ; };
assume { inv4 ( ^ node) };
[#"../red_black_tree.rs" 863 26 863 35] _29 <- ([#"../red_black_tree.rs" 863 26 863 35] RedBlackTree_Node_Type.node_key ( * node));
assert { [@expl:type invariant] inv5 _29 };
@@ -11211,10 +11211,10 @@ module RedBlackTree_Impl15_GetMut
}
BB10 {
[#"../red_black_tree.rs" 866 34 866 49] _37 <- Borrow.borrow_mut (RedBlackTree_Node_Type.node_right ( * node));
- [#"../red_black_tree.rs" 866 34 866 49] node <- { node with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * node in RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 ( ^ _37)) };
+ [#"../red_black_tree.rs" 866 34 866 49] node <- { node with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * node in RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 ( ^ _37)) ; };
assume { inv6 ( ^ _37) };
- [#"../red_black_tree.rs" 866 34 866 49] _36 <- Borrow.borrow_mut ( * _37);
- [#"../red_black_tree.rs" 866 34 866 49] _37 <- { _37 with current = ^ _36 };
+ [#"../red_black_tree.rs" 866 34 866 49] _36 <- Borrow.borrow_final ( * _37) (Borrow.get_id _37);
+ [#"../red_black_tree.rs" 866 34 866 49] _37 <- { _37 with current = ( ^ _36) ; };
assume { inv6 ( ^ _36) };
assert { [@expl:type invariant] inv7 tree };
assume { resolve3 tree };
@@ -11239,10 +11239,10 @@ module RedBlackTree_Impl15_GetMut
}
BB12 {
[#"../red_black_tree.rs" 864 31 864 45] _32 <- Borrow.borrow_mut (RedBlackTree_Node_Type.node_left ( * node));
- [#"../red_black_tree.rs" 864 31 864 45] node <- { node with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * node in RedBlackTree_Node_Type.C_Node ( ^ _32) x1 x2 x3 x4) };
+ [#"../red_black_tree.rs" 864 31 864 45] node <- { node with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * node in RedBlackTree_Node_Type.C_Node ( ^ _32) x1 x2 x3 x4) ; };
assume { inv6 ( ^ _32) };
- [#"../red_black_tree.rs" 864 31 864 45] _31 <- Borrow.borrow_mut ( * _32);
- [#"../red_black_tree.rs" 864 31 864 45] _32 <- { _32 with current = ^ _31 };
+ [#"../red_black_tree.rs" 864 31 864 45] _31 <- Borrow.borrow_final ( * _32) (Borrow.get_id _32);
+ [#"../red_black_tree.rs" 864 31 864 45] _32 <- { _32 with current = ( ^ _31) ; };
assume { inv6 ( ^ _31) };
assert { [@expl:type invariant] inv7 tree };
assume { resolve3 tree };
@@ -11257,10 +11257,10 @@ module RedBlackTree_Impl15_GetMut
assert { [@expl:type invariant] inv5 key };
assume { resolve2 key };
[#"../red_black_tree.rs" 865 37 865 50] _35 <- Borrow.borrow_mut (RedBlackTree_Node_Type.node_val ( * node));
- [#"../red_black_tree.rs" 865 37 865 50] node <- { node with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * node in RedBlackTree_Node_Type.C_Node x0 x1 x2 ( ^ _35) x4) };
+ [#"../red_black_tree.rs" 865 37 865 50] node <- { node with current = (let RedBlackTree_Node_Type.C_Node x0 x1 x2 x3 x4 = * node in RedBlackTree_Node_Type.C_Node x0 x1 x2 ( ^ _35) x4) ; };
assume { inv1 ( ^ _35) };
- [#"../red_black_tree.rs" 865 37 865 50] _34 <- Borrow.borrow_mut ( * _35);
- [#"../red_black_tree.rs" 865 37 865 50] _35 <- { _35 with current = ^ _34 };
+ [#"../red_black_tree.rs" 865 37 865 50] _34 <- Borrow.borrow_final ( * _35) (Borrow.get_id _35);
+ [#"../red_black_tree.rs" 865 37 865 50] _35 <- { _35 with current = ( ^ _34) ; };
assume { inv1 ( ^ _34) };
[#"../red_black_tree.rs" 865 32 865 51] _0 <- ([#"../red_black_tree.rs" 865 32 865 51] Core_Option_Option_Type.C_Some _34);
_34 <- any borrowed v;
diff --git a/creusot/tests/should_succeed/red_black_tree/why3session.xml b/creusot/tests/should_succeed/red_black_tree/why3session.xml
index cc40403129..3968f923ef 100644
--- a/creusot/tests/should_succeed/red_black_tree/why3session.xml
+++ b/creusot/tests/should_succeed/red_black_tree/why3session.xml
@@ -2,17 +2,16 @@
-
+
-
-
+
@@ -79,73 +78,73 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -157,73 +156,73 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -232,55 +231,55 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -295,18 +294,18 @@
-
+
-
+
-
+
@@ -327,88 +326,79 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
+
-
-
-
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
-
+
+
-
-
+
+
@@ -418,6 +408,64 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -431,24 +479,27 @@
-
+
+
+
+
-
-
+
+
-
+
-
+
-
-
+
+
-
-
+
+
@@ -456,44 +507,60 @@
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
-
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -501,24 +568,13 @@
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -541,98 +597,108 @@
-
-
-
-
+
-
-
+
+
-
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
+
+
+
-
+
-
+
+
+
+
+
+
+
+
-
+
+
+
+
-
+
-
-
+
+
-
+
-
+
-
-
+
+
-
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
@@ -640,76 +706,66 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
+
-
-
+
+
-
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
-
+
@@ -724,69 +780,49 @@
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
+
-
-
+
+
-
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
@@ -796,62 +832,62 @@
+
+
+
+
+
+
-
-
-
-
-
-
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
+
-
-
+
+
-
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
@@ -861,8 +897,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -876,104 +932,104 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
@@ -987,160 +1043,112 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
+
-
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
+
+
+
-
-
-
-
-
+
+
-
+
-
+
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
+
+
+
@@ -1150,109 +1158,157 @@
-
-
-
-
-
+
+
-
+
-
+
-
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
+
+
+
-
-
-
-
-
+
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1277,80 +1333,22 @@
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
+
+
-
-
+
+
@@ -1360,10 +1358,19 @@
+
+
+
+
+
+
+
+
+
@@ -1373,32 +1380,41 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
@@ -1406,58 +1422,38 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
-
-
-
-
+
+
-
+
-
+
-
-
+
+
-
-
+
+
@@ -1465,10 +1461,13 @@
+
+
+
-
+
@@ -1488,91 +1487,91 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -1581,7 +1580,7 @@
-
+
@@ -1592,7 +1591,7 @@
-
+
@@ -1605,18 +1604,18 @@
-
+
+
+
+
+
-
-
-
-
-
+
@@ -1627,14 +1626,14 @@
-
+
-
+
@@ -1643,15 +1642,15 @@
-
-
-
-
-
+
+
+
+
+
@@ -1659,14 +1658,14 @@
-
+
-
+
@@ -1677,14 +1676,14 @@
-
+
-
+
@@ -1699,7 +1698,7 @@
-
+
@@ -1710,7 +1709,7 @@
-
+
@@ -1723,14 +1722,14 @@
-
+
-
+
@@ -1743,14 +1742,14 @@
-
+
-
+
@@ -1761,21 +1760,21 @@
-
+
-
+
-
+
@@ -1784,132 +1783,132 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
-
+
-
-
+
+
-
-
-
-
-
-
-
+
-
-
+
+
+
+
+
-
+
-
+
+
+
+
-
+
-
-
+
+
-
-
-
@@ -1917,14 +1916,14 @@
-
+
-
+
@@ -1939,7 +1938,7 @@
-
+
@@ -1950,7 +1949,7 @@
-
+
@@ -1961,15 +1960,15 @@
+
+
+
-
-
+
+
-
-
-
@@ -1977,33 +1976,33 @@
+
+
+
-
+
-
-
+
+
-
-
-
-
+
-
+
-
+
@@ -2017,115 +2016,115 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -2134,18 +2133,18 @@
-
+
-
+
+
-
-
+
@@ -2154,10 +2153,10 @@
-
+
-
+
@@ -2183,25 +2182,25 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -2210,61 +2209,61 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -2273,127 +2272,127 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
+
+
-
-
+
+
+
+
+
-
+
-
-
-
-
-
+
+
-
-
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
-
-
+
+
-
-
+
+
-
-
-
@@ -2401,20 +2400,20 @@
-
+
-
+
-
+
-
+
@@ -2425,47 +2424,39 @@
+
+
+
-
-
-
-
-
-
+
+
-
-
-
+
+
+
-
+
-
-
+
+
-
-
-
-
-
-
+
+
-
-
+
+
-
-
-
@@ -2477,14 +2468,18 @@
-
+
+
+
+
+
-
+
@@ -2495,27 +2490,20 @@
-
+
-
+
-
-
-
-
-
-
-
-
+
-
+
@@ -2528,67 +2516,55 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
-
-
-
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -2596,27 +2572,24 @@
-
+
+
+
+
+
-
+
-
+
-
-
-
-
-
-
-
-
+
@@ -2629,24 +2602,27 @@
-
+
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
-
+
@@ -2657,27 +2633,27 @@
-
+
-
+
-
+
-
+
-
+
@@ -2689,86 +2665,86 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -2777,10 +2753,10 @@
-
+
-
+
@@ -2793,10 +2769,10 @@
-
+
-
+
@@ -2810,143 +2786,143 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -2957,10 +2933,10 @@
-
+
-
+
@@ -2971,7 +2947,7 @@
-
+
@@ -2982,14 +2958,14 @@
-
+
-
+
@@ -3004,7 +2980,7 @@
-
+
@@ -3015,7 +2991,7 @@
-
+
@@ -3024,10 +3000,10 @@
-
+
-
+
@@ -3042,21 +3018,21 @@
-
+
-
+
-
+
@@ -3067,15 +3043,15 @@
-
+
-
+
-
+
@@ -3086,19 +3062,19 @@
-
+
-
+
-
+
@@ -3109,10 +3085,10 @@
-
+
-
+
@@ -3124,69 +3100,69 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -3199,7 +3175,7 @@
-
+
@@ -3218,10 +3194,10 @@
-
+
-
+
@@ -3236,14 +3212,14 @@
-
+
-
+
@@ -3260,10 +3236,10 @@
-
+
-
+
@@ -3277,85 +3253,85 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -3364,21 +3340,21 @@
-
+
-
+
-
+
-
+
-
+
@@ -3389,133 +3365,133 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -3524,23 +3500,23 @@
-
+
-
+
-
+
-
+
-
+
@@ -3549,39 +3525,39 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -3590,7 +3566,7 @@
-
+
@@ -3607,10 +3583,10 @@
-
+
-
+
@@ -3631,12 +3607,12 @@
-
+
-
+
@@ -3651,10 +3627,10 @@
-
+
-
+
@@ -3665,39 +3641,39 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -3706,64 +3682,64 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
+
+
+
+
+
-
+
-
+
-
+
@@ -3772,10 +3748,10 @@
-
+
-
+
@@ -3786,32 +3762,32 @@
-
-
-
-
-
+
+
+
+
+
-
+
-
+
-
+
-
+
@@ -3822,17 +3798,17 @@
-
+
-
+
-
+
@@ -3841,14 +3817,14 @@
-
+
-
+
@@ -3857,10 +3833,10 @@
-
+
-
+
@@ -3871,32 +3847,32 @@
-
+
-
+
-
+
-
+
-
+
-
+
@@ -3905,19 +3881,19 @@
-
-
-
-
-
+
+
+
+
+
-
+
@@ -3926,10 +3902,10 @@
-
+
-
+
@@ -3940,14 +3916,14 @@
-
+
-
+
@@ -3960,10 +3936,10 @@
-
+
-
+
@@ -3978,7 +3954,7 @@
-
+
@@ -4003,7 +3979,7 @@
-
+
@@ -4014,7 +3990,7 @@
-
+
@@ -4047,7 +4023,7 @@
-
+
@@ -4058,7 +4034,7 @@
-
+
@@ -4073,7 +4049,7 @@
-
+
@@ -4082,10 +4058,10 @@
-
+
-
+
@@ -4102,23 +4078,23 @@
-
-
-
-
+
-
-
+
+
+
+
+
-
+
@@ -4131,10 +4107,10 @@
-
+
-
+
@@ -4145,19 +4121,19 @@
-
+
-
+
-
+
@@ -4170,25 +4146,25 @@
-
-
-
-
+
-
-
+
+
+
+
+
-
+
@@ -4197,14 +4173,14 @@
-
+
-
+
@@ -4213,22 +4189,22 @@
-
+
-
+
-
+
-
+
@@ -4249,16 +4225,13 @@
-
-
-
-
+
-
+
-
-
+
+
@@ -4266,31 +4239,34 @@
+
+
+
-
+
-
+
-
+
-
+
@@ -4299,32 +4275,32 @@
-
-
-
-
-
+
+
+
+
+
-
+
-
+
-
+
-
+
@@ -4333,22 +4309,22 @@
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4363,43 +4339,43 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4412,7 +4388,7 @@
-
+
@@ -4425,7 +4401,7 @@
-
+
@@ -4434,14 +4410,14 @@
-
+
-
+
@@ -4465,7 +4441,7 @@
-
+
@@ -4502,52 +4478,52 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4556,10 +4532,10 @@
-
+
-
+
@@ -4568,43 +4544,43 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4615,7 +4591,7 @@
-
+
@@ -4624,17 +4600,17 @@
-
+
-
+
-
+
@@ -4643,7 +4619,7 @@
-
+
@@ -4656,7 +4632,7 @@
-
+
diff --git a/creusot/tests/should_succeed/red_black_tree/why3shapes.gz b/creusot/tests/should_succeed/red_black_tree/why3shapes.gz
index 935dd3e1f3..1bc0a95c45 100644
Binary files a/creusot/tests/should_succeed/red_black_tree/why3shapes.gz and b/creusot/tests/should_succeed/red_black_tree/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/resolve_uninit.mlcfg b/creusot/tests/should_succeed/resolve_uninit.mlcfg
index d9da49e7aa..3ecf9bd148 100644
--- a/creusot/tests/should_succeed/resolve_uninit.mlcfg
+++ b/creusot/tests/should_succeed/resolve_uninit.mlcfg
@@ -121,15 +121,15 @@ module ResolveUninit_InitJoin
BB1 {
[#"../resolve_uninit.rs" 20 12 20 18] _8 <- Borrow.borrow_mut x;
[#"../resolve_uninit.rs" 20 12 20 18] x <- ^ _8;
- [#"../resolve_uninit.rs" 20 12 20 18] _7 <- Borrow.borrow_mut ( * _8);
- [#"../resolve_uninit.rs" 20 12 20 18] _8 <- { _8 with current = ^ _7 };
+ [#"../resolve_uninit.rs" 20 12 20 18] _7 <- Borrow.borrow_final ( * _8) (Borrow.get_id _8);
+ [#"../resolve_uninit.rs" 20 12 20 18] _8 <- { _8 with current = ( ^ _7) ; };
[#"../resolve_uninit.rs" 20 8 20 18] z <- ([#"../resolve_uninit.rs" 20 8 20 18] _7);
[#"../resolve_uninit.rs" 20 8 20 18] _7 <- any borrowed int32;
assume { resolve0 _8 };
- [#"../resolve_uninit.rs" 21 12 21 19] _10 <- Borrow.borrow_mut ( * z);
- [#"../resolve_uninit.rs" 21 12 21 19] z <- { z with current = ^ _10 };
- [#"../resolve_uninit.rs" 21 12 21 19] _9 <- Borrow.borrow_mut ( * _10);
- [#"../resolve_uninit.rs" 21 12 21 19] _10 <- { _10 with current = ^ _9 };
+ [#"../resolve_uninit.rs" 21 12 21 19] _10 <- Borrow.borrow_final ( * z) (Borrow.get_id z);
+ [#"../resolve_uninit.rs" 21 12 21 19] z <- { z with current = ( ^ _10) ; };
+ [#"../resolve_uninit.rs" 21 12 21 19] _9 <- Borrow.borrow_final ( * _10) (Borrow.get_id _10);
+ [#"../resolve_uninit.rs" 21 12 21 19] _10 <- { _10 with current = ( ^ _9) ; };
[#"../resolve_uninit.rs" 21 8 21 19] y <- ([#"../resolve_uninit.rs" 21 8 21 19] _9);
[#"../resolve_uninit.rs" 21 8 21 19] _9 <- any borrowed int32;
assume { resolve0 _10 };
@@ -139,8 +139,8 @@ module ResolveUninit_InitJoin
BB2 {
[#"../resolve_uninit.rs" 24 12 24 18] _12 <- Borrow.borrow_mut x;
[#"../resolve_uninit.rs" 24 12 24 18] x <- ^ _12;
- [#"../resolve_uninit.rs" 24 12 24 18] _11 <- Borrow.borrow_mut ( * _12);
- [#"../resolve_uninit.rs" 24 12 24 18] _12 <- { _12 with current = ^ _11 };
+ [#"../resolve_uninit.rs" 24 12 24 18] _11 <- Borrow.borrow_final ( * _12) (Borrow.get_id _12);
+ [#"../resolve_uninit.rs" 24 12 24 18] _12 <- { _12 with current = ( ^ _11) ; };
[#"../resolve_uninit.rs" 24 8 24 18] y <- ([#"../resolve_uninit.rs" 24 8 24 18] _11);
[#"../resolve_uninit.rs" 24 8 24 18] _11 <- any borrowed int32;
assume { resolve0 _12 };
@@ -148,7 +148,7 @@ module ResolveUninit_InitJoin
goto BB3
}
BB3 {
- [#"../resolve_uninit.rs" 27 4 27 10] y <- { y with current = ([#"../resolve_uninit.rs" 27 4 27 10] [#"../resolve_uninit.rs" 27 9 27 10] (5 : int32)) };
+ [#"../resolve_uninit.rs" 27 4 27 10] y <- { y with current = ([#"../resolve_uninit.rs" 27 4 27 10] [#"../resolve_uninit.rs" 27 9 27 10] (5 : int32)) ; };
assume { resolve0 y };
switch ([#"../resolve_uninit.rs" 28 4 28 19] not ([#"../resolve_uninit.rs" 28 12 28 18] ([#"../resolve_uninit.rs" 28 12 28 13] x) = ([#"../resolve_uninit.rs" 28 17 28 18] [#"../resolve_uninit.rs" 28 17 28 18] (5 : int32))))
| False -> goto BB5
diff --git a/creusot/tests/should_succeed/resolve_uninit/why3session.xml b/creusot/tests/should_succeed/resolve_uninit/why3session.xml
index 80d3400f8a..7a6db60793 100644
--- a/creusot/tests/should_succeed/resolve_uninit/why3session.xml
+++ b/creusot/tests/should_succeed/resolve_uninit/why3session.xml
@@ -12,7 +12,7 @@
-
+
diff --git a/creusot/tests/should_succeed/resolve_uninit/why3shapes.gz b/creusot/tests/should_succeed/resolve_uninit/why3shapes.gz
index 21777054c7..43989e3bef 100644
Binary files a/creusot/tests/should_succeed/resolve_uninit/why3shapes.gz and b/creusot/tests/should_succeed/resolve_uninit/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/result/own.mlcfg b/creusot/tests/should_succeed/result/own.mlcfg
index 168e748b9f..24989490e2 100644
--- a/creusot/tests/should_succeed/result/own.mlcfg
+++ b/creusot/tests/should_succeed/result/own.mlcfg
@@ -611,11 +611,11 @@ module Own_Impl0_AsMut
goto BB4
}
BB2 {
- [#"../own.rs" 74 27 74 36] x1 <- Borrow.borrow_mut (Own_OwnResult_Type.err_0 ( * self));
- [#"../own.rs" 74 27 74 36] self <- { self with current = (let Own_OwnResult_Type.C_Err x0 = * self in Own_OwnResult_Type.C_Err ( ^ x1)) };
+ [#"../own.rs" 74 27 74 36] x1 <- Borrow.borrow_final (Own_OwnResult_Type.err_0 ( * self)) (Borrow.inherit_id (Borrow.get_id self) 1);
+ [#"../own.rs" 74 27 74 36] self <- { self with current = (let Own_OwnResult_Type.C_Err x0 = * self in Own_OwnResult_Type.C_Err ( ^ x1)) ; };
assume { inv2 ( ^ x1) };
- [#"../own.rs" 74 56 74 57] _7 <- Borrow.borrow_mut ( * x1);
- [#"../own.rs" 74 56 74 57] x1 <- { x1 with current = ^ _7 };
+ [#"../own.rs" 74 56 74 57] _7 <- Borrow.borrow_final ( * x1) (Borrow.get_id x1);
+ [#"../own.rs" 74 56 74 57] x1 <- { x1 with current = ( ^ _7) ; };
assume { inv2 ( ^ _7) };
[#"../own.rs" 74 41 74 58] _0 <- ([#"../own.rs" 74 41 74 58] Own_OwnResult_Type.C_Err _7);
_7 <- any borrowed e;
@@ -630,11 +630,11 @@ module Own_Impl0_AsMut
absurd
}
BB4 {
- [#"../own.rs" 73 26 73 35] x <- Borrow.borrow_mut (Own_OwnResult_Type.ok_0 ( * self));
- [#"../own.rs" 73 26 73 35] self <- { self with current = (let Own_OwnResult_Type.C_Ok x0 = * self in Own_OwnResult_Type.C_Ok ( ^ x)) };
+ [#"../own.rs" 73 26 73 35] x <- Borrow.borrow_final (Own_OwnResult_Type.ok_0 ( * self)) (Borrow.inherit_id (Borrow.get_id self) 1);
+ [#"../own.rs" 73 26 73 35] self <- { self with current = (let Own_OwnResult_Type.C_Ok x0 = * self in Own_OwnResult_Type.C_Ok ( ^ x)) ; };
assume { inv0 ( ^ x) };
- [#"../own.rs" 73 54 73 55] _5 <- Borrow.borrow_mut ( * x);
- [#"../own.rs" 73 54 73 55] x <- { x with current = ^ _5 };
+ [#"../own.rs" 73 54 73 55] _5 <- Borrow.borrow_final ( * x) (Borrow.get_id x);
+ [#"../own.rs" 73 54 73 55] x <- { x with current = ( ^ _5) ; };
assume { inv0 ( ^ _5) };
[#"../own.rs" 73 40 73 56] _0 <- ([#"../own.rs" 73 40 73 56] Own_OwnResult_Type.C_Ok _5);
_5 <- any borrowed t;
diff --git a/creusot/tests/should_succeed/result/result.mlcfg b/creusot/tests/should_succeed/result/result.mlcfg
index d0162f43e7..3c3d9c5192 100644
--- a/creusot/tests/should_succeed/result/result.mlcfg
+++ b/creusot/tests/should_succeed/result/result.mlcfg
@@ -642,7 +642,7 @@ module Result_TestResult
goto BB40
}
BB40 {
- [#"../result.rs" 23 4 23 29] _65 <- { _65 with current = ([#"../result.rs" 23 4 23 29] [#"../result.rs" 23 28 23 29] (0 : int32)) };
+ [#"../result.rs" 23 4 23 29] _65 <- { _65 with current = ([#"../result.rs" 23 4 23 29] [#"../result.rs" 23 28 23 29] (0 : int32)) ; };
assume { resolve0 _65 };
[#"../result.rs" 24 12 24 23] _71 <- ([#"../result.rs" 24 12 24 23] unwrap3 ([#"../result.rs" 24 12 24 14] ok));
goto BB41
@@ -670,7 +670,7 @@ module Result_TestResult
goto BB45
}
BB45 {
- [#"../result.rs" 25 4 25 29] _74 <- { _74 with current = ([#"../result.rs" 25 4 25 29] [#"../result.rs" 25 28 25 29] (1 : int32)) };
+ [#"../result.rs" 25 4 25 29] _74 <- { _74 with current = ([#"../result.rs" 25 4 25 29] [#"../result.rs" 25 28 25 29] (1 : int32)) ; };
assume { resolve0 _74 };
[#"../result.rs" 26 12 26 23] _80 <- ([#"../result.rs" 26 12 26 23] unwrap3 ([#"../result.rs" 26 12 26 14] ok));
goto BB46
@@ -698,7 +698,7 @@ module Result_TestResult
goto BB50
}
BB50 {
- [#"../result.rs" 27 4 27 34] _83 <- { _83 with current = ([#"../result.rs" 27 4 27 34] [#"../result.rs" 27 33 27 34] (0 : int32)) };
+ [#"../result.rs" 27 4 27 34] _83 <- { _83 with current = ([#"../result.rs" 27 4 27 34] [#"../result.rs" 27 33 27 34] (0 : int32)) ; };
assume { resolve0 _83 };
[#"../result.rs" 28 12 28 28] _89 <- ([#"../result.rs" 28 12 28 28] unwrap_err2 ([#"../result.rs" 28 12 28 15] err));
goto BB51
@@ -726,7 +726,7 @@ module Result_TestResult
goto BB55
}
BB55 {
- [#"../result.rs" 29 4 29 35] _92 <- { _92 with current = ([#"../result.rs" 29 4 29 35] [#"../result.rs" 29 33 29 35] (-1 : int32)) };
+ [#"../result.rs" 29 4 29 35] _92 <- { _92 with current = ([#"../result.rs" 29 4 29 35] [#"../result.rs" 29 33 29 35] (-1 : int32)) ; };
assume { resolve0 _92 };
[#"../result.rs" 30 12 30 28] _98 <- ([#"../result.rs" 30 12 30 28] unwrap_err2 ([#"../result.rs" 30 12 30 15] err));
goto BB56
diff --git a/creusot/tests/should_succeed/rusthorn/inc_max.mlcfg b/creusot/tests/should_succeed/rusthorn/inc_max.mlcfg
index 0ccb885cab..2ff458f126 100644
--- a/creusot/tests/should_succeed/rusthorn/inc_max.mlcfg
+++ b/creusot/tests/should_succeed/rusthorn/inc_max.mlcfg
@@ -33,24 +33,24 @@ module IncMax_TakeMax
}
BB1 {
assume { resolve0 mb };
- [#"../inc_max.rs" 8 8 8 10] _9 <- Borrow.borrow_mut ( * ma);
- [#"../inc_max.rs" 8 8 8 10] ma <- { ma with current = ^ _9 };
- [#"../inc_max.rs" 8 8 8 10] _5 <- Borrow.borrow_mut ( * _9);
- [#"../inc_max.rs" 8 8 8 10] _9 <- { _9 with current = ^ _5 };
+ [#"../inc_max.rs" 8 8 8 10] _9 <- Borrow.borrow_final ( * ma) (Borrow.get_id ma);
+ [#"../inc_max.rs" 8 8 8 10] ma <- { ma with current = ( ^ _9) ; };
+ [#"../inc_max.rs" 8 8 8 10] _5 <- Borrow.borrow_final ( * _9) (Borrow.get_id _9);
+ [#"../inc_max.rs" 8 8 8 10] _9 <- { _9 with current = ( ^ _5) ; };
assume { resolve0 _9 };
goto BB3
}
BB2 {
assume { resolve0 ma };
- [#"../inc_max.rs" 10 8 10 10] _5 <- Borrow.borrow_mut ( * mb);
- [#"../inc_max.rs" 10 8 10 10] mb <- { mb with current = ^ _5 };
+ [#"../inc_max.rs" 10 8 10 10] _5 <- Borrow.borrow_final ( * mb) (Borrow.get_id mb);
+ [#"../inc_max.rs" 10 8 10 10] mb <- { mb with current = ( ^ _5) ; };
goto BB3
}
BB3 {
- [#"../inc_max.rs" 7 4 11 5] _3 <- Borrow.borrow_mut ( * _5);
- [#"../inc_max.rs" 7 4 11 5] _5 <- { _5 with current = ^ _3 };
- [#"../inc_max.rs" 7 4 11 5] _0 <- Borrow.borrow_mut ( * _3);
- [#"../inc_max.rs" 7 4 11 5] _3 <- { _3 with current = ^ _0 };
+ [#"../inc_max.rs" 7 4 11 5] _3 <- Borrow.borrow_final ( * _5) (Borrow.get_id _5);
+ [#"../inc_max.rs" 7 4 11 5] _5 <- { _5 with current = ( ^ _3) ; };
+ [#"../inc_max.rs" 7 4 11 5] _0 <- Borrow.borrow_final ( * _3) (Borrow.get_id _3);
+ [#"../inc_max.rs" 7 4 11 5] _3 <- { _3 with current = ( ^ _0) ; };
assume { resolve0 _5 };
assume { resolve0 _3 };
assume { resolve0 mb };
@@ -93,12 +93,12 @@ module IncMax_IncMax
BB0 {
[#"../inc_max.rs" 16 22 16 28] _6 <- Borrow.borrow_mut a;
[#"../inc_max.rs" 16 22 16 28] a <- ^ _6;
- [#"../inc_max.rs" 16 22 16 28] _5 <- Borrow.borrow_mut ( * _6);
- [#"../inc_max.rs" 16 22 16 28] _6 <- { _6 with current = ^ _5 };
+ [#"../inc_max.rs" 16 22 16 28] _5 <- Borrow.borrow_final ( * _6) (Borrow.get_id _6);
+ [#"../inc_max.rs" 16 22 16 28] _6 <- { _6 with current = ( ^ _5) ; };
[#"../inc_max.rs" 16 30 16 36] _8 <- Borrow.borrow_mut b;
[#"../inc_max.rs" 16 30 16 36] b <- ^ _8;
- [#"../inc_max.rs" 16 30 16 36] _7 <- Borrow.borrow_mut ( * _8);
- [#"../inc_max.rs" 16 30 16 36] _8 <- { _8 with current = ^ _7 };
+ [#"../inc_max.rs" 16 30 16 36] _7 <- Borrow.borrow_final ( * _8) (Borrow.get_id _8);
+ [#"../inc_max.rs" 16 30 16 36] _8 <- { _8 with current = ( ^ _7) ; };
[#"../inc_max.rs" 16 13 16 37] mc <- ([#"../inc_max.rs" 16 13 16 37] take_max0 _5 _7);
_5 <- any borrowed uint32;
_7 <- any borrowed uint32;
@@ -107,7 +107,7 @@ module IncMax_IncMax
BB1 {
assume { resolve0 _8 };
assume { resolve0 _6 };
- [#"../inc_max.rs" 17 4 17 12] mc <- { mc with current = ([#"../inc_max.rs" 17 4 17 12] * mc + ([#"../inc_max.rs" 17 11 17 12] [#"../inc_max.rs" 17 11 17 12] (1 : uint32))) };
+ [#"../inc_max.rs" 17 4 17 12] mc <- { mc with current = ([#"../inc_max.rs" 17 4 17 12] * mc + ([#"../inc_max.rs" 17 11 17 12] [#"../inc_max.rs" 17 11 17 12] (1 : uint32))) ; };
assume { resolve0 mc };
switch ([#"../inc_max.rs" 18 4 18 19] not ([#"../inc_max.rs" 18 12 18 18] ([#"../inc_max.rs" 18 12 18 13] a) <> ([#"../inc_max.rs" 18 17 18 18] b)))
| False -> goto BB3
diff --git a/creusot/tests/should_succeed/rusthorn/inc_max/why3session.xml b/creusot/tests/should_succeed/rusthorn/inc_max/why3session.xml
index 57fd1b4099..139e9682ec 100644
--- a/creusot/tests/should_succeed/rusthorn/inc_max/why3session.xml
+++ b/creusot/tests/should_succeed/rusthorn/inc_max/why3session.xml
@@ -7,12 +7,12 @@
-
+
-
+
diff --git a/creusot/tests/should_succeed/rusthorn/inc_max/why3shapes.gz b/creusot/tests/should_succeed/rusthorn/inc_max/why3shapes.gz
index def65a8d48..cb708c6f6e 100644
Binary files a/creusot/tests/should_succeed/rusthorn/inc_max/why3shapes.gz and b/creusot/tests/should_succeed/rusthorn/inc_max/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/rusthorn/inc_max_3.mlcfg b/creusot/tests/should_succeed/rusthorn/inc_max_3.mlcfg
index f0b2117f3b..b27df33425 100644
--- a/creusot/tests/should_succeed/rusthorn/inc_max_3.mlcfg
+++ b/creusot/tests/should_succeed/rusthorn/inc_max_3.mlcfg
@@ -55,12 +55,12 @@ module IncMax3_IncMax3
BB1 {
[#"../inc_max_3.rs" 14 13 14 20] _12 <- Borrow.borrow_mut ma;
[#"../inc_max_3.rs" 14 13 14 20] ma <- ^ _12;
- [#"../inc_max_3.rs" 14 13 14 20] _11 <- Borrow.borrow_mut ( * _12);
- [#"../inc_max_3.rs" 14 13 14 20] _12 <- { _12 with current = ^ _11 };
+ [#"../inc_max_3.rs" 14 13 14 20] _11 <- Borrow.borrow_final ( * _12) (Borrow.get_id _12);
+ [#"../inc_max_3.rs" 14 13 14 20] _12 <- { _12 with current = ( ^ _11) ; };
[#"../inc_max_3.rs" 14 22 14 29] _14 <- Borrow.borrow_mut mb;
[#"../inc_max_3.rs" 14 22 14 29] mb <- ^ _14;
- [#"../inc_max_3.rs" 14 22 14 29] _13 <- Borrow.borrow_mut ( * _14);
- [#"../inc_max_3.rs" 14 22 14 29] _14 <- { _14 with current = ^ _13 };
+ [#"../inc_max_3.rs" 14 22 14 29] _13 <- Borrow.borrow_final ( * _14) (Borrow.get_id _14);
+ [#"../inc_max_3.rs" 14 22 14 29] _14 <- { _14 with current = ( ^ _13) ; };
[#"../inc_max_3.rs" 14 8 14 30] _10 <- ([#"../inc_max_3.rs" 14 8 14 30] swap0 _11 _13);
_11 <- any borrowed (borrowed uint32);
_13 <- any borrowed (borrowed uint32);
@@ -85,12 +85,12 @@ module IncMax3_IncMax3
BB5 {
[#"../inc_max_3.rs" 17 13 17 20] _21 <- Borrow.borrow_mut mb;
[#"../inc_max_3.rs" 17 13 17 20] mb <- ^ _21;
- [#"../inc_max_3.rs" 17 13 17 20] _20 <- Borrow.borrow_mut ( * _21);
- [#"../inc_max_3.rs" 17 13 17 20] _21 <- { _21 with current = ^ _20 };
+ [#"../inc_max_3.rs" 17 13 17 20] _20 <- Borrow.borrow_final ( * _21) (Borrow.get_id _21);
+ [#"../inc_max_3.rs" 17 13 17 20] _21 <- { _21 with current = ( ^ _20) ; };
[#"../inc_max_3.rs" 17 22 17 29] _23 <- Borrow.borrow_mut mc;
[#"../inc_max_3.rs" 17 22 17 29] mc <- ^ _23;
- [#"../inc_max_3.rs" 17 22 17 29] _22 <- Borrow.borrow_mut ( * _23);
- [#"../inc_max_3.rs" 17 22 17 29] _23 <- { _23 with current = ^ _22 };
+ [#"../inc_max_3.rs" 17 22 17 29] _22 <- Borrow.borrow_final ( * _23) (Borrow.get_id _23);
+ [#"../inc_max_3.rs" 17 22 17 29] _23 <- { _23 with current = ( ^ _22) ; };
[#"../inc_max_3.rs" 17 8 17 30] _19 <- ([#"../inc_max_3.rs" 17 8 17 30] swap0 _20 _22);
_20 <- any borrowed (borrowed uint32);
_22 <- any borrowed (borrowed uint32);
@@ -117,12 +117,12 @@ module IncMax3_IncMax3
BB9 {
[#"../inc_max_3.rs" 20 13 20 20] _30 <- Borrow.borrow_mut ma;
[#"../inc_max_3.rs" 20 13 20 20] ma <- ^ _30;
- [#"../inc_max_3.rs" 20 13 20 20] _29 <- Borrow.borrow_mut ( * _30);
- [#"../inc_max_3.rs" 20 13 20 20] _30 <- { _30 with current = ^ _29 };
+ [#"../inc_max_3.rs" 20 13 20 20] _29 <- Borrow.borrow_final ( * _30) (Borrow.get_id _30);
+ [#"../inc_max_3.rs" 20 13 20 20] _30 <- { _30 with current = ( ^ _29) ; };
[#"../inc_max_3.rs" 20 22 20 29] _32 <- Borrow.borrow_mut mb;
[#"../inc_max_3.rs" 20 22 20 29] mb <- ^ _32;
- [#"../inc_max_3.rs" 20 22 20 29] _31 <- Borrow.borrow_mut ( * _32);
- [#"../inc_max_3.rs" 20 22 20 29] _32 <- { _32 with current = ^ _31 };
+ [#"../inc_max_3.rs" 20 22 20 29] _31 <- Borrow.borrow_final ( * _32) (Borrow.get_id _32);
+ [#"../inc_max_3.rs" 20 22 20 29] _32 <- { _32 with current = ( ^ _31) ; };
[#"../inc_max_3.rs" 20 8 20 30] _28 <- ([#"../inc_max_3.rs" 20 8 20 30] swap0 _29 _31);
_29 <- any borrowed (borrowed uint32);
_31 <- any borrowed (borrowed uint32);
@@ -139,9 +139,9 @@ module IncMax3_IncMax3
goto BB12
}
BB12 {
- [#"../inc_max_3.rs" 22 4 22 12] ma <- { ma with current = ([#"../inc_max_3.rs" 22 4 22 12] * ma + ([#"../inc_max_3.rs" 22 11 22 12] [#"../inc_max_3.rs" 22 11 22 12] (2 : uint32))) };
+ [#"../inc_max_3.rs" 22 4 22 12] ma <- { ma with current = ([#"../inc_max_3.rs" 22 4 22 12] * ma + ([#"../inc_max_3.rs" 22 11 22 12] [#"../inc_max_3.rs" 22 11 22 12] (2 : uint32))) ; };
assume { resolve1 ma };
- [#"../inc_max_3.rs" 23 4 23 12] mb <- { mb with current = ([#"../inc_max_3.rs" 23 4 23 12] * mb + ([#"../inc_max_3.rs" 23 11 23 12] [#"../inc_max_3.rs" 23 11 23 12] (1 : uint32))) };
+ [#"../inc_max_3.rs" 23 4 23 12] mb <- { mb with current = ([#"../inc_max_3.rs" 23 4 23 12] * mb + ([#"../inc_max_3.rs" 23 11 23 12] [#"../inc_max_3.rs" 23 11 23 12] (1 : uint32))) ; };
assume { resolve1 mb };
[#"../inc_max_3.rs" 12 80 24 1] _0 <- ([#"../inc_max_3.rs" 12 80 24 1] ());
return _0
@@ -184,16 +184,16 @@ module IncMax3_TestIncMax3
BB0 {
[#"../inc_max_3.rs" 28 14 28 20] _7 <- Borrow.borrow_mut a;
[#"../inc_max_3.rs" 28 14 28 20] a <- ^ _7;
- [#"../inc_max_3.rs" 28 14 28 20] _6 <- Borrow.borrow_mut ( * _7);
- [#"../inc_max_3.rs" 28 14 28 20] _7 <- { _7 with current = ^ _6 };
+ [#"../inc_max_3.rs" 28 14 28 20] _6 <- Borrow.borrow_final ( * _7) (Borrow.get_id _7);
+ [#"../inc_max_3.rs" 28 14 28 20] _7 <- { _7 with current = ( ^ _6) ; };
[#"../inc_max_3.rs" 28 22 28 28] _9 <- Borrow.borrow_mut b;
[#"../inc_max_3.rs" 28 22 28 28] b <- ^ _9;
- [#"../inc_max_3.rs" 28 22 28 28] _8 <- Borrow.borrow_mut ( * _9);
- [#"../inc_max_3.rs" 28 22 28 28] _9 <- { _9 with current = ^ _8 };
+ [#"../inc_max_3.rs" 28 22 28 28] _8 <- Borrow.borrow_final ( * _9) (Borrow.get_id _9);
+ [#"../inc_max_3.rs" 28 22 28 28] _9 <- { _9 with current = ( ^ _8) ; };
[#"../inc_max_3.rs" 28 30 28 36] _11 <- Borrow.borrow_mut c;
[#"../inc_max_3.rs" 28 30 28 36] c <- ^ _11;
- [#"../inc_max_3.rs" 28 30 28 36] _10 <- Borrow.borrow_mut ( * _11);
- [#"../inc_max_3.rs" 28 30 28 36] _11 <- { _11 with current = ^ _10 };
+ [#"../inc_max_3.rs" 28 30 28 36] _10 <- Borrow.borrow_final ( * _11) (Borrow.get_id _11);
+ [#"../inc_max_3.rs" 28 30 28 36] _11 <- { _11 with current = ( ^ _10) ; };
[#"../inc_max_3.rs" 28 4 28 37] _5 <- ([#"../inc_max_3.rs" 28 4 28 37] inc_max_30 _6 _8 _10);
_6 <- any borrowed uint32;
_8 <- any borrowed uint32;
diff --git a/creusot/tests/should_succeed/rusthorn/inc_max_3/why3session.xml b/creusot/tests/should_succeed/rusthorn/inc_max_3/why3session.xml
index 1306383961..37f40be6f6 100644
--- a/creusot/tests/should_succeed/rusthorn/inc_max_3/why3session.xml
+++ b/creusot/tests/should_succeed/rusthorn/inc_max_3/why3session.xml
@@ -7,12 +7,12 @@
-
+
-
+
diff --git a/creusot/tests/should_succeed/rusthorn/inc_max_3/why3shapes.gz b/creusot/tests/should_succeed/rusthorn/inc_max_3/why3shapes.gz
index 6b7f9de372..fe4a5412b8 100644
Binary files a/creusot/tests/should_succeed/rusthorn/inc_max_3/why3shapes.gz and b/creusot/tests/should_succeed/rusthorn/inc_max_3/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/rusthorn/inc_max_many.mlcfg b/creusot/tests/should_succeed/rusthorn/inc_max_many.mlcfg
index e72775b9f7..35ed05161b 100644
--- a/creusot/tests/should_succeed/rusthorn/inc_max_many.mlcfg
+++ b/creusot/tests/should_succeed/rusthorn/inc_max_many.mlcfg
@@ -33,24 +33,24 @@ module IncMaxMany_TakeMax
}
BB1 {
assume { resolve0 mb };
- [#"../inc_max_many.rs" 8 8 8 10] _9 <- Borrow.borrow_mut ( * ma);
- [#"../inc_max_many.rs" 8 8 8 10] ma <- { ma with current = ^ _9 };
- [#"../inc_max_many.rs" 8 8 8 10] _5 <- Borrow.borrow_mut ( * _9);
- [#"../inc_max_many.rs" 8 8 8 10] _9 <- { _9 with current = ^ _5 };
+ [#"../inc_max_many.rs" 8 8 8 10] _9 <- Borrow.borrow_final ( * ma) (Borrow.get_id ma);
+ [#"../inc_max_many.rs" 8 8 8 10] ma <- { ma with current = ( ^ _9) ; };
+ [#"../inc_max_many.rs" 8 8 8 10] _5 <- Borrow.borrow_final ( * _9) (Borrow.get_id _9);
+ [#"../inc_max_many.rs" 8 8 8 10] _9 <- { _9 with current = ( ^ _5) ; };
assume { resolve0 _9 };
goto BB3
}
BB2 {
assume { resolve0 ma };
- [#"../inc_max_many.rs" 10 8 10 10] _5 <- Borrow.borrow_mut ( * mb);
- [#"../inc_max_many.rs" 10 8 10 10] mb <- { mb with current = ^ _5 };
+ [#"../inc_max_many.rs" 10 8 10 10] _5 <- Borrow.borrow_final ( * mb) (Borrow.get_id mb);
+ [#"../inc_max_many.rs" 10 8 10 10] mb <- { mb with current = ( ^ _5) ; };
goto BB3
}
BB3 {
- [#"../inc_max_many.rs" 7 4 11 5] _3 <- Borrow.borrow_mut ( * _5);
- [#"../inc_max_many.rs" 7 4 11 5] _5 <- { _5 with current = ^ _3 };
- [#"../inc_max_many.rs" 7 4 11 5] _0 <- Borrow.borrow_mut ( * _3);
- [#"../inc_max_many.rs" 7 4 11 5] _3 <- { _3 with current = ^ _0 };
+ [#"../inc_max_many.rs" 7 4 11 5] _3 <- Borrow.borrow_final ( * _5) (Borrow.get_id _5);
+ [#"../inc_max_many.rs" 7 4 11 5] _5 <- { _5 with current = ( ^ _3) ; };
+ [#"../inc_max_many.rs" 7 4 11 5] _0 <- Borrow.borrow_final ( * _3) (Borrow.get_id _3);
+ [#"../inc_max_many.rs" 7 4 11 5] _3 <- { _3 with current = ( ^ _0) ; };
assume { resolve0 _5 };
assume { resolve0 _3 };
assume { resolve0 mb };
@@ -95,12 +95,12 @@ module IncMaxMany_IncMaxMany
BB0 {
[#"../inc_max_many.rs" 16 22 16 28] _7 <- Borrow.borrow_mut a;
[#"../inc_max_many.rs" 16 22 16 28] a <- ^ _7;
- [#"../inc_max_many.rs" 16 22 16 28] _6 <- Borrow.borrow_mut ( * _7);
- [#"../inc_max_many.rs" 16 22 16 28] _7 <- { _7 with current = ^ _6 };
+ [#"../inc_max_many.rs" 16 22 16 28] _6 <- Borrow.borrow_final ( * _7) (Borrow.get_id _7);
+ [#"../inc_max_many.rs" 16 22 16 28] _7 <- { _7 with current = ( ^ _6) ; };
[#"../inc_max_many.rs" 16 30 16 36] _9 <- Borrow.borrow_mut b;
[#"../inc_max_many.rs" 16 30 16 36] b <- ^ _9;
- [#"../inc_max_many.rs" 16 30 16 36] _8 <- Borrow.borrow_mut ( * _9);
- [#"../inc_max_many.rs" 16 30 16 36] _9 <- { _9 with current = ^ _8 };
+ [#"../inc_max_many.rs" 16 30 16 36] _8 <- Borrow.borrow_final ( * _9) (Borrow.get_id _9);
+ [#"../inc_max_many.rs" 16 30 16 36] _9 <- { _9 with current = ( ^ _8) ; };
[#"../inc_max_many.rs" 16 13 16 37] mc <- ([#"../inc_max_many.rs" 16 13 16 37] take_max0 _6 _8);
_6 <- any borrowed uint32;
_8 <- any borrowed uint32;
@@ -109,7 +109,7 @@ module IncMaxMany_IncMaxMany
BB1 {
assume { resolve0 _9 };
assume { resolve0 _7 };
- [#"../inc_max_many.rs" 17 4 17 12] mc <- { mc with current = ([#"../inc_max_many.rs" 17 4 17 12] * mc + ([#"../inc_max_many.rs" 17 11 17 12] k)) };
+ [#"../inc_max_many.rs" 17 4 17 12] mc <- { mc with current = ([#"../inc_max_many.rs" 17 4 17 12] * mc + ([#"../inc_max_many.rs" 17 11 17 12] k)) ; };
assume { resolve0 mc };
switch ([#"../inc_max_many.rs" 18 12 18 22] ([#"../inc_max_many.rs" 18 12 18 13] a) >= ([#"../inc_max_many.rs" 18 17 18 22] ([#"../inc_max_many.rs" 18 17 18 18] b) + ([#"../inc_max_many.rs" 18 21 18 22] k)))
| False -> goto BB3
diff --git a/creusot/tests/should_succeed/rusthorn/inc_max_many/why3session.xml b/creusot/tests/should_succeed/rusthorn/inc_max_many/why3session.xml
index 344416079a..129fd31129 100644
--- a/creusot/tests/should_succeed/rusthorn/inc_max_many/why3session.xml
+++ b/creusot/tests/should_succeed/rusthorn/inc_max_many/why3session.xml
@@ -8,12 +8,12 @@
-
+
-
+
diff --git a/creusot/tests/should_succeed/rusthorn/inc_max_many/why3shapes.gz b/creusot/tests/should_succeed/rusthorn/inc_max_many/why3shapes.gz
index 19c3c52f1e..e9f08e6cc8 100644
Binary files a/creusot/tests/should_succeed/rusthorn/inc_max_many/why3shapes.gz and b/creusot/tests/should_succeed/rusthorn/inc_max_many/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/rusthorn/inc_max_repeat.mlcfg b/creusot/tests/should_succeed/rusthorn/inc_max_repeat.mlcfg
index c50aefebe3..05d513e74d 100644
--- a/creusot/tests/should_succeed/rusthorn/inc_max_repeat.mlcfg
+++ b/creusot/tests/should_succeed/rusthorn/inc_max_repeat.mlcfg
@@ -33,24 +33,24 @@ module IncMaxRepeat_TakeMax
}
BB1 {
assume { resolve0 mb };
- [#"../inc_max_repeat.rs" 8 8 8 10] _9 <- Borrow.borrow_mut ( * ma);
- [#"../inc_max_repeat.rs" 8 8 8 10] ma <- { ma with current = ^ _9 };
- [#"../inc_max_repeat.rs" 8 8 8 10] _5 <- Borrow.borrow_mut ( * _9);
- [#"../inc_max_repeat.rs" 8 8 8 10] _9 <- { _9 with current = ^ _5 };
+ [#"../inc_max_repeat.rs" 8 8 8 10] _9 <- Borrow.borrow_final ( * ma) (Borrow.get_id ma);
+ [#"../inc_max_repeat.rs" 8 8 8 10] ma <- { ma with current = ( ^ _9) ; };
+ [#"../inc_max_repeat.rs" 8 8 8 10] _5 <- Borrow.borrow_final ( * _9) (Borrow.get_id _9);
+ [#"../inc_max_repeat.rs" 8 8 8 10] _9 <- { _9 with current = ( ^ _5) ; };
assume { resolve0 _9 };
goto BB3
}
BB2 {
assume { resolve0 ma };
- [#"../inc_max_repeat.rs" 10 8 10 10] _5 <- Borrow.borrow_mut ( * mb);
- [#"../inc_max_repeat.rs" 10 8 10 10] mb <- { mb with current = ^ _5 };
+ [#"../inc_max_repeat.rs" 10 8 10 10] _5 <- Borrow.borrow_final ( * mb) (Borrow.get_id mb);
+ [#"../inc_max_repeat.rs" 10 8 10 10] mb <- { mb with current = ( ^ _5) ; };
goto BB3
}
BB3 {
- [#"../inc_max_repeat.rs" 7 4 11 5] _3 <- Borrow.borrow_mut ( * _5);
- [#"../inc_max_repeat.rs" 7 4 11 5] _5 <- { _5 with current = ^ _3 };
- [#"../inc_max_repeat.rs" 7 4 11 5] _0 <- Borrow.borrow_mut ( * _3);
- [#"../inc_max_repeat.rs" 7 4 11 5] _3 <- { _3 with current = ^ _0 };
+ [#"../inc_max_repeat.rs" 7 4 11 5] _3 <- Borrow.borrow_final ( * _5) (Borrow.get_id _5);
+ [#"../inc_max_repeat.rs" 7 4 11 5] _5 <- { _5 with current = ( ^ _3) ; };
+ [#"../inc_max_repeat.rs" 7 4 11 5] _0 <- Borrow.borrow_final ( * _3) (Borrow.get_id _3);
+ [#"../inc_max_repeat.rs" 7 4 11 5] _3 <- { _3 with current = ( ^ _0) ; };
assume { resolve0 _5 };
assume { resolve0 _3 };
assume { resolve0 mb };
@@ -272,8 +272,8 @@ module IncMaxRepeat_IncMaxRepeat
BB5 {
[#"../inc_max_repeat.rs" 16 4 16 86] _20 <- Borrow.borrow_mut iter;
[#"../inc_max_repeat.rs" 16 4 16 86] iter <- ^ _20;
- [#"../inc_max_repeat.rs" 16 4 16 86] _19 <- Borrow.borrow_mut ( * _20);
- [#"../inc_max_repeat.rs" 16 4 16 86] _20 <- { _20 with current = ^ _19 };
+ [#"../inc_max_repeat.rs" 16 4 16 86] _19 <- Borrow.borrow_final ( * _20) (Borrow.get_id _20);
+ [#"../inc_max_repeat.rs" 16 4 16 86] _20 <- { _20 with current = ( ^ _19) ; };
[#"../inc_max_repeat.rs" 16 4 16 86] _18 <- ([#"../inc_max_repeat.rs" 16 4 16 86] next0 _19);
_19 <- any borrowed (Core_Ops_Range_Range_Type.t_range uint32);
goto BB6
@@ -308,12 +308,12 @@ module IncMaxRepeat_IncMaxRepeat
[#"../inc_max_repeat.rs" 16 4 16 86] _23 <- any Ghost.ghost_ty (Seq.seq uint32);
[#"../inc_max_repeat.rs" 19 26 19 32] _27 <- Borrow.borrow_mut a;
[#"../inc_max_repeat.rs" 19 26 19 32] a <- ^ _27;
- [#"../inc_max_repeat.rs" 19 26 19 32] _26 <- Borrow.borrow_mut ( * _27);
- [#"../inc_max_repeat.rs" 19 26 19 32] _27 <- { _27 with current = ^ _26 };
+ [#"../inc_max_repeat.rs" 19 26 19 32] _26 <- Borrow.borrow_final ( * _27) (Borrow.get_id _27);
+ [#"../inc_max_repeat.rs" 19 26 19 32] _27 <- { _27 with current = ( ^ _26) ; };
[#"../inc_max_repeat.rs" 19 34 19 40] _29 <- Borrow.borrow_mut b;
[#"../inc_max_repeat.rs" 19 34 19 40] b <- ^ _29;
- [#"../inc_max_repeat.rs" 19 34 19 40] _28 <- Borrow.borrow_mut ( * _29);
- [#"../inc_max_repeat.rs" 19 34 19 40] _29 <- { _29 with current = ^ _28 };
+ [#"../inc_max_repeat.rs" 19 34 19 40] _28 <- Borrow.borrow_final ( * _29) (Borrow.get_id _29);
+ [#"../inc_max_repeat.rs" 19 34 19 40] _29 <- { _29 with current = ( ^ _28) ; };
[#"../inc_max_repeat.rs" 19 17 19 41] mc <- ([#"../inc_max_repeat.rs" 19 17 19 41] take_max0 _26 _28);
_26 <- any borrowed uint32;
_28 <- any borrowed uint32;
@@ -322,7 +322,7 @@ module IncMaxRepeat_IncMaxRepeat
BB12 {
assume { resolve1 _29 };
assume { resolve1 _27 };
- [#"../inc_max_repeat.rs" 20 8 20 16] mc <- { mc with current = ([#"../inc_max_repeat.rs" 20 8 20 16] * mc + ([#"../inc_max_repeat.rs" 20 15 20 16] [#"../inc_max_repeat.rs" 20 15 20 16] (1 : uint32))) };
+ [#"../inc_max_repeat.rs" 20 8 20 16] mc <- { mc with current = ([#"../inc_max_repeat.rs" 20 8 20 16] * mc + ([#"../inc_max_repeat.rs" 20 15 20 16] [#"../inc_max_repeat.rs" 20 15 20 16] (1 : uint32))) ; };
assume { resolve1 mc };
goto BB4
}
diff --git a/creusot/tests/should_succeed/rusthorn/inc_max_repeat/why3session.xml b/creusot/tests/should_succeed/rusthorn/inc_max_repeat/why3session.xml
index 8c93002a7e..2c8bd869fa 100644
--- a/creusot/tests/should_succeed/rusthorn/inc_max_repeat/why3session.xml
+++ b/creusot/tests/should_succeed/rusthorn/inc_max_repeat/why3session.xml
@@ -8,12 +8,12 @@
-
+
-
+
diff --git a/creusot/tests/should_succeed/rusthorn/inc_max_repeat/why3shapes.gz b/creusot/tests/should_succeed/rusthorn/inc_max_repeat/why3shapes.gz
index 59d6492d40..44a9fe6183 100644
Binary files a/creusot/tests/should_succeed/rusthorn/inc_max_repeat/why3shapes.gz and b/creusot/tests/should_succeed/rusthorn/inc_max_repeat/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/rusthorn/inc_some_2_list.mlcfg b/creusot/tests/should_succeed/rusthorn/inc_some_2_list.mlcfg
index 5161ed570b..132849a8bf 100644
--- a/creusot/tests/should_succeed/rusthorn/inc_some_2_list.mlcfg
+++ b/creusot/tests/should_succeed/rusthorn/inc_some_2_list.mlcfg
@@ -184,10 +184,10 @@ module IncSome2List_Impl0_TakeSomeRest
absurd
}
BB4 {
- [#"../inc_some_2_list.rs" 56 17 56 19] ma <- Borrow.borrow_mut (IncSome2List_List_Type.cons_0 ( * self));
- [#"../inc_some_2_list.rs" 56 17 56 19] self <- { self with current = (let IncSome2List_List_Type.C_Cons x0 x1 = * self in IncSome2List_List_Type.C_Cons ( ^ ma) x1) };
- [#"../inc_some_2_list.rs" 56 21 56 23] ml <- Borrow.borrow_mut (IncSome2List_List_Type.cons_1 ( * self));
- [#"../inc_some_2_list.rs" 56 21 56 23] self <- { self with current = (let IncSome2List_List_Type.C_Cons x0 x1 = * self in IncSome2List_List_Type.C_Cons x0 ( ^ ml)) };
+ [#"../inc_some_2_list.rs" 56 17 56 19] ma <- Borrow.borrow_final (IncSome2List_List_Type.cons_0 ( * self)) (Borrow.inherit_id (Borrow.get_id self) 1);
+ [#"../inc_some_2_list.rs" 56 17 56 19] self <- { self with current = (let IncSome2List_List_Type.C_Cons x0 x1 = * self in IncSome2List_List_Type.C_Cons ( ^ ma) x1) ; };
+ [#"../inc_some_2_list.rs" 56 21 56 23] ml <- Borrow.borrow_final (IncSome2List_List_Type.cons_1 ( * self)) (Borrow.inherit_id (Borrow.get_id self) 2);
+ [#"../inc_some_2_list.rs" 56 21 56 23] self <- { self with current = (let IncSome2List_List_Type.C_Cons x0 x1 = * self in IncSome2List_List_Type.C_Cons x0 ( ^ ml)) ; };
[#"../inc_some_2_list.rs" 57 16 57 45] _8 <- ([#"../inc_some_2_list.rs" 57 16 57 45] Ghost.new (lemma_sum_nonneg0 ( * ml)));
goto BB5
}
@@ -202,10 +202,10 @@ module IncSome2List_Impl0_TakeSomeRest
end
}
BB7 {
- [#"../inc_some_2_list.rs" 59 21 59 23] _11 <- Borrow.borrow_mut ( * ma);
- [#"../inc_some_2_list.rs" 59 21 59 23] ma <- { ma with current = ^ _11 };
+ [#"../inc_some_2_list.rs" 59 21 59 23] _11 <- Borrow.borrow_final ( * ma) (Borrow.get_id ma);
+ [#"../inc_some_2_list.rs" 59 21 59 23] ma <- { ma with current = ( ^ _11) ; };
[#"../inc_some_2_list.rs" 59 25 59 27] _12 <- Borrow.borrow_mut ( * ml);
- [#"../inc_some_2_list.rs" 59 25 59 27] ml <- { ml with current = ^ _12 };
+ [#"../inc_some_2_list.rs" 59 25 59 27] ml <- { ml with current = ( ^ _12) ; };
[#"../inc_some_2_list.rs" 59 20 59 28] _0 <- ([#"../inc_some_2_list.rs" 59 20 59 28] (_11, _12));
_11 <- any borrowed uint32;
_12 <- any borrowed (IncSome2List_List_Type.t_list);
@@ -214,7 +214,7 @@ module IncSome2List_Impl0_TakeSomeRest
BB8 {
assume { resolve0 ma };
[#"../inc_some_2_list.rs" 61 20 61 39] _13 <- Borrow.borrow_mut ( * ml);
- [#"../inc_some_2_list.rs" 61 20 61 39] ml <- { ml with current = ^ _13 };
+ [#"../inc_some_2_list.rs" 61 20 61 39] ml <- { ml with current = ( ^ _13) ; };
[#"../inc_some_2_list.rs" 61 20 61 39] _0 <- ([#"../inc_some_2_list.rs" 61 20 61 39] take_some_rest _13);
_13 <- any borrowed (IncSome2List_List_Type.t_list);
goto BB9
@@ -320,8 +320,8 @@ module IncSome2List_IncSome2List
[#"../inc_some_2_list.rs" 72 13 72 15] ml <- ([#"../inc_some_2_list.rs" 72 13 72 15] let (_, a) = _9 in a);
[#"../inc_some_2_list.rs" 72 13 72 15] _9 <- (let (x0, x1) = _9 in (x0, any borrowed (IncSome2List_List_Type.t_list)));
assume { resolve0 _9 };
- [#"../inc_some_2_list.rs" 73 18 73 37] _13 <- Borrow.borrow_mut ( * ml);
- [#"../inc_some_2_list.rs" 73 18 73 37] ml <- { ml with current = ^ _13 };
+ [#"../inc_some_2_list.rs" 73 18 73 37] _13 <- Borrow.borrow_final ( * ml) (Borrow.get_id ml);
+ [#"../inc_some_2_list.rs" 73 18 73 37] ml <- { ml with current = ( ^ _13) ; };
[#"../inc_some_2_list.rs" 73 18 73 37] _12 <- ([#"../inc_some_2_list.rs" 73 18 73 37] take_some_rest0 _13);
_13 <- any borrowed (IncSome2List_List_Type.t_list);
goto BB4
@@ -330,9 +330,9 @@ module IncSome2List_IncSome2List
[#"../inc_some_2_list.rs" 73 9 73 11] mb <- ([#"../inc_some_2_list.rs" 73 9 73 11] let (a, _) = _12 in a);
[#"../inc_some_2_list.rs" 73 9 73 11] _12 <- (let (x0, x1) = _12 in (any borrowed uint32, x1));
assume { resolve0 _12 };
- [#"../inc_some_2_list.rs" 74 4 74 12] ma <- { ma with current = ([#"../inc_some_2_list.rs" 74 4 74 12] * ma + ([#"../inc_some_2_list.rs" 74 11 74 12] j)) };
+ [#"../inc_some_2_list.rs" 74 4 74 12] ma <- { ma with current = ([#"../inc_some_2_list.rs" 74 4 74 12] * ma + ([#"../inc_some_2_list.rs" 74 11 74 12] j)) ; };
assume { resolve1 ma };
- [#"../inc_some_2_list.rs" 75 4 75 12] mb <- { mb with current = ([#"../inc_some_2_list.rs" 75 4 75 12] * mb + ([#"../inc_some_2_list.rs" 75 11 75 12] k)) };
+ [#"../inc_some_2_list.rs" 75 4 75 12] mb <- { mb with current = ([#"../inc_some_2_list.rs" 75 4 75 12] * mb + ([#"../inc_some_2_list.rs" 75 11 75 12] k)) ; };
assume { resolve1 mb };
assume { resolve2 ml };
[#"../inc_some_2_list.rs" 76 12 76 21] _19 <- ([#"../inc_some_2_list.rs" 76 12 76 21] sum_x0 ([#"../inc_some_2_list.rs" 76 12 76 21] l));
diff --git a/creusot/tests/should_succeed/rusthorn/inc_some_2_list/why3session.xml b/creusot/tests/should_succeed/rusthorn/inc_some_2_list/why3session.xml
index 03dc890a88..f4a5c9a0a0 100644
--- a/creusot/tests/should_succeed/rusthorn/inc_some_2_list/why3session.xml
+++ b/creusot/tests/should_succeed/rusthorn/inc_some_2_list/why3session.xml
@@ -18,12 +18,12 @@
-
+
-
+
diff --git a/creusot/tests/should_succeed/rusthorn/inc_some_2_list/why3shapes.gz b/creusot/tests/should_succeed/rusthorn/inc_some_2_list/why3shapes.gz
index ac125aebb9..d030e5ecf6 100644
Binary files a/creusot/tests/should_succeed/rusthorn/inc_some_2_list/why3shapes.gz and b/creusot/tests/should_succeed/rusthorn/inc_some_2_list/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/rusthorn/inc_some_2_tree.mlcfg b/creusot/tests/should_succeed/rusthorn/inc_some_2_tree.mlcfg
index ee571defc0..f7d1c129d8 100644
--- a/creusot/tests/should_succeed/rusthorn/inc_some_2_tree.mlcfg
+++ b/creusot/tests/should_succeed/rusthorn/inc_some_2_tree.mlcfg
@@ -210,12 +210,12 @@ module IncSome2Tree_Impl0_TakeSomeRest
absurd
}
BB4 {
- [#"../inc_some_2_tree.rs" 65 17 65 20] mtl <- Borrow.borrow_mut (IncSome2Tree_Tree_Type.node_0 ( * self));
- [#"../inc_some_2_tree.rs" 65 17 65 20] self <- { self with current = (let IncSome2Tree_Tree_Type.C_Node x0 x1 x2 = * self in IncSome2Tree_Tree_Type.C_Node ( ^ mtl) x1 x2) };
- [#"../inc_some_2_tree.rs" 65 22 65 24] ma <- Borrow.borrow_mut (IncSome2Tree_Tree_Type.node_1 ( * self));
- [#"../inc_some_2_tree.rs" 65 22 65 24] self <- { self with current = (let IncSome2Tree_Tree_Type.C_Node x0 x1 x2 = * self in IncSome2Tree_Tree_Type.C_Node x0 ( ^ ma) x2) };
- [#"../inc_some_2_tree.rs" 65 26 65 29] mtr <- Borrow.borrow_mut (IncSome2Tree_Tree_Type.node_2 ( * self));
- [#"../inc_some_2_tree.rs" 65 26 65 29] self <- { self with current = (let IncSome2Tree_Tree_Type.C_Node x0 x1 x2 = * self in IncSome2Tree_Tree_Type.C_Node x0 x1 ( ^ mtr)) };
+ [#"../inc_some_2_tree.rs" 65 17 65 20] mtl <- Borrow.borrow_final (IncSome2Tree_Tree_Type.node_0 ( * self)) (Borrow.inherit_id (Borrow.get_id self) 1);
+ [#"../inc_some_2_tree.rs" 65 17 65 20] self <- { self with current = (let IncSome2Tree_Tree_Type.C_Node x0 x1 x2 = * self in IncSome2Tree_Tree_Type.C_Node ( ^ mtl) x1 x2) ; };
+ [#"../inc_some_2_tree.rs" 65 22 65 24] ma <- Borrow.borrow_final (IncSome2Tree_Tree_Type.node_1 ( * self)) (Borrow.inherit_id (Borrow.get_id self) 2);
+ [#"../inc_some_2_tree.rs" 65 22 65 24] self <- { self with current = (let IncSome2Tree_Tree_Type.C_Node x0 x1 x2 = * self in IncSome2Tree_Tree_Type.C_Node x0 ( ^ ma) x2) ; };
+ [#"../inc_some_2_tree.rs" 65 26 65 29] mtr <- Borrow.borrow_final (IncSome2Tree_Tree_Type.node_2 ( * self)) (Borrow.inherit_id (Borrow.get_id self) 3);
+ [#"../inc_some_2_tree.rs" 65 26 65 29] self <- { self with current = (let IncSome2Tree_Tree_Type.C_Node x0 x1 x2 = * self in IncSome2Tree_Tree_Type.C_Node x0 x1 ( ^ mtr)) ; };
assert { [@expl:assertion] [#"../inc_some_2_tree.rs" 67 20 67 42] let _ = lemma_sum_nonneg0 ( * mtl) in let _ = lemma_sum_nonneg0 ( * mtr) in true };
[#"../inc_some_2_tree.rs" 71 19 71 27] _11 <- ([#"../inc_some_2_tree.rs" 71 19 71 27] random0 ());
goto BB5
@@ -227,8 +227,8 @@ module IncSome2Tree_Impl0_TakeSomeRest
end
}
BB6 {
- [#"../inc_some_2_tree.rs" 72 21 72 23] _12 <- Borrow.borrow_mut ( * ma);
- [#"../inc_some_2_tree.rs" 72 21 72 23] ma <- { ma with current = ^ _12 };
+ [#"../inc_some_2_tree.rs" 72 21 72 23] _12 <- Borrow.borrow_final ( * ma) (Borrow.get_id ma);
+ [#"../inc_some_2_tree.rs" 72 21 72 23] ma <- { ma with current = ( ^ _12) ; };
[#"../inc_some_2_tree.rs" 72 28 72 36] _15 <- ([#"../inc_some_2_tree.rs" 72 28 72 36] random0 ());
goto BB7
}
@@ -241,21 +241,21 @@ module IncSome2Tree_Impl0_TakeSomeRest
BB8 {
assume { resolve1 mtr };
[#"../inc_some_2_tree.rs" 72 39 72 42] _16 <- Borrow.borrow_mut ( * mtl);
- [#"../inc_some_2_tree.rs" 72 39 72 42] mtl <- { mtl with current = ^ _16 };
- [#"../inc_some_2_tree.rs" 72 39 72 42] _14 <- Borrow.borrow_mut ( * _16);
- [#"../inc_some_2_tree.rs" 72 39 72 42] _16 <- { _16 with current = ^ _14 };
+ [#"../inc_some_2_tree.rs" 72 39 72 42] mtl <- { mtl with current = ( ^ _16) ; };
+ [#"../inc_some_2_tree.rs" 72 39 72 42] _14 <- Borrow.borrow_final ( * _16) (Borrow.get_id _16);
+ [#"../inc_some_2_tree.rs" 72 39 72 42] _16 <- { _16 with current = ( ^ _14) ; };
assume { resolve2 _16 };
goto BB10
}
BB9 {
assume { resolve1 mtl };
[#"../inc_some_2_tree.rs" 72 52 72 55] _14 <- Borrow.borrow_mut ( * mtr);
- [#"../inc_some_2_tree.rs" 72 52 72 55] mtr <- { mtr with current = ^ _14 };
+ [#"../inc_some_2_tree.rs" 72 52 72 55] mtr <- { mtr with current = ( ^ _14) ; };
goto BB10
}
BB10 {
- [#"../inc_some_2_tree.rs" 72 25 72 57] _13 <- Borrow.borrow_mut ( * _14);
- [#"../inc_some_2_tree.rs" 72 25 72 57] _14 <- { _14 with current = ^ _13 };
+ [#"../inc_some_2_tree.rs" 72 25 72 57] _13 <- Borrow.borrow_final ( * _14) (Borrow.get_id _14);
+ [#"../inc_some_2_tree.rs" 72 25 72 57] _14 <- { _14 with current = ( ^ _13) ; };
[#"../inc_some_2_tree.rs" 72 20 72 58] _0 <- ([#"../inc_some_2_tree.rs" 72 20 72 58] (_12, _13));
_12 <- any borrowed uint32;
_13 <- any borrowed (IncSome2Tree_Tree_Type.t_tree);
@@ -276,7 +276,7 @@ module IncSome2Tree_Impl0_TakeSomeRest
BB13 {
assume { resolve1 mtr };
[#"../inc_some_2_tree.rs" 74 20 74 40] _18 <- Borrow.borrow_mut ( * mtl);
- [#"../inc_some_2_tree.rs" 74 20 74 40] mtl <- { mtl with current = ^ _18 };
+ [#"../inc_some_2_tree.rs" 74 20 74 40] mtl <- { mtl with current = ( ^ _18) ; };
[#"../inc_some_2_tree.rs" 74 20 74 40] _0 <- ([#"../inc_some_2_tree.rs" 74 20 74 40] take_some_rest _18);
_18 <- any borrowed (IncSome2Tree_Tree_Type.t_tree);
goto BB14
@@ -287,7 +287,7 @@ module IncSome2Tree_Impl0_TakeSomeRest
BB15 {
assume { resolve1 mtl };
[#"../inc_some_2_tree.rs" 76 20 76 40] _19 <- Borrow.borrow_mut ( * mtr);
- [#"../inc_some_2_tree.rs" 76 20 76 40] mtr <- { mtr with current = ^ _19 };
+ [#"../inc_some_2_tree.rs" 76 20 76 40] mtr <- { mtr with current = ( ^ _19) ; };
[#"../inc_some_2_tree.rs" 76 20 76 40] _0 <- ([#"../inc_some_2_tree.rs" 76 20 76 40] take_some_rest _19);
_19 <- any borrowed (IncSome2Tree_Tree_Type.t_tree);
goto BB16
@@ -397,8 +397,8 @@ module IncSome2Tree_IncSome2Tree
[#"../inc_some_2_tree.rs" 87 13 87 15] mt <- ([#"../inc_some_2_tree.rs" 87 13 87 15] let (_, a) = _9 in a);
[#"../inc_some_2_tree.rs" 87 13 87 15] _9 <- (let (x0, x1) = _9 in (x0, any borrowed (IncSome2Tree_Tree_Type.t_tree)));
assume { resolve0 _9 };
- [#"../inc_some_2_tree.rs" 88 18 88 37] _13 <- Borrow.borrow_mut ( * mt);
- [#"../inc_some_2_tree.rs" 88 18 88 37] mt <- { mt with current = ^ _13 };
+ [#"../inc_some_2_tree.rs" 88 18 88 37] _13 <- Borrow.borrow_final ( * mt) (Borrow.get_id mt);
+ [#"../inc_some_2_tree.rs" 88 18 88 37] mt <- { mt with current = ( ^ _13) ; };
[#"../inc_some_2_tree.rs" 88 18 88 37] _12 <- ([#"../inc_some_2_tree.rs" 88 18 88 37] take_some_rest0 _13);
_13 <- any borrowed (IncSome2Tree_Tree_Type.t_tree);
goto BB4
@@ -407,9 +407,9 @@ module IncSome2Tree_IncSome2Tree
[#"../inc_some_2_tree.rs" 88 9 88 11] mb <- ([#"../inc_some_2_tree.rs" 88 9 88 11] let (a, _) = _12 in a);
[#"../inc_some_2_tree.rs" 88 9 88 11] _12 <- (let (x0, x1) = _12 in (any borrowed uint32, x1));
assume { resolve0 _12 };
- [#"../inc_some_2_tree.rs" 89 4 89 12] ma <- { ma with current = ([#"../inc_some_2_tree.rs" 89 4 89 12] * ma + ([#"../inc_some_2_tree.rs" 89 11 89 12] j)) };
+ [#"../inc_some_2_tree.rs" 89 4 89 12] ma <- { ma with current = ([#"../inc_some_2_tree.rs" 89 4 89 12] * ma + ([#"../inc_some_2_tree.rs" 89 11 89 12] j)) ; };
assume { resolve1 ma };
- [#"../inc_some_2_tree.rs" 90 4 90 12] mb <- { mb with current = ([#"../inc_some_2_tree.rs" 90 4 90 12] * mb + ([#"../inc_some_2_tree.rs" 90 11 90 12] k)) };
+ [#"../inc_some_2_tree.rs" 90 4 90 12] mb <- { mb with current = ([#"../inc_some_2_tree.rs" 90 4 90 12] * mb + ([#"../inc_some_2_tree.rs" 90 11 90 12] k)) ; };
assume { resolve1 mb };
assume { resolve2 mt };
[#"../inc_some_2_tree.rs" 91 12 91 21] _19 <- ([#"../inc_some_2_tree.rs" 91 12 91 21] sum_x0 ([#"../inc_some_2_tree.rs" 91 12 91 21] t));
diff --git a/creusot/tests/should_succeed/rusthorn/inc_some_2_tree/why3session.xml b/creusot/tests/should_succeed/rusthorn/inc_some_2_tree/why3session.xml
index 1050596e51..eae494becb 100644
--- a/creusot/tests/should_succeed/rusthorn/inc_some_2_tree/why3session.xml
+++ b/creusot/tests/should_succeed/rusthorn/inc_some_2_tree/why3session.xml
@@ -18,12 +18,12 @@
-
+
-
+
diff --git a/creusot/tests/should_succeed/rusthorn/inc_some_2_tree/why3shapes.gz b/creusot/tests/should_succeed/rusthorn/inc_some_2_tree/why3shapes.gz
index 2a615417f7..15ce905d78 100644
Binary files a/creusot/tests/should_succeed/rusthorn/inc_some_2_tree/why3shapes.gz and b/creusot/tests/should_succeed/rusthorn/inc_some_2_tree/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/rusthorn/inc_some_list.mlcfg b/creusot/tests/should_succeed/rusthorn/inc_some_list.mlcfg
index 3b75bf0e0a..61ee547893 100644
--- a/creusot/tests/should_succeed/rusthorn/inc_some_list.mlcfg
+++ b/creusot/tests/should_succeed/rusthorn/inc_some_list.mlcfg
@@ -187,10 +187,10 @@ module IncSomeList_Impl0_TakeSome
absurd
}
BB4 {
- [#"../inc_some_list.rs" 53 17 53 19] ma <- Borrow.borrow_mut (IncSomeList_List_Type.cons_0 ( * self));
- [#"../inc_some_list.rs" 53 17 53 19] self <- { self with current = (let IncSomeList_List_Type.C_Cons x0 x1 = * self in IncSomeList_List_Type.C_Cons ( ^ ma) x1) };
- [#"../inc_some_list.rs" 53 21 53 23] ml <- Borrow.borrow_mut (IncSomeList_List_Type.cons_1 ( * self));
- [#"../inc_some_list.rs" 53 21 53 23] self <- { self with current = (let IncSomeList_List_Type.C_Cons x0 x1 = * self in IncSomeList_List_Type.C_Cons x0 ( ^ ml)) };
+ [#"../inc_some_list.rs" 53 17 53 19] ma <- Borrow.borrow_final (IncSomeList_List_Type.cons_0 ( * self)) (Borrow.inherit_id (Borrow.get_id self) 1);
+ [#"../inc_some_list.rs" 53 17 53 19] self <- { self with current = (let IncSomeList_List_Type.C_Cons x0 x1 = * self in IncSomeList_List_Type.C_Cons ( ^ ma) x1) ; };
+ [#"../inc_some_list.rs" 53 21 53 23] ml <- Borrow.borrow_final (IncSomeList_List_Type.cons_1 ( * self)) (Borrow.inherit_id (Borrow.get_id self) 2);
+ [#"../inc_some_list.rs" 53 21 53 23] self <- { self with current = (let IncSomeList_List_Type.C_Cons x0 x1 = * self in IncSomeList_List_Type.C_Cons x0 ( ^ ml)) ; };
[#"../inc_some_list.rs" 54 16 54 45] _10 <- ([#"../inc_some_list.rs" 54 16 54 45] Ghost.new (lemma_sum_nonneg0 ( * ml)));
goto BB5
}
@@ -206,40 +206,40 @@ module IncSomeList_Impl0_TakeSome
}
BB7 {
assume { resolve1 ml };
- [#"../inc_some_list.rs" 56 20 56 22] _14 <- Borrow.borrow_mut ( * ma);
- [#"../inc_some_list.rs" 56 20 56 22] ma <- { ma with current = ^ _14 };
- [#"../inc_some_list.rs" 56 20 56 22] _12 <- Borrow.borrow_mut ( * _14);
- [#"../inc_some_list.rs" 56 20 56 22] _14 <- { _14 with current = ^ _12 };
+ [#"../inc_some_list.rs" 56 20 56 22] _14 <- Borrow.borrow_final ( * ma) (Borrow.get_id ma);
+ [#"../inc_some_list.rs" 56 20 56 22] ma <- { ma with current = ( ^ _14) ; };
+ [#"../inc_some_list.rs" 56 20 56 22] _12 <- Borrow.borrow_final ( * _14) (Borrow.get_id _14);
+ [#"../inc_some_list.rs" 56 20 56 22] _14 <- { _14 with current = ( ^ _12) ; };
assume { resolve0 _14 };
goto BB10
}
BB8 {
assume { resolve0 ma };
[#"../inc_some_list.rs" 58 20 58 34] _16 <- Borrow.borrow_mut ( * ml);
- [#"../inc_some_list.rs" 58 20 58 34] ml <- { ml with current = ^ _16 };
+ [#"../inc_some_list.rs" 58 20 58 34] ml <- { ml with current = ( ^ _16) ; };
[#"../inc_some_list.rs" 58 20 58 34] _15 <- ([#"../inc_some_list.rs" 58 20 58 34] take_some _16);
_16 <- any borrowed (IncSomeList_List_Type.t_list);
goto BB9
}
BB9 {
- [#"../inc_some_list.rs" 58 20 58 34] _12 <- Borrow.borrow_mut ( * _15);
- [#"../inc_some_list.rs" 58 20 58 34] _15 <- { _15 with current = ^ _12 };
+ [#"../inc_some_list.rs" 58 20 58 34] _12 <- Borrow.borrow_final ( * _15) (Borrow.get_id _15);
+ [#"../inc_some_list.rs" 58 20 58 34] _15 <- { _15 with current = ( ^ _12) ; };
assume { resolve0 _15 };
goto BB10
}
BB10 {
- [#"../inc_some_list.rs" 55 16 59 17] _9 <- Borrow.borrow_mut ( * _12);
- [#"../inc_some_list.rs" 55 16 59 17] _12 <- { _12 with current = ^ _9 };
- [#"../inc_some_list.rs" 55 16 59 17] _5 <- Borrow.borrow_mut ( * _9);
- [#"../inc_some_list.rs" 55 16 59 17] _9 <- { _9 with current = ^ _5 };
+ [#"../inc_some_list.rs" 55 16 59 17] _9 <- Borrow.borrow_final ( * _12) (Borrow.get_id _12);
+ [#"../inc_some_list.rs" 55 16 59 17] _12 <- { _12 with current = ( ^ _9) ; };
+ [#"../inc_some_list.rs" 55 16 59 17] _5 <- Borrow.borrow_final ( * _9) (Borrow.get_id _9);
+ [#"../inc_some_list.rs" 55 16 59 17] _9 <- { _9 with current = ( ^ _5) ; };
assume { resolve0 _12 };
assume { resolve0 _9 };
assume { resolve1 ml };
assume { resolve0 ma };
- [#"../inc_some_list.rs" 52 8 62 9] _2 <- Borrow.borrow_mut ( * _5);
- [#"../inc_some_list.rs" 52 8 62 9] _5 <- { _5 with current = ^ _2 };
- [#"../inc_some_list.rs" 52 8 62 9] _0 <- Borrow.borrow_mut ( * _2);
- [#"../inc_some_list.rs" 52 8 62 9] _2 <- { _2 with current = ^ _0 };
+ [#"../inc_some_list.rs" 52 8 62 9] _2 <- Borrow.borrow_final ( * _5) (Borrow.get_id _5);
+ [#"../inc_some_list.rs" 52 8 62 9] _5 <- { _5 with current = ( ^ _2) ; };
+ [#"../inc_some_list.rs" 52 8 62 9] _0 <- Borrow.borrow_final ( * _2) (Borrow.get_id _2);
+ [#"../inc_some_list.rs" 52 8 62 9] _2 <- { _2 with current = ( ^ _0) ; };
assume { resolve0 _5 };
assume { resolve0 _2 };
assume { resolve2 self };
@@ -315,7 +315,7 @@ module IncSomeList_IncSomeList
goto BB3
}
BB3 {
- [#"../inc_some_list.rs" 70 4 70 12] ma <- { ma with current = ([#"../inc_some_list.rs" 70 4 70 12] * ma + ([#"../inc_some_list.rs" 70 11 70 12] k)) };
+ [#"../inc_some_list.rs" 70 4 70 12] ma <- { ma with current = ([#"../inc_some_list.rs" 70 4 70 12] * ma + ([#"../inc_some_list.rs" 70 11 70 12] k)) ; };
assume { resolve0 ma };
[#"../inc_some_list.rs" 71 12 71 21] _12 <- ([#"../inc_some_list.rs" 71 12 71 21] sum_x0 ([#"../inc_some_list.rs" 71 12 71 21] l));
goto BB4
diff --git a/creusot/tests/should_succeed/rusthorn/inc_some_list/why3session.xml b/creusot/tests/should_succeed/rusthorn/inc_some_list/why3session.xml
index 111215d6fd..d6fe7e8cb2 100644
--- a/creusot/tests/should_succeed/rusthorn/inc_some_list/why3session.xml
+++ b/creusot/tests/should_succeed/rusthorn/inc_some_list/why3session.xml
@@ -18,12 +18,12 @@
-
+
-
+
diff --git a/creusot/tests/should_succeed/rusthorn/inc_some_list/why3shapes.gz b/creusot/tests/should_succeed/rusthorn/inc_some_list/why3shapes.gz
index c1942438e5..c9506d6d1c 100644
Binary files a/creusot/tests/should_succeed/rusthorn/inc_some_list/why3shapes.gz and b/creusot/tests/should_succeed/rusthorn/inc_some_list/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/rusthorn/inc_some_tree.mlcfg b/creusot/tests/should_succeed/rusthorn/inc_some_tree.mlcfg
index a8ff031855..0cda7fb32b 100644
--- a/creusot/tests/should_succeed/rusthorn/inc_some_tree.mlcfg
+++ b/creusot/tests/should_succeed/rusthorn/inc_some_tree.mlcfg
@@ -212,12 +212,12 @@ module IncSomeTree_Impl0_TakeSome
absurd
}
BB4 {
- [#"../inc_some_tree.rs" 63 17 63 20] mtl <- Borrow.borrow_mut (IncSomeTree_Tree_Type.node_0 ( * self));
- [#"../inc_some_tree.rs" 63 17 63 20] self <- { self with current = (let IncSomeTree_Tree_Type.C_Node x0 x1 x2 = * self in IncSomeTree_Tree_Type.C_Node ( ^ mtl) x1 x2) };
- [#"../inc_some_tree.rs" 63 22 63 24] ma <- Borrow.borrow_mut (IncSomeTree_Tree_Type.node_1 ( * self));
- [#"../inc_some_tree.rs" 63 22 63 24] self <- { self with current = (let IncSomeTree_Tree_Type.C_Node x0 x1 x2 = * self in IncSomeTree_Tree_Type.C_Node x0 ( ^ ma) x2) };
- [#"../inc_some_tree.rs" 63 26 63 29] mtr <- Borrow.borrow_mut (IncSomeTree_Tree_Type.node_2 ( * self));
- [#"../inc_some_tree.rs" 63 26 63 29] self <- { self with current = (let IncSomeTree_Tree_Type.C_Node x0 x1 x2 = * self in IncSomeTree_Tree_Type.C_Node x0 x1 ( ^ mtr)) };
+ [#"../inc_some_tree.rs" 63 17 63 20] mtl <- Borrow.borrow_final (IncSomeTree_Tree_Type.node_0 ( * self)) (Borrow.inherit_id (Borrow.get_id self) 1);
+ [#"../inc_some_tree.rs" 63 17 63 20] self <- { self with current = (let IncSomeTree_Tree_Type.C_Node x0 x1 x2 = * self in IncSomeTree_Tree_Type.C_Node ( ^ mtl) x1 x2) ; };
+ [#"../inc_some_tree.rs" 63 22 63 24] ma <- Borrow.borrow_final (IncSomeTree_Tree_Type.node_1 ( * self)) (Borrow.inherit_id (Borrow.get_id self) 2);
+ [#"../inc_some_tree.rs" 63 22 63 24] self <- { self with current = (let IncSomeTree_Tree_Type.C_Node x0 x1 x2 = * self in IncSomeTree_Tree_Type.C_Node x0 ( ^ ma) x2) ; };
+ [#"../inc_some_tree.rs" 63 26 63 29] mtr <- Borrow.borrow_final (IncSomeTree_Tree_Type.node_2 ( * self)) (Borrow.inherit_id (Borrow.get_id self) 3);
+ [#"../inc_some_tree.rs" 63 26 63 29] self <- { self with current = (let IncSomeTree_Tree_Type.C_Node x0 x1 x2 = * self in IncSomeTree_Tree_Type.C_Node x0 x1 ( ^ mtr)) ; };
assert { [@expl:assertion] [#"../inc_some_tree.rs" 65 20 65 42] let _ = lemma_sum_nonneg0 ( * mtl) in let _ = lemma_sum_nonneg0 ( * mtr) in true };
[#"../inc_some_tree.rs" 69 19 69 27] _14 <- ([#"../inc_some_tree.rs" 69 19 69 27] random0 ());
goto BB5
@@ -231,10 +231,10 @@ module IncSomeTree_Impl0_TakeSome
BB6 {
assume { resolve1 mtr };
assume { resolve1 mtl };
- [#"../inc_some_tree.rs" 70 20 70 22] _15 <- Borrow.borrow_mut ( * ma);
- [#"../inc_some_tree.rs" 70 20 70 22] ma <- { ma with current = ^ _15 };
- [#"../inc_some_tree.rs" 70 20 70 22] _13 <- Borrow.borrow_mut ( * _15);
- [#"../inc_some_tree.rs" 70 20 70 22] _15 <- { _15 with current = ^ _13 };
+ [#"../inc_some_tree.rs" 70 20 70 22] _15 <- Borrow.borrow_final ( * ma) (Borrow.get_id ma);
+ [#"../inc_some_tree.rs" 70 20 70 22] ma <- { ma with current = ( ^ _15) ; };
+ [#"../inc_some_tree.rs" 70 20 70 22] _13 <- Borrow.borrow_final ( * _15) (Borrow.get_id _15);
+ [#"../inc_some_tree.rs" 70 20 70 22] _15 <- { _15 with current = ( ^ _13) ; };
assume { resolve0 _15 };
goto BB14
}
@@ -252,16 +252,16 @@ module IncSomeTree_Impl0_TakeSome
BB9 {
assume { resolve1 mtr };
[#"../inc_some_tree.rs" 72 20 72 35] _19 <- Borrow.borrow_mut ( * mtl);
- [#"../inc_some_tree.rs" 72 20 72 35] mtl <- { mtl with current = ^ _19 };
+ [#"../inc_some_tree.rs" 72 20 72 35] mtl <- { mtl with current = ( ^ _19) ; };
[#"../inc_some_tree.rs" 72 20 72 35] _18 <- ([#"../inc_some_tree.rs" 72 20 72 35] take_some _19);
_19 <- any borrowed (IncSomeTree_Tree_Type.t_tree);
goto BB10
}
BB10 {
- [#"../inc_some_tree.rs" 72 20 72 35] _17 <- Borrow.borrow_mut ( * _18);
- [#"../inc_some_tree.rs" 72 20 72 35] _18 <- { _18 with current = ^ _17 };
- [#"../inc_some_tree.rs" 72 20 72 35] _13 <- Borrow.borrow_mut ( * _17);
- [#"../inc_some_tree.rs" 72 20 72 35] _17 <- { _17 with current = ^ _13 };
+ [#"../inc_some_tree.rs" 72 20 72 35] _17 <- Borrow.borrow_final ( * _18) (Borrow.get_id _18);
+ [#"../inc_some_tree.rs" 72 20 72 35] _18 <- { _18 with current = ( ^ _17) ; };
+ [#"../inc_some_tree.rs" 72 20 72 35] _13 <- Borrow.borrow_final ( * _17) (Borrow.get_id _17);
+ [#"../inc_some_tree.rs" 72 20 72 35] _17 <- { _17 with current = ( ^ _13) ; };
assume { resolve0 _18 };
assume { resolve0 _17 };
goto BB13
@@ -269,14 +269,14 @@ module IncSomeTree_Impl0_TakeSome
BB11 {
assume { resolve1 mtl };
[#"../inc_some_tree.rs" 74 20 74 35] _21 <- Borrow.borrow_mut ( * mtr);
- [#"../inc_some_tree.rs" 74 20 74 35] mtr <- { mtr with current = ^ _21 };
+ [#"../inc_some_tree.rs" 74 20 74 35] mtr <- { mtr with current = ( ^ _21) ; };
[#"../inc_some_tree.rs" 74 20 74 35] _20 <- ([#"../inc_some_tree.rs" 74 20 74 35] take_some _21);
_21 <- any borrowed (IncSomeTree_Tree_Type.t_tree);
goto BB12
}
BB12 {
- [#"../inc_some_tree.rs" 74 20 74 35] _13 <- Borrow.borrow_mut ( * _20);
- [#"../inc_some_tree.rs" 74 20 74 35] _20 <- { _20 with current = ^ _13 };
+ [#"../inc_some_tree.rs" 74 20 74 35] _13 <- Borrow.borrow_final ( * _20) (Borrow.get_id _20);
+ [#"../inc_some_tree.rs" 74 20 74 35] _20 <- { _20 with current = ( ^ _13) ; };
assume { resolve0 _20 };
goto BB13
}
@@ -284,19 +284,19 @@ module IncSomeTree_Impl0_TakeSome
goto BB14
}
BB14 {
- [#"../inc_some_tree.rs" 69 16 75 17] _10 <- Borrow.borrow_mut ( * _13);
- [#"../inc_some_tree.rs" 69 16 75 17] _13 <- { _13 with current = ^ _10 };
- [#"../inc_some_tree.rs" 69 16 75 17] _5 <- Borrow.borrow_mut ( * _10);
- [#"../inc_some_tree.rs" 69 16 75 17] _10 <- { _10 with current = ^ _5 };
+ [#"../inc_some_tree.rs" 69 16 75 17] _10 <- Borrow.borrow_final ( * _13) (Borrow.get_id _13);
+ [#"../inc_some_tree.rs" 69 16 75 17] _13 <- { _13 with current = ( ^ _10) ; };
+ [#"../inc_some_tree.rs" 69 16 75 17] _5 <- Borrow.borrow_final ( * _10) (Borrow.get_id _10);
+ [#"../inc_some_tree.rs" 69 16 75 17] _10 <- { _10 with current = ( ^ _5) ; };
assume { resolve0 _13 };
assume { resolve0 _10 };
assume { resolve1 mtr };
assume { resolve0 ma };
assume { resolve1 mtl };
- [#"../inc_some_tree.rs" 62 8 78 9] _2 <- Borrow.borrow_mut ( * _5);
- [#"../inc_some_tree.rs" 62 8 78 9] _5 <- { _5 with current = ^ _2 };
- [#"../inc_some_tree.rs" 62 8 78 9] _0 <- Borrow.borrow_mut ( * _2);
- [#"../inc_some_tree.rs" 62 8 78 9] _2 <- { _2 with current = ^ _0 };
+ [#"../inc_some_tree.rs" 62 8 78 9] _2 <- Borrow.borrow_final ( * _5) (Borrow.get_id _5);
+ [#"../inc_some_tree.rs" 62 8 78 9] _5 <- { _5 with current = ( ^ _2) ; };
+ [#"../inc_some_tree.rs" 62 8 78 9] _0 <- Borrow.borrow_final ( * _2) (Borrow.get_id _2);
+ [#"../inc_some_tree.rs" 62 8 78 9] _2 <- { _2 with current = ( ^ _0) ; };
assume { resolve0 _5 };
assume { resolve0 _2 };
assume { resolve2 self };
@@ -372,7 +372,7 @@ module IncSomeTree_IncSomeTree
goto BB3
}
BB3 {
- [#"../inc_some_tree.rs" 86 4 86 12] ma <- { ma with current = ([#"../inc_some_tree.rs" 86 4 86 12] * ma + ([#"../inc_some_tree.rs" 86 11 86 12] k)) };
+ [#"../inc_some_tree.rs" 86 4 86 12] ma <- { ma with current = ([#"../inc_some_tree.rs" 86 4 86 12] * ma + ([#"../inc_some_tree.rs" 86 11 86 12] k)) ; };
assume { resolve0 ma };
[#"../inc_some_tree.rs" 87 12 87 21] _12 <- ([#"../inc_some_tree.rs" 87 12 87 21] sum_x0 ([#"../inc_some_tree.rs" 87 12 87 21] t));
goto BB4
diff --git a/creusot/tests/should_succeed/rusthorn/inc_some_tree/why3session.xml b/creusot/tests/should_succeed/rusthorn/inc_some_tree/why3session.xml
index ad9e28ed10..11bb0766eb 100644
--- a/creusot/tests/should_succeed/rusthorn/inc_some_tree/why3session.xml
+++ b/creusot/tests/should_succeed/rusthorn/inc_some_tree/why3session.xml
@@ -18,12 +18,12 @@
-
+
-
+
diff --git a/creusot/tests/should_succeed/rusthorn/inc_some_tree/why3shapes.gz b/creusot/tests/should_succeed/rusthorn/inc_some_tree/why3shapes.gz
index cd90effd96..527489e01f 100644
Binary files a/creusot/tests/should_succeed/rusthorn/inc_some_tree/why3shapes.gz and b/creusot/tests/should_succeed/rusthorn/inc_some_tree/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/selection_sort_generic.mlcfg b/creusot/tests/should_succeed/selection_sort_generic.mlcfg
index 4d3cc5231a..544ee36e7f 100644
--- a/creusot/tests/should_succeed/selection_sort_generic.mlcfg
+++ b/creusot/tests/should_succeed/selection_sort_generic.mlcfg
@@ -628,8 +628,8 @@ module SelectionSortGeneric_SelectionSort
BB7 {
[#"../selection_sort_generic.rs" 35 4 35 43] _22 <- Borrow.borrow_mut iter;
[#"../selection_sort_generic.rs" 35 4 35 43] iter <- ^ _22;
- [#"../selection_sort_generic.rs" 35 4 35 43] _21 <- Borrow.borrow_mut ( * _22);
- [#"../selection_sort_generic.rs" 35 4 35 43] _22 <- { _22 with current = ^ _21 };
+ [#"../selection_sort_generic.rs" 35 4 35 43] _21 <- Borrow.borrow_final ( * _22) (Borrow.get_id _22);
+ [#"../selection_sort_generic.rs" 35 4 35 43] _22 <- { _22 with current = ( ^ _21) ; };
[#"../selection_sort_generic.rs" 35 4 35 43] _20 <- ([#"../selection_sort_generic.rs" 35 4 35 43] next0 _21);
_21 <- any borrowed (Core_Ops_Range_Range_Type.t_range usize);
goto BB8
@@ -693,8 +693,8 @@ module SelectionSortGeneric_SelectionSort
BB19 {
[#"../selection_sort_generic.rs" 41 8 41 121] _46 <- Borrow.borrow_mut iter1;
[#"../selection_sort_generic.rs" 41 8 41 121] iter1 <- ^ _46;
- [#"../selection_sort_generic.rs" 41 8 41 121] _45 <- Borrow.borrow_mut ( * _46);
- [#"../selection_sort_generic.rs" 41 8 41 121] _46 <- { _46 with current = ^ _45 };
+ [#"../selection_sort_generic.rs" 41 8 41 121] _45 <- Borrow.borrow_final ( * _46) (Borrow.get_id _46);
+ [#"../selection_sort_generic.rs" 41 8 41 121] _46 <- { _46 with current = ( ^ _45) ; };
[#"../selection_sort_generic.rs" 41 8 41 121] _44 <- ([#"../selection_sort_generic.rs" 41 8 41 121] next0 _45);
_45 <- any borrowed (Core_Ops_Range_Range_Type.t_range usize);
goto BB20
@@ -708,7 +708,7 @@ module SelectionSortGeneric_SelectionSort
}
BB21 {
[#"../selection_sort_generic.rs" 48 8 48 22] _66 <- Borrow.borrow_mut ( * v);
- [#"../selection_sort_generic.rs" 48 8 48 22] v <- { v with current = ^ _66 };
+ [#"../selection_sort_generic.rs" 48 8 48 22] v <- { v with current = ( ^ _66) ; };
assume { inv3 ( ^ _66) };
[#"../selection_sort_generic.rs" 48 8 48 22] _65 <- ([#"../selection_sort_generic.rs" 48 8 48 22] deref_mut0 _66);
_66 <- any borrowed (Alloc_Vec_Vec_Type.t_vec t (Alloc_Alloc_Global_Type.t_global));
@@ -760,8 +760,8 @@ module SelectionSortGeneric_SelectionSort
goto BB18
}
BB31 {
- [#"../selection_sort_generic.rs" 48 8 48 22] _64 <- Borrow.borrow_mut ( * _65);
- [#"../selection_sort_generic.rs" 48 8 48 22] _65 <- { _65 with current = ^ _64 };
+ [#"../selection_sort_generic.rs" 48 8 48 22] _64 <- Borrow.borrow_final ( * _65) (Borrow.get_id _65);
+ [#"../selection_sort_generic.rs" 48 8 48 22] _65 <- { _65 with current = ( ^ _64) ; };
assume { inv4 ( ^ _64) };
[#"../selection_sort_generic.rs" 48 8 48 22] _63 <- ([#"../selection_sort_generic.rs" 48 8 48 22] swap0 _64 ([#"../selection_sort_generic.rs" 48 15 48 16] i) ([#"../selection_sort_generic.rs" 48 18 48 21] min));
_64 <- any borrowed (slice t);
diff --git a/creusot/tests/should_succeed/selection_sort_generic/why3session.xml b/creusot/tests/should_succeed/selection_sort_generic/why3session.xml
index 533f29cb36..216b2d283d 100644
--- a/creusot/tests/should_succeed/selection_sort_generic/why3session.xml
+++ b/creusot/tests/should_succeed/selection_sort_generic/why3session.xml
@@ -39,70 +39,70 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -111,27 +111,27 @@
-
+
-
+
-
+
-
+
-
+
@@ -142,49 +142,49 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/creusot/tests/should_succeed/selection_sort_generic/why3shapes.gz b/creusot/tests/should_succeed/selection_sort_generic/why3shapes.gz
index fe7b7e5ca4..269147f7ec 100644
Binary files a/creusot/tests/should_succeed/selection_sort_generic/why3shapes.gz and b/creusot/tests/should_succeed/selection_sort_generic/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/slices/01.mlcfg b/creusot/tests/should_succeed/slices/01.mlcfg
index 15c407ebeb..151009e3f2 100644
--- a/creusot/tests/should_succeed/slices/01.mlcfg
+++ b/creusot/tests/should_succeed/slices/01.mlcfg
@@ -139,7 +139,7 @@ module C01_IndexMutSlice
goto BB1
}
BB1 {
- [#"../01.rs" 13 4 13 12] a <- { a with current = Slice.set ( * a) _4 ([#"../01.rs" 13 4 13 12] [#"../01.rs" 13 11 13 12] (3 : uint32)) };
+ [#"../01.rs" 13 4 13 12] a <- { a with current = Slice.set ( * a) _4 ([#"../01.rs" 13 4 13 12] [#"../01.rs" 13 11 13 12] (3 : uint32)) ; };
assume { resolve0 a };
[#"../01.rs" 12 38 14 1] _0 <- ([#"../01.rs" 12 38 14 1] ());
return _0
diff --git a/creusot/tests/should_succeed/slices/01/why3session.xml b/creusot/tests/should_succeed/slices/01/why3session.xml
index b339d54451..f4f1f2553e 100644
--- a/creusot/tests/should_succeed/slices/01/why3session.xml
+++ b/creusot/tests/should_succeed/slices/01/why3session.xml
@@ -13,12 +13,12 @@
-
+
-
+
diff --git a/creusot/tests/should_succeed/slices/01/why3shapes.gz b/creusot/tests/should_succeed/slices/01/why3shapes.gz
index 574e31b247..e5d8b2fbb8 100644
Binary files a/creusot/tests/should_succeed/slices/01/why3shapes.gz and b/creusot/tests/should_succeed/slices/01/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/slices/02_std/why3session.xml b/creusot/tests/should_succeed/slices/02_std/why3session.xml
index 512e682529..3953067b13 100644
--- a/creusot/tests/should_succeed/slices/02_std/why3session.xml
+++ b/creusot/tests/should_succeed/slices/02_std/why3session.xml
@@ -9,7 +9,7 @@
-
+
@@ -20,7 +20,7 @@
-
+
diff --git a/creusot/tests/should_succeed/slices/02_std/why3shapes.gz b/creusot/tests/should_succeed/slices/02_std/why3shapes.gz
index be7bfcff29..3f6359d380 100644
Binary files a/creusot/tests/should_succeed/slices/02_std/why3shapes.gz and b/creusot/tests/should_succeed/slices/02_std/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/sparse_array.mlcfg b/creusot/tests/should_succeed/sparse_array.mlcfg
index af0983b9fe..cfc33c8759 100644
--- a/creusot/tests/should_succeed/sparse_array.mlcfg
+++ b/creusot/tests/should_succeed/sparse_array.mlcfg
@@ -873,8 +873,8 @@ module SparseArray_Impl2_Set
goto BB1
}
BB1 {
- [#"../sparse_array.rs" 113 8 113 19] _10 <- Borrow.borrow_mut (SparseArray_Sparse_Type.sparse_values ( * self));
- [#"../sparse_array.rs" 113 8 113 19] self <- { self with current = (let SparseArray_Sparse_Type.C_Sparse x0 x1 x2 x3 x4 = * self in SparseArray_Sparse_Type.C_Sparse x0 x1 ( ^ _10) x3 x4) };
+ [#"../sparse_array.rs" 113 8 113 19] _10 <- Borrow.borrow_final (SparseArray_Sparse_Type.sparse_values ( * self)) (Borrow.inherit_id (Borrow.get_id self) 3);
+ [#"../sparse_array.rs" 113 8 113 19] self <- { self with current = (let SparseArray_Sparse_Type.C_Sparse x0 x1 x2 x3 x4 = * self in SparseArray_Sparse_Type.C_Sparse x0 x1 ( ^ _10) x3 x4) ; };
assume { inv0 ( ^ _10) };
[#"../sparse_array.rs" 113 8 113 22] _9 <- ([#"../sparse_array.rs" 113 8 113 22] index_mut0 _10 ([#"../sparse_array.rs" 113 20 113 21] i));
_10 <- any borrowed (Alloc_Vec_Vec_Type.t_vec t (Alloc_Alloc_Global_Type.t_global));
@@ -884,7 +884,7 @@ module SparseArray_Impl2_Set
goto BB3
}
BB3 {
- [#"../sparse_array.rs" 113 8 113 22] _9 <- { _9 with current = ([#"../sparse_array.rs" 113 25 113 26] v) };
+ [#"../sparse_array.rs" 113 8 113 22] _9 <- { _9 with current = ([#"../sparse_array.rs" 113 25 113 26] v) ; };
[#"../sparse_array.rs" 113 25 113 26] v <- any t;
assert { [@expl:type invariant] inv1 ( * _9) };
assume { resolve0 ( * _9) };
@@ -928,25 +928,25 @@ module SparseArray_Impl2_Set
BB12 {
assume { resolve3 _27 };
assert { [@expl:assertion] [#"../sparse_array.rs" 118 26 118 46] UIntSize.to_int (SparseArray_Sparse_Type.sparse_n ( * self)) < UIntSize.to_int (SparseArray_Sparse_Type.sparse_size ( * self)) };
- [#"../sparse_array.rs" 120 12 120 20] _33 <- Borrow.borrow_mut (SparseArray_Sparse_Type.sparse_idx ( * self));
- [#"../sparse_array.rs" 120 12 120 20] self <- { self with current = (let SparseArray_Sparse_Type.C_Sparse x0 x1 x2 x3 x4 = * self in SparseArray_Sparse_Type.C_Sparse x0 x1 x2 ( ^ _33) x4) };
+ [#"../sparse_array.rs" 120 12 120 20] _33 <- Borrow.borrow_final (SparseArray_Sparse_Type.sparse_idx ( * self)) (Borrow.inherit_id (Borrow.get_id self) 4);
+ [#"../sparse_array.rs" 120 12 120 20] self <- { self with current = (let SparseArray_Sparse_Type.C_Sparse x0 x1 x2 x3 x4 = * self in SparseArray_Sparse_Type.C_Sparse x0 x1 x2 ( ^ _33) x4) ; };
[#"../sparse_array.rs" 120 12 120 23] _32 <- ([#"../sparse_array.rs" 120 12 120 23] index_mut1 _33 ([#"../sparse_array.rs" 120 21 120 22] i));
_33 <- any borrowed (Alloc_Vec_Vec_Type.t_vec usize (Alloc_Alloc_Global_Type.t_global));
goto BB13
}
BB13 {
- [#"../sparse_array.rs" 120 12 120 32] _32 <- { _32 with current = ([#"../sparse_array.rs" 120 26 120 32] SparseArray_Sparse_Type.sparse_n ( * self)) };
+ [#"../sparse_array.rs" 120 12 120 32] _32 <- { _32 with current = ([#"../sparse_array.rs" 120 26 120 32] SparseArray_Sparse_Type.sparse_n ( * self)) ; };
assume { resolve4 _32 };
- [#"../sparse_array.rs" 121 12 121 21] _37 <- Borrow.borrow_mut (SparseArray_Sparse_Type.sparse_back ( * self));
- [#"../sparse_array.rs" 121 12 121 21] self <- { self with current = (let SparseArray_Sparse_Type.C_Sparse x0 x1 x2 x3 x4 = * self in SparseArray_Sparse_Type.C_Sparse x0 x1 x2 x3 ( ^ _37)) };
+ [#"../sparse_array.rs" 121 12 121 21] _37 <- Borrow.borrow_final (SparseArray_Sparse_Type.sparse_back ( * self)) (Borrow.inherit_id (Borrow.get_id self) 5);
+ [#"../sparse_array.rs" 121 12 121 21] self <- { self with current = (let SparseArray_Sparse_Type.C_Sparse x0 x1 x2 x3 x4 = * self in SparseArray_Sparse_Type.C_Sparse x0 x1 x2 x3 ( ^ _37)) ; };
[#"../sparse_array.rs" 121 12 121 29] _36 <- ([#"../sparse_array.rs" 121 12 121 29] index_mut1 _37 ([#"../sparse_array.rs" 121 22 121 28] SparseArray_Sparse_Type.sparse_n ( * self)));
_37 <- any borrowed (Alloc_Vec_Vec_Type.t_vec usize (Alloc_Alloc_Global_Type.t_global));
goto BB14
}
BB14 {
- [#"../sparse_array.rs" 121 12 121 33] _36 <- { _36 with current = ([#"../sparse_array.rs" 121 32 121 33] i) };
+ [#"../sparse_array.rs" 121 12 121 33] _36 <- { _36 with current = ([#"../sparse_array.rs" 121 32 121 33] i) ; };
assume { resolve4 _36 };
- [#"../sparse_array.rs" 122 12 122 23] self <- { self with current = (let SparseArray_Sparse_Type.C_Sparse x0 x1 x2 x3 x4 = * self in SparseArray_Sparse_Type.C_Sparse x0 ([#"../sparse_array.rs" 122 12 122 23] SparseArray_Sparse_Type.sparse_n ( * self) + ([#"../sparse_array.rs" 122 22 122 23] [#"../sparse_array.rs" 122 22 122 23] (1 : usize))) x2 x3 x4) };
+ [#"../sparse_array.rs" 122 12 122 23] self <- { self with current = (let SparseArray_Sparse_Type.C_Sparse x0 x1 x2 x3 x4 = * self in SparseArray_Sparse_Type.C_Sparse x0 ([#"../sparse_array.rs" 122 12 122 23] SparseArray_Sparse_Type.sparse_n ( * self) + ([#"../sparse_array.rs" 122 22 122 23] [#"../sparse_array.rs" 122 22 122 23] (1 : usize))) x2 x3 x4) ; };
assert { [@expl:type invariant] inv3 self };
assume { resolve2 self };
[#"../sparse_array.rs" 115 54 123 9] _0 <- ([#"../sparse_array.rs" 115 54 123 9] ());
diff --git a/creusot/tests/should_succeed/sparse_array/why3session.xml b/creusot/tests/should_succeed/sparse_array/why3session.xml
index 14c277d104..25d976f47d 100644
--- a/creusot/tests/should_succeed/sparse_array/why3session.xml
+++ b/creusot/tests/should_succeed/sparse_array/why3session.xml
@@ -29,14 +29,14 @@
-
+
-
+
@@ -53,103 +53,103 @@
-
+
-
+
-
-
+
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
-
+
+
-
+
-
+
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
-
+
-
+
-
+
-
-
+
+
-
-
+
+
@@ -158,13 +158,13 @@
-
-
+
+
-
+
diff --git a/creusot/tests/should_succeed/sparse_array/why3shapes.gz b/creusot/tests/should_succeed/sparse_array/why3shapes.gz
index a7dea29c33..c80a5f4b9a 100644
Binary files a/creusot/tests/should_succeed/sparse_array/why3shapes.gz and b/creusot/tests/should_succeed/sparse_array/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/split_borrow.mlcfg b/creusot/tests/should_succeed/split_borrow.mlcfg
index 09a9318d74..1ae2f34de1 100644
--- a/creusot/tests/should_succeed/split_borrow.mlcfg
+++ b/creusot/tests/should_succeed/split_borrow.mlcfg
@@ -64,12 +64,12 @@ module SplitBorrow_F
end
}
BB2 {
- [#"../split_borrow.rs" 14 8 14 25] y <- { y with current = (let (x0, x1) = * y in (x0, ([#"../split_borrow.rs" 14 17 14 25] SplitBorrow_MyInt_Type.C_MyInt ([#"../split_borrow.rs" 14 23 14 24] [#"../split_borrow.rs" 14 23 14 24] (4 : usize))))) };
+ [#"../split_borrow.rs" 14 8 14 25] y <- { y with current = (let (x0, x1) = * y in (x0, ([#"../split_borrow.rs" 14 17 14 25] SplitBorrow_MyInt_Type.C_MyInt ([#"../split_borrow.rs" 14 23 14 24] [#"../split_borrow.rs" 14 23 14 24] (4 : usize))))) ; };
[#"../split_borrow.rs" 13 11 15 5] _5 <- ([#"../split_borrow.rs" 13 11 15 5] ());
goto BB4
}
BB3 {
- [#"../split_borrow.rs" 16 8 16 26] y <- { y with current = (let (x0, x1) = * y in (([#"../split_borrow.rs" 16 17 16 26] SplitBorrow_MyInt_Type.C_MyInt ([#"../split_borrow.rs" 16 23 16 25] [#"../split_borrow.rs" 16 23 16 25] (10 : usize))), x1)) };
+ [#"../split_borrow.rs" 16 8 16 26] y <- { y with current = (let (x0, x1) = * y in (([#"../split_borrow.rs" 16 17 16 26] SplitBorrow_MyInt_Type.C_MyInt ([#"../split_borrow.rs" 16 23 16 25] [#"../split_borrow.rs" 16 23 16 25] (10 : usize))), x1)) ; };
[#"../split_borrow.rs" 15 11 17 5] _5 <- ([#"../split_borrow.rs" 15 11 17 5] ());
goto BB4
}
@@ -119,10 +119,10 @@ module SplitBorrow_G
[#"../split_borrow.rs" 24 16 24 36] a <- ([#"../split_borrow.rs" 24 16 24 36] (([#"../split_borrow.rs" 24 17 24 25] SplitBorrow_MyInt_Type.C_MyInt ([#"../split_borrow.rs" 24 23 24 24] [#"../split_borrow.rs" 24 23 24 24] (1 : usize))), ([#"../split_borrow.rs" 24 27 24 35] SplitBorrow_MyInt_Type.C_MyInt ([#"../split_borrow.rs" 24 33 24 34] [#"../split_borrow.rs" 24 33 24 34] (2 : usize)))));
[#"../split_borrow.rs" 25 12 25 18] x <- Borrow.borrow_mut a;
[#"../split_borrow.rs" 25 12 25 18] a <- ^ x;
- [#"../split_borrow.rs" 27 13 27 21] _z <- Borrow.borrow_mut (let (_, a) = * x in a);
- [#"../split_borrow.rs" 27 13 27 21] x <- { x with current = (let (x0, x1) = * x in (x0, ^ _z)) };
+ [#"../split_borrow.rs" 27 13 27 21] _z <- Borrow.borrow_final (let (_, a) = * x in a) (Borrow.inherit_id (Borrow.get_id x) 2);
+ [#"../split_borrow.rs" 27 13 27 21] x <- { x with current = (let (x0, x1) = * x in (x0, ^ _z)) ; };
assume { resolve0 _z };
- [#"../split_borrow.rs" 29 4 29 21] x <- { x with current = (let (x0, x1) = * x in (([#"../split_borrow.rs" 29 13 29 21] SplitBorrow_MyInt_Type.C_MyInt ([#"../split_borrow.rs" 29 19 29 20] [#"../split_borrow.rs" 29 19 29 20] (3 : usize))), x1)) };
+ [#"../split_borrow.rs" 29 4 29 21] x <- { x with current = (let (x0, x1) = * x in (([#"../split_borrow.rs" 29 13 29 21] SplitBorrow_MyInt_Type.C_MyInt ([#"../split_borrow.rs" 29 19 29 20] [#"../split_borrow.rs" 29 19 29 20] (3 : usize))), x1)) ; };
assume { resolve1 x };
assume { resolve2 a };
[#"../split_borrow.rs" 23 11 32 1] _0 <- ([#"../split_borrow.rs" 23 11 32 1] ());
diff --git a/creusot/tests/should_succeed/sum.mlcfg b/creusot/tests/should_succeed/sum.mlcfg
index a3c78db1d2..a65be54b53 100644
--- a/creusot/tests/should_succeed/sum.mlcfg
+++ b/creusot/tests/should_succeed/sum.mlcfg
@@ -247,8 +247,8 @@ module Sum_SumFirstN
BB6 {
[#"../sum.rs" 8 4 8 67] _19 <- Borrow.borrow_mut iter;
[#"../sum.rs" 8 4 8 67] iter <- ^ _19;
- [#"../sum.rs" 8 4 8 67] _18 <- Borrow.borrow_mut ( * _19);
- [#"../sum.rs" 8 4 8 67] _19 <- { _19 with current = ^ _18 };
+ [#"../sum.rs" 8 4 8 67] _18 <- Borrow.borrow_final ( * _19) (Borrow.get_id _19);
+ [#"../sum.rs" 8 4 8 67] _19 <- { _19 with current = ( ^ _18) ; };
[#"../sum.rs" 8 4 8 67] _17 <- ([#"../sum.rs" 8 4 8 67] next0 _18);
_18 <- any borrowed (Core_Ops_Range_RangeInclusive_Type.t_rangeinclusive uint32);
goto BB7
diff --git a/creusot/tests/should_succeed/sum/why3session.xml b/creusot/tests/should_succeed/sum/why3session.xml
index a4b5840672..0f794689b8 100644
--- a/creusot/tests/should_succeed/sum/why3session.xml
+++ b/creusot/tests/should_succeed/sum/why3session.xml
@@ -14,7 +14,7 @@
-
+
@@ -23,19 +23,19 @@
-
+
-
+
-
+
-
+
@@ -44,12 +44,12 @@
-
+
-
+
@@ -60,18 +60,18 @@
-
+
-
+
-
+
-
+
diff --git a/creusot/tests/should_succeed/sum/why3shapes.gz b/creusot/tests/should_succeed/sum/why3shapes.gz
index 4de98dfe4e..8161fc4e8d 100644
Binary files a/creusot/tests/should_succeed/sum/why3shapes.gz and b/creusot/tests/should_succeed/sum/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/sum_of_odds.mlcfg b/creusot/tests/should_succeed/sum_of_odds.mlcfg
index 45384b8a50..b2ec5b7d6c 100644
--- a/creusot/tests/should_succeed/sum_of_odds.mlcfg
+++ b/creusot/tests/should_succeed/sum_of_odds.mlcfg
@@ -252,8 +252,8 @@ module SumOfOdds_ComputeSumOfOdd
BB5 {
[#"../sum_of_odds.rs" 38 4 38 50] _20 <- Borrow.borrow_mut iter;
[#"../sum_of_odds.rs" 38 4 38 50] iter <- ^ _20;
- [#"../sum_of_odds.rs" 38 4 38 50] _19 <- Borrow.borrow_mut ( * _20);
- [#"../sum_of_odds.rs" 38 4 38 50] _20 <- { _20 with current = ^ _19 };
+ [#"../sum_of_odds.rs" 38 4 38 50] _19 <- Borrow.borrow_final ( * _20) (Borrow.get_id _20);
+ [#"../sum_of_odds.rs" 38 4 38 50] _20 <- { _20 with current = ( ^ _19) ; };
[#"../sum_of_odds.rs" 38 4 38 50] _18 <- ([#"../sum_of_odds.rs" 38 4 38 50] next0 _19);
_19 <- any borrowed (Core_Ops_Range_Range_Type.t_range uint32);
goto BB6
diff --git a/creusot/tests/should_succeed/sum_of_odds/why3session.xml b/creusot/tests/should_succeed/sum_of_odds/why3session.xml
index e3ce9d68d4..8e4658a63d 100644
--- a/creusot/tests/should_succeed/sum_of_odds/why3session.xml
+++ b/creusot/tests/should_succeed/sum_of_odds/why3session.xml
@@ -3,13 +3,12 @@
"http://why3.lri.fr/why3session.dtd">
-
-
+
@@ -36,38 +35,38 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/creusot/tests/should_succeed/sum_of_odds/why3shapes.gz b/creusot/tests/should_succeed/sum_of_odds/why3shapes.gz
index 7544fa4bbe..67c5b86ed3 100644
Binary files a/creusot/tests/should_succeed/sum_of_odds/why3shapes.gz and b/creusot/tests/should_succeed/sum_of_odds/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/swap_borrows.mlcfg b/creusot/tests/should_succeed/swap_borrows.mlcfg
index 709ca72114..1d97767b47 100644
--- a/creusot/tests/should_succeed/swap_borrows.mlcfg
+++ b/creusot/tests/should_succeed/swap_borrows.mlcfg
@@ -113,8 +113,8 @@ module SwapBorrows_F
[#"../swap_borrows.rs" 12 18 12 24] a <- ^ _6;
[#"../swap_borrows.rs" 12 26 12 32] _8 <- Borrow.borrow_mut b;
[#"../swap_borrows.rs" 12 26 12 32] b <- ^ _8;
- [#"../swap_borrows.rs" 12 26 12 32] _7 <- Borrow.borrow_mut ( * _8);
- [#"../swap_borrows.rs" 12 26 12 32] _8 <- { _8 with current = ^ _7 };
+ [#"../swap_borrows.rs" 12 26 12 32] _7 <- Borrow.borrow_final ( * _8) (Borrow.get_id _8);
+ [#"../swap_borrows.rs" 12 26 12 32] _8 <- { _8 with current = ( ^ _7) ; };
[#"../swap_borrows.rs" 12 12 12 34] p <- ([#"../swap_borrows.rs" 12 12 12 34] swap0 ([#"../swap_borrows.rs" 12 17 12 33] (_6, _7)));
_6 <- any borrowed uint32;
_7 <- any borrowed uint32;
@@ -122,7 +122,7 @@ module SwapBorrows_F
}
BB1 {
assume { resolve1 _8 };
- [#"../swap_borrows.rs" 13 4 13 13] p <- (let (x0, x1) = p in ({ (let (a, _) = p in a) with current = ([#"../swap_borrows.rs" 13 4 13 13] [#"../swap_borrows.rs" 13 11 13 13] (10 : uint32)) }, x1));
+ [#"../swap_borrows.rs" 13 4 13 13] p <- (let (x0, x1) = p in ({ (let (a, _) = p in a) with current = ([#"../swap_borrows.rs" 13 4 13 13] [#"../swap_borrows.rs" 13 11 13 13] (10 : uint32)) ; }, x1));
assume { resolve2 p };
assert { [@expl:assertion] [#"../swap_borrows.rs" 15 20 15 30] b = (10 : uint32) };
assert { [@expl:assertion] [#"../swap_borrows.rs" 16 20 16 29] a = (0 : uint32) };
diff --git a/creusot/tests/should_succeed/swap_borrows/why3session.xml b/creusot/tests/should_succeed/swap_borrows/why3session.xml
index 1c6808ca96..24666037b3 100644
--- a/creusot/tests/should_succeed/swap_borrows/why3session.xml
+++ b/creusot/tests/should_succeed/swap_borrows/why3session.xml
@@ -12,7 +12,7 @@
-
+
diff --git a/creusot/tests/should_succeed/swap_borrows/why3shapes.gz b/creusot/tests/should_succeed/swap_borrows/why3shapes.gz
index 93382a831d..a9a14a7d21 100644
Binary files a/creusot/tests/should_succeed/swap_borrows/why3shapes.gz and b/creusot/tests/should_succeed/swap_borrows/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/syntax/02_operators/why3session.xml b/creusot/tests/should_succeed/syntax/02_operators/why3session.xml
index c2be464043..81b6106b8c 100644
--- a/creusot/tests/should_succeed/syntax/02_operators/why3session.xml
+++ b/creusot/tests/should_succeed/syntax/02_operators/why3session.xml
@@ -2,21 +2,19 @@
-
-
-
+
-
+
@@ -46,17 +44,17 @@
-
+
-
+
-
+
diff --git a/creusot/tests/should_succeed/syntax/06_logic_function_contracts/why3session.xml b/creusot/tests/should_succeed/syntax/06_logic_function_contracts/why3session.xml
index ff9e678606..40beb9cd22 100644
--- a/creusot/tests/should_succeed/syntax/06_logic_function_contracts/why3session.xml
+++ b/creusot/tests/should_succeed/syntax/06_logic_function_contracts/why3session.xml
@@ -3,13 +3,12 @@
"http://why3.lri.fr/why3session.dtd">
-
-
+
@@ -19,7 +18,7 @@
-
+
diff --git a/creusot/tests/should_succeed/syntax/09_maintains/why3session.xml b/creusot/tests/should_succeed/syntax/09_maintains/why3session.xml
index 97ab29ddc0..215f318bd0 100644
--- a/creusot/tests/should_succeed/syntax/09_maintains/why3session.xml
+++ b/creusot/tests/should_succeed/syntax/09_maintains/why3session.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/creusot/tests/should_succeed/syntax/09_maintains/why3shapes.gz b/creusot/tests/should_succeed/syntax/09_maintains/why3shapes.gz
index 0fb5a4ac39..cd905f40c3 100644
Binary files a/creusot/tests/should_succeed/syntax/09_maintains/why3shapes.gz and b/creusot/tests/should_succeed/syntax/09_maintains/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/syntax/12_ghost_code/why3session.xml b/creusot/tests/should_succeed/syntax/12_ghost_code/why3session.xml
index b1871b20bc..e3eef2c3d1 100644
--- a/creusot/tests/should_succeed/syntax/12_ghost_code/why3session.xml
+++ b/creusot/tests/should_succeed/syntax/12_ghost_code/why3session.xml
@@ -8,7 +8,7 @@
-
+
diff --git a/creusot/tests/should_succeed/syntax/12_ghost_code/why3shapes.gz b/creusot/tests/should_succeed/syntax/12_ghost_code/why3shapes.gz
index ac184bbd4d..c408fd74c5 100644
Binary files a/creusot/tests/should_succeed/syntax/12_ghost_code/why3shapes.gz and b/creusot/tests/should_succeed/syntax/12_ghost_code/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/syntax/derive_macros/why3session.xml b/creusot/tests/should_succeed/syntax/derive_macros/why3session.xml
index 0ef6d40442..061dd394af 100644
--- a/creusot/tests/should_succeed/syntax/derive_macros/why3session.xml
+++ b/creusot/tests/should_succeed/syntax/derive_macros/why3session.xml
@@ -2,48 +2,48 @@
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/creusot/tests/should_succeed/syntax/derive_macros/why3shapes.gz b/creusot/tests/should_succeed/syntax/derive_macros/why3shapes.gz
index 939c74e215..0846f1611f 100644
Binary files a/creusot/tests/should_succeed/syntax/derive_macros/why3shapes.gz and b/creusot/tests/should_succeed/syntax/derive_macros/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/take_first_mut.mlcfg b/creusot/tests/should_succeed/take_first_mut.mlcfg
index a3138c788b..863f8648ed 100644
--- a/creusot/tests/should_succeed/take_first_mut.mlcfg
+++ b/creusot/tests/should_succeed/take_first_mut.mlcfg
@@ -161,7 +161,7 @@ module TakeFirstMut_TakeFirstMut
requires {[#"../take_first_mut.rs" 14 29 14 34] inv3 self_}
ensures { [#"../take_first_mut.rs" 6 10 13 1] match result with
| Core_Option_Option_Type.C_Some r -> * r = index_logic0 ( * * self_) 0 /\ ^ r = index_logic0 ( ^ * self_) 0 /\ Seq.length (shallow_model0 ( * * self_)) > 0 /\ Seq.length (shallow_model0 ( ^ * self_)) > 0 /\ shallow_model0 ( * ^ self_) = tail0 (shallow_model0 ( * * self_)) /\ shallow_model0 ( ^ ^ self_) = tail0 (shallow_model0 ( ^ * self_))
- | Core_Option_Option_Type.C_None -> ^ self_ = * self_ /\ Seq.length (shallow_model0 ( * * self_)) = 0
+ | Core_Option_Option_Type.C_None -> Seq.length (shallow_model0 ( * ^ self_)) = 0 /\ Seq.length (shallow_model0 ( ^ * self_)) = 0 /\ Seq.length (shallow_model0 ( * * self_)) = 0
end }
ensures { [#"../take_first_mut.rs" 14 57 14 74] inv6 result }
@@ -180,16 +180,16 @@ module TakeFirstMut_TakeFirstMut
goto BB0
}
BB0 {
- [#"../take_first_mut.rs" 15 20 15 25] _6 <- Borrow.borrow_mut ( * self_);
- [#"../take_first_mut.rs" 15 20 15 25] self_ <- { self_ with current = ^ _6 };
+ [#"../take_first_mut.rs" 15 20 15 25] _6 <- Borrow.borrow_final ( * self_) (Borrow.get_id self_);
+ [#"../take_first_mut.rs" 15 20 15 25] self_ <- { self_ with current = ( ^ _6) ; };
assume { inv0 ( ^ _6) };
[#"../take_first_mut.rs" 15 10 15 26] _5 <- ([#"../take_first_mut.rs" 15 10 15 26] take0 _6);
_6 <- any borrowed (borrowed (slice t));
goto BB1
}
BB1 {
- [#"../take_first_mut.rs" 15 10 15 44] _4 <- Borrow.borrow_mut ( * _5);
- [#"../take_first_mut.rs" 15 10 15 44] _5 <- { _5 with current = ^ _4 };
+ [#"../take_first_mut.rs" 15 10 15 44] _4 <- Borrow.borrow_final ( * _5) (Borrow.get_id _5);
+ [#"../take_first_mut.rs" 15 10 15 44] _5 <- { _5 with current = ( ^ _4) ; };
assume { inv1 ( ^ _4) };
[#"../take_first_mut.rs" 15 10 15 44] _3 <- ([#"../take_first_mut.rs" 15 10 15 44] split_first_mut0 _4);
_4 <- any borrowed (slice t);
@@ -211,17 +211,17 @@ module TakeFirstMut_TakeFirstMut
[#"../take_first_mut.rs" 17 21 17 24] _3 <- (let Core_Option_Option_Type.C_Some x0 = _3 in Core_Option_Option_Type.C_Some (let (x0, x1) = Core_Option_Option_Type.some_0 _3 in (x0, any borrowed (slice t))));
assert { [@expl:type invariant] inv2 _3 };
assume { resolve0 _3 };
- [#"../take_first_mut.rs" 18 21 18 24] _11 <- Borrow.borrow_mut ( * rem);
- [#"../take_first_mut.rs" 18 21 18 24] rem <- { rem with current = ^ _11 };
+ [#"../take_first_mut.rs" 18 21 18 24] _11 <- Borrow.borrow_final ( * rem) (Borrow.get_id rem);
+ [#"../take_first_mut.rs" 18 21 18 24] rem <- { rem with current = ( ^ _11) ; };
assume { inv1 ( ^ _11) };
- [#"../take_first_mut.rs" 18 12 18 24] self_ <- { self_ with current = ([#"../take_first_mut.rs" 18 12 18 24] _11) };
+ [#"../take_first_mut.rs" 18 12 18 24] self_ <- { self_ with current = ([#"../take_first_mut.rs" 18 12 18 24] _11) ; };
[#"../take_first_mut.rs" 18 12 18 24] _11 <- any borrowed (slice t);
assert { [@expl:type invariant] inv0 ( * self_) };
assume { resolve2 ( * self_) };
assert { [@expl:type invariant] inv3 self_ };
assume { resolve1 self_ };
- [#"../take_first_mut.rs" 19 17 19 22] _12 <- Borrow.borrow_mut ( * first);
- [#"../take_first_mut.rs" 19 17 19 22] first <- { first with current = ^ _12 };
+ [#"../take_first_mut.rs" 19 17 19 22] _12 <- Borrow.borrow_final ( * first) (Borrow.get_id first);
+ [#"../take_first_mut.rs" 19 17 19 22] first <- { first with current = ( ^ _12) ; };
assume { inv4 ( ^ _12) };
[#"../take_first_mut.rs" 19 12 19 23] _0 <- ([#"../take_first_mut.rs" 19 12 19 23] Core_Option_Option_Type.C_Some _12);
_12 <- any borrowed t;
diff --git a/creusot/tests/should_succeed/take_first_mut/why3session.xml b/creusot/tests/should_succeed/take_first_mut/why3session.xml
index 38830f42c9..8894a3d0a3 100644
--- a/creusot/tests/should_succeed/take_first_mut/why3session.xml
+++ b/creusot/tests/should_succeed/take_first_mut/why3session.xml
@@ -7,7 +7,7 @@
-
+
diff --git a/creusot/tests/should_succeed/take_first_mut/why3shapes.gz b/creusot/tests/should_succeed/take_first_mut/why3shapes.gz
index 56c63406c2..5d42c4c701 100644
Binary files a/creusot/tests/should_succeed/take_first_mut/why3shapes.gz and b/creusot/tests/should_succeed/take_first_mut/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/traits/02/why3shapes.gz b/creusot/tests/should_succeed/traits/02/why3shapes.gz
index ead4441633..9e312c2307 100644
Binary files a/creusot/tests/should_succeed/traits/02/why3shapes.gz and b/creusot/tests/should_succeed/traits/02/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/traits/12_default_method/why3shapes.gz b/creusot/tests/should_succeed/traits/12_default_method/why3shapes.gz
index d524c10c4d..a6f69926d2 100644
Binary files a/creusot/tests/should_succeed/traits/12_default_method/why3shapes.gz and b/creusot/tests/should_succeed/traits/12_default_method/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/traits/13_assoc_types/why3shapes.gz b/creusot/tests/should_succeed/traits/13_assoc_types/why3shapes.gz
index bd52dc64ad..50953bbc18 100644
Binary files a/creusot/tests/should_succeed/traits/13_assoc_types/why3shapes.gz and b/creusot/tests/should_succeed/traits/13_assoc_types/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/traits/16_impl_cloning/why3shapes.gz b/creusot/tests/should_succeed/traits/16_impl_cloning/why3shapes.gz
index 8ab72e74ed..02a8dd49b0 100644
Binary files a/creusot/tests/should_succeed/traits/16_impl_cloning/why3shapes.gz and b/creusot/tests/should_succeed/traits/16_impl_cloning/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/traits/18_trait_laws/why3session.xml b/creusot/tests/should_succeed/traits/18_trait_laws/why3session.xml
index 10f8deeb30..bfd0c24fa6 100644
--- a/creusot/tests/should_succeed/traits/18_trait_laws/why3session.xml
+++ b/creusot/tests/should_succeed/traits/18_trait_laws/why3session.xml
@@ -13,7 +13,7 @@
-
+
diff --git a/creusot/tests/should_succeed/type_invariants/borrows.mlcfg b/creusot/tests/should_succeed/type_invariants/borrows.mlcfg
index d77e000ba7..d59db346b9 100644
--- a/creusot/tests/should_succeed/type_invariants/borrows.mlcfg
+++ b/creusot/tests/should_succeed/type_invariants/borrows.mlcfg
@@ -96,12 +96,12 @@ module Borrows_Impl1_InnerMut
goto BB0
}
BB0 {
- [#"../borrows.rs" 24 8 24 19] _5 <- Borrow.borrow_mut (Borrows_NonZero_Type.nonzero_0 ( * self));
- [#"../borrows.rs" 24 8 24 19] self <- { self with current = (let Borrows_NonZero_Type.C_NonZero x0 = * self in Borrows_NonZero_Type.C_NonZero ( ^ _5)) };
- [#"../borrows.rs" 24 8 24 19] _2 <- Borrow.borrow_mut ( * _5);
- [#"../borrows.rs" 24 8 24 19] _5 <- { _5 with current = ^ _2 };
- [#"../borrows.rs" 24 8 24 19] _0 <- Borrow.borrow_mut ( * _2);
- [#"../borrows.rs" 24 8 24 19] _2 <- { _2 with current = ^ _0 };
+ [#"../borrows.rs" 24 8 24 19] _5 <- Borrow.borrow_final (Borrows_NonZero_Type.nonzero_0 ( * self)) (Borrow.inherit_id (Borrow.get_id self) 1);
+ [#"../borrows.rs" 24 8 24 19] self <- { self with current = (let Borrows_NonZero_Type.C_NonZero x0 = * self in Borrows_NonZero_Type.C_NonZero ( ^ _5)) ; };
+ [#"../borrows.rs" 24 8 24 19] _2 <- Borrow.borrow_final ( * _5) (Borrow.get_id _5);
+ [#"../borrows.rs" 24 8 24 19] _5 <- { _5 with current = ( ^ _2) ; };
+ [#"../borrows.rs" 24 8 24 19] _0 <- Borrow.borrow_final ( * _2) (Borrow.get_id _2);
+ [#"../borrows.rs" 24 8 24 19] _2 <- { _2 with current = ( ^ _0) ; };
assume { resolve0 _5 };
assume { resolve0 _2 };
assert { [@expl:type invariant] inv0 self };
@@ -139,7 +139,7 @@ module Borrows_Inc
goto BB0
}
BB0 {
- [#"../borrows.rs" 102 4 102 11] x <- { x with current = ([#"../borrows.rs" 102 4 102 11] * x + ([#"../borrows.rs" 102 10 102 11] [#"../borrows.rs" 102 10 102 11] (1 : int32))) };
+ [#"../borrows.rs" 102 4 102 11] x <- { x with current = ([#"../borrows.rs" 102 4 102 11] * x + ([#"../borrows.rs" 102 10 102 11] [#"../borrows.rs" 102 10 102 11] (1 : int32))) ; };
assume { resolve0 x };
[#"../borrows.rs" 101 24 103 1] _0 <- ([#"../borrows.rs" 101 24 103 1] ());
return _0
@@ -211,10 +211,10 @@ module Borrows_Simple
goto BB0
}
BB0 {
- [#"../borrows.rs" 32 8 32 16] _6 <- Borrow.borrow_mut (Borrows_NonZero_Type.nonzero_0 ( * x));
- [#"../borrows.rs" 32 8 32 16] x <- { x with current = (let Borrows_NonZero_Type.C_NonZero x0 = * x in Borrows_NonZero_Type.C_NonZero ( ^ _6)) };
- [#"../borrows.rs" 32 8 32 16] _5 <- Borrow.borrow_mut ( * _6);
- [#"../borrows.rs" 32 8 32 16] _6 <- { _6 with current = ^ _5 };
+ [#"../borrows.rs" 32 8 32 16] _6 <- Borrow.borrow_final (Borrows_NonZero_Type.nonzero_0 ( * x)) (Borrow.inherit_id (Borrow.get_id x) 1);
+ [#"../borrows.rs" 32 8 32 16] x <- { x with current = (let Borrows_NonZero_Type.C_NonZero x0 = * x in Borrows_NonZero_Type.C_NonZero ( ^ _6)) ; };
+ [#"../borrows.rs" 32 8 32 16] _5 <- Borrow.borrow_final ( * _6) (Borrow.get_id _6);
+ [#"../borrows.rs" 32 8 32 16] _6 <- { _6 with current = ( ^ _5) ; };
[#"../borrows.rs" 32 4 32 17] _4 <- ([#"../borrows.rs" 32 4 32 17] inc0 _5);
_5 <- any borrowed int32;
goto BB1
@@ -299,16 +299,16 @@ module Borrows_Hard
goto BB0
}
BB0 {
- [#"../borrows.rs" 39 8 39 21] _7 <- Borrow.borrow_mut ( * x);
- [#"../borrows.rs" 39 8 39 21] x <- { x with current = ^ _7 };
+ [#"../borrows.rs" 39 8 39 21] _7 <- Borrow.borrow_final ( * x) (Borrow.get_id x);
+ [#"../borrows.rs" 39 8 39 21] x <- { x with current = ( ^ _7) ; };
assume { inv0 ( ^ _7) };
[#"../borrows.rs" 39 8 39 21] _6 <- ([#"../borrows.rs" 39 8 39 21] inner_mut0 _7);
_7 <- any borrowed (Borrows_NonZero_Type.t_nonzero);
goto BB1
}
BB1 {
- [#"../borrows.rs" 39 8 39 21] _5 <- Borrow.borrow_mut ( * _6);
- [#"../borrows.rs" 39 8 39 21] _6 <- { _6 with current = ^ _5 };
+ [#"../borrows.rs" 39 8 39 21] _5 <- Borrow.borrow_final ( * _6) (Borrow.get_id _6);
+ [#"../borrows.rs" 39 8 39 21] _6 <- { _6 with current = ( ^ _5) ; };
[#"../borrows.rs" 39 4 39 22] _4 <- ([#"../borrows.rs" 39 4 39 22] inc0 _5);
_5 <- any borrowed int32;
goto BB2
@@ -408,10 +408,10 @@ module Borrows_Tuple
}
BB0 {
[#"../borrows.rs" 46 4 46 14] x <- (let (x0, x1) = x in ((let Borrows_NonZero_Type.C_NonZero x0 = let (a, _) = x in a in Borrows_NonZero_Type.C_NonZero ([#"../borrows.rs" 46 4 46 14] [#"../borrows.rs" 46 13 46 14] (0 : int32))), x1));
- [#"../borrows.rs" 47 8 47 19] _6 <- Borrow.borrow_mut (Borrows_NonZero_Type.nonzero_0 ( * (let (_, a) = x in a)));
- [#"../borrows.rs" 47 8 47 19] x <- (let (x0, x1) = x in (x0, { (let (_, a) = x in a) with current = (let Borrows_NonZero_Type.C_NonZero x0 = * (let (_, a) = x in a) in Borrows_NonZero_Type.C_NonZero ( ^ _6)) }));
- [#"../borrows.rs" 47 8 47 19] _5 <- Borrow.borrow_mut ( * _6);
- [#"../borrows.rs" 47 8 47 19] _6 <- { _6 with current = ^ _5 };
+ [#"../borrows.rs" 47 8 47 19] _6 <- Borrow.borrow_final (Borrows_NonZero_Type.nonzero_0 ( * (let (_, a) = x in a))) (Borrow.inherit_id (Borrow.get_id (let (_, a) = x in a)) 1);
+ [#"../borrows.rs" 47 8 47 19] x <- (let (x0, x1) = x in (x0, { (let (_, a) = x in a) with current = (let Borrows_NonZero_Type.C_NonZero x0 = * (let (_, a) = x in a) in Borrows_NonZero_Type.C_NonZero ( ^ _6)) ; }));
+ [#"../borrows.rs" 47 8 47 19] _5 <- Borrow.borrow_final ( * _6) (Borrow.get_id _6);
+ [#"../borrows.rs" 47 8 47 19] _6 <- { _6 with current = ( ^ _5) ; };
[#"../borrows.rs" 47 4 47 20] _4 <- ([#"../borrows.rs" 47 4 47 20] inc0 _5);
_5 <- any borrowed int32;
goto BB1
@@ -513,10 +513,10 @@ module Borrows_PartialMove
BB0 {
[#"../borrows.rs" 54 16 54 19] a <- ([#"../borrows.rs" 54 16 54 19] let (a, _) = x in a);
[#"../borrows.rs" 54 16 54 19] x <- (let (x0, x1) = x in (any Borrows_NonZero_Type.t_nonzero, x1));
- [#"../borrows.rs" 55 8 55 19] _7 <- Borrow.borrow_mut (Borrows_NonZero_Type.nonzero_0 ( * (let (_, a) = x in a)));
- [#"../borrows.rs" 55 8 55 19] x <- (let (x0, x1) = x in (x0, { (let (_, a) = x in a) with current = (let Borrows_NonZero_Type.C_NonZero x0 = * (let (_, a) = x in a) in Borrows_NonZero_Type.C_NonZero ( ^ _7)) }));
- [#"../borrows.rs" 55 8 55 19] _6 <- Borrow.borrow_mut ( * _7);
- [#"../borrows.rs" 55 8 55 19] _7 <- { _7 with current = ^ _6 };
+ [#"../borrows.rs" 55 8 55 19] _7 <- Borrow.borrow_final (Borrows_NonZero_Type.nonzero_0 ( * (let (_, a) = x in a))) (Borrow.inherit_id (Borrow.get_id (let (_, a) = x in a)) 1);
+ [#"../borrows.rs" 55 8 55 19] x <- (let (x0, x1) = x in (x0, { (let (_, a) = x in a) with current = (let Borrows_NonZero_Type.C_NonZero x0 = * (let (_, a) = x in a) in Borrows_NonZero_Type.C_NonZero ( ^ _7)) ; }));
+ [#"../borrows.rs" 55 8 55 19] _6 <- Borrow.borrow_final ( * _7) (Borrow.get_id _7);
+ [#"../borrows.rs" 55 8 55 19] _7 <- { _7 with current = ( ^ _6) ; };
[#"../borrows.rs" 55 4 55 20] _5 <- ([#"../borrows.rs" 55 4 55 20] inc0 _6);
_6 <- any borrowed int32;
goto BB1
@@ -625,10 +625,10 @@ module Borrows_Destruct
assert { [@expl:type invariant] inv0 x };
assume { resolve0 x };
[#"../borrows.rs" 63 4 63 11] a <- (let Borrows_NonZero_Type.C_NonZero x0 = a in Borrows_NonZero_Type.C_NonZero ([#"../borrows.rs" 63 4 63 11] [#"../borrows.rs" 63 10 63 11] (0 : int32)));
- [#"../borrows.rs" 64 8 64 16] _8 <- Borrow.borrow_mut (Borrows_NonZero_Type.nonzero_0 ( * b));
- [#"../borrows.rs" 64 8 64 16] b <- { b with current = (let Borrows_NonZero_Type.C_NonZero x0 = * b in Borrows_NonZero_Type.C_NonZero ( ^ _8)) };
- [#"../borrows.rs" 64 8 64 16] _7 <- Borrow.borrow_mut ( * _8);
- [#"../borrows.rs" 64 8 64 16] _8 <- { _8 with current = ^ _7 };
+ [#"../borrows.rs" 64 8 64 16] _8 <- Borrow.borrow_final (Borrows_NonZero_Type.nonzero_0 ( * b)) (Borrow.inherit_id (Borrow.get_id b) 1);
+ [#"../borrows.rs" 64 8 64 16] b <- { b with current = (let Borrows_NonZero_Type.C_NonZero x0 = * b in Borrows_NonZero_Type.C_NonZero ( ^ _8)) ; };
+ [#"../borrows.rs" 64 8 64 16] _7 <- Borrow.borrow_final ( * _8) (Borrow.get_id _8);
+ [#"../borrows.rs" 64 8 64 16] _8 <- { _8 with current = ( ^ _7) ; };
[#"../borrows.rs" 64 4 64 17] _6 <- ([#"../borrows.rs" 64 4 64 17] inc0 _7);
_7 <- any borrowed int32;
goto BB1
@@ -710,10 +710,10 @@ module Borrows_FrozenDead
goto BB0
}
BB0 {
- [#"../borrows.rs" 70 13 70 21] _a <- Borrow.borrow_mut (Borrows_NonZero_Type.nonzero_0 ( * x));
- [#"../borrows.rs" 70 13 70 21] x <- { x with current = (let Borrows_NonZero_Type.C_NonZero x0 = * x in Borrows_NonZero_Type.C_NonZero ( ^ _a)) };
- [#"../borrows.rs" 74 8 74 9] _6 <- Borrow.borrow_mut ( * y);
- [#"../borrows.rs" 74 8 74 9] y <- { y with current = ^ _6 };
+ [#"../borrows.rs" 70 13 70 21] _a <- Borrow.borrow_final (Borrows_NonZero_Type.nonzero_0 ( * x)) (Borrow.inherit_id (Borrow.get_id x) 1);
+ [#"../borrows.rs" 70 13 70 21] x <- { x with current = (let Borrows_NonZero_Type.C_NonZero x0 = * x in Borrows_NonZero_Type.C_NonZero ( ^ _a)) ; };
+ [#"../borrows.rs" 74 8 74 9] _6 <- Borrow.borrow_final ( * y) (Borrow.get_id y);
+ [#"../borrows.rs" 74 8 74 9] y <- { y with current = ( ^ _6) ; };
assume { inv0 ( ^ _6) };
assert { [@expl:type invariant] inv1 x };
assume { resolve0 x };
@@ -721,8 +721,8 @@ module Borrows_FrozenDead
[#"../borrows.rs" 73 4 74 9] _6 <- any borrowed (Borrows_NonZero_Type.t_nonzero);
assert { [@expl:type invariant] inv1 x };
assume { resolve0 x };
- [#"../borrows.rs" 75 8 75 10] _8 <- Borrow.borrow_mut ( * _a);
- [#"../borrows.rs" 75 8 75 10] _a <- { _a with current = ^ _8 };
+ [#"../borrows.rs" 75 8 75 10] _8 <- Borrow.borrow_final ( * _a) (Borrow.get_id _a);
+ [#"../borrows.rs" 75 8 75 10] _a <- { _a with current = ( ^ _8) ; };
[#"../borrows.rs" 75 4 75 11] _7 <- ([#"../borrows.rs" 75 4 75 11] inc0 _8);
_8 <- any borrowed int32;
goto BB1
@@ -780,7 +780,7 @@ module Borrows_Dec
goto BB0
}
BB0 {
- [#"../borrows.rs" 108 4 108 11] x <- { x with current = ([#"../borrows.rs" 108 4 108 11] * x - ([#"../borrows.rs" 108 10 108 11] [#"../borrows.rs" 108 10 108 11] (1 : int32))) };
+ [#"../borrows.rs" 108 4 108 11] x <- { x with current = ([#"../borrows.rs" 108 4 108 11] * x - ([#"../borrows.rs" 108 10 108 11] [#"../borrows.rs" 108 10 108 11] (1 : int32))) ; };
assume { resolve0 x };
[#"../borrows.rs" 107 24 109 1] _0 <- ([#"../borrows.rs" 107 24 109 1] ());
return _0
@@ -860,20 +860,20 @@ module Borrows_Impl3_Foo
goto BB0
}
BB0 {
- [#"../borrows.rs" 94 12 94 23] _5 <- Borrow.borrow_mut (Borrows_SumTo10_Type.sumto10_a ( * self));
- [#"../borrows.rs" 94 12 94 23] self <- { self with current = (let Borrows_SumTo10_Type.C_SumTo10 x0 x1 = * self in Borrows_SumTo10_Type.C_SumTo10 ( ^ _5) x1) };
- [#"../borrows.rs" 94 12 94 23] _4 <- Borrow.borrow_mut ( * _5);
- [#"../borrows.rs" 94 12 94 23] _5 <- { _5 with current = ^ _4 };
+ [#"../borrows.rs" 94 12 94 23] _5 <- Borrow.borrow_final (Borrows_SumTo10_Type.sumto10_a ( * self)) (Borrow.inherit_id (Borrow.get_id self) 1);
+ [#"../borrows.rs" 94 12 94 23] self <- { self with current = (let Borrows_SumTo10_Type.C_SumTo10 x0 x1 = * self in Borrows_SumTo10_Type.C_SumTo10 ( ^ _5) x1) ; };
+ [#"../borrows.rs" 94 12 94 23] _4 <- Borrow.borrow_final ( * _5) (Borrow.get_id _5);
+ [#"../borrows.rs" 94 12 94 23] _5 <- { _5 with current = ( ^ _4) ; };
[#"../borrows.rs" 94 8 94 24] _3 <- ([#"../borrows.rs" 94 8 94 24] inc0 _4);
_4 <- any borrowed int32;
goto BB1
}
BB1 {
assume { resolve0 _5 };
- [#"../borrows.rs" 95 12 95 23] _8 <- Borrow.borrow_mut (Borrows_SumTo10_Type.sumto10_b ( * self));
- [#"../borrows.rs" 95 12 95 23] self <- { self with current = (let Borrows_SumTo10_Type.C_SumTo10 x0 x1 = * self in Borrows_SumTo10_Type.C_SumTo10 x0 ( ^ _8)) };
- [#"../borrows.rs" 95 12 95 23] _7 <- Borrow.borrow_mut ( * _8);
- [#"../borrows.rs" 95 12 95 23] _8 <- { _8 with current = ^ _7 };
+ [#"../borrows.rs" 95 12 95 23] _8 <- Borrow.borrow_final (Borrows_SumTo10_Type.sumto10_b ( * self)) (Borrow.inherit_id (Borrow.get_id self) 2);
+ [#"../borrows.rs" 95 12 95 23] self <- { self with current = (let Borrows_SumTo10_Type.C_SumTo10 x0 x1 = * self in Borrows_SumTo10_Type.C_SumTo10 x0 ( ^ _8)) ; };
+ [#"../borrows.rs" 95 12 95 23] _7 <- Borrow.borrow_final ( * _8) (Borrow.get_id _8);
+ [#"../borrows.rs" 95 12 95 23] _8 <- { _8 with current = ( ^ _7) ; };
[#"../borrows.rs" 95 8 95 24] _6 <- ([#"../borrows.rs" 95 8 95 24] dec0 _7);
_7 <- any borrowed int32;
goto BB2
diff --git a/creusot/tests/should_succeed/type_invariants/generated/why3shapes.gz b/creusot/tests/should_succeed/type_invariants/generated/why3shapes.gz
index ebf48a2458..8225519901 100644
Binary files a/creusot/tests/should_succeed/type_invariants/generated/why3shapes.gz and b/creusot/tests/should_succeed/type_invariants/generated/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/type_invariants/vec_inv/why3shapes.gz b/creusot/tests/should_succeed/type_invariants/vec_inv/why3shapes.gz
index 7b0856381a..aa7417cc5d 100644
Binary files a/creusot/tests/should_succeed/type_invariants/vec_inv/why3shapes.gz and b/creusot/tests/should_succeed/type_invariants/vec_inv/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/unnest.mlcfg b/creusot/tests/should_succeed/unnest.mlcfg
index 8e21a00b98..e65da4bb7b 100644
--- a/creusot/tests/should_succeed/unnest.mlcfg
+++ b/creusot/tests/should_succeed/unnest.mlcfg
@@ -27,9 +27,9 @@ module Unnest_Unnest
}
BB0 {
[#"../unnest.rs" 9 4 9 6] _2 <- Borrow.borrow_mut ( * * x);
- [#"../unnest.rs" 9 4 9 6] x <- { x with current = { ( * x) with current = ^ _2 } };
- [#"../unnest.rs" 9 4 9 6] _0 <- Borrow.borrow_mut ( * _2);
- [#"../unnest.rs" 9 4 9 6] _2 <- { _2 with current = ^ _0 };
+ [#"../unnest.rs" 9 4 9 6] x <- { x with current = { ( * x) with current = ( ^ _2) ; } ; };
+ [#"../unnest.rs" 9 4 9 6] _0 <- Borrow.borrow_final ( * _2) (Borrow.get_id _2);
+ [#"../unnest.rs" 9 4 9 6] _2 <- { _2 with current = ( ^ _0) ; };
assume { resolve0 _2 };
assume { resolve1 x };
return _0
diff --git a/creusot/tests/should_succeed/unnest/why3session.xml b/creusot/tests/should_succeed/unnest/why3session.xml
index 103f7cd781..4cb5fc1d0d 100644
--- a/creusot/tests/should_succeed/unnest/why3session.xml
+++ b/creusot/tests/should_succeed/unnest/why3session.xml
@@ -7,7 +7,7 @@
-
+
diff --git a/creusot/tests/should_succeed/unnest/why3shapes.gz b/creusot/tests/should_succeed/unnest/why3shapes.gz
index f748b7cd62..aa3bbeb2d2 100644
Binary files a/creusot/tests/should_succeed/unnest/why3shapes.gz and b/creusot/tests/should_succeed/unnest/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/vecdeque/why3session.xml b/creusot/tests/should_succeed/vecdeque/why3session.xml
index 8e8c782d51..70a678afd8 100644
--- a/creusot/tests/should_succeed/vecdeque/why3session.xml
+++ b/creusot/tests/should_succeed/vecdeque/why3session.xml
@@ -58,7 +58,7 @@
-
+
@@ -67,19 +67,19 @@
-
+
-
+
-
+
-
+
@@ -88,25 +88,25 @@
-
+
-
+
-
+
-
+
diff --git a/creusot/tests/should_succeed/vecdeque/why3shapes.gz b/creusot/tests/should_succeed/vecdeque/why3shapes.gz
index 0dae1679ba..1e15650dea 100644
Binary files a/creusot/tests/should_succeed/vecdeque/why3shapes.gz and b/creusot/tests/should_succeed/vecdeque/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/vector/01.mlcfg b/creusot/tests/should_succeed/vector/01.mlcfg
index ac44353557..456898fc75 100644
--- a/creusot/tests/should_succeed/vector/01.mlcfg
+++ b/creusot/tests/should_succeed/vector/01.mlcfg
@@ -394,8 +394,8 @@ module C01_AllZero
BB7 {
[#"../01.rs" 9 4 9 42] _21 <- Borrow.borrow_mut iter;
[#"../01.rs" 9 4 9 42] iter <- ^ _21;
- [#"../01.rs" 9 4 9 42] _20 <- Borrow.borrow_mut ( * _21);
- [#"../01.rs" 9 4 9 42] _21 <- { _21 with current = ^ _20 };
+ [#"../01.rs" 9 4 9 42] _20 <- Borrow.borrow_final ( * _21) (Borrow.get_id _21);
+ [#"../01.rs" 9 4 9 42] _21 <- { _21 with current = ( ^ _20) ; };
[#"../01.rs" 9 4 9 42] _19 <- ([#"../01.rs" 9 4 9 42] next0 _20);
_20 <- any borrowed (Core_Ops_Range_Range_Type.t_range usize);
goto BB8
@@ -430,13 +430,13 @@ module C01_AllZero
[#"../01.rs" 9 4 9 42] _24 <- any Ghost.ghost_ty (Seq.seq usize);
[#"../../../../../creusot-contracts-proc/src/lib.rs" 664 0 664 51] i <- ([#"../../../../../creusot-contracts-proc/src/lib.rs" 664 0 664 51] __creusot_proc_iter_elem);
[#"../01.rs" 12 8 12 9] _28 <- Borrow.borrow_mut ( * v);
- [#"../01.rs" 12 8 12 9] v <- { v with current = ^ _28 };
+ [#"../01.rs" 12 8 12 9] v <- { v with current = ( ^ _28) ; };
[#"../01.rs" 12 8 12 12] _27 <- ([#"../01.rs" 12 8 12 12] index_mut0 _28 ([#"../01.rs" 12 10 12 11] i));
_28 <- any borrowed (Alloc_Vec_Vec_Type.t_vec uint32 (Alloc_Alloc_Global_Type.t_global));
goto BB14
}
BB14 {
- [#"../01.rs" 12 8 12 16] _27 <- { _27 with current = ([#"../01.rs" 12 8 12 16] [#"../01.rs" 12 15 12 16] (0 : uint32)) };
+ [#"../01.rs" 12 8 12 16] _27 <- { _27 with current = ([#"../01.rs" 12 8 12 16] [#"../01.rs" 12 15 12 16] (0 : uint32)) ; };
assume { resolve1 _27 };
goto BB6
}
diff --git a/creusot/tests/should_succeed/vector/01/why3session.xml b/creusot/tests/should_succeed/vector/01/why3session.xml
index 685fc8da06..f899afa407 100644
--- a/creusot/tests/should_succeed/vector/01/why3session.xml
+++ b/creusot/tests/should_succeed/vector/01/why3session.xml
@@ -7,7 +7,7 @@
-
+
diff --git a/creusot/tests/should_succeed/vector/01/why3shapes.gz b/creusot/tests/should_succeed/vector/01/why3shapes.gz
index 09ed095915..ead06830c6 100644
Binary files a/creusot/tests/should_succeed/vector/01/why3shapes.gz and b/creusot/tests/should_succeed/vector/01/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/vector/02_gnome.mlcfg b/creusot/tests/should_succeed/vector/02_gnome.mlcfg
index 9de5e83518..b0c0bdaa59 100644
--- a/creusot/tests/should_succeed/vector/02_gnome.mlcfg
+++ b/creusot/tests/should_succeed/vector/02_gnome.mlcfg
@@ -496,15 +496,15 @@ module C02Gnome_GnomeSort
}
BB13 {
[#"../02_gnome.rs" 34 12 34 28] _31 <- Borrow.borrow_mut ( * v);
- [#"../02_gnome.rs" 34 12 34 28] v <- { v with current = ^ _31 };
+ [#"../02_gnome.rs" 34 12 34 28] v <- { v with current = ( ^ _31) ; };
assume { inv3 ( ^ _31) };
[#"../02_gnome.rs" 34 12 34 28] _30 <- ([#"../02_gnome.rs" 34 12 34 28] deref_mut0 _31);
_31 <- any borrowed (Alloc_Vec_Vec_Type.t_vec t (Alloc_Alloc_Global_Type.t_global));
goto BB14
}
BB14 {
- [#"../02_gnome.rs" 34 12 34 28] _29 <- Borrow.borrow_mut ( * _30);
- [#"../02_gnome.rs" 34 12 34 28] _30 <- { _30 with current = ^ _29 };
+ [#"../02_gnome.rs" 34 12 34 28] _29 <- Borrow.borrow_final ( * _30) (Borrow.get_id _30);
+ [#"../02_gnome.rs" 34 12 34 28] _30 <- { _30 with current = ( ^ _29) ; };
assume { inv4 ( ^ _29) };
[#"../02_gnome.rs" 34 12 34 28] _28 <- ([#"../02_gnome.rs" 34 12 34 28] swap0 _29 ([#"../02_gnome.rs" 34 19 34 24] ([#"../02_gnome.rs" 34 19 34 20] i) - ([#"../02_gnome.rs" 34 23 34 24] [#"../02_gnome.rs" 34 23 34 24] (1 : usize))) ([#"../02_gnome.rs" 34 26 34 27] i));
_29 <- any borrowed (slice t);
diff --git a/creusot/tests/should_succeed/vector/02_gnome/why3session.xml b/creusot/tests/should_succeed/vector/02_gnome/why3session.xml
index 3a46cc02cb..f2b2b5eacd 100644
--- a/creusot/tests/should_succeed/vector/02_gnome/why3session.xml
+++ b/creusot/tests/should_succeed/vector/02_gnome/why3session.xml
@@ -10,98 +10,98 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/creusot/tests/should_succeed/vector/02_gnome/why3shapes.gz b/creusot/tests/should_succeed/vector/02_gnome/why3shapes.gz
index 2153be3db9..368606eecb 100644
Binary files a/creusot/tests/should_succeed/vector/02_gnome/why3shapes.gz and b/creusot/tests/should_succeed/vector/02_gnome/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/vector/03_knuth_shuffle.mlcfg b/creusot/tests/should_succeed/vector/03_knuth_shuffle.mlcfg
index ff5cbf0743..970e78bb63 100644
--- a/creusot/tests/should_succeed/vector/03_knuth_shuffle.mlcfg
+++ b/creusot/tests/should_succeed/vector/03_knuth_shuffle.mlcfg
@@ -408,8 +408,8 @@ module C03KnuthShuffle_KnuthShuffle
BB7 {
[#"../03_knuth_shuffle.rs" 16 4 16 43] _19 <- Borrow.borrow_mut iter;
[#"../03_knuth_shuffle.rs" 16 4 16 43] iter <- ^ _19;
- [#"../03_knuth_shuffle.rs" 16 4 16 43] _18 <- Borrow.borrow_mut ( * _19);
- [#"../03_knuth_shuffle.rs" 16 4 16 43] _19 <- { _19 with current = ^ _18 };
+ [#"../03_knuth_shuffle.rs" 16 4 16 43] _18 <- Borrow.borrow_final ( * _19) (Borrow.get_id _19);
+ [#"../03_knuth_shuffle.rs" 16 4 16 43] _19 <- { _19 with current = ( ^ _18) ; };
[#"../03_knuth_shuffle.rs" 16 4 16 43] _17 <- ([#"../03_knuth_shuffle.rs" 16 4 16 43] next0 _18);
_18 <- any borrowed (Core_Ops_Range_Range_Type.t_range usize);
goto BB8
@@ -456,15 +456,15 @@ module C03KnuthShuffle_KnuthShuffle
}
BB15 {
[#"../03_knuth_shuffle.rs" 22 8 22 28] _34 <- Borrow.borrow_mut ( * v);
- [#"../03_knuth_shuffle.rs" 22 8 22 28] v <- { v with current = ^ _34 };
+ [#"../03_knuth_shuffle.rs" 22 8 22 28] v <- { v with current = ( ^ _34) ; };
assume { inv2 ( ^ _34) };
[#"../03_knuth_shuffle.rs" 22 8 22 28] _33 <- ([#"../03_knuth_shuffle.rs" 22 8 22 28] deref_mut0 _34);
_34 <- any borrowed (Alloc_Vec_Vec_Type.t_vec t (Alloc_Alloc_Global_Type.t_global));
goto BB16
}
BB16 {
- [#"../03_knuth_shuffle.rs" 22 8 22 28] _32 <- Borrow.borrow_mut ( * _33);
- [#"../03_knuth_shuffle.rs" 22 8 22 28] _33 <- { _33 with current = ^ _32 };
+ [#"../03_knuth_shuffle.rs" 22 8 22 28] _32 <- Borrow.borrow_final ( * _33) (Borrow.get_id _33);
+ [#"../03_knuth_shuffle.rs" 22 8 22 28] _33 <- { _33 with current = ( ^ _32) ; };
assume { inv3 ( ^ _32) };
[#"../03_knuth_shuffle.rs" 22 8 22 28] _31 <- ([#"../03_knuth_shuffle.rs" 22 8 22 28] swap0 _32 ([#"../03_knuth_shuffle.rs" 22 15 22 16] i) ([#"../03_knuth_shuffle.rs" 22 18 22 27] ([#"../03_knuth_shuffle.rs" 22 18 22 23] upper) - ([#"../03_knuth_shuffle.rs" 22 26 22 27] [#"../03_knuth_shuffle.rs" 22 26 22 27] (1 : usize))));
_32 <- any borrowed (slice t);
diff --git a/creusot/tests/should_succeed/vector/03_knuth_shuffle/why3session.xml b/creusot/tests/should_succeed/vector/03_knuth_shuffle/why3session.xml
index 39dbb0c646..1a79eb8aef 100644
--- a/creusot/tests/should_succeed/vector/03_knuth_shuffle/why3session.xml
+++ b/creusot/tests/should_succeed/vector/03_knuth_shuffle/why3session.xml
@@ -7,7 +7,7 @@
-
+
diff --git a/creusot/tests/should_succeed/vector/03_knuth_shuffle/why3shapes.gz b/creusot/tests/should_succeed/vector/03_knuth_shuffle/why3shapes.gz
index 81a72cf37c..3bfbcc2f71 100644
Binary files a/creusot/tests/should_succeed/vector/03_knuth_shuffle/why3shapes.gz and b/creusot/tests/should_succeed/vector/03_knuth_shuffle/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/vector/04_binary_search/why3shapes.gz b/creusot/tests/should_succeed/vector/04_binary_search/why3shapes.gz
index 3f290b5b8c..47ce872f98 100644
Binary files a/creusot/tests/should_succeed/vector/04_binary_search/why3shapes.gz and b/creusot/tests/should_succeed/vector/04_binary_search/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/vector/05_binary_search_generic/why3session.xml b/creusot/tests/should_succeed/vector/05_binary_search_generic/why3session.xml
index 6dcf55fa5f..11b449f716 100644
--- a/creusot/tests/should_succeed/vector/05_binary_search_generic/why3session.xml
+++ b/creusot/tests/should_succeed/vector/05_binary_search_generic/why3session.xml
@@ -38,7 +38,7 @@
-
+
@@ -95,22 +95,22 @@
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/creusot/tests/should_succeed/vector/05_binary_search_generic/why3shapes.gz b/creusot/tests/should_succeed/vector/05_binary_search_generic/why3shapes.gz
index aaaf994304..892b2f6536 100644
Binary files a/creusot/tests/should_succeed/vector/05_binary_search_generic/why3shapes.gz and b/creusot/tests/should_succeed/vector/05_binary_search_generic/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/vector/06_knights_tour.mlcfg b/creusot/tests/should_succeed/vector/06_knights_tour.mlcfg
index ecb928b02e..3ecd9e6219 100644
--- a/creusot/tests/should_succeed/vector/06_knights_tour.mlcfg
+++ b/creusot/tests/should_succeed/vector/06_knights_tour.mlcfg
@@ -639,7 +639,7 @@ module C06KnightsTour_Impl1_New
predicate completed0 (self : borrowed (CreusotContracts_Std1_Iter_MapInv_MapInv_Type.t_mapinv (Core_Ops_Range_Range_Type.t_range usize) usize C06KnightsTour_Impl1_New_Closure3.c06knightstour_impl1_new_closure3))
=
- [#"../../../../../creusot-contracts/src/std/iter/map_inv.rs" 15 8 18 9] Ghost.inner (CreusotContracts_Std1_Iter_MapInv_MapInv_Type.mapinv_produced ( ^ self)) = Seq.empty /\ completed1 {current = CreusotContracts_Std1_Iter_MapInv_MapInv_Type.mapinv_iter ( * self); final = CreusotContracts_Std1_Iter_MapInv_MapInv_Type.mapinv_iter ( ^ self)} /\ CreusotContracts_Std1_Iter_MapInv_MapInv_Type.mapinv_func ( * self) = CreusotContracts_Std1_Iter_MapInv_MapInv_Type.mapinv_func ( ^ self)
+ [#"../../../../../creusot-contracts/src/std/iter/map_inv.rs" 15 8 18 9] Ghost.inner (CreusotContracts_Std1_Iter_MapInv_MapInv_Type.mapinv_produced ( ^ self)) = Seq.empty /\ completed1 (Borrow.borrow_logic (CreusotContracts_Std1_Iter_MapInv_MapInv_Type.mapinv_iter ( * self)) (CreusotContracts_Std1_Iter_MapInv_MapInv_Type.mapinv_iter ( ^ self)) (Borrow.inherit_id (Borrow.get_id self) 1)) /\ CreusotContracts_Std1_Iter_MapInv_MapInv_Type.mapinv_func ( * self) = CreusotContracts_Std1_Iter_MapInv_MapInv_Type.mapinv_func ( ^ self)
val completed0 (self : borrowed (CreusotContracts_Std1_Iter_MapInv_MapInv_Type.t_mapinv (Core_Ops_Range_Range_Type.t_range usize) usize C06KnightsTour_Impl1_New_Closure3.c06knightstour_impl1_new_closure3)) : bool
ensures { result = completed0 self }
@@ -1359,8 +1359,8 @@ module C06KnightsTour_Impl1_CountDegree
BB8 {
[#"../06_knights_tour.rs" 73 8 73 46] _19 <- Borrow.borrow_mut iter;
[#"../06_knights_tour.rs" 73 8 73 46] iter <- ^ _19;
- [#"../06_knights_tour.rs" 73 8 73 46] _18 <- Borrow.borrow_mut ( * _19);
- [#"../06_knights_tour.rs" 73 8 73 46] _19 <- { _19 with current = ^ _18 };
+ [#"../06_knights_tour.rs" 73 8 73 46] _18 <- Borrow.borrow_final ( * _19) (Borrow.get_id _19);
+ [#"../06_knights_tour.rs" 73 8 73 46] _19 <- { _19 with current = ( ^ _18) ; };
[#"../06_knights_tour.rs" 73 8 73 46] _17 <- ([#"../06_knights_tour.rs" 73 8 73 46] next0 _18);
_18 <- any borrowed (Alloc_Vec_IntoIter_IntoIter_Type.t_intoiter (isize, isize) (Alloc_Alloc_Global_Type.t_global));
goto BB9
@@ -1668,21 +1668,21 @@ module C06KnightsTour_Impl1_Set
goto BB0
}
BB0 {
- [#"../06_knights_tour.rs" 88 8 88 18] _12 <- Borrow.borrow_mut (C06KnightsTour_Board_Type.board_field ( * self));
- [#"../06_knights_tour.rs" 88 8 88 18] self <- { self with current = (let C06KnightsTour_Board_Type.C_Board x0 x1 = * self in C06KnightsTour_Board_Type.C_Board x0 ( ^ _12)) };
+ [#"../06_knights_tour.rs" 88 8 88 18] _12 <- Borrow.borrow_final (C06KnightsTour_Board_Type.board_field ( * self)) (Borrow.inherit_id (Borrow.get_id self) 2);
+ [#"../06_knights_tour.rs" 88 8 88 18] self <- { self with current = (let C06KnightsTour_Board_Type.C_Board x0 x1 = * self in C06KnightsTour_Board_Type.C_Board x0 ( ^ _12)) ; };
[#"../06_knights_tour.rs" 88 8 88 32] _11 <- ([#"../06_knights_tour.rs" 88 8 88 32] index_mut0 _12 ([#"../06_knights_tour.rs" 88 19 88 31] UIntSize.of_int (IntSize.to_int ([#"../06_knights_tour.rs" 88 19 88 22] C06KnightsTour_Point_Type.point_x p))));
_12 <- any borrowed (Alloc_Vec_Vec_Type.t_vec (Alloc_Vec_Vec_Type.t_vec usize (Alloc_Alloc_Global_Type.t_global)) (Alloc_Alloc_Global_Type.t_global));
goto BB1
}
BB1 {
- [#"../06_knights_tour.rs" 88 8 88 32] _10 <- Borrow.borrow_mut ( * _11);
- [#"../06_knights_tour.rs" 88 8 88 32] _11 <- { _11 with current = ^ _10 };
+ [#"../06_knights_tour.rs" 88 8 88 32] _10 <- Borrow.borrow_final ( * _11) (Borrow.get_id _11);
+ [#"../06_knights_tour.rs" 88 8 88 32] _11 <- { _11 with current = ( ^ _10) ; };
[#"../06_knights_tour.rs" 88 8 88 46] _9 <- ([#"../06_knights_tour.rs" 88 8 88 46] index_mut1 _10 ([#"../06_knights_tour.rs" 88 33 88 45] UIntSize.of_int (IntSize.to_int ([#"../06_knights_tour.rs" 88 33 88 36] C06KnightsTour_Point_Type.point_y p))));
_10 <- any borrowed (Alloc_Vec_Vec_Type.t_vec usize (Alloc_Alloc_Global_Type.t_global));
goto BB2
}
BB2 {
- [#"../06_knights_tour.rs" 88 8 88 50] _9 <- { _9 with current = ([#"../06_knights_tour.rs" 88 49 88 50] v) };
+ [#"../06_knights_tour.rs" 88 8 88 50] _9 <- { _9 with current = ([#"../06_knights_tour.rs" 88 49 88 50] v) ; };
assume { resolve0 _9 };
[#"../06_knights_tour.rs" 88 8 88 50] _0 <- ([#"../06_knights_tour.rs" 88 8 88 50] ());
assume { resolve1 _11 };
@@ -1982,8 +1982,8 @@ module C06KnightsTour_Min
BB5 {
[#"../06_knights_tour.rs" 113 4 114 74] _17 <- Borrow.borrow_mut iter;
[#"../06_knights_tour.rs" 113 4 114 74] iter <- ^ _17;
- [#"../06_knights_tour.rs" 113 4 114 74] _16 <- Borrow.borrow_mut ( * _17);
- [#"../06_knights_tour.rs" 113 4 114 74] _17 <- { _17 with current = ^ _16 };
+ [#"../06_knights_tour.rs" 113 4 114 74] _16 <- Borrow.borrow_final ( * _17) (Borrow.get_id _17);
+ [#"../06_knights_tour.rs" 113 4 114 74] _17 <- { _17 with current = ( ^ _16) ; };
[#"../06_knights_tour.rs" 113 4 114 74] _15 <- ([#"../06_knights_tour.rs" 113 4 114 74] next0 _16);
_16 <- any borrowed (Core_Slice_Iter_Iter_Type.t_iter (usize, C06KnightsTour_Point_Type.t_point));
goto BB6
@@ -2697,8 +2697,8 @@ module C06KnightsTour_KnightsTour
BB10 {
[#"../06_knights_tour.rs" 142 4 142 36] _37 <- Borrow.borrow_mut iter;
[#"../06_knights_tour.rs" 142 4 142 36] iter <- ^ _37;
- [#"../06_knights_tour.rs" 142 4 142 36] _36 <- Borrow.borrow_mut ( * _37);
- [#"../06_knights_tour.rs" 142 4 142 36] _37 <- { _37 with current = ^ _36 };
+ [#"../06_knights_tour.rs" 142 4 142 36] _36 <- Borrow.borrow_final ( * _37) (Borrow.get_id _37);
+ [#"../06_knights_tour.rs" 142 4 142 36] _37 <- { _37 with current = ( ^ _36) ; };
[#"../06_knights_tour.rs" 142 4 142 36] _35 <- ([#"../06_knights_tour.rs" 142 4 142 36] next0 _36);
_36 <- any borrowed (Core_Ops_Range_Range_Type.t_range usize);
goto BB11
@@ -2772,8 +2772,8 @@ module C06KnightsTour_KnightsTour
BB26 {
[#"../06_knights_tour.rs" 148 8 149 54] _56 <- Borrow.borrow_mut iter1;
[#"../06_knights_tour.rs" 148 8 149 54] iter1 <- ^ _56;
- [#"../06_knights_tour.rs" 148 8 149 54] _55 <- Borrow.borrow_mut ( * _56);
- [#"../06_knights_tour.rs" 148 8 149 54] _56 <- { _56 with current = ^ _55 };
+ [#"../06_knights_tour.rs" 148 8 149 54] _55 <- Borrow.borrow_final ( * _56) (Borrow.get_id _56);
+ [#"../06_knights_tour.rs" 148 8 149 54] _56 <- { _56 with current = ( ^ _55) ; };
[#"../06_knights_tour.rs" 148 8 149 54] _54 <- ([#"../06_knights_tour.rs" 148 8 149 54] next1 _55);
_55 <- any borrowed (Alloc_Vec_IntoIter_IntoIter_Type.t_intoiter (isize, isize) (Alloc_Alloc_Global_Type.t_global));
goto BB27
diff --git a/creusot/tests/should_succeed/vector/06_knights_tour/why3session.xml b/creusot/tests/should_succeed/vector/06_knights_tour/why3session.xml
index add56cfbad..fb12057966 100644
--- a/creusot/tests/should_succeed/vector/06_knights_tour/why3session.xml
+++ b/creusot/tests/should_succeed/vector/06_knights_tour/why3session.xml
@@ -14,7 +14,7 @@
-
+
@@ -44,17 +44,17 @@
-
+
-
+
-
+
@@ -76,13 +76,13 @@
-
+
-
+
-
+
@@ -95,7 +95,7 @@
-
+
@@ -110,7 +110,7 @@
-
+
@@ -133,7 +133,7 @@
-
+
@@ -148,7 +148,7 @@
-
+
@@ -161,25 +161,25 @@
-
+
-
+
-
+
-
+
-
+
@@ -188,7 +188,7 @@
-
+
@@ -212,13 +212,13 @@
-
+
-
+
@@ -229,7 +229,7 @@
-
+
@@ -244,10 +244,10 @@
-
+
-
+
@@ -274,16 +274,16 @@
-
+
-
+
-
+
@@ -295,7 +295,7 @@
-
+
@@ -310,65 +310,65 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -383,7 +383,7 @@
-
+
@@ -398,7 +398,7 @@
-
+
@@ -421,7 +421,7 @@
-
+
@@ -436,7 +436,7 @@
-
+
@@ -449,28 +449,28 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/creusot/tests/should_succeed/vector/06_knights_tour/why3shapes.gz b/creusot/tests/should_succeed/vector/06_knights_tour/why3shapes.gz
index 3b10a1da72..b3db69bdbb 100644
Binary files a/creusot/tests/should_succeed/vector/06_knights_tour/why3shapes.gz and b/creusot/tests/should_succeed/vector/06_knights_tour/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/vector/07_read_write.mlcfg b/creusot/tests/should_succeed/vector/07_read_write.mlcfg
index 2328b99083..c285dd29e2 100644
--- a/creusot/tests/should_succeed/vector/07_read_write.mlcfg
+++ b/creusot/tests/should_succeed/vector/07_read_write.mlcfg
@@ -226,15 +226,15 @@ module C07ReadWrite_ReadWrite
goto BB0
}
BB0 {
- [#"../07_read_write.rs" 7 4 7 5] _7 <- Borrow.borrow_mut ( * a);
- [#"../07_read_write.rs" 7 4 7 5] a <- { a with current = ^ _7 };
+ [#"../07_read_write.rs" 7 4 7 5] _7 <- Borrow.borrow_final ( * a) (Borrow.get_id a);
+ [#"../07_read_write.rs" 7 4 7 5] a <- { a with current = ( ^ _7) ; };
assume { inv0 ( ^ _7) };
[#"../07_read_write.rs" 7 4 7 8] _6 <- ([#"../07_read_write.rs" 7 4 7 8] index_mut0 _7 ([#"../07_read_write.rs" 7 6 7 7] i));
_7 <- any borrowed (Alloc_Vec_Vec_Type.t_vec t (Alloc_Alloc_Global_Type.t_global));
goto BB1
}
BB1 {
- [#"../07_read_write.rs" 7 4 7 12] _6 <- { _6 with current = ([#"../07_read_write.rs" 7 11 7 12] x) };
+ [#"../07_read_write.rs" 7 4 7 12] _6 <- { _6 with current = ([#"../07_read_write.rs" 7 11 7 12] x) ; };
assert { [@expl:type invariant] inv1 ( * _6) };
assume { resolve0 ( * _6) };
assert { [@expl:type invariant] inv2 _6 };
diff --git a/creusot/tests/should_succeed/vector/07_read_write/why3session.xml b/creusot/tests/should_succeed/vector/07_read_write/why3session.xml
index 3c87d7f57d..75c56bc78a 100644
--- a/creusot/tests/should_succeed/vector/07_read_write/why3session.xml
+++ b/creusot/tests/should_succeed/vector/07_read_write/why3session.xml
@@ -7,7 +7,7 @@
-
+
diff --git a/creusot/tests/should_succeed/vector/07_read_write/why3shapes.gz b/creusot/tests/should_succeed/vector/07_read_write/why3shapes.gz
index 9a8d699ad5..9695344529 100644
Binary files a/creusot/tests/should_succeed/vector/07_read_write/why3shapes.gz and b/creusot/tests/should_succeed/vector/07_read_write/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/vector/08_haystack.mlcfg b/creusot/tests/should_succeed/vector/08_haystack.mlcfg
index 2c584347f7..1717568cab 100644
--- a/creusot/tests/should_succeed/vector/08_haystack.mlcfg
+++ b/creusot/tests/should_succeed/vector/08_haystack.mlcfg
@@ -503,8 +503,8 @@ module C08Haystack_Search
BB8 {
[#"../08_haystack.rs" 22 4 22 112] _26 <- Borrow.borrow_mut iter;
[#"../08_haystack.rs" 22 4 22 112] iter <- ^ _26;
- [#"../08_haystack.rs" 22 4 22 112] _25 <- Borrow.borrow_mut ( * _26);
- [#"../08_haystack.rs" 22 4 22 112] _26 <- { _26 with current = ^ _25 };
+ [#"../08_haystack.rs" 22 4 22 112] _25 <- Borrow.borrow_final ( * _26) (Borrow.get_id _26);
+ [#"../08_haystack.rs" 22 4 22 112] _26 <- { _26 with current = ( ^ _25) ; };
[#"../08_haystack.rs" 22 4 22 112] _24 <- ([#"../08_haystack.rs" 22 4 22 112] next0 _25);
_25 <- any borrowed (Core_Ops_Range_RangeInclusive_Type.t_rangeinclusive usize);
goto BB9
@@ -564,8 +564,8 @@ module C08Haystack_Search
BB20 {
[#"../08_haystack.rs" 24 8 24 68] _47 <- Borrow.borrow_mut iter1;
[#"../08_haystack.rs" 24 8 24 68] iter1 <- ^ _47;
- [#"../08_haystack.rs" 24 8 24 68] _46 <- Borrow.borrow_mut ( * _47);
- [#"../08_haystack.rs" 24 8 24 68] _47 <- { _47 with current = ^ _46 };
+ [#"../08_haystack.rs" 24 8 24 68] _46 <- Borrow.borrow_final ( * _47) (Borrow.get_id _47);
+ [#"../08_haystack.rs" 24 8 24 68] _47 <- { _47 with current = ( ^ _46) ; };
[#"../08_haystack.rs" 24 8 24 68] _45 <- ([#"../08_haystack.rs" 24 8 24 68] next1 _46);
_46 <- any borrowed (Core_Ops_Range_Range_Type.t_range usize);
goto BB21
diff --git a/creusot/tests/should_succeed/vector/08_haystack/why3session.xml b/creusot/tests/should_succeed/vector/08_haystack/why3session.xml
index 5868be5fd0..9f3b05c16d 100644
--- a/creusot/tests/should_succeed/vector/08_haystack/why3session.xml
+++ b/creusot/tests/should_succeed/vector/08_haystack/why3session.xml
@@ -11,10 +11,10 @@
-
+
-
+
@@ -38,82 +38,82 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/creusot/tests/should_succeed/vector/08_haystack/why3shapes.gz b/creusot/tests/should_succeed/vector/08_haystack/why3shapes.gz
index d06b439d3d..4ae38b4a90 100644
Binary files a/creusot/tests/should_succeed/vector/08_haystack/why3shapes.gz and b/creusot/tests/should_succeed/vector/08_haystack/why3shapes.gz differ
diff --git a/creusot/tests/should_succeed/vector/09_capacity.mlcfg b/creusot/tests/should_succeed/vector/09_capacity.mlcfg
index b96cbd31c6..04ad62229f 100644
--- a/creusot/tests/should_succeed/vector/09_capacity.mlcfg
+++ b/creusot/tests/should_succeed/vector/09_capacity.mlcfg
@@ -140,7 +140,7 @@ module C09Capacity_ChangeCapacity
}
BB0 {
[#"../09_capacity.rs" 7 4 7 18] _5 <- Borrow.borrow_mut ( * v);
- [#"../09_capacity.rs" 7 4 7 18] v <- { v with current = ^ _5 };
+ [#"../09_capacity.rs" 7 4 7 18] v <- { v with current = ( ^ _5) ; };
assume { inv0 ( ^ _5) };
[#"../09_capacity.rs" 7 4 7 18] _4 <- ([#"../09_capacity.rs" 7 4 7 18] reserve0 _5 ([#"../09_capacity.rs" 7 14 7 17] [#"../09_capacity.rs" 7 14 7 17] (100 : usize)));
_5 <- any borrowed (Alloc_Vec_Vec_Type.t_vec t (Alloc_Alloc_Global_Type.t_global));
@@ -148,7 +148,7 @@ module C09Capacity_ChangeCapacity
}
BB1 {
[#"../09_capacity.rs" 8 4 8 24] _7 <- Borrow.borrow_mut ( * v);
- [#"../09_capacity.rs" 8 4 8 24] v <- { v with current = ^ _7 };
+ [#"../09_capacity.rs" 8 4 8 24] v <- { v with current = ( ^ _7) ; };
assume { inv0 ( ^ _7) };
[#"../09_capacity.rs" 8 4 8 24] _6 <- ([#"../09_capacity.rs" 8 4 8 24] reserve_exact0 _7 ([#"../09_capacity.rs" 8 20 8 23] [#"../09_capacity.rs" 8 20 8 23] (200 : usize)));
_7 <- any borrowed (Alloc_Vec_Vec_Type.t_vec t (Alloc_Alloc_Global_Type.t_global));
@@ -156,15 +156,15 @@ module C09Capacity_ChangeCapacity
}
BB2 {
[#"../09_capacity.rs" 9 4 9 21] _9 <- Borrow.borrow_mut ( * v);
- [#"../09_capacity.rs" 9 4 9 21] v <- { v with current = ^ _9 };
+ [#"../09_capacity.rs" 9 4 9 21] v <- { v with current = ( ^ _9) ; };
assume { inv0 ( ^ _9) };
[#"../09_capacity.rs" 9 4 9 21] _8 <- ([#"../09_capacity.rs" 9 4 9 21] shrink_to_fit0 _9);
_9 <- any borrowed (Alloc_Vec_Vec_Type.t_vec t (Alloc_Alloc_Global_Type.t_global));
goto BB3
}
BB3 {
- [#"../09_capacity.rs" 10 4 10 18] _11 <- Borrow.borrow_mut ( * v);
- [#"../09_capacity.rs" 10 4 10 18] v <- { v with current = ^ _11 };
+ [#"../09_capacity.rs" 10 4 10 18] _11 <- Borrow.borrow_final ( * v) (Borrow.get_id v);
+ [#"../09_capacity.rs" 10 4 10 18] v <- { v with current = ( ^ _11) ; };
assume { inv0 ( ^ _11) };
[#"../09_capacity.rs" 10 4 10 18] _10 <- ([#"../09_capacity.rs" 10 4 10 18] shrink_to0 _11 ([#"../09_capacity.rs" 10 16 10 17] [#"../09_capacity.rs" 10 16 10 17] (1 : usize)));
_11 <- any borrowed (Alloc_Vec_Vec_Type.t_vec t (Alloc_Alloc_Global_Type.t_global));
@@ -246,8 +246,8 @@ module C09Capacity_ClearVec
goto BB0
}
BB0 {
- [#"../09_capacity.rs" 15 4 15 13] _4 <- Borrow.borrow_mut ( * v);
- [#"../09_capacity.rs" 15 4 15 13] v <- { v with current = ^ _4 };
+ [#"../09_capacity.rs" 15 4 15 13] _4 <- Borrow.borrow_final ( * v) (Borrow.get_id v);
+ [#"../09_capacity.rs" 15 4 15 13] v <- { v with current = ( ^ _4) ; };
assume { inv0 ( ^ _4) };
[#"../09_capacity.rs" 15 4 15 13] _3 <- ([#"../09_capacity.rs" 15 4 15 13] clear0 _4);
_4 <- any borrowed (Alloc_Vec_Vec_Type.t_vec t (Alloc_Alloc_Global_Type.t_global));
diff --git a/creusot/tests/should_succeed/vector/09_capacity/why3session.xml b/creusot/tests/should_succeed/vector/09_capacity/why3session.xml
index d8f84d654d..1d5dff960a 100644
--- a/creusot/tests/should_succeed/vector/09_capacity/why3session.xml
+++ b/creusot/tests/should_succeed/vector/09_capacity/why3session.xml
@@ -7,12 +7,12 @@
-
+
-
+
diff --git a/creusot/tests/should_succeed/vector/09_capacity/why3shapes.gz b/creusot/tests/should_succeed/vector/09_capacity/why3shapes.gz
index a6b15b23dc..1ca694e5c6 100644
Binary files a/creusot/tests/should_succeed/vector/09_capacity/why3shapes.gz and b/creusot/tests/should_succeed/vector/09_capacity/why3shapes.gz differ
diff --git a/prelude/prelude.mlw b/prelude/prelude.mlw
index 606956402a..a132033874 100644
--- a/prelude/prelude.mlw
+++ b/prelude/prelude.mlw
@@ -46,7 +46,8 @@ module Borrow
type borrowed 'a = { current : 'a; final : 'a; id : int }
let function ( *_ ) x = x.current
let function ( ^_ ) x = x.final
- let function get_id x = x.id
+ let function get_id (x : borrowed 'a) = x.id
+ let function borrow_logic (cur fin : 'a) (id : int) = { current = cur; final = fin; id = id; }
val borrow_mut (a : 'a) : borrowed 'a
ensures { *result = a }
val function inherit_id (old_id inherit_path: int) : int