From d285d5a3e777eef5be98d767d72cb36c4d41784f Mon Sep 17 00:00:00 2001 From: arnaudgolfouse Date: Tue, 3 Dec 2024 15:52:13 +0100 Subject: [PATCH] Update tests --- creusot/tests/should_fail/bug/436_0.stderr | 2 +- creusot/tests/should_succeed/100doors.coma | 4 +- creusot/tests/should_succeed/bug/545.coma | 6 +-- .../should_succeed/bug/545/why3session.xml | 2 +- .../should_succeed/bug/545/why3shapes.gz | Bin 108 -> 101 bytes creusot/tests/should_succeed/bug/682.coma | 32 +++++++++----- .../should_succeed/bug/682/why3session.xml | 8 ++-- .../should_succeed/bug/682/why3shapes.gz | Bin 249 -> 247 bytes .../should_succeed/bug/final_borrows.coma | 8 ++-- .../tests/should_succeed/bug/two_phase.coma | 4 +- creusot/tests/should_succeed/cell/01.coma | 6 ++- .../should_succeed/cell/01/why3shapes.gz | Bin 202 -> 202 bytes creusot/tests/should_succeed/cell/02.coma | 4 +- .../tests/should_succeed/filter_positive.coma | 4 +- .../tests/should_succeed/ghost/ghost_vec.coma | 2 +- creusot/tests/should_succeed/hashmap.coma | 20 ++++----- .../should_succeed/heapsort_generic.coma | 8 ++-- creusot/tests/should_succeed/hillel.coma | 36 ++++++++-------- creusot/tests/should_succeed/index_range.coma | 24 +++++------ .../tests/should_succeed/insertion_sort.coma | 8 ++-- .../should_succeed/iterators/02_iter_mut.coma | 36 ++++++++-------- .../iterators/03_std_iterators.coma | 36 ++++++++-------- .../should_succeed/iterators/04_skip.coma | 4 +- .../iterators/08_collect_extend.coma | 4 +- .../should_succeed/iterators/17_filter.coma | 8 ++-- creusot/tests/should_succeed/knapsack.coma | 8 ++-- .../tests/should_succeed/knapsack_full.coma | 10 ++--- .../should_succeed/list_reversal_lasso.coma | 40 +++++++++--------- creusot/tests/should_succeed/mc91.coma | 10 ++++- .../tests/should_succeed/mc91/why3session.xml | 4 +- .../tests/should_succeed/mc91/why3shapes.gz | Bin 209 -> 217 bytes creusot/tests/should_succeed/mutex.coma | 12 ++++-- .../tests/should_succeed/mutex/why3shapes.gz | Bin 418 -> 417 bytes .../selection_sort_generic.coma | 4 +- creusot/tests/should_succeed/slices/01.coma | 8 ++-- .../tests/should_succeed/slices/02_std.coma | 4 +- .../tests/should_succeed/sparse_array.coma | 28 ++++++------ .../should_succeed/syntax/11_array_types.coma | 4 +- .../should_succeed/syntax/13_vec_macro.coma | 4 +- .../syntax/derive_macros/mixed.coma | 8 ++-- .../should_succeed/syntax/int_suffix.coma | 2 +- .../tests/should_succeed/take_first_mut.coma | 4 +- creusot/tests/should_succeed/trigger2.coma | 8 ++-- .../type_invariants/vec_inv.coma | 4 +- creusot/tests/should_succeed/vector/01.coma | 4 +- .../tests/should_succeed/vector/02_gnome.coma | 4 +- .../vector/04_binary_search.coma | 4 +- .../vector/05_binary_search_generic.coma | 4 +- .../vector/06_knights_tour.coma | 36 ++++++++-------- .../should_succeed/vector/08_haystack.coma | 4 +- .../should_succeed/vector/09_capacity.coma | 4 +- 51 files changed, 255 insertions(+), 233 deletions(-) diff --git a/creusot/tests/should_fail/bug/436_0.stderr b/creusot/tests/should_fail/bug/436_0.stderr index 7f70e70fa4..1ed777cd7b 100644 --- a/creusot/tests/should_fail/bug/436_0.stderr +++ b/creusot/tests/should_fail/bug/436_0.stderr @@ -1,7 +1,7 @@ error: called prophetic logic function `prophecy` in logic context --> 436_0.rs:15:23 | -15 | b.g = snapshot! { prophecy(b) + 1i32 }; +15 | b.g = snapshot! { prophecy(b) + 1 }; | ^^^^^^^^ error: aborting due to 1 previous error diff --git a/creusot/tests/should_succeed/100doors.coma b/creusot/tests/should_succeed/100doors.coma index f61a8065d5..b633da86ef 100644 --- a/creusot/tests/should_succeed/100doors.coma +++ b/creusot/tests/should_succeed/100doors.coma @@ -26,7 +26,7 @@ module M_100doors__f [#"100doors.rs" 18 0 18 10] let%span svec24 = "../../../creusot-contracts/src/std/vec.rs" 154 26 154 57 let%span svec25 = "../../../creusot-contracts/src/std/vec.rs" 155 26 155 62 let%span svec26 = "../../../creusot-contracts/src/std/vec.rs" 156 26 156 55 - let%span sops27 = "../../../creusot-contracts/src/logic/ops.rs" 22 8 22 31 + let%span sindex27 = "../../../creusot-contracts/src/logic/ops/index.rs" 23 8 23 31 let%span siter28 = "../../../creusot-contracts/src/std/iter.rs" 86 20 86 24 let%span siter29 = "../../../creusot-contracts/src/std/iter.rs" 92 8 92 19 let%span srange30 = "../../../creusot-contracts/src/std/iter/range.rs" 33 15 33 24 @@ -90,7 +90,7 @@ module M_100doors__f [#"100doors.rs" 18 0 18 10] use seq.Seq function index_logic'0 [@inline:trivial] (self : t_Vec'0) (ix : int) : bool = - [%#sops27] Seq.get (view'0 self) ix + [%#sindex27] Seq.get (view'0 self) ix let rec from_elem'0 (elem:bool) (n:usize) (return' (ret:t_Vec'0))= {[@expl:from_elem 'elem' type invariant] inv'2 elem} any diff --git a/creusot/tests/should_succeed/bug/545.coma b/creusot/tests/should_succeed/bug/545.coma index 4db4c532b5..b81b30661c 100644 --- a/creusot/tests/should_succeed/bug/545.coma +++ b/creusot/tests/should_succeed/bug/545.coma @@ -1,7 +1,5 @@ module M_545__negative_is_negative [#"545.rs" 4 0 4 29] - let%span s5450 = "545.rs" 5 18 5 32 - - use prelude.prelude.Int32 + let%span s5450 = "545.rs" 5 18 5 26 use prelude.prelude.Int @@ -10,6 +8,6 @@ module M_545__negative_is_negative [#"545.rs" 4 0 4 29] meta "compute_max_steps" 1000000 let rec negative_is_negative'0 (_1:()) (return' (ret:()))= (! bb0 - [ bb0 = s0 [ s0 = {[@expl:assertion] [%#s5450] (0 : int32) > (-100 : int32)} s1 | s1 = return' {_0} ] ] + [ bb0 = s0 [ s0 = {[@expl:assertion] [%#s5450] 0 > - 100} s1 | s1 = return' {_0} ] ] ) [ & _0 : () = any_l () ] [ return' (result:())-> (! return' {result}) ] end diff --git a/creusot/tests/should_succeed/bug/545/why3session.xml b/creusot/tests/should_succeed/bug/545/why3session.xml index 3da0b4cb10..3cd235676d 100644 --- a/creusot/tests/should_succeed/bug/545/why3session.xml +++ b/creusot/tests/should_succeed/bug/545/why3session.xml @@ -6,7 +6,7 @@ - + diff --git a/creusot/tests/should_succeed/bug/545/why3shapes.gz b/creusot/tests/should_succeed/bug/545/why3shapes.gz index aa29824d3266e47cb0db818de083d75750815c4c..0188dc9cb08d222d89525e670d83ba18df7d8ab0 100644 GIT binary patch delta 69 zcmV-L0J{HdWsoI6Hb~YrG%(;w%`GUYj0Y>?;xbA#N=dd%GPX1~HZ@5#OEEV|F-kH? bOiHw{G%zzZuv9SgFyI0JpuO5BQ~&?~b50mi delta 76 zcmYeznV{;fbF%;Z8EsFq2E!6wUY;F6#oS(6j}J!e*x}O~>~rR9uurcKkT^5RN2oXG gtj=WJpk7_xGnaTKO%ma;<=MfY!elO)#K6D+0J6v&bpQYW diff --git a/creusot/tests/should_succeed/bug/682.coma b/creusot/tests/should_succeed/bug/682.coma index 628e011596..890d34a4c5 100644 --- a/creusot/tests/should_succeed/bug/682.coma +++ b/creusot/tests/should_succeed/bug/682.coma @@ -1,29 +1,35 @@ module M_682__add_some [#"682.rs" 6 0 6 24] let%span s6820 = "682.rs" 7 10 7 11 - let%span s6821 = "682.rs" 4 11 4 32 + let%span s6821 = "682.rs" 4 11 4 35 let%span s6822 = "682.rs" 5 10 5 17 - let%span sresolve3 = "../../../../creusot-contracts/src/resolve.rs" 54 20 54 34 + let%span sarithmetic3 = "../../../../creusot-contracts/src/logic/ops/arithmetic.rs" 92 28 92 42 + let%span sresolve4 = "../../../../creusot-contracts/src/resolve.rs" 54 20 54 34 use prelude.prelude.UInt64 use prelude.prelude.Borrow predicate resolve'1 (self : borrowed uint64) = - [%#sresolve3] self.final = self.current + [%#sresolve4] self.final = self.current predicate resolve'0 (_1 : borrowed uint64) = resolve'1 _1 use prelude.prelude.Intrinsic + use prelude.prelude.UInt64 + constant v_MAX'0 : uint64 = (18446744073709551615 : uint64) use prelude.prelude.Int + function div'0 (self : uint64) (other : uint64) : int = + [%#sarithmetic3] div (UInt64.to_int self) (UInt64.to_int other) + meta "compute_max_steps" 1000000 - let rec add_some'0 (a:borrowed uint64) (return' (ret:()))= {[@expl:add_some requires] [%#s6821] a.current - <= div (v_MAX'0 : uint64) (2 : uint64)} + let rec add_some'0 (a:borrowed uint64) (return' (ret:()))= {[@expl:add_some requires] [%#s6821] UInt64.to_int a.current + <= div'0 (v_MAX'0 : uint64) (2 : uint64)} (! bb0 [ bb0 = s0 [ s0 = UInt64.add {a.current} {[%#s6820] (1 : uint64)} @@ -40,9 +46,10 @@ module M_682__foo [#"682.rs" 12 0 12 23] let%span s6821 = "682.rs" 15 18 15 27 let%span s6822 = "682.rs" 10 11 10 21 let%span s6823 = "682.rs" 11 10 11 17 - let%span s6824 = "682.rs" 4 11 4 32 + let%span s6824 = "682.rs" 4 11 4 35 let%span s6825 = "682.rs" 5 10 5 17 - let%span sresolve6 = "../../../../creusot-contracts/src/resolve.rs" 54 20 54 34 + let%span sarithmetic6 = "../../../../creusot-contracts/src/logic/ops/arithmetic.rs" 92 28 92 42 + let%span sresolve7 = "../../../../creusot-contracts/src/resolve.rs" 54 20 54 34 use prelude.prelude.Borrow @@ -50,16 +57,21 @@ module M_682__foo [#"682.rs" 12 0 12 23] use prelude.prelude.UInt64 + use prelude.prelude.UInt64 + constant v_MAX'0 : uint64 = (18446744073709551615 : uint64) use prelude.prelude.Int - let rec add_some'0 (a:borrowed uint64) (return' (ret:()))= {[@expl:add_some requires] [%#s6824] a.current - <= div (v_MAX'0 : uint64) (2 : uint64)} + function div'0 (self : uint64) (other : uint64) : int = + [%#sarithmetic6] div (UInt64.to_int self) (UInt64.to_int other) + + let rec add_some'0 (a:borrowed uint64) (return' (ret:()))= {[@expl:add_some requires] [%#s6824] UInt64.to_int a.current + <= div'0 (v_MAX'0 : uint64) (2 : uint64)} any [ return' (result:())-> {[%#s6825] a.final > a.current} (! return' {result}) ] predicate resolve'1 (self : borrowed uint64) = - [%#sresolve6] self.final = self.current + [%#sresolve7] self.final = self.current predicate resolve'0 (_1 : borrowed uint64) = resolve'1 _1 diff --git a/creusot/tests/should_succeed/bug/682/why3session.xml b/creusot/tests/should_succeed/bug/682/why3session.xml index f21977ed1c..f7e906ff8a 100644 --- a/creusot/tests/should_succeed/bug/682/why3session.xml +++ b/creusot/tests/should_succeed/bug/682/why3session.xml @@ -6,13 +6,13 @@ - - + + - - + + diff --git a/creusot/tests/should_succeed/bug/682/why3shapes.gz b/creusot/tests/should_succeed/bug/682/why3shapes.gz index 2821fcbf164e7db4fd3a1574b282d21ac577be23..a2354c5dfccee9ed61b603363f16fbb40cc498c3 100644 GIT binary patch literal 247 zcmVqggbi8{X_uf6M`0#;88u&zM@G(4d#aE9EUvZ4B4OBK1Yet9T_|^V2yQ4}qQyOsteF&5=(E0z3mu9~%-4p-vv>CN|&6rzTi-xEGkV2Od xopQSDwblyrH4qnDV4cRkL+PN;Md_f>g)yXEuD~jr8^gs`vTrP0g*x#80069%b({bI literal 249 zcmV?&M@j^=A;xeeo18vtIXj%aQJcH7mhij?xeF+(5}a?^aPhYPi`&E7X1TR)oW!wt zFF%smpejbE^YGRDwERb{az<)7EuHri!PE8e_RFwemmaNhd*)1HS}|sHm!e29H+d(O z6;|m&XIZK+MJq+Y {[%#s014] inv'1 result} {[%#s015] inv'2 result} (! return' {result}) ] diff --git a/creusot/tests/should_succeed/cell/01/why3shapes.gz b/creusot/tests/should_succeed/cell/01/why3shapes.gz index 99b9bee6604b7aff518737fc4e286a640884996e..6b7e395ebfcb85b7bab3a740d41b17fecc08b3d3 100644 GIT binary patch literal 202 zcmV;*05$&~iwFP!00000|80=D4#F@HM0r1Etw)N#KRgQBjE6|M!@CAgpzr>&4~-w zHx#aK$Tu&J%)1>v1NeJ_FUni+t zU#?tVF27!qm{&Wzv*jOzoJ?5=agQR1O>vA%Km=rh8P1`EV@`R>(l7<`0j&5(Ttfi> E00`z)6951J diff --git a/creusot/tests/should_succeed/cell/02.coma b/creusot/tests/should_succeed/cell/02.coma index 980f8e2b7d..c515e97a4f 100644 --- a/creusot/tests/should_succeed/cell/02.coma +++ b/creusot/tests/should_succeed/cell/02.coma @@ -88,7 +88,7 @@ module M_02__fib_memo [#"02.rs" 95 0 95 50] let%span sslice30 = "../../../../creusot-contracts/src/std/slice.rs" 122 20 122 37 let%span sslice31 = "../../../../creusot-contracts/src/std/slice.rs" 129 20 129 37 let%span s0232 = "02.rs" 72 12 75 13 - let%span sops33 = "../../../../creusot-contracts/src/logic/ops.rs" 22 8 22 31 + let%span sindex33 = "../../../../creusot-contracts/src/logic/ops/index.rs" 23 8 23 31 let%span svec34 = "../../../../creusot-contracts/src/std/vec.rs" 18 14 18 41 use prelude.prelude.Borrow @@ -236,7 +236,7 @@ module M_02__fib_memo [#"02.rs" 95 0 95 50] use prelude.prelude.Snapshot function index_logic'0 [@inline:trivial] (self : t_Vec'0) (ix : int) : t_Cell'0 = - [%#sops33] Seq.get (view'1 self) ix + [%#sindex33] Seq.get (view'1 self) ix predicate fib_cell'0 [#"02.rs" 84 0 84 32] (v : t_Vec'0) = [%#s0228] forall i : int . UIntSize.to_int ((index_logic'0 v i).t_Cell__ghost_inv'0).t_Fib__ix'0 = i diff --git a/creusot/tests/should_succeed/filter_positive.coma b/creusot/tests/should_succeed/filter_positive.coma index 807d00bb9c..1e0a6ba925 100644 --- a/creusot/tests/should_succeed/filter_positive.coma +++ b/creusot/tests/should_succeed/filter_positive.coma @@ -160,7 +160,7 @@ module M_filter_positive__m [#"filter_positive.rs" 82 0 82 33] let%span smodel39 = "../../../creusot-contracts/src/model.rs" 88 8 88 22 let%span sslice40 = "../../../creusot-contracts/src/std/slice.rs" 122 20 122 37 let%span sslice41 = "../../../creusot-contracts/src/std/slice.rs" 129 20 129 37 - let%span sops42 = "../../../creusot-contracts/src/logic/ops.rs" 22 8 22 31 + let%span sindex42 = "../../../creusot-contracts/src/logic/ops/index.rs" 23 8 23 31 let%span smodel43 = "../../../creusot-contracts/src/model.rs" 106 8 106 22 let%span sslice44 = "../../../creusot-contracts/src/std/slice.rs" 136 20 136 94 let%span sresolve45 = "../../../creusot-contracts/src/resolve.rs" 54 20 54 34 @@ -257,7 +257,7 @@ module M_filter_positive__m [#"filter_positive.rs" 82 0 82 33] axiom inv_axiom'4 [@rewrite] : forall x : t_Vec'0 [inv'4 x] . inv'4 x = true function index_logic'0 [@inline:trivial] (self : t_Vec'0) (ix : int) : int32 = - [%#sops42] Seq.get (view'0 self) ix + [%#sindex42] Seq.get (view'0 self) ix let rec from_elem'0 (elem:int32) (n:usize) (return' (ret:t_Vec'0))= {[@expl:from_elem 'elem' type invariant] inv'3 elem} any diff --git a/creusot/tests/should_succeed/ghost/ghost_vec.coma b/creusot/tests/should_succeed/ghost/ghost_vec.coma index 71ff1072aa..d7d4f155ed 100644 --- a/creusot/tests/should_succeed/ghost/ghost_vec.coma +++ b/creusot/tests/should_succeed/ghost/ghost_vec.coma @@ -43,7 +43,7 @@ module M_ghost_vec__ghost_vec [#"ghost_vec.rs" 4 0 4 18] let%span sghost41 = "../../../../creusot-contracts/src/ghost.rs" 68 14 68 35 let%span sseq42 = "../../../../creusot-contracts/src/logic/seq.rs" 445 22 445 26 let%span sseq43 = "../../../../creusot-contracts/src/logic/seq.rs" 444 14 444 34 - let%span sint44 = "../../../../creusot-contracts/src/logic/int.rs" 59 14 59 31 + let%span sint44 = "../../../../creusot-contracts/src/logic/int.rs" 60 14 60 31 let%span sghost45 = "../../../../creusot-contracts/src/ghost.rs" 199 22 199 26 let%span sghost46 = "../../../../creusot-contracts/src/ghost.rs" 199 4 199 32 let%span sghost47 = "../../../../creusot-contracts/src/ghost.rs" 197 14 197 31 diff --git a/creusot/tests/should_succeed/hashmap.coma b/creusot/tests/should_succeed/hashmap.coma index 8b56ee3690..cee42e48af 100644 --- a/creusot/tests/should_succeed/hashmap.coma +++ b/creusot/tests/should_succeed/hashmap.coma @@ -47,7 +47,7 @@ module M_hashmap__qyi7664122466964245986__new [#"hashmap.rs" 116 4 116 46] (* My let%span svec4 = "../../../creusot-contracts/src/std/vec.rs" 181 22 181 76 let%span shashmap5 = "hashmap.rs" 80 8 80 33 let%span svec6 = "../../../creusot-contracts/src/std/vec.rs" 18 14 18 41 - let%span sops7 = "../../../creusot-contracts/src/logic/ops.rs" 22 8 22 31 + let%span sindex7 = "../../../creusot-contracts/src/logic/ops/index.rs" 23 8 23 31 let%span shashmap8 = "hashmap.rs" 86 8 86 53 let%span shashmap9 = "hashmap.rs" 31 12 34 13 let%span shashmap10 = "hashmap.rs" 107 12 108 139 @@ -142,7 +142,7 @@ module M_hashmap__qyi7664122466964245986__new [#"hashmap.rs" 116 4 116 46] (* My use seq.Seq function index_logic'0 [@inline:trivial] (self : t_Vec'0) (ix : int) : t_List'0 = - [%#sops7] Seq.get (view'1 self) ix + [%#sindex7] Seq.get (view'1 self) ix let rec from_elem'0 (elem:t_List'0) (n:usize) (return' (ret:t_Vec'0))= {[@expl:from_elem 'elem' type invariant] inv'1 elem} any @@ -279,7 +279,7 @@ module M_hashmap__qyi7664122466964245986__add [#"hashmap.rs" 122 4 122 41] (* My let%span svec37 = "../../../creusot-contracts/src/std/vec.rs" 65 20 65 41 let%span sinvariant38 = "../../../creusot-contracts/src/invariant.rs" 34 20 34 44 let%span sboxed39 = "../../../creusot-contracts/src/std/boxed.rs" 28 8 28 18 - let%span sops40 = "../../../creusot-contracts/src/logic/ops.rs" 22 8 22 31 + let%span sindex40 = "../../../creusot-contracts/src/logic/ops/index.rs" 23 8 23 31 let%span sinvariant41 = "../../../creusot-contracts/src/invariant.rs" 24 8 24 18 let%span sseq42 = "../../../creusot-contracts/src/logic/seq.rs" 611 20 611 95 let%span shashmap43 = "hashmap.rs" 107 12 108 139 @@ -548,7 +548,7 @@ module M_hashmap__qyi7664122466964245986__add [#"hashmap.rs" 122 4 122 41] (* My resolve'8 _1 function index_logic'0 [@inline:trivial] (self : t_Vec'0) (ix : int) : t_List'0 = - [%#sops40] Seq.get (view'4 self) ix + [%#sindex40] Seq.get (view'4 self) ix predicate invariant'11 [#"hashmap.rs" 105 4 105 30] (self : t_MyHashMap'0) = [%#shashmap43] 0 < Seq.length (view'4 self.t_MyHashMap__buckets'0) @@ -827,7 +827,7 @@ module M_hashmap__qyi7664122466964245986__get [#"hashmap.rs" 154 4 154 43] (* My let%span sslice17 = "../../../creusot-contracts/src/std/slice.rs" 122 20 122 37 let%span sslice18 = "../../../creusot-contracts/src/std/slice.rs" 129 20 129 37 let%span shashmap19 = "hashmap.rs" 91 20 91 66 - let%span sops20 = "../../../creusot-contracts/src/logic/ops.rs" 22 8 22 31 + let%span sindex20 = "../../../creusot-contracts/src/logic/ops/index.rs" 23 8 23 31 let%span shashmap21 = "hashmap.rs" 80 8 80 33 let%span svec22 = "../../../creusot-contracts/src/std/vec.rs" 18 14 18 41 let%span sinvariant23 = "../../../creusot-contracts/src/invariant.rs" 24 8 24 18 @@ -997,7 +997,7 @@ module M_hashmap__qyi7664122466964245986__get [#"hashmap.rs" 154 4 154 43] (* My [%#shashmap19] EuclideanDivision.mod (hash_log'0 k) (Seq.length (view'3 self.t_MyHashMap__buckets'0)) function index_logic'0 [@inline:trivial] (self : t_Vec'0) (ix : int) : t_List'0 = - [%#sops20] Seq.get (view'3 self) ix + [%#sindex20] Seq.get (view'3 self) ix function bucket'0 [#"hashmap.rs" 85 4 85 54] (self : t_MyHashMap'0) (k : t_DeepModelTy'0) : t_List'0 = [%#shashmap12] index_logic'0 self.t_MyHashMap__buckets'0 (bucket_ix'0 self k) @@ -1185,7 +1185,7 @@ module M_hashmap__qyi7664122466964245986__resize [#"hashmap.rs" 173 4 173 24] (* let%span shashmap24 = "hashmap.rs" 116 31 116 46 let%span shashmap25 = "hashmap.rs" 115 14 115 62 let%span svec26 = "../../../creusot-contracts/src/std/vec.rs" 18 14 18 41 - let%span sops27 = "../../../creusot-contracts/src/logic/ops.rs" 22 8 22 31 + let%span sindex27 = "../../../creusot-contracts/src/logic/ops/index.rs" 23 8 23 31 let%span shashmap28 = "hashmap.rs" 91 20 91 66 let%span shashmap29 = "hashmap.rs" 80 8 80 33 let%span ssnapshot30 = "../../../creusot-contracts/src/snapshot.rs" 52 20 52 39 @@ -1323,7 +1323,7 @@ module M_hashmap__qyi7664122466964245986__resize [#"hashmap.rs" 173 4 173 24] (* use seq.Seq function index_logic'0 [@inline:trivial] (self : t_Vec'0) (ix : int) : t_List'0 = - [%#sops27] Seq.get (view'0 self) ix + [%#sindex27] Seq.get (view'0 self) ix type t_DeepModelTy'0 @@ -1720,7 +1720,7 @@ module M_hashmap__main [#"hashmap.rs" 213 0 213 13] let%span shashmap34 = "hashmap.rs" 31 12 34 13 let%span shashmap35 = "hashmap.rs" 107 12 108 139 let%span shashmap36 = "hashmap.rs" 91 20 91 66 - let%span sops37 = "../../../creusot-contracts/src/logic/ops.rs" 22 8 22 31 + let%span sindex37 = "../../../creusot-contracts/src/logic/ops/index.rs" 23 8 23 31 let%span sinvariant38 = "../../../creusot-contracts/src/invariant.rs" 24 8 24 18 let%span svec39 = "../../../creusot-contracts/src/std/vec.rs" 18 14 18 41 let%span shashmap40 = "hashmap.rs" 97 12 97 91 @@ -1773,7 +1773,7 @@ module M_hashmap__main [#"hashmap.rs" 213 0 213 13] use seq.Seq function index_logic'0 [@inline:trivial] (self : t_Vec'0) (ix : int) : t_List'0 = - [%#sops37] Seq.get (view'3 self) ix + [%#sindex37] Seq.get (view'3 self) ix type t_Option'1 = | C_None'0 diff --git a/creusot/tests/should_succeed/heapsort_generic.coma b/creusot/tests/should_succeed/heapsort_generic.coma index 7cd87cf096..241a95d985 100644 --- a/creusot/tests/should_succeed/heapsort_generic.coma +++ b/creusot/tests/should_succeed/heapsort_generic.coma @@ -136,7 +136,7 @@ module M_heapsort_generic__sift_down [#"heapsort_generic.rs" 41 0 43 29] let%span sheapsort_generic23 = "heapsort_generic.rs" 11 4 11 19 let%span smodel24 = "../../../creusot-contracts/src/model.rs" 97 8 97 28 let%span smodel25 = "../../../creusot-contracts/src/model.rs" 106 8 106 22 - let%span sops26 = "../../../creusot-contracts/src/logic/ops.rs" 22 8 22 31 + let%span sindex26 = "../../../creusot-contracts/src/logic/ops/index.rs" 23 8 23 31 let%span ssnapshot27 = "../../../creusot-contracts/src/snapshot.rs" 52 20 52 39 let%span sseq28 = "../../../creusot-contracts/src/logic/seq.rs" 316 8 316 41 let%span svec29 = "../../../creusot-contracts/src/std/vec.rs" 162 27 162 46 @@ -232,7 +232,7 @@ module M_heapsort_generic__sift_down [#"heapsort_generic.rs" 41 0 43 29] use seq.Seq function index_logic'0 [@inline:trivial] (self : t_Vec'0) (ix : int) : t_T'0 = - [%#sops26] Seq.get (view'2 self) ix + [%#sindex26] Seq.get (view'2 self) ix function deep_model'3 (self : t_T'0) : t_DeepModelTy'0 @@ -668,7 +668,7 @@ module M_heapsort_generic__heap_sort [#"heapsort_generic.rs" 94 0 96 29] let%span svec51 = "../../../creusot-contracts/src/std/vec.rs" 18 14 18 41 let%span smodel52 = "../../../creusot-contracts/src/model.rs" 88 8 88 22 let%span sheapsort_generic53 = "heapsort_generic.rs" 11 4 11 19 - let%span sops54 = "../../../creusot-contracts/src/logic/ops.rs" 22 8 22 31 + let%span sindex54 = "../../../creusot-contracts/src/logic/ops/index.rs" 23 8 23 31 let%span sord55 = "../../../creusot-contracts/src/logic/ord.rs" 29 14 29 64 let%span sord56 = "../../../creusot-contracts/src/logic/ord.rs" 40 14 40 61 let%span sord57 = "../../../creusot-contracts/src/logic/ord.rs" 51 14 51 61 @@ -785,7 +785,7 @@ module M_heapsort_generic__heap_sort [#"heapsort_generic.rs" 94 0 96 29] use seq.Seq function index_logic'0 [@inline:trivial] (self : t_Vec'0) (ix : int) : t_T'0 = - [%#sops54] Seq.get (view'2 self) ix + [%#sindex54] Seq.get (view'2 self) ix function deep_model'2 (self : t_T'0) : t_DeepModelTy'0 diff --git a/creusot/tests/should_succeed/hillel.coma b/creusot/tests/should_succeed/hillel.coma index 64c06a9fb7..ad80df120c 100644 --- a/creusot/tests/should_succeed/hillel.coma +++ b/creusot/tests/should_succeed/hillel.coma @@ -15,7 +15,7 @@ module M_hillel__right_pad [#"hillel.rs" 17 0 17 59] let%span shillel13 = "hillel.rs" 16 10 16 73 let%span ssnapshot14 = "../../../creusot-contracts/src/snapshot.rs" 52 20 52 39 let%span smodel15 = "../../../creusot-contracts/src/model.rs" 106 8 106 22 - let%span sops16 = "../../../creusot-contracts/src/logic/ops.rs" 22 8 22 31 + let%span sindex16 = "../../../creusot-contracts/src/logic/ops/index.rs" 23 8 23 31 let%span svec17 = "../../../creusot-contracts/src/std/vec.rs" 83 26 83 48 let%span svec18 = "../../../creusot-contracts/src/std/vec.rs" 87 26 87 56 let%span svec19 = "../../../creusot-contracts/src/std/vec.rs" 18 14 18 41 @@ -82,7 +82,7 @@ module M_hillel__right_pad [#"hillel.rs" 17 0 17 59] use seq.Seq function index_logic'0 [@inline:trivial] (self : t_Vec'0) (ix : int) : t_T'0 = - [%#sops16] Seq.get (view'2 self) ix + [%#sindex16] Seq.get (view'2 self) ix use seq.Seq @@ -229,7 +229,7 @@ module M_hillel__left_pad [#"hillel.rs" 34 0 34 58] let%span shillel13 = "hillel.rs" 31 10 31 62 let%span shillel14 = "hillel.rs" 32 10 32 88 let%span shillel15 = "hillel.rs" 33 10 33 104 - let%span sops16 = "../../../creusot-contracts/src/logic/ops.rs" 22 8 22 31 + let%span sindex16 = "../../../creusot-contracts/src/logic/ops/index.rs" 23 8 23 31 let%span smodel17 = "../../../creusot-contracts/src/model.rs" 106 8 106 22 let%span ssnapshot18 = "../../../creusot-contracts/src/snapshot.rs" 52 20 52 39 let%span svec19 = "../../../creusot-contracts/src/std/vec.rs" 83 26 83 48 @@ -292,7 +292,7 @@ module M_hillel__left_pad [#"hillel.rs" 34 0 34 58] use seq.Seq function index_logic'0 [@inline:trivial] (self : t_Vec'0) (ix : int) : t_T'0 = - [%#sops16] Seq.get (view'2 self) ix + [%#sindex16] Seq.get (view'2 self) ix function view'0 (self : borrowed (t_Vec'0)) : Seq.seq t_T'0 = [%#smodel17] view'2 self.current @@ -505,11 +505,11 @@ module M_hillel__insert_unique [#"hillel.rs" 80 0 80 62] let%span svec23 = "../../../creusot-contracts/src/std/vec.rs" 169 26 169 42 let%span sslice24 = "../../../creusot-contracts/src/std/slice.rs" 245 0 354 1 let%span siter25 = "../../../creusot-contracts/src/std/iter.rs" 101 0 213 1 - let%span sops26 = "../../../creusot-contracts/src/logic/ops.rs" 88 8 88 33 + let%span sindex26 = "../../../creusot-contracts/src/logic/ops/index.rs" 89 8 89 33 let%span smodel27 = "../../../creusot-contracts/src/model.rs" 79 8 79 28 let%span sslice28 = "../../../creusot-contracts/src/std/slice.rs" 405 12 405 66 let%span siter29 = "../../../creusot-contracts/src/std/iter.rs" 107 26 110 17 - let%span sops30 = "../../../creusot-contracts/src/logic/ops.rs" 22 8 22 31 + let%span sindex30 = "../../../creusot-contracts/src/logic/ops/index.rs" 23 8 23 31 let%span scmp31 = "../../../creusot-contracts/src/std/cmp.rs" 11 26 11 75 let%span shillel32 = "hillel.rs" 60 8 60 64 let%span shillel33 = "hillel.rs" 53 8 53 105 @@ -533,7 +533,7 @@ module M_hillel__insert_unique [#"hillel.rs" 80 0 80 62] let%span smodel51 = "../../../creusot-contracts/src/model.rs" 106 8 106 22 let%span sslice52 = "../../../creusot-contracts/src/std/slice.rs" 28 14 28 41 let%span sslice53 = "../../../creusot-contracts/src/std/slice.rs" 29 14 29 42 - let%span sops54 = "../../../creusot-contracts/src/logic/ops.rs" 44 8 44 31 + let%span sindex54 = "../../../creusot-contracts/src/logic/ops/index.rs" 45 8 45 31 let%span sseq55 = "../../../creusot-contracts/src/logic/seq.rs" 611 20 611 95 let%span sinvariant56 = "../../../creusot-contracts/src/invariant.rs" 34 20 34 44 let%span svec57 = "../../../creusot-contracts/src/std/vec.rs" 65 20 65 41 @@ -604,7 +604,7 @@ module M_hillel__insert_unique [#"hillel.rs" 80 0 80 62] use seq.Seq function index_logic'1 [@inline:trivial] (self : t_Vec'0) (ix : int) : t_T'0 = - [%#sops30] Seq.get (view'3 self) ix + [%#sindex30] Seq.get (view'3 self) ix function deep_model'1 (self : t_T'0) : t_DeepModelTy'0 @@ -724,7 +724,7 @@ module M_hillel__insert_unique [#"hillel.rs" 80 0 80 62] use seq.Seq function index_logic'0 [@inline:trivial] (self : Snapshot.snap_ty (Seq.seq t_T'0)) (ix : int) : t_T'0 = - [%#sops26] Seq.get (Snapshot.inner self) ix + [%#sindex26] Seq.get (Snapshot.inner self) ix function deep_model'2 (self : t_T'0) : t_DeepModelTy'0 = [%#smodel27] deep_model'1 self @@ -736,7 +736,7 @@ module M_hillel__insert_unique [#"hillel.rs" 80 0 80 62] use seq.Seq function index_logic'2 [@inline:trivial] (self : slice t_T'0) (ix : int) : t_T'0 = - [%#sops54] Seq.get (view'5 self) ix + [%#sindex54] Seq.get (view'5 self) ix function to_ref_seq'0 (self : slice t_T'0) : Seq.seq t_T'0 @@ -1039,7 +1039,7 @@ module M_hillel__unique [#"hillel.rs" 102 0 102 56] let%span siter40 = "../../../creusot-contracts/src/std/iter.rs" 92 8 92 19 let%span sslice41 = "../../../creusot-contracts/src/std/slice.rs" 40 14 40 44 let%span sslice42 = "../../../creusot-contracts/src/std/slice.rs" 41 14 41 96 - let%span sops43 = "../../../creusot-contracts/src/logic/ops.rs" 22 8 22 31 + let%span sindex43 = "../../../creusot-contracts/src/logic/ops/index.rs" 23 8 23 31 let%span shillel44 = "hillel.rs" 60 8 60 64 let%span srange45 = "../../../creusot-contracts/src/std/iter/range.rs" 33 15 33 24 let%span srange46 = "../../../creusot-contracts/src/std/iter/range.rs" 34 14 34 45 @@ -1055,7 +1055,7 @@ module M_hillel__unique [#"hillel.rs" 102 0 102 56] let%span smodel56 = "../../../creusot-contracts/src/model.rs" 97 8 97 28 let%span sslice57 = "../../../creusot-contracts/src/std/slice.rs" 28 14 28 41 let%span sslice58 = "../../../creusot-contracts/src/std/slice.rs" 29 14 29 42 - let%span sops59 = "../../../creusot-contracts/src/logic/ops.rs" 44 8 44 31 + let%span sindex59 = "../../../creusot-contracts/src/logic/ops/index.rs" 45 8 45 31 let%span svec60 = "../../../creusot-contracts/src/std/vec.rs" 65 20 65 41 let%span sinvariant61 = "../../../creusot-contracts/src/invariant.rs" 34 20 34 44 let%span sinvariant62 = "../../../creusot-contracts/src/invariant.rs" 24 8 24 18 @@ -1201,7 +1201,7 @@ module M_hillel__unique [#"hillel.rs" 102 0 102 56] use seq.Seq function index_logic'1 [@inline:trivial] (self : slice t_T'0) (ix : int) : t_T'0 = - [%#sops59] Seq.get (view'2 self) ix + [%#sindex59] Seq.get (view'2 self) ix function deep_model'3 (self : t_T'0) : t_DeepModelTy'0 @@ -1222,7 +1222,7 @@ module M_hillel__unique [#"hillel.rs" 102 0 102 56] use seq.Seq function index_logic'0 [@inline:trivial] (self : t_Vec'0) (ix : int) : t_T'0 = - [%#sops43] Seq.get (view'1 self) ix + [%#sindex43] Seq.get (view'1 self) ix function deep_model'1 (self : t_Vec'0) : Seq.seq t_DeepModelTy'0 @@ -1595,7 +1595,7 @@ module M_hillel__score [#"hillel.rs" 147 0 147 38] let%span shillel9 = "hillel.rs" 148 4 148 41 let%span shillel10 = "hillel.rs" 121 0 121 8 let%span shillel11 = "hillel.rs" 138 4 140 5 - let%span sint12 = "../../../creusot-contracts/src/logic/int.rs" 156 4 156 12 + let%span sint12 = "../../../creusot-contracts/src/logic/int.rs" 157 4 157 12 use prelude.prelude.Int @@ -1713,7 +1713,7 @@ module M_hillel__fulcrum [#"hillel.rs" 159 0 159 30] let%span shillel57 = "hillel.rs" 136 10 136 85 let%span shillel58 = "hillel.rs" 134 10 134 18 let%span shillel59 = "hillel.rs" 138 4 140 5 - let%span sint60 = "../../../creusot-contracts/src/logic/int.rs" 156 4 156 12 + let%span sint60 = "../../../creusot-contracts/src/logic/int.rs" 157 4 157 12 let%span srange61 = "../../../creusot-contracts/src/std/iter/range.rs" 33 15 33 24 let%span srange62 = "../../../creusot-contracts/src/std/iter/range.rs" 34 14 34 45 let%span srange63 = "../../../creusot-contracts/src/std/iter/range.rs" 39 15 39 21 @@ -1724,7 +1724,7 @@ module M_hillel__fulcrum [#"hillel.rs" 159 0 159 30] let%span srange68 = "../../../creusot-contracts/src/std/iter/range.rs" 44 14 44 42 let%span snum69 = "../../../creusot-contracts/src/std/num.rs" 21 28 21 33 let%span srange70 = "../../../creusot-contracts/src/std/iter/range.rs" 15 12 15 78 - let%span sops71 = "../../../creusot-contracts/src/logic/ops.rs" 44 8 44 31 + let%span sindex71 = "../../../creusot-contracts/src/logic/ops/index.rs" 45 8 45 31 let%span smodel72 = "../../../creusot-contracts/src/model.rs" 106 8 106 22 use prelude.prelude.UInt32 @@ -1815,7 +1815,7 @@ module M_hillel__fulcrum [#"hillel.rs" 159 0 159 30] use seq.Seq function index_logic'0 [@inline:trivial] (self : slice uint32) (ix : int) : uint32 = - [%#sops71] Seq.get (view'1 self) ix + [%#sindex71] Seq.get (view'1 self) ix function to_ref_seq'0 (self : slice uint32) : Seq.seq uint32 diff --git a/creusot/tests/should_succeed/index_range.coma b/creusot/tests/should_succeed/index_range.coma index f70ad1c3f5..ce63fe7fa8 100644 --- a/creusot/tests/should_succeed/index_range.coma +++ b/creusot/tests/should_succeed/index_range.coma @@ -9,7 +9,7 @@ module M_index_range__create_arr [#"index_range.rs" 14 0 14 27] let%span svec7 = "../../../creusot-contracts/src/std/vec.rs" 74 26 74 44 let%span svec8 = "../../../creusot-contracts/src/std/vec.rs" 87 26 87 56 let%span svec9 = "../../../creusot-contracts/src/std/vec.rs" 18 14 18 41 - let%span sops10 = "../../../creusot-contracts/src/logic/ops.rs" 22 8 22 31 + let%span sindex10 = "../../../creusot-contracts/src/logic/ops/index.rs" 23 8 23 31 let%span smodel11 = "../../../creusot-contracts/src/model.rs" 106 8 106 22 use prelude.prelude.Opaque @@ -79,7 +79,7 @@ module M_index_range__create_arr [#"index_range.rs" 14 0 14 27] use seq.Seq function index_logic'0 [@inline:trivial] (self : t_Vec'0) (ix : int) : int32 = - [%#sops10] Seq.get (view'0 self) ix + [%#sindex10] Seq.get (view'0 self) ix use prelude.prelude.Int32 @@ -229,7 +229,7 @@ module M_index_range__test_range [#"index_range.rs" 27 0 27 19] let%span svec84 = "../../../creusot-contracts/src/std/vec.rs" 156 26 156 55 let%span svec85 = "../../../creusot-contracts/src/std/vec.rs" 83 26 83 48 let%span svec86 = "../../../creusot-contracts/src/std/vec.rs" 18 14 18 41 - let%span sops87 = "../../../creusot-contracts/src/logic/ops.rs" 22 8 22 31 + let%span sindex87 = "../../../creusot-contracts/src/logic/ops/index.rs" 23 8 23 31 let%span smodel88 = "../../../creusot-contracts/src/model.rs" 88 8 88 22 let%span sslice89 = "../../../creusot-contracts/src/std/slice.rs" 144 20 144 70 let%span sslice90 = "../../../creusot-contracts/src/std/slice.rs" 150 20 150 67 @@ -279,7 +279,7 @@ module M_index_range__test_range [#"index_range.rs" 27 0 27 19] use seq.Seq function index_logic'0 [@inline:trivial] (self : t_Vec'0) (ix : int) : int32 = - [%#sops87] Seq.get (view'0 self) ix + [%#sindex87] Seq.get (view'0 self) ix use prelude.prelude.Int32 @@ -861,7 +861,7 @@ module M_index_range__test_range_to [#"index_range.rs" 78 0 78 22] let%span svec57 = "../../../creusot-contracts/src/std/vec.rs" 156 26 156 55 let%span svec58 = "../../../creusot-contracts/src/std/vec.rs" 83 26 83 48 let%span svec59 = "../../../creusot-contracts/src/std/vec.rs" 18 14 18 41 - let%span sops60 = "../../../creusot-contracts/src/logic/ops.rs" 22 8 22 31 + let%span sindex60 = "../../../creusot-contracts/src/logic/ops/index.rs" 23 8 23 31 let%span smodel61 = "../../../creusot-contracts/src/model.rs" 88 8 88 22 let%span sslice62 = "../../../creusot-contracts/src/std/slice.rs" 167 20 167 42 let%span sslice63 = "../../../creusot-contracts/src/std/slice.rs" 173 20 173 57 @@ -911,7 +911,7 @@ module M_index_range__test_range_to [#"index_range.rs" 78 0 78 22] use seq.Seq function index_logic'0 [@inline:trivial] (self : t_Vec'0) (ix : int) : int32 = - [%#sops60] Seq.get (view'0 self) ix + [%#sindex60] Seq.get (view'0 self) ix use prelude.prelude.Int32 @@ -1349,7 +1349,7 @@ module M_index_range__test_range_from [#"index_range.rs" 115 0 115 24] let%span svec59 = "../../../creusot-contracts/src/std/vec.rs" 156 26 156 55 let%span svec60 = "../../../creusot-contracts/src/std/vec.rs" 83 26 83 48 let%span svec61 = "../../../creusot-contracts/src/std/vec.rs" 18 14 18 41 - let%span sops62 = "../../../creusot-contracts/src/logic/ops.rs" 22 8 22 31 + let%span sindex62 = "../../../creusot-contracts/src/logic/ops/index.rs" 23 8 23 31 let%span smodel63 = "../../../creusot-contracts/src/model.rs" 88 8 88 22 let%span sslice64 = "../../../creusot-contracts/src/std/slice.rs" 187 20 187 44 let%span sslice65 = "../../../creusot-contracts/src/std/slice.rs" 193 20 193 67 @@ -1399,7 +1399,7 @@ module M_index_range__test_range_from [#"index_range.rs" 115 0 115 24] use seq.Seq function index_logic'0 [@inline:trivial] (self : t_Vec'0) (ix : int) : int32 = - [%#sops62] Seq.get (view'0 self) ix + [%#sindex62] Seq.get (view'0 self) ix use prelude.prelude.Int32 @@ -1842,7 +1842,7 @@ module M_index_range__test_range_full [#"index_range.rs" 154 0 154 24] let%span svec51 = "../../../creusot-contracts/src/std/vec.rs" 156 26 156 55 let%span svec52 = "../../../creusot-contracts/src/std/vec.rs" 83 26 83 48 let%span svec53 = "../../../creusot-contracts/src/std/vec.rs" 18 14 18 41 - let%span sops54 = "../../../creusot-contracts/src/logic/ops.rs" 22 8 22 31 + let%span sindex54 = "../../../creusot-contracts/src/logic/ops/index.rs" 23 8 23 31 let%span smodel55 = "../../../creusot-contracts/src/model.rs" 88 8 88 22 let%span sslice56 = "../../../creusot-contracts/src/std/slice.rs" 209 20 209 24 let%span sslice57 = "../../../creusot-contracts/src/std/slice.rs" 215 20 215 31 @@ -1892,7 +1892,7 @@ module M_index_range__test_range_full [#"index_range.rs" 154 0 154 24] use seq.Seq function index_logic'0 [@inline:trivial] (self : t_Vec'0) (ix : int) : int32 = - [%#sops54] Seq.get (view'0 self) ix + [%#sindex54] Seq.get (view'0 self) ix use prelude.prelude.Int32 @@ -2300,7 +2300,7 @@ module M_index_range__test_range_to_inclusive [#"index_range.rs" 179 0 179 32] let%span svec54 = "../../../creusot-contracts/src/std/vec.rs" 156 26 156 55 let%span svec55 = "../../../creusot-contracts/src/std/vec.rs" 83 26 83 48 let%span svec56 = "../../../creusot-contracts/src/std/vec.rs" 18 14 18 41 - let%span sops57 = "../../../creusot-contracts/src/logic/ops.rs" 22 8 22 31 + let%span sindex57 = "../../../creusot-contracts/src/logic/ops/index.rs" 23 8 23 31 let%span smodel58 = "../../../creusot-contracts/src/model.rs" 88 8 88 22 let%span sslice59 = "../../../creusot-contracts/src/std/slice.rs" 229 20 229 41 let%span sslice60 = "../../../creusot-contracts/src/std/slice.rs" 235 20 235 61 @@ -2350,7 +2350,7 @@ module M_index_range__test_range_to_inclusive [#"index_range.rs" 179 0 179 32] use seq.Seq function index_logic'0 [@inline:trivial] (self : t_Vec'0) (ix : int) : int32 = - [%#sops57] Seq.get (view'0 self) ix + [%#sindex57] Seq.get (view'0 self) ix use prelude.prelude.Int32 diff --git a/creusot/tests/should_succeed/insertion_sort.coma b/creusot/tests/should_succeed/insertion_sort.coma index 6cf0870e15..fd18bc1ade 100644 --- a/creusot/tests/should_succeed/insertion_sort.coma +++ b/creusot/tests/should_succeed/insertion_sort.coma @@ -30,8 +30,8 @@ module M_insertion_sort__insertion_sort [#"insertion_sort.rs" 21 0 21 40] let%span sinsertion_sort28 = "insertion_sort.rs" 8 8 8 72 let%span srange29 = "../../../creusot-contracts/src/std/iter/range.rs" 23 12 27 70 let%span siter30 = "../../../creusot-contracts/src/std/iter.rs" 107 26 110 17 - let%span sops31 = "../../../creusot-contracts/src/logic/ops.rs" 55 8 55 32 - let%span sops32 = "../../../creusot-contracts/src/logic/ops.rs" 44 8 44 31 + let%span sindex31 = "../../../creusot-contracts/src/logic/ops/index.rs" 56 8 56 32 + let%span sindex32 = "../../../creusot-contracts/src/logic/ops/index.rs" 45 8 45 31 let%span sslice33 = "../../../creusot-contracts/src/std/slice.rs" 257 19 257 35 let%span sslice34 = "../../../creusot-contracts/src/std/slice.rs" 258 19 258 35 let%span sslice35 = "../../../creusot-contracts/src/std/slice.rs" 259 18 259 50 @@ -222,10 +222,10 @@ module M_insertion_sort__insertion_sort [#"insertion_sort.rs" 21 0 21 40] function index_logic'0 [@inline:trivial] (self : slice int32) (ix : usize) : int32 = - [%#sops31] Seq.get (view'2 self) (UIntSize.to_int ix) + [%#sindex31] Seq.get (view'2 self) (UIntSize.to_int ix) function index_logic'1 [@inline:trivial] (self : slice int32) (ix : int) : int32 = - [%#sops32] Seq.get (view'2 self) ix + [%#sindex32] Seq.get (view'2 self) ix predicate inv'5 (_1 : borrowed (slice int32)) diff --git a/creusot/tests/should_succeed/iterators/02_iter_mut.coma b/creusot/tests/should_succeed/iterators/02_iter_mut.coma index 2b5aadbffb..7439a54975 100644 --- a/creusot/tests/should_succeed/iterators/02_iter_mut.coma +++ b/creusot/tests/should_succeed/iterators/02_iter_mut.coma @@ -9,7 +9,7 @@ module M_02_iter_mut__qyi4305820612590367313__produces_refl [#"02_iter_mut.rs" 5 let%span s02_iter_mut7 = "02_iter_mut.rs" 22 20 22 64 let%span sslice8 = "../../../../creusot-contracts/src/std/slice.rs" 28 14 28 41 let%span sslice9 = "../../../../creusot-contracts/src/std/slice.rs" 29 14 29 42 - let%span sops10 = "../../../../creusot-contracts/src/logic/ops.rs" 44 8 44 31 + let%span sindex10 = "../../../../creusot-contracts/src/logic/ops/index.rs" 45 8 45 31 let%span sinvariant11 = "../../../../creusot-contracts/src/invariant.rs" 34 20 34 44 let%span sslice12 = "../../../../creusot-contracts/src/std/slice.rs" 18 20 18 30 let%span sseq13 = "../../../../creusot-contracts/src/logic/seq.rs" 611 20 611 95 @@ -102,7 +102,7 @@ module M_02_iter_mut__qyi4305820612590367313__produces_refl [#"02_iter_mut.rs" 5 use seq.Seq function index_logic'0 [@inline:trivial] (self : slice t_T'0) (ix : int) : t_T'0 = - [%#sops10] Seq.get (view'1 self) ix + [%#sindex10] Seq.get (view'1 self) ix function to_mut_seq'0 (self : borrowed (slice t_T'0)) : Seq.seq (borrowed t_T'0) @@ -147,7 +147,7 @@ module M_02_iter_mut__qyi4305820612590367313__produces_trans [#"02_iter_mut.rs" let%span s02_iter_mut11 = "02_iter_mut.rs" 22 20 22 64 let%span sslice12 = "../../../../creusot-contracts/src/std/slice.rs" 28 14 28 41 let%span sslice13 = "../../../../creusot-contracts/src/std/slice.rs" 29 14 29 42 - let%span sops14 = "../../../../creusot-contracts/src/logic/ops.rs" 44 8 44 31 + let%span sindex14 = "../../../../creusot-contracts/src/logic/ops/index.rs" 45 8 45 31 let%span sinvariant15 = "../../../../creusot-contracts/src/invariant.rs" 34 20 34 44 let%span sslice16 = "../../../../creusot-contracts/src/std/slice.rs" 18 20 18 30 let%span sseq17 = "../../../../creusot-contracts/src/logic/seq.rs" 611 20 611 95 @@ -238,7 +238,7 @@ module M_02_iter_mut__qyi4305820612590367313__produces_trans [#"02_iter_mut.rs" use seq.Seq function index_logic'0 [@inline:trivial] (self : slice t_T'0) (ix : int) : t_T'0 = - [%#sops14] Seq.get (view'1 self) ix + [%#sindex14] Seq.get (view'1 self) ix function to_mut_seq'0 (self : borrowed (slice t_T'0)) : Seq.seq (borrowed t_T'0) @@ -287,7 +287,7 @@ module M_02_iter_mut__qyi4305820612590367313__next [#"02_iter_mut.rs" 67 4 67 44 let%span sslice3 = "../../../../creusot-contracts/src/std/slice.rs" 291 18 298 9 let%span s02_iter_mut4 = "02_iter_mut.rs" 32 8 32 76 let%span s02_iter_mut5 = "02_iter_mut.rs" 39 12 43 13 - let%span sops6 = "../../../../creusot-contracts/src/logic/ops.rs" 44 8 44 31 + let%span sindex6 = "../../../../creusot-contracts/src/logic/ops/index.rs" 45 8 45 31 let%span sslice7 = "../../../../creusot-contracts/src/std/slice.rs" 28 14 28 41 let%span sslice8 = "../../../../creusot-contracts/src/std/slice.rs" 29 14 29 42 let%span sseq9 = "../../../../creusot-contracts/src/logic/seq.rs" 173 8 173 39 @@ -391,7 +391,7 @@ module M_02_iter_mut__qyi4305820612590367313__next [#"02_iter_mut.rs" 67 4 67 44 use seq.Seq function index_logic'0 [@inline:trivial] (self : slice t_T'0) (ix : int) : t_T'0 = - [%#sops6] Seq.get (view'0 self) ix + [%#sindex6] Seq.get (view'0 self) ix use seq.Seq @@ -869,14 +869,14 @@ module M_02_iter_mut__all_zero [#"02_iter_mut.rs" 88 0 88 35] let%span s02_iter_mut14 = "02_iter_mut.rs" 74 17 74 21 let%span s02_iter_mut15 = "02_iter_mut.rs" 74 26 74 30 let%span s02_iter_mut16 = "02_iter_mut.rs" 73 14 73 28 - let%span sops17 = "../../../../creusot-contracts/src/logic/ops.rs" 88 8 88 33 + let%span sindex17 = "../../../../creusot-contracts/src/logic/ops/index.rs" 89 8 89 33 let%span s02_iter_mut18 = "02_iter_mut.rs" 39 12 43 13 let%span s02_iter_mut19 = "02_iter_mut.rs" 67 17 67 21 let%span s02_iter_mut20 = "02_iter_mut.rs" 67 26 67 44 let%span s02_iter_mut21 = "02_iter_mut.rs" 63 14 66 5 let%span svec22 = "../../../../creusot-contracts/src/std/vec.rs" 18 14 18 41 let%span smodel23 = "../../../../creusot-contracts/src/model.rs" 106 8 106 22 - let%span sops24 = "../../../../creusot-contracts/src/logic/ops.rs" 22 8 22 31 + let%span sindex24 = "../../../../creusot-contracts/src/logic/ops/index.rs" 23 8 23 31 let%span sslice25 = "../../../../creusot-contracts/src/std/slice.rs" 28 14 28 41 let%span sslice26 = "../../../../creusot-contracts/src/std/slice.rs" 29 14 29 42 let%span s02_iter_mut27 = "02_iter_mut.rs" 49 15 49 24 @@ -893,7 +893,7 @@ module M_02_iter_mut__all_zero [#"02_iter_mut.rs" 88 0 88 35] let%span sslice38 = "../../../../creusot-contracts/src/std/slice.rs" 88 14 88 84 let%span s02_iter_mut39 = "02_iter_mut.rs" 32 8 32 76 let%span sresolve40 = "../../../../creusot-contracts/src/resolve.rs" 54 20 54 34 - let%span sops41 = "../../../../creusot-contracts/src/logic/ops.rs" 44 8 44 31 + let%span sindex41 = "../../../../creusot-contracts/src/logic/ops/index.rs" 45 8 45 31 let%span s02_iter_mut42 = "02_iter_mut.rs" 22 20 22 64 let%span sinvariant43 = "../../../../creusot-contracts/src/invariant.rs" 34 20 34 44 @@ -1002,7 +1002,7 @@ module M_02_iter_mut__all_zero [#"02_iter_mut.rs" 88 0 88 35] function index_logic'0 [@inline:trivial] (self : Snapshot.snap_ty (Seq.seq (borrowed usize))) (ix : int) : borrowed usize = - [%#sops17] Seq.get (Snapshot.inner self) ix + [%#sindex17] Seq.get (Snapshot.inner self) ix use prelude.prelude.Snapshot @@ -1013,7 +1013,7 @@ module M_02_iter_mut__all_zero [#"02_iter_mut.rs" 88 0 88 35] use seq.Seq function index_logic'2 [@inline:trivial] (self : slice usize) (ix : int) : usize = - [%#sops41] Seq.get (view'3 self) ix + [%#sindex41] Seq.get (view'3 self) ix function to_mut_seq'0 (self : borrowed (slice usize)) : Seq.seq (borrowed usize) @@ -1113,7 +1113,7 @@ module M_02_iter_mut__all_zero [#"02_iter_mut.rs" 88 0 88 35] use prelude.prelude.Snapshot function index_logic'1 [@inline:trivial] (self : t_Vec'0) (ix : int) : usize = - [%#sops24] Seq.get (view'0 self) ix + [%#sindex24] Seq.get (view'0 self) ix meta "compute_max_steps" 1000000 @@ -1191,7 +1191,7 @@ module M_02_iter_mut__qyi4305820612590367313__produces_trans__refines [#"02_iter let%span sslice4 = "../../../../creusot-contracts/src/std/slice.rs" 88 14 88 84 let%span sslice5 = "../../../../creusot-contracts/src/std/slice.rs" 28 14 28 41 let%span sslice6 = "../../../../creusot-contracts/src/std/slice.rs" 29 14 29 42 - let%span sops7 = "../../../../creusot-contracts/src/logic/ops.rs" 44 8 44 31 + let%span sindex7 = "../../../../creusot-contracts/src/logic/ops/index.rs" 45 8 45 31 let%span s02_iter_mut8 = "02_iter_mut.rs" 22 20 22 64 let%span sinvariant9 = "../../../../creusot-contracts/src/invariant.rs" 34 20 34 44 let%span sslice10 = "../../../../creusot-contracts/src/std/slice.rs" 18 20 18 30 @@ -1239,7 +1239,7 @@ module M_02_iter_mut__qyi4305820612590367313__produces_trans__refines [#"02_iter use seq.Seq function index_logic'0 [@inline:trivial] (self : slice t_T'0) (ix : int) : t_T'0 = - [%#sops7] Seq.get (view'1 self) ix + [%#sindex7] Seq.get (view'1 self) ix function to_mut_seq'0 (self : borrowed (slice t_T'0)) : Seq.seq (borrowed t_T'0) @@ -1324,7 +1324,7 @@ module M_02_iter_mut__qyi4305820612590367313__next__refines [#"02_iter_mut.rs" 6 let%span sinvariant7 = "../../../../creusot-contracts/src/invariant.rs" 34 20 34 44 let%span sslice8 = "../../../../creusot-contracts/src/std/slice.rs" 28 14 28 41 let%span sslice9 = "../../../../creusot-contracts/src/std/slice.rs" 29 14 29 42 - let%span sops10 = "../../../../creusot-contracts/src/logic/ops.rs" 44 8 44 31 + let%span sindex10 = "../../../../creusot-contracts/src/logic/ops/index.rs" 45 8 45 31 let%span s02_iter_mut11 = "02_iter_mut.rs" 22 20 22 64 let%span sslice12 = "../../../../creusot-contracts/src/std/slice.rs" 18 20 18 30 let%span sseq13 = "../../../../creusot-contracts/src/logic/seq.rs" 611 20 611 95 @@ -1439,7 +1439,7 @@ module M_02_iter_mut__qyi4305820612590367313__next__refines [#"02_iter_mut.rs" 6 use seq.Seq function index_logic'0 [@inline:trivial] (self : slice t_T'0) (ix : int) : t_T'0 = - [%#sops10] Seq.get (view'1 self) ix + [%#sindex10] Seq.get (view'1 self) ix function to_mut_seq'0 (self : borrowed (slice t_T'0)) : Seq.seq (borrowed t_T'0) @@ -1499,7 +1499,7 @@ module M_02_iter_mut__qyi4305820612590367313__produces_refl__refines [#"02_iter_ let%span s02_iter_mut5 = "02_iter_mut.rs" 22 20 22 64 let%span sslice6 = "../../../../creusot-contracts/src/std/slice.rs" 28 14 28 41 let%span sslice7 = "../../../../creusot-contracts/src/std/slice.rs" 29 14 29 42 - let%span sops8 = "../../../../creusot-contracts/src/logic/ops.rs" 44 8 44 31 + let%span sindex8 = "../../../../creusot-contracts/src/logic/ops/index.rs" 45 8 45 31 let%span sinvariant9 = "../../../../creusot-contracts/src/invariant.rs" 34 20 34 44 let%span sslice10 = "../../../../creusot-contracts/src/std/slice.rs" 18 20 18 30 let%span sseq11 = "../../../../creusot-contracts/src/logic/seq.rs" 611 20 611 95 @@ -1592,7 +1592,7 @@ module M_02_iter_mut__qyi4305820612590367313__produces_refl__refines [#"02_iter_ use seq.Seq function index_logic'0 [@inline:trivial] (self : slice t_T'0) (ix : int) : t_T'0 = - [%#sops8] Seq.get (view'1 self) ix + [%#sindex8] Seq.get (view'1 self) ix function to_mut_seq'0 (self : borrowed (slice t_T'0)) : Seq.seq (borrowed t_T'0) diff --git a/creusot/tests/should_succeed/iterators/03_std_iterators.coma b/creusot/tests/should_succeed/iterators/03_std_iterators.coma index ad3506963f..110f27a56c 100644 --- a/creusot/tests/should_succeed/iterators/03_std_iterators.coma +++ b/creusot/tests/should_succeed/iterators/03_std_iterators.coma @@ -28,7 +28,7 @@ module M_03_std_iterators__slice_iter [#"03_std_iterators.rs" 6 0 6 42] let%span sresolve26 = "../../../../creusot-contracts/src/resolve.rs" 54 20 54 34 let%span sslice27 = "../../../../creusot-contracts/src/std/slice.rs" 28 14 28 41 let%span sslice28 = "../../../../creusot-contracts/src/std/slice.rs" 29 14 29 42 - let%span sops29 = "../../../../creusot-contracts/src/logic/ops.rs" 44 8 44 31 + let%span sindex29 = "../../../../creusot-contracts/src/logic/ops/index.rs" 45 8 45 31 let%span sseq30 = "../../../../creusot-contracts/src/logic/seq.rs" 611 20 611 95 let%span smodel31 = "../../../../creusot-contracts/src/model.rs" 106 8 106 22 let%span sinvariant32 = "../../../../creusot-contracts/src/invariant.rs" 24 8 24 18 @@ -146,7 +146,7 @@ module M_03_std_iterators__slice_iter [#"03_std_iterators.rs" 6 0 6 42] use seq.Seq function index_logic'0 [@inline:trivial] (self : slice t_T'0) (ix : int) : t_T'0 = - [%#sops29] Seq.get (view'2 self) ix + [%#sindex29] Seq.get (view'2 self) ix function to_ref_seq'0 (self : slice t_T'0) : Seq.seq t_T'0 @@ -339,7 +339,7 @@ module M_03_std_iterators__vec_iter [#"03_std_iterators.rs" 17 0 17 41] let%span sslice24 = "../../../../creusot-contracts/src/std/slice.rs" 398 20 398 61 let%span sresolve25 = "../../../../creusot-contracts/src/resolve.rs" 54 20 54 34 let%span svec26 = "../../../../creusot-contracts/src/std/vec.rs" 18 14 18 41 - let%span sops27 = "../../../../creusot-contracts/src/logic/ops.rs" 44 8 44 31 + let%span sindex27 = "../../../../creusot-contracts/src/logic/ops/index.rs" 45 8 45 31 let%span sseq28 = "../../../../creusot-contracts/src/logic/seq.rs" 611 20 611 95 let%span smodel29 = "../../../../creusot-contracts/src/model.rs" 106 8 106 22 let%span sslice30 = "../../../../creusot-contracts/src/std/slice.rs" 28 14 28 41 @@ -471,7 +471,7 @@ module M_03_std_iterators__vec_iter [#"03_std_iterators.rs" 17 0 17 41] use seq.Seq function index_logic'0 [@inline:trivial] (self : slice t_T'0) (ix : int) : t_T'0 = - [%#sops27] Seq.get (view'5 self) ix + [%#sindex27] Seq.get (view'5 self) ix function to_ref_seq'0 (self : slice t_T'0) : Seq.seq t_T'0 @@ -651,12 +651,12 @@ module M_03_std_iterators__all_zero [#"03_std_iterators.rs" 28 0 28 35] let%span svec9 = "../../../../creusot-contracts/src/std/vec.rs" 176 26 176 48 let%span sslice10 = "../../../../creusot-contracts/src/std/slice.rs" 245 0 354 1 let%span siter11 = "../../../../creusot-contracts/src/std/iter.rs" 101 0 213 1 - let%span sops12 = "../../../../creusot-contracts/src/logic/ops.rs" 88 8 88 33 + let%span sindex12 = "../../../../creusot-contracts/src/logic/ops/index.rs" 89 8 89 33 let%span sslice13 = "../../../../creusot-contracts/src/std/slice.rs" 459 12 459 66 let%span siter14 = "../../../../creusot-contracts/src/std/iter.rs" 107 26 110 17 let%span svec15 = "../../../../creusot-contracts/src/std/vec.rs" 18 14 18 41 let%span smodel16 = "../../../../creusot-contracts/src/model.rs" 106 8 106 22 - let%span sops17 = "../../../../creusot-contracts/src/logic/ops.rs" 22 8 22 31 + let%span sindex17 = "../../../../creusot-contracts/src/logic/ops/index.rs" 23 8 23 31 let%span sslice18 = "../../../../creusot-contracts/src/std/slice.rs" 28 14 28 41 let%span sslice19 = "../../../../creusot-contracts/src/std/slice.rs" 29 14 29 42 let%span sslice20 = "../../../../creusot-contracts/src/std/slice.rs" 427 14 427 50 @@ -677,7 +677,7 @@ module M_03_std_iterators__all_zero [#"03_std_iterators.rs" 28 0 28 35] let%span sslice35 = "../../../../creusot-contracts/src/std/slice.rs" 88 14 88 84 let%span sslice36 = "../../../../creusot-contracts/src/std/slice.rs" 452 20 452 61 let%span sslice37 = "../../../../creusot-contracts/src/std/slice.rs" 437 20 437 36 - let%span sops38 = "../../../../creusot-contracts/src/logic/ops.rs" 44 8 44 31 + let%span sindex38 = "../../../../creusot-contracts/src/logic/ops/index.rs" 45 8 45 31 use prelude.prelude.Borrow @@ -798,7 +798,7 @@ module M_03_std_iterators__all_zero [#"03_std_iterators.rs" 28 0 28 35] function index_logic'0 [@inline:trivial] (self : Snapshot.snap_ty (Seq.seq (borrowed usize))) (ix : int) : borrowed usize = - [%#sops12] Seq.get (Snapshot.inner self) ix + [%#sindex12] Seq.get (Snapshot.inner self) ix use prelude.prelude.Snapshot @@ -809,7 +809,7 @@ module M_03_std_iterators__all_zero [#"03_std_iterators.rs" 28 0 28 35] use seq.Seq function index_logic'2 [@inline:trivial] (self : slice usize) (ix : int) : usize = - [%#sops38] Seq.get (view'3 self) ix + [%#sindex38] Seq.get (view'3 self) ix function to_mut_seq'0 (self : borrowed (slice usize)) : Seq.seq (borrowed usize) @@ -906,7 +906,7 @@ module M_03_std_iterators__all_zero [#"03_std_iterators.rs" 28 0 28 35] use prelude.prelude.Snapshot function index_logic'1 [@inline:trivial] (self : t_Vec'0) (ix : int) : usize = - [%#sops17] Seq.get (view'0 self) ix + [%#sindex17] Seq.get (view'0 self) ix meta "compute_max_steps" 1000000 @@ -1373,7 +1373,7 @@ module M_03_std_iterators__counter [#"03_std_iterators.rs" 41 0 41 27] let%span smap_inv51 = "../../../../creusot-contracts/src/std/iter/map_inv.rs" 32 15 32 32 let%span smap_inv52 = "../../../../creusot-contracts/src/std/iter/map_inv.rs" 33 15 33 32 let%span smap_inv53 = "../../../../creusot-contracts/src/std/iter/map_inv.rs" 34 14 34 42 - let%span sops54 = "../../../../creusot-contracts/src/logic/ops.rs" 44 8 44 31 + let%span sindex54 = "../../../../creusot-contracts/src/logic/ops/index.rs" 45 8 45 31 let%span smodel55 = "../../../../creusot-contracts/src/model.rs" 106 8 106 22 let%span sinvariant56 = "../../../../creusot-contracts/src/invariant.rs" 34 20 34 44 @@ -1553,7 +1553,7 @@ module M_03_std_iterators__counter [#"03_std_iterators.rs" 41 0 41 27] use seq.Seq function index_logic'0 [@inline:trivial] (self : slice uint32) (ix : int) : uint32 = - [%#sops54] Seq.get (view'4 self) ix + [%#sindex54] Seq.get (view'4 self) ix function to_ref_seq'0 (self : slice uint32) : Seq.seq uint32 @@ -2049,7 +2049,7 @@ module M_03_std_iterators__enumerate_range [#"03_std_iterators.rs" 72 0 72 24] let%span siter7 = "../../../../creusot-contracts/src/std/iter.rs" 154 27 154 103 let%span siter8 = "../../../../creusot-contracts/src/std/iter.rs" 155 27 157 54 let%span siter9 = "../../../../creusot-contracts/src/std/iter.rs" 101 0 213 1 - let%span sops10 = "../../../../creusot-contracts/src/logic/ops.rs" 88 8 88 33 + let%span sindex10 = "../../../../creusot-contracts/src/logic/ops/index.rs" 89 8 89 33 let%span senumerate11 = "../../../../creusot-contracts/src/std/iter/enumerate.rs" 74 12 78 113 let%span siter12 = "../../../../creusot-contracts/src/std/iter.rs" 107 26 110 17 let%span srange13 = "../../../../creusot-contracts/src/std/iter/range.rs" 15 12 15 78 @@ -2206,7 +2206,7 @@ module M_03_std_iterators__enumerate_range [#"03_std_iterators.rs" 72 0 72 24] function index_logic'0 [@inline:trivial] (self : Snapshot.snap_ty (Seq.seq (usize, usize))) (ix : int) : (usize, usize) = - [%#sops10] Seq.get (Snapshot.inner self) ix + [%#sindex10] Seq.get (Snapshot.inner self) ix use prelude.prelude.Snapshot @@ -2406,8 +2406,8 @@ module M_03_std_iterators__my_reverse [#"03_std_iterators.rs" 94 0 94 37] let%span sslice29 = "../../../../creusot-contracts/src/std/slice.rs" 257 19 257 35 let%span sslice30 = "../../../../creusot-contracts/src/std/slice.rs" 258 19 258 35 let%span sslice31 = "../../../../creusot-contracts/src/std/slice.rs" 259 18 259 50 - let%span sops32 = "../../../../creusot-contracts/src/logic/ops.rs" 44 8 44 31 - let%span sops33 = "../../../../creusot-contracts/src/logic/ops.rs" 55 8 55 32 + let%span sindex32 = "../../../../creusot-contracts/src/logic/ops/index.rs" 45 8 45 31 + let%span sindex33 = "../../../../creusot-contracts/src/logic/ops/index.rs" 56 8 56 32 let%span sslice34 = "../../../../creusot-contracts/src/std/slice.rs" 28 14 28 41 let%span sslice35 = "../../../../creusot-contracts/src/std/slice.rs" 29 14 29 42 let%span smodel36 = "../../../../creusot-contracts/src/model.rs" 88 8 88 22 @@ -2755,10 +2755,10 @@ module M_03_std_iterators__my_reverse [#"03_std_iterators.rs" 94 0 94 37] function index_logic'0 [@inline:trivial] (self : slice t_T'0) (ix : int) : t_T'0 = - [%#sops32] Seq.get (view'2 self) ix + [%#sindex32] Seq.get (view'2 self) ix function index_logic'1 [@inline:trivial] (self : slice t_T'0) (ix : usize) : t_T'0 = - [%#sops33] Seq.get (view'2 self) (UIntSize.to_int ix) + [%#sindex33] Seq.get (view'2 self) (UIntSize.to_int ix) predicate resolve'3 (self : borrowed (slice t_T'0)) = [%#sresolve51] self.final = self.current diff --git a/creusot/tests/should_succeed/iterators/04_skip.coma b/creusot/tests/should_succeed/iterators/04_skip.coma index 8217f71449..4b91306088 100644 --- a/creusot/tests/should_succeed/iterators/04_skip.coma +++ b/creusot/tests/should_succeed/iterators/04_skip.coma @@ -234,7 +234,7 @@ module M_04_skip__qyi17349041008065389927__next [#"04_skip.rs" 67 4 67 41] (* {[@expl:mc91 ensures] [%#smc913] x <= (100 : uint32) - -> result = (91 : uint32) /\ x > (100 : uint32) -> result = x - (10 : uint32)} + -> result = (91 : uint32) /\ x > (100 : uint32) -> UInt32.to_int result = sub'0 x (10 : uint32)} (! return' {result}) ] end diff --git a/creusot/tests/should_succeed/mc91/why3session.xml b/creusot/tests/should_succeed/mc91/why3session.xml index 8ee1f7511e..08f10d8e5e 100644 --- a/creusot/tests/should_succeed/mc91/why3session.xml +++ b/creusot/tests/should_succeed/mc91/why3session.xml @@ -6,8 +6,8 @@ - - + + diff --git a/creusot/tests/should_succeed/mc91/why3shapes.gz b/creusot/tests/should_succeed/mc91/why3shapes.gz index 5ea964a99a1e4c695c482cfda8382445742484aa..03f921796c28e75bf0edb2a96b8721b32e19d3b0 100644 GIT binary patch literal 217 zcmV;~04Dz*iwFP!00000|FzM}3c@fD1<-xIB0FCQlcWzSR_G?!y<}UaO~it>YFfd+ z7krUox^z2pIShBEb7~KGHkRJZ)z)pZq7j|X2&UMzMcs5&!qE2R1Qb*Za@@S<3O)e_ zkmEY_&s}EeiDXzeMcMX^w%&b?sbaXh_9pwsNiRkW88N~LFQdd;;X{Qx=?qgPs)V_k zyO$2faq)XMlWtMIz^f>UM{7nJxqPdXl9Jo)&DgpoiW4B~A literal 209 zcmV;?051O@iwFP!00000|Gknu3&JoEhWGr6j9L+r#22LMYaHWXjv$4hE$U{_oWktOtjJpz);R1T$PF^Ra8M#5fUj(cLd!4 Li4%D$QUU+~*s)|j diff --git a/creusot/tests/should_succeed/mutex.coma b/creusot/tests/should_succeed/mutex.coma index f54c048d09..981f825a4a 100644 --- a/creusot/tests/should_succeed/mutex.coma +++ b/creusot/tests/should_succeed/mutex.coma @@ -8,7 +8,7 @@ module M_mutex__qyi5425553346843331945__call [#"mutex.rs" 100 4 100 23] (* {[%#smutex5] inv'1 result} @@ -120,7 +122,7 @@ module M_mutex__concurrent [#"mutex.rs" 163 0 163 19] let%span smutex9 = "mutex.rs" 130 11 130 27 let%span smutex10 = "mutex.rs" 121 21 121 34 let%span smutex11 = "mutex.rs" 117 14 120 5 - let%span smutex12 = "mutex.rs" 67 8 67 24 + let%span smutex12 = "mutex.rs" 67 8 67 25 let%span sresolve13 = "../../../creusot-contracts/src/resolve.rs" 54 20 54 34 let%span smutex14 = "mutex.rs" 92 8 92 12 let%span smutex15 = "mutex.rs" 149 4 149 16 @@ -138,10 +140,12 @@ module M_mutex__concurrent [#"mutex.rs" 163 0 163 19] use prelude.prelude.Borrow + use prelude.prelude.UInt32 + use prelude.prelude.Int predicate inv'2 [#"mutex.rs" 66 4 66 33] (self : ()) (x : uint32) = - [%#smutex12] mod x (2 : uint32) = (0 : uint32) + [%#smutex12] mod (UInt32.to_int x) 2 = 0 type t_MutexInner'0 diff --git a/creusot/tests/should_succeed/mutex/why3shapes.gz b/creusot/tests/should_succeed/mutex/why3shapes.gz index 1a899d0378865223bd45efc6f170970b13a52909..c015e86748d3285a8986773f19209e8be25f3368 100644 GIT binary patch literal 417 zcmV;S0bc$eiwFP!00000|E*FzlbkRN?fDgSB$r0m#x^(Eg2sU&-HuyEU@>8C4>&NJ z6O-PoTtZBrVnou|AOOm&A@_*AjWc=n+TEs zc!kTn`F@_<=*M}=z%t8C6LMLF%Su17CZXrWe{JvGV`*-giQp*BaGWMu(YGIWPhURl zxVpB@GqA#{Dri-MC-ieWPTnef7hw@V&&*BPcJn^D?N5AzCoA#1?o|D&YY(Ao4@Z{4 z%SH{p|E+2cxAXG7ba3OfiHaupS(y7shvZ=S-}6ireC8%PDJ(Y;#8_d4i6F+LEldP4 zrmQp(B)=>UeOo!Voj=bRWY167@9RpFxB7U3e1-o{g&JIGn=e<&;C4CvU~d257*7XB zL=17OOkC}GUoHf3k9oKU3wuZsJ}~0Y5wO8wS?EFz1LT7!ORfr%L&|Gb=QSj1(28q9 zlFYG==IEfOe>;q^=aD7OrE`De461n>2^ItaYtw8FIb> LVsr|SoC5#==w!;A literal 418 zcmV;T0bTwdiwFP!00000|E*HHlAJIQ%=rp3>~o?AdT`|pNMsQ>+fqsmLMl_YCpZvm z`|n-5NOt*kPOPZaGt;B#(VK^I`vi;I%Bx$qX%3GiFCX3(@dc)Et&l+~gUn%rRR%=@ zw1s8fqMgGy#c2)|GQ?2TrCQR$vbvw5s&LOs{Mz5UXK8AP%HWVDFoob&i2cVsx-TDg zSjWD{6*9FEZORoLoFLBq6rvIEE<=`pCF+*h5AzEy<16R|G&$<%$MBjt$Fzt^cY`Ak)IvNlv@kU3^*l|kmXVJd^n z3By$e#V?D4*tg@joj=bNs-B;~?(6D8H1c=?e {[%#s06_knights_tour37] Seq.length (view'3 result) = 8} @@ -2090,7 +2090,7 @@ module M_06_knights_tour__knights_tour [#"06_knights_tour.rs" 135 0 135 69] use seq.Seq function index_logic'0 [@inline:trivial] (self : t_Vec'0) (ix : int) : (usize, t_Point'0) = - [%#sops40] Seq.get (view'0 self) ix + [%#sindex40] Seq.get (view'0 self) ix use prelude.prelude.Snapshot diff --git a/creusot/tests/should_succeed/vector/08_haystack.coma b/creusot/tests/should_succeed/vector/08_haystack.coma index ee95b672bf..35eb99cc29 100644 --- a/creusot/tests/should_succeed/vector/08_haystack.coma +++ b/creusot/tests/should_succeed/vector/08_haystack.coma @@ -32,7 +32,7 @@ module M_08_haystack__search [#"08_haystack.rs" 21 0 21 60] let%span siter30 = "../../../../creusot-contracts/src/std/iter.rs" 86 20 86 24 let%span siter31 = "../../../../creusot-contracts/src/std/iter.rs" 92 8 92 19 let%span svec32 = "../../../../creusot-contracts/src/std/vec.rs" 18 14 18 41 - let%span sops33 = "../../../../creusot-contracts/src/logic/ops.rs" 22 8 22 31 + let%span sindex33 = "../../../../creusot-contracts/src/logic/ops/index.rs" 23 8 23 31 let%span srange34 = "../../../../creusot-contracts/src/std/iter/range.rs" 81 14 81 45 let%span srange35 = "../../../../creusot-contracts/src/std/iter/range.rs" 79 4 79 10 let%span srange36 = "../../../../creusot-contracts/src/std/iter/range.rs" 86 15 86 32 @@ -166,7 +166,7 @@ module M_08_haystack__search [#"08_haystack.rs" 21 0 21 60] use seq.Seq function index_logic'0 [@inline:trivial] (self : t_Vec'0) (ix : int) : uint8 = - [%#sops33] Seq.get (view'1 self) ix + [%#sindex33] Seq.get (view'1 self) ix predicate match_at'0 [#"08_haystack.rs" 7 0 7 77] (needle : t_Vec'0) (haystack : t_Vec'0) (pos : int) (len : int) = [%#s08_haystack22] len <= Seq.length (view'0 needle) diff --git a/creusot/tests/should_succeed/vector/09_capacity.coma b/creusot/tests/should_succeed/vector/09_capacity.coma index 8e64155fb1..280ba8d6c1 100644 --- a/creusot/tests/should_succeed/vector/09_capacity.coma +++ b/creusot/tests/should_succeed/vector/09_capacity.coma @@ -11,7 +11,7 @@ module M_09_capacity__change_capacity [#"09_capacity.rs" 6 0 6 41] let%span svec9 = "../../../../creusot-contracts/src/std/vec.rs" 130 26 130 43 let%span svec10 = "../../../../creusot-contracts/src/std/vec.rs" 18 14 18 41 let%span smodel11 = "../../../../creusot-contracts/src/model.rs" 106 8 106 22 - let%span sops12 = "../../../../creusot-contracts/src/logic/ops.rs" 22 8 22 31 + let%span sindex12 = "../../../../creusot-contracts/src/logic/ops/index.rs" 23 8 23 31 let%span sresolve13 = "../../../../creusot-contracts/src/resolve.rs" 54 20 54 34 let%span svec14 = "../../../../creusot-contracts/src/std/vec.rs" 65 20 65 41 let%span sinvariant15 = "../../../../creusot-contracts/src/invariant.rs" 34 20 34 44 @@ -113,7 +113,7 @@ module M_09_capacity__change_capacity [#"09_capacity.rs" 6 0 6 41] use seq.Seq function index_logic'0 [@inline:trivial] (self : t_Vec'0) (ix : int) : t_T'0 = - [%#sops12] Seq.get (view'0 self) ix + [%#sindex12] Seq.get (view'0 self) ix meta "compute_max_steps" 1000000