summaryrefslogtreecommitdiff
path: root/tests/fstar
diff options
context:
space:
mode:
authorSon HO2023-11-22 15:06:43 +0100
committerGitHub2023-11-22 15:06:43 +0100
commitbacf3f5f6f5f6a9aa650d5ae8d12a132fd747039 (patch)
tree9953d7af1fe406cdc750030a43a5e4d6245cd763 /tests/fstar
parent587f1ebc0178acb19029d3fc9a729c197082aba7 (diff)
parent01cfd899119174ef7c5941c99dd251711f4ee701 (diff)
Merge pull request #45 from AeneasVerif/son_merge_types
Big cleanup
Diffstat (limited to 'tests/fstar')
-rw-r--r--tests/fstar/array/Array.Clauses.Template.fst6
-rw-r--r--tests/fstar/array/Array.Funs.fst218
-rw-r--r--tests/fstar/array/Array.Types.fst3
-rw-r--r--tests/fstar/array/Primitives.fst88
-rw-r--r--tests/fstar/betree/BetreeMain.Clauses.Template.fst47
-rw-r--r--tests/fstar/betree/BetreeMain.Clauses.fst2
-rw-r--r--tests/fstar/betree/BetreeMain.Funs.fst202
-rw-r--r--tests/fstar/betree/BetreeMain.Opaque.fsti15
-rw-r--r--tests/fstar/betree/BetreeMain.Types.fsti27
-rw-r--r--tests/fstar/betree/Primitives.fst88
-rw-r--r--tests/fstar/betree_back_stateful/BetreeMain.Clauses.Template.fst47
-rw-r--r--tests/fstar/betree_back_stateful/BetreeMain.Clauses.fst2
-rw-r--r--tests/fstar/betree_back_stateful/BetreeMain.Funs.fst220
-rw-r--r--tests/fstar/betree_back_stateful/BetreeMain.Opaque.fsti15
-rw-r--r--tests/fstar/betree_back_stateful/BetreeMain.Types.fsti27
-rw-r--r--tests/fstar/betree_back_stateful/Primitives.fst88
-rw-r--r--tests/fstar/hashmap/Hashmap.Clauses.Template.fst27
-rw-r--r--tests/fstar/hashmap/Hashmap.Funs.fst190
-rw-r--r--tests/fstar/hashmap/Hashmap.Types.fst6
-rw-r--r--tests/fstar/hashmap/Primitives.fst88
-rw-r--r--tests/fstar/hashmap_on_disk/HashmapMain.Clauses.Template.fst27
-rw-r--r--tests/fstar/hashmap_on_disk/HashmapMain.Funs.fst182
-rw-r--r--tests/fstar/hashmap_on_disk/HashmapMain.Opaque.fsti6
-rw-r--r--tests/fstar/hashmap_on_disk/HashmapMain.Types.fsti6
-rw-r--r--tests/fstar/hashmap_on_disk/Primitives.fst88
-rw-r--r--tests/fstar/misc/Constants.fst84
-rw-r--r--tests/fstar/misc/External.Funs.fst27
-rw-r--r--tests/fstar/misc/External.Opaque.fsti15
-rw-r--r--tests/fstar/misc/External.Types.fsti3
-rw-r--r--tests/fstar/misc/Loops.Clauses.Template.fst57
-rw-r--r--tests/fstar/misc/Loops.Funs.fst197
-rw-r--r--tests/fstar/misc/Loops.Types.fst3
-rw-r--r--tests/fstar/misc/NoNestedBorrows.fst212
-rw-r--r--tests/fstar/misc/Paper.fst33
-rw-r--r--tests/fstar/misc/PoloniusList.fst9
-rw-r--r--tests/fstar/misc/Primitives.fst88
-rw-r--r--tests/fstar/traits/Primitives.fst88
-rw-r--r--tests/fstar/traits/Traits.fst404
38 files changed, 1790 insertions, 1145 deletions
diff --git a/tests/fstar/array/Array.Clauses.Template.fst b/tests/fstar/array/Array.Clauses.Template.fst
index 06056d61..08a2925f 100644
--- a/tests/fstar/array/Array.Clauses.Template.fst
+++ b/tests/fstar/array/Array.Clauses.Template.fst
@@ -6,12 +6,14 @@ open Array.Types
#set-options "--z3rlimit 50 --fuel 1 --ifuel 1"
-(** [array::sum]: decreases clause *)
+(** [array::sum]: decreases clause
+ Source: 'src/array.rs', lines 228:0-236:1 *)
unfold
let sum_loop_decreases (s : slice u32) (sum0 : u32) (i : usize) : nat =
admit ()
-(** [array::sum2]: decreases clause *)
+(** [array::sum2]: decreases clause
+ Source: 'src/array.rs', lines 238:0-247:1 *)
unfold
let sum2_loop_decreases (s : slice u32) (s2 : slice u32) (sum0 : u32)
(i : usize) : nat =
diff --git a/tests/fstar/array/Array.Funs.fst b/tests/fstar/array/Array.Funs.fst
index 8f0bfbbd..a8722a4f 100644
--- a/tests/fstar/array/Array.Funs.fst
+++ b/tests/fstar/array/Array.Funs.fst
@@ -8,146 +8,174 @@ include Array.Clauses
#set-options "--z3rlimit 50 --fuel 1 --ifuel 1"
(** [array::incr]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/array.rs', lines 8:0-8:24 *)
let incr (x : u32) : result u32 =
u32_add x 1
-(** [array::array_to_shared_slice_]: forward function *)
+(** [array::array_to_shared_slice_]: forward function
+ Source: 'src/array.rs', lines 16:0-16:53 *)
let array_to_shared_slice_ (t : Type0) (s : array t 32) : result (slice t) =
array_to_slice t 32 s
-(** [array::array_to_mut_slice_]: forward function *)
+(** [array::array_to_mut_slice_]: forward function
+ Source: 'src/array.rs', lines 21:0-21:58 *)
let array_to_mut_slice_ (t : Type0) (s : array t 32) : result (slice t) =
array_to_slice t 32 s
-(** [array::array_to_mut_slice_]: backward function 0 *)
+(** [array::array_to_mut_slice_]: backward function 0
+ Source: 'src/array.rs', lines 21:0-21:58 *)
let array_to_mut_slice__back
(t : Type0) (s : array t 32) (ret : slice t) : result (array t 32) =
array_from_slice t 32 s ret
-(** [array::array_len]: forward function *)
+(** [array::array_len]: forward function
+ Source: 'src/array.rs', lines 25:0-25:40 *)
let array_len (t : Type0) (s : array t 32) : result usize =
let* s0 = array_to_slice t 32 s in let i = slice_len t s0 in Return i
-(** [array::shared_array_len]: forward function *)
+(** [array::shared_array_len]: forward function
+ Source: 'src/array.rs', lines 29:0-29:48 *)
let shared_array_len (t : Type0) (s : array t 32) : result usize =
let* s0 = array_to_slice t 32 s in let i = slice_len t s0 in Return i
-(** [array::shared_slice_len]: forward function *)
+(** [array::shared_slice_len]: forward function
+ Source: 'src/array.rs', lines 33:0-33:44 *)
let shared_slice_len (t : Type0) (s : slice t) : result usize =
let i = slice_len t s in Return i
-(** [array::index_array_shared]: forward function *)
+(** [array::index_array_shared]: forward function
+ Source: 'src/array.rs', lines 37:0-37:57 *)
let index_array_shared (t : Type0) (s : array t 32) (i : usize) : result t =
array_index_usize t 32 s i
-(** [array::index_array_u32]: forward function *)
+(** [array::index_array_u32]: forward function
+ Source: 'src/array.rs', lines 44:0-44:53 *)
let index_array_u32 (s : array u32 32) (i : usize) : result u32 =
array_index_usize u32 32 s i
-(** [array::index_array_copy]: forward function *)
+(** [array::index_array_copy]: forward function
+ Source: 'src/array.rs', lines 48:0-48:45 *)
let index_array_copy (x : array u32 32) : result u32 =
array_index_usize u32 32 x 0
-(** [array::index_mut_array]: forward function *)
+(** [array::index_mut_array]: forward function
+ Source: 'src/array.rs', lines 52:0-52:62 *)
let index_mut_array (t : Type0) (s : array t 32) (i : usize) : result t =
array_index_usize t 32 s i
-(** [array::index_mut_array]: backward function 0 *)
+(** [array::index_mut_array]: backward function 0
+ Source: 'src/array.rs', lines 52:0-52:62 *)
let index_mut_array_back
(t : Type0) (s : array t 32) (i : usize) (ret : t) : result (array t 32) =
array_update_usize t 32 s i ret
-(** [array::index_slice]: forward function *)
+(** [array::index_slice]: forward function
+ Source: 'src/array.rs', lines 56:0-56:46 *)
let index_slice (t : Type0) (s : slice t) (i : usize) : result t =
slice_index_usize t s i
-(** [array::index_mut_slice]: forward function *)
+(** [array::index_mut_slice]: forward function
+ Source: 'src/array.rs', lines 60:0-60:58 *)
let index_mut_slice (t : Type0) (s : slice t) (i : usize) : result t =
slice_index_usize t s i
-(** [array::index_mut_slice]: backward function 0 *)
+(** [array::index_mut_slice]: backward function 0
+ Source: 'src/array.rs', lines 60:0-60:58 *)
let index_mut_slice_back
(t : Type0) (s : slice t) (i : usize) (ret : t) : result (slice t) =
slice_update_usize t s i ret
-(** [array::slice_subslice_shared_]: forward function *)
+(** [array::slice_subslice_shared_]: forward function
+ Source: 'src/array.rs', lines 64:0-64:70 *)
let slice_subslice_shared_
(x : slice u32) (y : usize) (z : usize) : result (slice u32) =
core_slice_index_Slice_index u32 (core_ops_range_Range usize)
- (core_slice_index_Range_coresliceindexSliceIndexInst u32) x
+ (core_slice_index_SliceIndexRangeUsizeSliceTInst u32) x
{ start = y; end_ = z }
-(** [array::slice_subslice_mut_]: forward function *)
+(** [array::slice_subslice_mut_]: forward function
+ Source: 'src/array.rs', lines 68:0-68:75 *)
let slice_subslice_mut_
(x : slice u32) (y : usize) (z : usize) : result (slice u32) =
core_slice_index_Slice_index_mut u32 (core_ops_range_Range usize)
- (core_slice_index_Range_coresliceindexSliceIndexInst u32) x
+ (core_slice_index_SliceIndexRangeUsizeSliceTInst u32) x
{ start = y; end_ = z }
-(** [array::slice_subslice_mut_]: backward function 0 *)
+(** [array::slice_subslice_mut_]: backward function 0
+ Source: 'src/array.rs', lines 68:0-68:75 *)
let slice_subslice_mut__back
(x : slice u32) (y : usize) (z : usize) (ret : slice u32) :
result (slice u32)
=
core_slice_index_Slice_index_mut_back u32 (core_ops_range_Range usize)
- (core_slice_index_Range_coresliceindexSliceIndexInst u32) x
+ (core_slice_index_SliceIndexRangeUsizeSliceTInst u32) x
{ start = y; end_ = z } ret
-(** [array::array_to_slice_shared_]: forward function *)
+(** [array::array_to_slice_shared_]: forward function
+ Source: 'src/array.rs', lines 72:0-72:54 *)
let array_to_slice_shared_ (x : array u32 32) : result (slice u32) =
array_to_slice u32 32 x
-(** [array::array_to_slice_mut_]: forward function *)
+(** [array::array_to_slice_mut_]: forward function
+ Source: 'src/array.rs', lines 76:0-76:59 *)
let array_to_slice_mut_ (x : array u32 32) : result (slice u32) =
array_to_slice u32 32 x
-(** [array::array_to_slice_mut_]: backward function 0 *)
+(** [array::array_to_slice_mut_]: backward function 0
+ Source: 'src/array.rs', lines 76:0-76:59 *)
let array_to_slice_mut__back
(x : array u32 32) (ret : slice u32) : result (array u32 32) =
array_from_slice u32 32 x ret
-(** [array::array_subslice_shared_]: forward function *)
+(** [array::array_subslice_shared_]: forward function
+ Source: 'src/array.rs', lines 80:0-80:74 *)
let array_subslice_shared_
(x : array u32 32) (y : usize) (z : usize) : result (slice u32) =
core_array_Array_index u32 (core_ops_range_Range usize) 32
- (core_slice_index_Slice_coreopsindexIndexInst u32 (core_ops_range_Range
- usize) (core_slice_index_Range_coresliceindexSliceIndexInst u32)) x
+ (core_ops_index_IndexSliceTIInst u32 (core_ops_range_Range usize)
+ (core_slice_index_SliceIndexRangeUsizeSliceTInst u32)) x
{ start = y; end_ = z }
-(** [array::array_subslice_mut_]: forward function *)
+(** [array::array_subslice_mut_]: forward function
+ Source: 'src/array.rs', lines 84:0-84:79 *)
let array_subslice_mut_
(x : array u32 32) (y : usize) (z : usize) : result (slice u32) =
core_array_Array_index_mut u32 (core_ops_range_Range usize) 32
- (core_slice_index_Slice_coreopsindexIndexMutInst u32 (core_ops_range_Range
- usize) (core_slice_index_Range_coresliceindexSliceIndexInst u32)) x
+ (core_ops_index_IndexMutSliceTIInst u32 (core_ops_range_Range usize)
+ (core_slice_index_SliceIndexRangeUsizeSliceTInst u32)) x
{ start = y; end_ = z }
-(** [array::array_subslice_mut_]: backward function 0 *)
+(** [array::array_subslice_mut_]: backward function 0
+ Source: 'src/array.rs', lines 84:0-84:79 *)
let array_subslice_mut__back
(x : array u32 32) (y : usize) (z : usize) (ret : slice u32) :
result (array u32 32)
=
core_array_Array_index_mut_back u32 (core_ops_range_Range usize) 32
- (core_slice_index_Slice_coreopsindexIndexMutInst u32 (core_ops_range_Range
- usize) (core_slice_index_Range_coresliceindexSliceIndexInst u32)) x
+ (core_ops_index_IndexMutSliceTIInst u32 (core_ops_range_Range usize)
+ (core_slice_index_SliceIndexRangeUsizeSliceTInst u32)) x
{ start = y; end_ = z } ret
-(** [array::index_slice_0]: forward function *)
+(** [array::index_slice_0]: forward function
+ Source: 'src/array.rs', lines 88:0-88:38 *)
let index_slice_0 (t : Type0) (s : slice t) : result t =
slice_index_usize t s 0
-(** [array::index_array_0]: forward function *)
+(** [array::index_array_0]: forward function
+ Source: 'src/array.rs', lines 92:0-92:42 *)
let index_array_0 (t : Type0) (s : array t 32) : result t =
array_index_usize t 32 s 0
-(** [array::index_index_array]: forward function *)
+(** [array::index_index_array]: forward function
+ Source: 'src/array.rs', lines 103:0-103:71 *)
let index_index_array
(s : array (array u32 32) 32) (i : usize) (j : usize) : result u32 =
let* a = array_index_usize (array u32 32) 32 s i in
array_index_usize u32 32 a j
-(** [array::update_update_array]: forward function *)
+(** [array::update_update_array]: forward function
+ Source: 'src/array.rs', lines 114:0-114:70 *)
let update_update_array
(s : array (array u32 32) 32) (i : usize) (j : usize) : result unit =
let* a = array_index_usize (array u32 32) 32 s i in
@@ -155,28 +183,34 @@ let update_update_array
let* _ = array_update_usize (array u32 32) 32 s i a0 in
Return ()
-(** [array::array_local_deep_copy]: forward function *)
+(** [array::array_local_deep_copy]: forward function
+ Source: 'src/array.rs', lines 118:0-118:43 *)
let array_local_deep_copy (x : array u32 32) : result unit =
Return ()
-(** [array::take_array]: forward function *)
+(** [array::take_array]: forward function
+ Source: 'src/array.rs', lines 122:0-122:30 *)
let take_array (a : array u32 2) : result unit =
Return ()
-(** [array::take_array_borrow]: forward function *)
+(** [array::take_array_borrow]: forward function
+ Source: 'src/array.rs', lines 123:0-123:38 *)
let take_array_borrow (a : array u32 2) : result unit =
Return ()
-(** [array::take_slice]: forward function *)
+(** [array::take_slice]: forward function
+ Source: 'src/array.rs', lines 124:0-124:28 *)
let take_slice (s : slice u32) : result unit =
Return ()
(** [array::take_mut_slice]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/array.rs', lines 125:0-125:36 *)
let take_mut_slice (s : slice u32) : result (slice u32) =
Return s
-(** [array::take_all]: forward function *)
+(** [array::take_all]: forward function
+ Source: 'src/array.rs', lines 127:0-127:17 *)
let take_all : result unit =
let* _ = take_array (mk_array u32 2 [ 0; 0 ]) in
let* _ = take_array_borrow (mk_array u32 2 [ 0; 0 ]) in
@@ -187,27 +221,33 @@ let take_all : result unit =
let* _ = array_from_slice u32 2 (mk_array u32 2 [ 0; 0 ]) s1 in
Return ()
-(** [array::index_array]: forward function *)
+(** [array::index_array]: forward function
+ Source: 'src/array.rs', lines 141:0-141:38 *)
let index_array (x : array u32 2) : result u32 =
array_index_usize u32 2 x 0
-(** [array::index_array_borrow]: forward function *)
+(** [array::index_array_borrow]: forward function
+ Source: 'src/array.rs', lines 144:0-144:46 *)
let index_array_borrow (x : array u32 2) : result u32 =
array_index_usize u32 2 x 0
-(** [array::index_slice_u32_0]: forward function *)
+(** [array::index_slice_u32_0]: forward function
+ Source: 'src/array.rs', lines 148:0-148:42 *)
let index_slice_u32_0 (x : slice u32) : result u32 =
slice_index_usize u32 x 0
-(** [array::index_mut_slice_u32_0]: forward function *)
+(** [array::index_mut_slice_u32_0]: forward function
+ Source: 'src/array.rs', lines 152:0-152:50 *)
let index_mut_slice_u32_0 (x : slice u32) : result u32 =
slice_index_usize u32 x 0
-(** [array::index_mut_slice_u32_0]: backward function 0 *)
+(** [array::index_mut_slice_u32_0]: backward function 0
+ Source: 'src/array.rs', lines 152:0-152:50 *)
let index_mut_slice_u32_0_back (x : slice u32) : result (slice u32) =
let* _ = slice_index_usize u32 x 0 in Return x
-(** [array::index_all]: forward function *)
+(** [array::index_all]: forward function
+ Source: 'src/array.rs', lines 156:0-156:25 *)
let index_all : result u32 =
let* i = index_array (mk_array u32 2 [ 0; 0 ]) in
let* i0 = index_array (mk_array u32 2 [ 0; 0 ]) in
@@ -224,21 +264,25 @@ let index_all : result u32 =
let* _ = array_from_slice u32 2 (mk_array u32 2 [ 0; 0 ]) s1 in
Return i7
-(** [array::update_array]: forward function *)
+(** [array::update_array]: forward function
+ Source: 'src/array.rs', lines 170:0-170:36 *)
let update_array (x : array u32 2) : result unit =
let* _ = array_update_usize u32 2 x 0 1 in Return ()
(** [array::update_array_mut_borrow]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/array.rs', lines 173:0-173:48 *)
let update_array_mut_borrow (x : array u32 2) : result (array u32 2) =
array_update_usize u32 2 x 0 1
(** [array::update_mut_slice]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/array.rs', lines 176:0-176:38 *)
let update_mut_slice (x : slice u32) : result (slice u32) =
slice_update_usize u32 x 0 1
-(** [array::update_all]: forward function *)
+(** [array::update_all]: forward function
+ Source: 'src/array.rs', lines 180:0-180:19 *)
let update_all : result unit =
let* _ = update_array (mk_array u32 2 [ 0; 0 ]) in
let* x = update_array_mut_borrow (mk_array u32 2 [ 0; 0 ]) in
@@ -247,44 +291,49 @@ let update_all : result unit =
let* _ = array_from_slice u32 2 x s0 in
Return ()
-(** [array::range_all]: forward function *)
+(** [array::range_all]: forward function
+ Source: 'src/array.rs', lines 191:0-191:18 *)
let range_all : result unit =
let* s =
core_array_Array_index_mut u32 (core_ops_range_Range usize) 4
- (core_slice_index_Slice_coreopsindexIndexMutInst u32
- (core_ops_range_Range usize)
- (core_slice_index_Range_coresliceindexSliceIndexInst u32))
+ (core_ops_index_IndexMutSliceTIInst u32 (core_ops_range_Range usize)
+ (core_slice_index_SliceIndexRangeUsizeSliceTInst u32))
(mk_array u32 4 [ 0; 0; 0; 0 ]) { start = 1; end_ = 3 } in
let* s0 = update_mut_slice s in
let* _ =
core_array_Array_index_mut_back u32 (core_ops_range_Range usize) 4
- (core_slice_index_Slice_coreopsindexIndexMutInst u32
- (core_ops_range_Range usize)
- (core_slice_index_Range_coresliceindexSliceIndexInst u32))
+ (core_ops_index_IndexMutSliceTIInst u32 (core_ops_range_Range usize)
+ (core_slice_index_SliceIndexRangeUsizeSliceTInst u32))
(mk_array u32 4 [ 0; 0; 0; 0 ]) { start = 1; end_ = 3 } s0 in
Return ()
-(** [array::deref_array_borrow]: forward function *)
+(** [array::deref_array_borrow]: forward function
+ Source: 'src/array.rs', lines 200:0-200:46 *)
let deref_array_borrow (x : array u32 2) : result u32 =
array_index_usize u32 2 x 0
-(** [array::deref_array_mut_borrow]: forward function *)
+(** [array::deref_array_mut_borrow]: forward function
+ Source: 'src/array.rs', lines 205:0-205:54 *)
let deref_array_mut_borrow (x : array u32 2) : result u32 =
array_index_usize u32 2 x 0
-(** [array::deref_array_mut_borrow]: backward function 0 *)
+(** [array::deref_array_mut_borrow]: backward function 0
+ Source: 'src/array.rs', lines 205:0-205:54 *)
let deref_array_mut_borrow_back (x : array u32 2) : result (array u32 2) =
let* _ = array_index_usize u32 2 x 0 in Return x
-(** [array::take_array_t]: forward function *)
+(** [array::take_array_t]: forward function
+ Source: 'src/array.rs', lines 213:0-213:31 *)
let take_array_t (a : array aB_t 2) : result unit =
Return ()
-(** [array::non_copyable_array]: forward function *)
+(** [array::non_copyable_array]: forward function
+ Source: 'src/array.rs', lines 215:0-215:27 *)
let non_copyable_array : result unit =
let* _ = take_array_t (mk_array aB_t 2 [ AB_A; AB_B ]) in Return ()
-(** [array::sum]: loop 0: forward function *)
+(** [array::sum]: loop 0: forward function
+ Source: 'src/array.rs', lines 228:0-236:1 *)
let rec sum_loop
(s : slice u32) (sum0 : u32) (i : usize) :
Tot (result u32) (decreases (sum_loop_decreases s sum0 i))
@@ -298,11 +347,13 @@ let rec sum_loop
sum_loop s sum1 i2
else Return sum0
-(** [array::sum]: forward function *)
+(** [array::sum]: forward function
+ Source: 'src/array.rs', lines 228:0-228:28 *)
let sum (s : slice u32) : result u32 =
sum_loop s 0 0
-(** [array::sum2]: loop 0: forward function *)
+(** [array::sum2]: loop 0: forward function
+ Source: 'src/array.rs', lines 238:0-247:1 *)
let rec sum2_loop
(s : slice u32) (s2 : slice u32) (sum0 : u32) (i : usize) :
Tot (result u32) (decreases (sum2_loop_decreases s s2 sum0 i))
@@ -318,35 +369,41 @@ let rec sum2_loop
sum2_loop s s2 sum1 i4
else Return sum0
-(** [array::sum2]: forward function *)
+(** [array::sum2]: forward function
+ Source: 'src/array.rs', lines 238:0-238:41 *)
let sum2 (s : slice u32) (s2 : slice u32) : result u32 =
let i = slice_len u32 s in
let i0 = slice_len u32 s2 in
if not (i = i0) then Fail Failure else sum2_loop s s2 0 0
-(** [array::f0]: forward function *)
+(** [array::f0]: forward function
+ Source: 'src/array.rs', lines 249:0-249:11 *)
let f0 : result unit =
let* s = array_to_slice u32 2 (mk_array u32 2 [ 1; 2 ]) in
let* s0 = slice_update_usize u32 s 0 1 in
let* _ = array_from_slice u32 2 (mk_array u32 2 [ 1; 2 ]) s0 in
Return ()
-(** [array::f1]: forward function *)
+(** [array::f1]: forward function
+ Source: 'src/array.rs', lines 254:0-254:11 *)
let f1 : result unit =
let* _ = array_update_usize u32 2 (mk_array u32 2 [ 1; 2 ]) 0 1 in Return ()
-(** [array::f2]: forward function *)
+(** [array::f2]: forward function
+ Source: 'src/array.rs', lines 259:0-259:17 *)
let f2 (i : u32) : result unit =
Return ()
-(** [array::f4]: forward function *)
+(** [array::f4]: forward function
+ Source: 'src/array.rs', lines 268:0-268:54 *)
let f4 (x : array u32 32) (y : usize) (z : usize) : result (slice u32) =
core_array_Array_index u32 (core_ops_range_Range usize) 32
- (core_slice_index_Slice_coreopsindexIndexInst u32 (core_ops_range_Range
- usize) (core_slice_index_Range_coresliceindexSliceIndexInst u32)) x
+ (core_ops_index_IndexSliceTIInst u32 (core_ops_range_Range usize)
+ (core_slice_index_SliceIndexRangeUsizeSliceTInst u32)) x
{ start = y; end_ = z }
-(** [array::f3]: forward function *)
+(** [array::f3]: forward function
+ Source: 'src/array.rs', lines 261:0-261:18 *)
let f3 : result u32 =
let* i = array_index_usize u32 2 (mk_array u32 2 [ 1; 2 ]) 0 in
let* _ = f2 i in
@@ -355,15 +412,18 @@ let f3 : result u32 =
let* s0 = f4 b 16 18 in
sum2 s s0
-(** [array::SZ] *)
+(** [array::SZ]
+ Source: 'src/array.rs', lines 272:0-272:19 *)
let sz_body : result usize = Return 32
let sz_c : usize = eval_global sz_body
-(** [array::f5]: forward function *)
+(** [array::f5]: forward function
+ Source: 'src/array.rs', lines 275:0-275:31 *)
let f5 (x : array u32 32) : result u32 =
array_index_usize u32 32 x 0
-(** [array::ite]: forward function *)
+(** [array::ite]: forward function
+ Source: 'src/array.rs', lines 280:0-280:12 *)
let ite : result unit =
let* s = array_to_slice u32 2 (mk_array u32 2 [ 0; 0 ]) in
let* s0 = array_to_slice u32 2 (mk_array u32 2 [ 0; 0 ]) in
diff --git a/tests/fstar/array/Array.Types.fst b/tests/fstar/array/Array.Types.fst
index 4e8d5566..312f6018 100644
--- a/tests/fstar/array/Array.Types.fst
+++ b/tests/fstar/array/Array.Types.fst
@@ -5,6 +5,7 @@ open Primitives
#set-options "--z3rlimit 50 --fuel 1 --ifuel 1"
-(** [array::AB] *)
+(** [array::AB]
+ Source: 'src/array.rs', lines 3:0-3:11 *)
type aB_t = | AB_A : aB_t | AB_B : aB_t
diff --git a/tests/fstar/array/Primitives.fst b/tests/fstar/array/Primitives.fst
index 3297803c..94322ead 100644
--- a/tests/fstar/array/Primitives.fst
+++ b/tests/fstar/array/Primitives.fst
@@ -351,14 +351,14 @@ let alloc_boxed_Box_deref_mut (t : Type0) (x : t) : result t = Return x
let alloc_boxed_Box_deref_mut_back (t : Type) (_ : t) (x : t) : result t = Return x
// Trait instance
-let alloc_boxed_Box_coreOpsDerefInst (self : Type0) : core_ops_deref_Deref self = {
+let alloc_boxed_Box_coreopsDerefInst (self : Type0) : core_ops_deref_Deref self = {
target = self;
deref = alloc_boxed_Box_deref self;
}
// Trait instance
-let alloc_boxed_Box_coreOpsDerefMutInst (self : Type0) : core_ops_deref_DerefMut self = {
- derefInst = alloc_boxed_Box_coreOpsDerefInst self;
+let alloc_boxed_Box_coreopsDerefMutInst (self : Type0) : core_ops_deref_DerefMut self = {
+ derefInst = alloc_boxed_Box_coreopsDerefInst self;
deref_mut = alloc_boxed_Box_deref_mut self;
deref_mut_back = alloc_boxed_Box_deref_mut_back self;
}
@@ -483,23 +483,23 @@ let core_slice_index_Slice_index
| Some x -> Return x
// [core::slice::index::Range:::get]: forward function
-let core_slice_index_Range_get (t : Type0) (i : core_ops_range_Range usize) (s : slice t) :
+let core_slice_index_RangeUsize_get (t : Type0) (i : core_ops_range_Range usize) (s : slice t) :
result (option (slice t)) =
admit () // TODO
// [core::slice::index::Range::get_mut]: forward function
-let core_slice_index_Range_get_mut
+let core_slice_index_RangeUsize_get_mut
(t : Type0) : core_ops_range_Range usize → slice t → result (option (slice t)) =
admit () // TODO
// [core::slice::index::Range::get_mut]: backward function 0
-let core_slice_index_Range_get_mut_back
+let core_slice_index_RangeUsize_get_mut_back
(t : Type0) :
core_ops_range_Range usize → slice t → option (slice t) → result (slice t) =
admit () // TODO
// [core::slice::index::Range::get_unchecked]: forward function
-let core_slice_index_Range_get_unchecked
+let core_slice_index_RangeUsize_get_unchecked
(t : Type0) :
core_ops_range_Range usize → const_raw_ptr (slice t) → result (const_raw_ptr (slice t)) =
// Don't know what the model should be - for now we always fail to make
@@ -507,7 +507,7 @@ let core_slice_index_Range_get_unchecked
fun _ _ -> Fail Failure
// [core::slice::index::Range::get_unchecked_mut]: forward function
-let core_slice_index_Range_get_unchecked_mut
+let core_slice_index_RangeUsize_get_unchecked_mut
(t : Type0) :
core_ops_range_Range usize → mut_raw_ptr (slice t) → result (mut_raw_ptr (slice t)) =
// Don't know what the model should be - for now we always fail to make
@@ -515,17 +515,17 @@ let core_slice_index_Range_get_unchecked_mut
fun _ _ -> Fail Failure
// [core::slice::index::Range::index]: forward function
-let core_slice_index_Range_index
+let core_slice_index_RangeUsize_index
(t : Type0) : core_ops_range_Range usize → slice t → result (slice t) =
admit () // TODO
// [core::slice::index::Range::index_mut]: forward function
-let core_slice_index_Range_index_mut
+let core_slice_index_RangeUsize_index_mut
(t : Type0) : core_ops_range_Range usize → slice t → result (slice t) =
admit () // TODO
// [core::slice::index::Range::index_mut]: backward function 0
-let core_slice_index_Range_index_mut_back
+let core_slice_index_RangeUsize_index_mut_back
(t : Type0) : core_ops_range_Range usize → slice t → slice t → result (slice t) =
admit () // TODO
@@ -559,44 +559,44 @@ let core_array_Array_index_mut_back
(a : array t n) (i : idx) (x : inst.indexInst.output) : result (array t n) =
admit () // TODO
-// Trait implementation: [core::slice::index::[T]]
-let core_slice_index_Slice_coreopsindexIndexInst (t idx : Type0)
- (inst : core_slice_index_SliceIndex idx (slice t)) :
- core_ops_index_Index (slice t) idx = {
- output = inst.output;
- index = core_slice_index_Slice_index t idx inst;
-}
-
// Trait implementation: [core::slice::index::private_slice_index::Range]
-let core_slice_index_private_slice_index_Range_coresliceindexprivate_slice_indexSealedInst
+let core_slice_index_private_slice_index_SealedRangeUsizeInst
: core_slice_index_private_slice_index_Sealed (core_ops_range_Range usize) = ()
// Trait implementation: [core::slice::index::Range]
-let core_slice_index_Range_coresliceindexSliceIndexInst (t : Type0) :
+let core_slice_index_SliceIndexRangeUsizeSliceTInst (t : Type0) :
core_slice_index_SliceIndex (core_ops_range_Range usize) (slice t) = {
- sealedInst = core_slice_index_private_slice_index_Range_coresliceindexprivate_slice_indexSealedInst;
+ sealedInst = core_slice_index_private_slice_index_SealedRangeUsizeInst;
output = slice t;
- get = core_slice_index_Range_get t;
- get_mut = core_slice_index_Range_get_mut t;
- get_mut_back = core_slice_index_Range_get_mut_back t;
- get_unchecked = core_slice_index_Range_get_unchecked t;
- get_unchecked_mut = core_slice_index_Range_get_unchecked_mut t;
- index = core_slice_index_Range_index t;
- index_mut = core_slice_index_Range_index_mut t;
- index_mut_back = core_slice_index_Range_index_mut_back t;
+ get = core_slice_index_RangeUsize_get t;
+ get_mut = core_slice_index_RangeUsize_get_mut t;
+ get_mut_back = core_slice_index_RangeUsize_get_mut_back t;
+ get_unchecked = core_slice_index_RangeUsize_get_unchecked t;
+ get_unchecked_mut = core_slice_index_RangeUsize_get_unchecked_mut t;
+ index = core_slice_index_RangeUsize_index t;
+ index_mut = core_slice_index_RangeUsize_index_mut t;
+ index_mut_back = core_slice_index_RangeUsize_index_mut_back t;
+}
+
+// Trait implementation: [core::slice::index::[T]]
+let core_ops_index_IndexSliceTIInst (t idx : Type0)
+ (inst : core_slice_index_SliceIndex idx (slice t)) :
+ core_ops_index_Index (slice t) idx = {
+ output = inst.output;
+ index = core_slice_index_Slice_index t idx inst;
}
// Trait implementation: [core::slice::index::[T]]
-let core_slice_index_Slice_coreopsindexIndexMutInst (t idx : Type0)
+let core_ops_index_IndexMutSliceTIInst (t idx : Type0)
(inst : core_slice_index_SliceIndex idx (slice t)) :
core_ops_index_IndexMut (slice t) idx = {
- indexInst = core_slice_index_Slice_coreopsindexIndexInst t idx inst;
+ indexInst = core_ops_index_IndexSliceTIInst t idx inst;
index_mut = core_slice_index_Slice_index_mut t idx inst;
index_mut_back = core_slice_index_Slice_index_mut_back t idx inst;
}
// Trait implementation: [core::array::[T; N]]
-let core_array_Array_coreopsindexIndexInst (t idx : Type0) (n : usize)
+let core_ops_index_IndexArrayInst (t idx : Type0) (n : usize)
(inst : core_ops_index_Index (slice t) idx) :
core_ops_index_Index (array t n) idx = {
output = inst.output;
@@ -604,10 +604,10 @@ let core_array_Array_coreopsindexIndexInst (t idx : Type0) (n : usize)
}
// Trait implementation: [core::array::[T; N]]
-let core_array_Array_coreopsindexIndexMutInst (t idx : Type0) (n : usize)
+let core_ops_index_IndexMutArrayIInst (t idx : Type0) (n : usize)
(inst : core_ops_index_IndexMut (slice t) idx) :
core_ops_index_IndexMut (array t n) idx = {
- indexInst = core_array_Array_coreopsindexIndexInst t idx n inst.indexInst;
+ indexInst = core_ops_index_IndexArrayInst t idx n inst.indexInst;
index_mut = core_array_Array_index_mut t idx n inst;
index_mut_back = core_array_Array_index_mut_back t idx n inst;
}
@@ -651,13 +651,13 @@ let core_slice_index_usize_index_mut_back
admit () // TODO
// Trait implementation: [core::slice::index::private_slice_index::usize]
-let core_slice_index_private_slice_index_usize_coresliceindexprivate_slice_indexSealedInst
+let core_slice_index_private_slice_index_SealedUsizeInst
: core_slice_index_private_slice_index_Sealed usize = ()
// Trait implementation: [core::slice::index::usize]
-let core_slice_index_usize_coresliceindexSliceIndexInst (t : Type0) :
+let core_slice_index_SliceIndexUsizeSliceTInst (t : Type0) :
core_slice_index_SliceIndex usize (slice t) = {
- sealedInst = core_slice_index_private_slice_index_usize_coresliceindexprivate_slice_indexSealedInst;
+ sealedInst = core_slice_index_private_slice_index_SealedUsizeInst;
output = t;
get = core_slice_index_usize_get t;
get_mut = core_slice_index_usize_get_mut t;
@@ -706,24 +706,24 @@ let alloc_vec_Vec_coreopsindexIndexMutInst (t idx : Type0)
let alloc_vec_Vec_index_eq (#a : Type0) (v : alloc_vec_Vec a) (i : usize) :
Lemma (
- alloc_vec_Vec_index a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i ==
+ alloc_vec_Vec_index a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i ==
alloc_vec_Vec_index_usize v i)
- [SMTPat (alloc_vec_Vec_index a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i)]
+ [SMTPat (alloc_vec_Vec_index a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i)]
=
admit()
let alloc_vec_Vec_index_mut_eq (#a : Type0) (v : alloc_vec_Vec a) (i : usize) :
Lemma (
- alloc_vec_Vec_index_mut a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i ==
+ alloc_vec_Vec_index_mut a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i ==
alloc_vec_Vec_index_usize v i)
- [SMTPat (alloc_vec_Vec_index_mut a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i)]
+ [SMTPat (alloc_vec_Vec_index_mut a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i)]
=
admit()
let alloc_vec_Vec_index_mut_back_eq (#a : Type0) (v : alloc_vec_Vec a) (i : usize) (x : a) :
Lemma (
- alloc_vec_Vec_index_mut_back a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i x ==
+ alloc_vec_Vec_index_mut_back a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i x ==
alloc_vec_Vec_update_usize v i x)
- [SMTPat (alloc_vec_Vec_index_mut_back a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i x)]
+ [SMTPat (alloc_vec_Vec_index_mut_back a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i x)]
=
admit()
diff --git a/tests/fstar/betree/BetreeMain.Clauses.Template.fst b/tests/fstar/betree/BetreeMain.Clauses.Template.fst
index 8722f0bf..4ae29302 100644
--- a/tests/fstar/betree/BetreeMain.Clauses.Template.fst
+++ b/tests/fstar/betree/BetreeMain.Clauses.Template.fst
@@ -6,94 +6,109 @@ open BetreeMain.Types
#set-options "--z3rlimit 50 --fuel 1 --ifuel 1"
-(** [betree_main::betree::List::{1}::len]: decreases clause *)
+(** [betree_main::betree::{betree_main::betree::List<T>#1}::len]: decreases clause
+ Source: 'src/betree.rs', lines 276:4-276:24 *)
unfold
let betree_List_len_decreases (t : Type0) (self : betree_List_t t) : nat =
admit ()
-(** [betree_main::betree::List::{1}::split_at]: decreases clause *)
+(** [betree_main::betree::{betree_main::betree::List<T>#1}::split_at]: decreases clause
+ Source: 'src/betree.rs', lines 284:4-284:51 *)
unfold
let betree_List_split_at_decreases (t : Type0) (self : betree_List_t t)
(n : u64) : nat =
admit ()
-(** [betree_main::betree::List::{2}::partition_at_pivot]: decreases clause *)
+(** [betree_main::betree::{betree_main::betree::List<(u64, T)>#2}::partition_at_pivot]: decreases clause
+ Source: 'src/betree.rs', lines 339:4-339:73 *)
unfold
-let betree_List_partition_at_pivot_decreases (t : Type0)
+let betree_ListTupleU64T_partition_at_pivot_decreases (t : Type0)
(self : betree_List_t (u64 & t)) (pivot : u64) : nat =
admit ()
-(** [betree_main::betree::Node::{5}::lookup_first_message_for_key]: decreases clause *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::lookup_first_message_for_key]: decreases clause
+ Source: 'src/betree.rs', lines 789:4-792:34 *)
unfold
let betree_Node_lookup_first_message_for_key_decreases (key : u64)
(msgs : betree_List_t (u64 & betree_Message_t)) : nat =
admit ()
-(** [betree_main::betree::Node::{5}::apply_upserts]: decreases clause *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply_upserts]: decreases clause
+ Source: 'src/betree.rs', lines 819:4-819:90 *)
unfold
let betree_Node_apply_upserts_decreases
(msgs : betree_List_t (u64 & betree_Message_t)) (prev : option u64)
(key : u64) (st : state) : nat =
admit ()
-(** [betree_main::betree::Node::{5}::lookup_in_bindings]: decreases clause *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::lookup_in_bindings]: decreases clause
+ Source: 'src/betree.rs', lines 636:4-636:80 *)
unfold
let betree_Node_lookup_in_bindings_decreases (key : u64)
(bindings : betree_List_t (u64 & u64)) : nat =
admit ()
-(** [betree_main::betree::Internal::{4}::lookup_in_children]: decreases clause *)
+(** [betree_main::betree::{betree_main::betree::Internal#4}::lookup_in_children]: decreases clause
+ Source: 'src/betree.rs', lines 395:4-395:63 *)
unfold
let betree_Internal_lookup_in_children_decreases (self : betree_Internal_t)
(key : u64) (st : state) : nat =
admit ()
-(** [betree_main::betree::Node::{5}::lookup]: decreases clause *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::lookup]: decreases clause
+ Source: 'src/betree.rs', lines 709:4-709:58 *)
unfold
let betree_Node_lookup_decreases (self : betree_Node_t) (key : u64)
(st : state) : nat =
admit ()
-(** [betree_main::betree::Node::{5}::filter_messages_for_key]: decreases clause *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::filter_messages_for_key]: decreases clause
+ Source: 'src/betree.rs', lines 674:4-674:77 *)
unfold
let betree_Node_filter_messages_for_key_decreases (key : u64)
(msgs : betree_List_t (u64 & betree_Message_t)) : nat =
admit ()
-(** [betree_main::betree::Node::{5}::lookup_first_message_after_key]: decreases clause *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::lookup_first_message_after_key]: decreases clause
+ Source: 'src/betree.rs', lines 689:4-692:34 *)
unfold
let betree_Node_lookup_first_message_after_key_decreases (key : u64)
(msgs : betree_List_t (u64 & betree_Message_t)) : nat =
admit ()
-(** [betree_main::betree::Node::{5}::apply_messages_to_internal]: decreases clause *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply_messages_to_internal]: decreases clause
+ Source: 'src/betree.rs', lines 502:4-505:5 *)
unfold
let betree_Node_apply_messages_to_internal_decreases
(msgs : betree_List_t (u64 & betree_Message_t))
(new_msgs : betree_List_t (u64 & betree_Message_t)) : nat =
admit ()
-(** [betree_main::betree::Node::{5}::lookup_mut_in_bindings]: decreases clause *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::lookup_mut_in_bindings]: decreases clause
+ Source: 'src/betree.rs', lines 653:4-656:32 *)
unfold
let betree_Node_lookup_mut_in_bindings_decreases (key : u64)
(bindings : betree_List_t (u64 & u64)) : nat =
admit ()
-(** [betree_main::betree::Node::{5}::apply_messages_to_leaf]: decreases clause *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply_messages_to_leaf]: decreases clause
+ Source: 'src/betree.rs', lines 444:4-447:5 *)
unfold
let betree_Node_apply_messages_to_leaf_decreases
(bindings : betree_List_t (u64 & u64))
(new_msgs : betree_List_t (u64 & betree_Message_t)) : nat =
admit ()
-(** [betree_main::betree::Internal::{4}::flush]: decreases clause *)
+(** [betree_main::betree::{betree_main::betree::Internal#4}::flush]: decreases clause
+ Source: 'src/betree.rs', lines 410:4-415:26 *)
unfold
let betree_Internal_flush_decreases (self : betree_Internal_t)
(params : betree_Params_t) (node_id_cnt : betree_NodeIdCounter_t)
(content : betree_List_t (u64 & betree_Message_t)) (st : state) : nat =
admit ()
-(** [betree_main::betree::Node::{5}::apply_messages]: decreases clause *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply_messages]: decreases clause
+ Source: 'src/betree.rs', lines 588:4-593:5 *)
unfold
let betree_Node_apply_messages_decreases (self : betree_Node_t)
(params : betree_Params_t) (node_id_cnt : betree_NodeIdCounter_t)
diff --git a/tests/fstar/betree/BetreeMain.Clauses.fst b/tests/fstar/betree/BetreeMain.Clauses.fst
index cda7b920..21f953d1 100644
--- a/tests/fstar/betree/BetreeMain.Clauses.fst
+++ b/tests/fstar/betree/BetreeMain.Clauses.fst
@@ -114,7 +114,7 @@ let betree_List_split_at_decreases (t : Type0) (self : betree_List_t t)
(** [betree_main::betree::List::{2}::partition_at_pivot]: decreases clause *)
unfold
-let betree_List_partition_at_pivot_decreases (t : Type0)
+let betree_ListTupleU64T_partition_at_pivot_decreases (t : Type0)
(self : betree_List_t (u64 & t)) (pivot : u64) : betree_List_t (u64 & t) =
self
diff --git a/tests/fstar/betree/BetreeMain.Funs.fst b/tests/fstar/betree/BetreeMain.Funs.fst
index d2bf5c7c..537ec32e 100644
--- a/tests/fstar/betree/BetreeMain.Funs.fst
+++ b/tests/fstar/betree/BetreeMain.Funs.fst
@@ -8,14 +8,16 @@ include BetreeMain.Clauses
#set-options "--z3rlimit 50 --fuel 1 --ifuel 1"
-(** [betree_main::betree::load_internal_node]: forward function *)
+(** [betree_main::betree::load_internal_node]: forward function
+ Source: 'src/betree.rs', lines 36:0-36:52 *)
let betree_load_internal_node
(id : u64) (st : state) :
result (state & (betree_List_t (u64 & betree_Message_t)))
=
betree_utils_load_internal_node id st
-(** [betree_main::betree::store_internal_node]: forward function *)
+(** [betree_main::betree::store_internal_node]: forward function
+ Source: 'src/betree.rs', lines 41:0-41:60 *)
let betree_store_internal_node
(id : u64) (content : betree_List_t (u64 & betree_Message_t)) (st : state) :
result (state & unit)
@@ -23,12 +25,14 @@ let betree_store_internal_node
let* (st0, _) = betree_utils_store_internal_node id content st in
Return (st0, ())
-(** [betree_main::betree::load_leaf_node]: forward function *)
+(** [betree_main::betree::load_leaf_node]: forward function
+ Source: 'src/betree.rs', lines 46:0-46:44 *)
let betree_load_leaf_node
(id : u64) (st : state) : result (state & (betree_List_t (u64 & u64))) =
betree_utils_load_leaf_node id st
-(** [betree_main::betree::store_leaf_node]: forward function *)
+(** [betree_main::betree::store_leaf_node]: forward function
+ Source: 'src/betree.rs', lines 51:0-51:52 *)
let betree_store_leaf_node
(id : u64) (content : betree_List_t (u64 & u64)) (st : state) :
result (state & unit)
@@ -36,29 +40,35 @@ let betree_store_leaf_node
let* (st0, _) = betree_utils_store_leaf_node id content st in
Return (st0, ())
-(** [betree_main::betree::fresh_node_id]: forward function *)
+(** [betree_main::betree::fresh_node_id]: forward function
+ Source: 'src/betree.rs', lines 55:0-55:48 *)
let betree_fresh_node_id (counter : u64) : result u64 =
let* _ = u64_add counter 1 in Return counter
-(** [betree_main::betree::fresh_node_id]: backward function 0 *)
+(** [betree_main::betree::fresh_node_id]: backward function 0
+ Source: 'src/betree.rs', lines 55:0-55:48 *)
let betree_fresh_node_id_back (counter : u64) : result u64 =
u64_add counter 1
-(** [betree_main::betree::NodeIdCounter::{0}::new]: forward function *)
+(** [betree_main::betree::{betree_main::betree::NodeIdCounter}::new]: forward function
+ Source: 'src/betree.rs', lines 206:4-206:20 *)
let betree_NodeIdCounter_new : result betree_NodeIdCounter_t =
Return { next_node_id = 0 }
-(** [betree_main::betree::NodeIdCounter::{0}::fresh_id]: forward function *)
+(** [betree_main::betree::{betree_main::betree::NodeIdCounter}::fresh_id]: forward function
+ Source: 'src/betree.rs', lines 210:4-210:36 *)
let betree_NodeIdCounter_fresh_id
(self : betree_NodeIdCounter_t) : result u64 =
let* _ = u64_add self.next_node_id 1 in Return self.next_node_id
-(** [betree_main::betree::NodeIdCounter::{0}::fresh_id]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::NodeIdCounter}::fresh_id]: backward function 0
+ Source: 'src/betree.rs', lines 210:4-210:36 *)
let betree_NodeIdCounter_fresh_id_back
(self : betree_NodeIdCounter_t) : result betree_NodeIdCounter_t =
let* i = u64_add self.next_node_id 1 in Return { next_node_id = i }
-(** [betree_main::betree::upsert_update]: forward function *)
+(** [betree_main::betree::upsert_update]: forward function
+ Source: 'src/betree.rs', lines 234:0-234:70 *)
let betree_upsert_update
(prev : option u64) (st : betree_UpsertFunState_t) : result u64 =
begin match prev with
@@ -77,7 +87,8 @@ let betree_upsert_update
end
end
-(** [betree_main::betree::List::{1}::len]: forward function *)
+(** [betree_main::betree::{betree_main::betree::List<T>#1}::len]: forward function
+ Source: 'src/betree.rs', lines 276:4-276:24 *)
let rec betree_List_len
(t : Type0) (self : betree_List_t t) :
Tot (result u64) (decreases (betree_List_len_decreases t self))
@@ -87,7 +98,8 @@ let rec betree_List_len
| Betree_List_Nil -> Return 0
end
-(** [betree_main::betree::List::{1}::split_at]: forward function *)
+(** [betree_main::betree::{betree_main::betree::List<T>#1}::split_at]: forward function
+ Source: 'src/betree.rs', lines 284:4-284:51 *)
let rec betree_List_split_at
(t : Type0) (self : betree_List_t t) (n : u64) :
Tot (result ((betree_List_t t) & (betree_List_t t)))
@@ -106,15 +118,17 @@ let rec betree_List_split_at
| Betree_List_Nil -> Fail Failure
end
-(** [betree_main::betree::List::{1}::push_front]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [betree_main::betree::{betree_main::betree::List<T>#1}::push_front]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/betree.rs', lines 299:4-299:34 *)
let betree_List_push_front
(t : Type0) (self : betree_List_t t) (x : t) : result (betree_List_t t) =
let tl = core_mem_replace (betree_List_t t) self Betree_List_Nil in
let l = tl in
Return (Betree_List_Cons x l)
-(** [betree_main::betree::List::{1}::pop_front]: forward function *)
+(** [betree_main::betree::{betree_main::betree::List<T>#1}::pop_front]: forward function
+ Source: 'src/betree.rs', lines 306:4-306:32 *)
let betree_List_pop_front (t : Type0) (self : betree_List_t t) : result t =
let ls = core_mem_replace (betree_List_t t) self Betree_List_Nil in
begin match ls with
@@ -122,7 +136,8 @@ let betree_List_pop_front (t : Type0) (self : betree_List_t t) : result t =
| Betree_List_Nil -> Fail Failure
end
-(** [betree_main::betree::List::{1}::pop_front]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::List<T>#1}::pop_front]: backward function 0
+ Source: 'src/betree.rs', lines 306:4-306:32 *)
let betree_List_pop_front_back
(t : Type0) (self : betree_List_t t) : result (betree_List_t t) =
let ls = core_mem_replace (betree_List_t t) self Betree_List_Nil in
@@ -131,26 +146,29 @@ let betree_List_pop_front_back
| Betree_List_Nil -> Fail Failure
end
-(** [betree_main::betree::List::{1}::hd]: forward function *)
+(** [betree_main::betree::{betree_main::betree::List<T>#1}::hd]: forward function
+ Source: 'src/betree.rs', lines 318:4-318:22 *)
let betree_List_hd (t : Type0) (self : betree_List_t t) : result t =
begin match self with
| Betree_List_Cons hd l -> Return hd
| Betree_List_Nil -> Fail Failure
end
-(** [betree_main::betree::List::{2}::head_has_key]: forward function *)
-let betree_List_head_has_key
+(** [betree_main::betree::{betree_main::betree::List<(u64, T)>#2}::head_has_key]: forward function
+ Source: 'src/betree.rs', lines 327:4-327:44 *)
+let betree_ListTupleU64T_head_has_key
(t : Type0) (self : betree_List_t (u64 & t)) (key : u64) : result bool =
begin match self with
| Betree_List_Cons hd l -> let (i, _) = hd in Return (i = key)
| Betree_List_Nil -> Return false
end
-(** [betree_main::betree::List::{2}::partition_at_pivot]: forward function *)
-let rec betree_List_partition_at_pivot
+(** [betree_main::betree::{betree_main::betree::List<(u64, T)>#2}::partition_at_pivot]: forward function
+ Source: 'src/betree.rs', lines 339:4-339:73 *)
+let rec betree_ListTupleU64T_partition_at_pivot
(t : Type0) (self : betree_List_t (u64 & t)) (pivot : u64) :
Tot (result ((betree_List_t (u64 & t)) & (betree_List_t (u64 & t))))
- (decreases (betree_List_partition_at_pivot_decreases t self pivot))
+ (decreases (betree_ListTupleU64T_partition_at_pivot_decreases t self pivot))
=
begin match self with
| Betree_List_Cons hd tl ->
@@ -158,14 +176,15 @@ let rec betree_List_partition_at_pivot
if i >= pivot
then Return (Betree_List_Nil, Betree_List_Cons (i, x) tl)
else
- let* p = betree_List_partition_at_pivot t tl pivot in
+ let* p = betree_ListTupleU64T_partition_at_pivot t tl pivot in
let (ls0, ls1) = p in
let l = ls0 in
Return (Betree_List_Cons (i, x) l, ls1)
| Betree_List_Nil -> Return (Betree_List_Nil, Betree_List_Nil)
end
-(** [betree_main::betree::Leaf::{3}::split]: forward function *)
+(** [betree_main::betree::{betree_main::betree::Leaf#3}::split]: forward function
+ Source: 'src/betree.rs', lines 359:4-364:17 *)
let betree_Leaf_split
(self : betree_Leaf_t) (content : betree_List_t (u64 & u64))
(params : betree_Params_t) (node_id_cnt : betree_NodeIdCounter_t)
@@ -185,7 +204,8 @@ let betree_Leaf_split
let n0 = Betree_Node_Leaf { id = id1; size = params.split_size } in
Return (st1, { id = self.id; pivot = pivot; left = n; right = n0 })
-(** [betree_main::betree::Leaf::{3}::split]: backward function 2 *)
+(** [betree_main::betree::{betree_main::betree::Leaf#3}::split]: backward function 2
+ Source: 'src/betree.rs', lines 359:4-364:17 *)
let betree_Leaf_split_back
(self : betree_Leaf_t) (content : betree_List_t (u64 & u64))
(params : betree_Params_t) (node_id_cnt : betree_NodeIdCounter_t)
@@ -202,7 +222,8 @@ let betree_Leaf_split_back
let* _ = betree_store_leaf_node id1 content1 st0 in
betree_NodeIdCounter_fresh_id_back node_id_cnt0
-(** [betree_main::betree::Node::{5}::lookup_first_message_for_key]: forward function *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::lookup_first_message_for_key]: forward function
+ Source: 'src/betree.rs', lines 789:4-792:34 *)
let rec betree_Node_lookup_first_message_for_key
(key : u64) (msgs : betree_List_t (u64 & betree_Message_t)) :
Tot (result (betree_List_t (u64 & betree_Message_t)))
@@ -217,7 +238,8 @@ let rec betree_Node_lookup_first_message_for_key
| Betree_List_Nil -> Return Betree_List_Nil
end
-(** [betree_main::betree::Node::{5}::lookup_first_message_for_key]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::lookup_first_message_for_key]: backward function 0
+ Source: 'src/betree.rs', lines 789:4-792:34 *)
let rec betree_Node_lookup_first_message_for_key_back
(key : u64) (msgs : betree_List_t (u64 & betree_Message_t))
(ret : betree_List_t (u64 & betree_Message_t)) :
@@ -236,14 +258,15 @@ let rec betree_Node_lookup_first_message_for_key_back
| Betree_List_Nil -> Return ret
end
-(** [betree_main::betree::Node::{5}::apply_upserts]: forward function *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply_upserts]: forward function
+ Source: 'src/betree.rs', lines 819:4-819:90 *)
let rec betree_Node_apply_upserts
(msgs : betree_List_t (u64 & betree_Message_t)) (prev : option u64)
(key : u64) (st : state) :
Tot (result (state & u64))
(decreases (betree_Node_apply_upserts_decreases msgs prev key st))
=
- let* b = betree_List_head_has_key betree_Message_t msgs key in
+ let* b = betree_ListTupleU64T_head_has_key betree_Message_t msgs key in
if b
then
let* msg = betree_List_pop_front (u64 & betree_Message_t) msgs in
@@ -263,14 +286,15 @@ let rec betree_Node_apply_upserts
Betree_Message_Insert v) in
Return (st0, v)
-(** [betree_main::betree::Node::{5}::apply_upserts]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply_upserts]: backward function 0
+ Source: 'src/betree.rs', lines 819:4-819:90 *)
let rec betree_Node_apply_upserts_back
(msgs : betree_List_t (u64 & betree_Message_t)) (prev : option u64)
(key : u64) (st : state) :
Tot (result (betree_List_t (u64 & betree_Message_t)))
(decreases (betree_Node_apply_upserts_decreases msgs prev key st))
=
- let* b = betree_List_head_has_key betree_Message_t msgs key in
+ let* b = betree_ListTupleU64T_head_has_key betree_Message_t msgs key in
if b
then
let* msg = betree_List_pop_front (u64 & betree_Message_t) msgs in
@@ -288,7 +312,8 @@ let rec betree_Node_apply_upserts_back
betree_List_push_front (u64 & betree_Message_t) msgs (key,
Betree_Message_Insert v)
-(** [betree_main::betree::Node::{5}::lookup_in_bindings]: forward function *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::lookup_in_bindings]: forward function
+ Source: 'src/betree.rs', lines 636:4-636:80 *)
let rec betree_Node_lookup_in_bindings
(key : u64) (bindings : betree_List_t (u64 & u64)) :
Tot (result (option u64))
@@ -303,7 +328,8 @@ let rec betree_Node_lookup_in_bindings
| Betree_List_Nil -> Return None
end
-(** [betree_main::betree::Internal::{4}::lookup_in_children]: forward function *)
+(** [betree_main::betree::{betree_main::betree::Internal#4}::lookup_in_children]: forward function
+ Source: 'src/betree.rs', lines 395:4-395:63 *)
let rec betree_Internal_lookup_in_children
(self : betree_Internal_t) (key : u64) (st : state) :
Tot (result (state & (option u64)))
@@ -313,7 +339,8 @@ let rec betree_Internal_lookup_in_children
then betree_Node_lookup self.left key st
else betree_Node_lookup self.right key st
-(** [betree_main::betree::Internal::{4}::lookup_in_children]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::Internal#4}::lookup_in_children]: backward function 0
+ Source: 'src/betree.rs', lines 395:4-395:63 *)
and betree_Internal_lookup_in_children_back
(self : betree_Internal_t) (key : u64) (st : state) :
Tot (result betree_Internal_t)
@@ -327,7 +354,8 @@ and betree_Internal_lookup_in_children_back
let* n = betree_Node_lookup_back self.right key st in
Return { self with right = n }
-(** [betree_main::betree::Node::{5}::lookup]: forward function *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::lookup]: forward function
+ Source: 'src/betree.rs', lines 709:4-709:58 *)
and betree_Node_lookup
(self : betree_Node_t) (key : u64) (st : state) :
Tot (result (state & (option u64)))
@@ -386,7 +414,8 @@ and betree_Node_lookup
Return (st0, o)
end
-(** [betree_main::betree::Node::{5}::lookup]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::lookup]: backward function 0
+ Source: 'src/betree.rs', lines 709:4-709:58 *)
and betree_Node_lookup_back
(self : betree_Node_t) (key : u64) (st : state) :
Tot (result betree_Node_t)
@@ -445,8 +474,9 @@ and betree_Node_lookup_back
Return (Betree_Node_Leaf node)
end
-(** [betree_main::betree::Node::{5}::filter_messages_for_key]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::filter_messages_for_key]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/betree.rs', lines 674:4-674:77 *)
let rec betree_Node_filter_messages_for_key
(key : u64) (msgs : betree_List_t (u64 & betree_Message_t)) :
Tot (result (betree_List_t (u64 & betree_Message_t)))
@@ -465,7 +495,8 @@ let rec betree_Node_filter_messages_for_key
| Betree_List_Nil -> Return Betree_List_Nil
end
-(** [betree_main::betree::Node::{5}::lookup_first_message_after_key]: forward function *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::lookup_first_message_after_key]: forward function
+ Source: 'src/betree.rs', lines 689:4-692:34 *)
let rec betree_Node_lookup_first_message_after_key
(key : u64) (msgs : betree_List_t (u64 & betree_Message_t)) :
Tot (result (betree_List_t (u64 & betree_Message_t)))
@@ -480,7 +511,8 @@ let rec betree_Node_lookup_first_message_after_key
| Betree_List_Nil -> Return Betree_List_Nil
end
-(** [betree_main::betree::Node::{5}::lookup_first_message_after_key]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::lookup_first_message_after_key]: backward function 0
+ Source: 'src/betree.rs', lines 689:4-692:34 *)
let rec betree_Node_lookup_first_message_after_key_back
(key : u64) (msgs : betree_List_t (u64 & betree_Message_t))
(ret : betree_List_t (u64 & betree_Message_t)) :
@@ -499,15 +531,16 @@ let rec betree_Node_lookup_first_message_after_key_back
| Betree_List_Nil -> Return ret
end
-(** [betree_main::betree::Node::{5}::apply_to_internal]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply_to_internal]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/betree.rs', lines 521:4-521:89 *)
let betree_Node_apply_to_internal
(msgs : betree_List_t (u64 & betree_Message_t)) (key : u64)
(new_msg : betree_Message_t) :
result (betree_List_t (u64 & betree_Message_t))
=
let* msgs0 = betree_Node_lookup_first_message_for_key key msgs in
- let* b = betree_List_head_has_key betree_Message_t msgs0 key in
+ let* b = betree_ListTupleU64T_head_has_key betree_Message_t msgs0 key in
if b
then
begin match new_msg with
@@ -558,8 +591,9 @@ let betree_Node_apply_to_internal
betree_List_push_front (u64 & betree_Message_t) msgs0 (key, new_msg) in
betree_Node_lookup_first_message_for_key_back key msgs msgs1
-(** [betree_main::betree::Node::{5}::apply_messages_to_internal]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply_messages_to_internal]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/betree.rs', lines 502:4-505:5 *)
let rec betree_Node_apply_messages_to_internal
(msgs : betree_List_t (u64 & betree_Message_t))
(new_msgs : betree_List_t (u64 & betree_Message_t)) :
@@ -574,7 +608,8 @@ let rec betree_Node_apply_messages_to_internal
| Betree_List_Nil -> Return msgs
end
-(** [betree_main::betree::Node::{5}::lookup_mut_in_bindings]: forward function *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::lookup_mut_in_bindings]: forward function
+ Source: 'src/betree.rs', lines 653:4-656:32 *)
let rec betree_Node_lookup_mut_in_bindings
(key : u64) (bindings : betree_List_t (u64 & u64)) :
Tot (result (betree_List_t (u64 & u64)))
@@ -589,7 +624,8 @@ let rec betree_Node_lookup_mut_in_bindings
| Betree_List_Nil -> Return Betree_List_Nil
end
-(** [betree_main::betree::Node::{5}::lookup_mut_in_bindings]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::lookup_mut_in_bindings]: backward function 0
+ Source: 'src/betree.rs', lines 653:4-656:32 *)
let rec betree_Node_lookup_mut_in_bindings_back
(key : u64) (bindings : betree_List_t (u64 & u64))
(ret : betree_List_t (u64 & u64)) :
@@ -607,15 +643,16 @@ let rec betree_Node_lookup_mut_in_bindings_back
| Betree_List_Nil -> Return ret
end
-(** [betree_main::betree::Node::{5}::apply_to_leaf]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply_to_leaf]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/betree.rs', lines 460:4-460:87 *)
let betree_Node_apply_to_leaf
(bindings : betree_List_t (u64 & u64)) (key : u64)
(new_msg : betree_Message_t) :
result (betree_List_t (u64 & u64))
=
let* bindings0 = betree_Node_lookup_mut_in_bindings key bindings in
- let* b = betree_List_head_has_key u64 bindings0 key in
+ let* b = betree_ListTupleU64T_head_has_key u64 bindings0 key in
if b
then
let* hd = betree_List_pop_front (u64 & u64) bindings0 in
@@ -647,8 +684,9 @@ let betree_Node_apply_to_leaf
betree_Node_lookup_mut_in_bindings_back key bindings bindings1
end
-(** [betree_main::betree::Node::{5}::apply_messages_to_leaf]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply_messages_to_leaf]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/betree.rs', lines 444:4-447:5 *)
let rec betree_Node_apply_messages_to_leaf
(bindings : betree_List_t (u64 & u64))
(new_msgs : betree_List_t (u64 & betree_Message_t)) :
@@ -663,7 +701,8 @@ let rec betree_Node_apply_messages_to_leaf
| Betree_List_Nil -> Return bindings
end
-(** [betree_main::betree::Internal::{4}::flush]: forward function *)
+(** [betree_main::betree::{betree_main::betree::Internal#4}::flush]: forward function
+ Source: 'src/betree.rs', lines 410:4-415:26 *)
let rec betree_Internal_flush
(self : betree_Internal_t) (params : betree_Params_t)
(node_id_cnt : betree_NodeIdCounter_t)
@@ -672,7 +711,8 @@ let rec betree_Internal_flush
(decreases (
betree_Internal_flush_decreases self params node_id_cnt content st))
=
- let* p = betree_List_partition_at_pivot betree_Message_t content self.pivot
+ let* p =
+ betree_ListTupleU64T_partition_at_pivot betree_Message_t content self.pivot
in
let (msgs_left, msgs_right) = p in
let* len_left = betree_List_len (u64 & betree_Message_t) msgs_left in
@@ -702,7 +742,8 @@ let rec betree_Internal_flush
st in
Return (st0, msgs_left)
-(** [betree_main::betree::Internal::{4}::flush]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::Internal#4}::flush]: backward function 0
+ Source: 'src/betree.rs', lines 410:4-415:26 *)
and betree_Internal_flush_back
(self : betree_Internal_t) (params : betree_Params_t)
(node_id_cnt : betree_NodeIdCounter_t)
@@ -711,7 +752,8 @@ and betree_Internal_flush_back
(decreases (
betree_Internal_flush_decreases self params node_id_cnt content st))
=
- let* p = betree_List_partition_at_pivot betree_Message_t content self.pivot
+ let* p =
+ betree_ListTupleU64T_partition_at_pivot betree_Message_t content self.pivot
in
let (msgs_left, msgs_right) = p in
let* len_left = betree_List_len (u64 & betree_Message_t) msgs_left in
@@ -736,7 +778,8 @@ and betree_Internal_flush_back
st in
Return ({ self with right = n }, node_id_cnt0)
-(** [betree_main::betree::Node::{5}::apply_messages]: forward function *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply_messages]: forward function
+ Source: 'src/betree.rs', lines 588:4-593:5 *)
and betree_Node_apply_messages
(self : betree_Node_t) (params : betree_Params_t)
(node_id_cnt : betree_NodeIdCounter_t)
@@ -776,7 +819,8 @@ and betree_Node_apply_messages
Return (st1, ())
end
-(** [betree_main::betree::Node::{5}::apply_messages]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply_messages]: backward function 0
+ Source: 'src/betree.rs', lines 588:4-593:5 *)
and betree_Node_apply_messages_back
(self : betree_Node_t) (params : betree_Params_t)
(node_id_cnt : betree_NodeIdCounter_t)
@@ -819,7 +863,8 @@ and betree_Node_apply_messages_back
Return (Betree_Node_Leaf { node with size = len }, node_id_cnt)
end
-(** [betree_main::betree::Node::{5}::apply]: forward function *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply]: forward function
+ Source: 'src/betree.rs', lines 576:4-582:5 *)
let betree_Node_apply
(self : betree_Node_t) (params : betree_Params_t)
(node_id_cnt : betree_NodeIdCounter_t) (key : u64)
@@ -835,7 +880,8 @@ let betree_Node_apply
(key, new_msg) l) st in
Return (st0, ())
-(** [betree_main::betree::Node::{5}::apply]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply]: backward function 0
+ Source: 'src/betree.rs', lines 576:4-582:5 *)
let betree_Node_apply_back
(self : betree_Node_t) (params : betree_Params_t)
(node_id_cnt : betree_NodeIdCounter_t) (key : u64)
@@ -846,7 +892,8 @@ let betree_Node_apply_back
betree_Node_apply_messages_back self params node_id_cnt (Betree_List_Cons
(key, new_msg) l) st
-(** [betree_main::betree::BeTree::{6}::new]: forward function *)
+(** [betree_main::betree::{betree_main::betree::BeTree#6}::new]: forward function
+ Source: 'src/betree.rs', lines 849:4-849:60 *)
let betree_BeTree_new
(min_flush_size : u64) (split_size : u64) (st : state) :
result (state & betree_BeTree_t)
@@ -862,7 +909,8 @@ let betree_BeTree_new
root = (Betree_Node_Leaf { id = id; size = 0 })
})
-(** [betree_main::betree::BeTree::{6}::apply]: forward function *)
+(** [betree_main::betree::{betree_main::betree::BeTree#6}::apply]: forward function
+ Source: 'src/betree.rs', lines 868:4-868:47 *)
let betree_BeTree_apply
(self : betree_BeTree_t) (key : u64) (msg : betree_Message_t) (st : state) :
result (state & unit)
@@ -873,7 +921,8 @@ let betree_BeTree_apply
betree_Node_apply_back self.root self.params self.node_id_cnt key msg st in
Return (st0, ())
-(** [betree_main::betree::BeTree::{6}::apply]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::BeTree#6}::apply]: backward function 0
+ Source: 'src/betree.rs', lines 868:4-868:47 *)
let betree_BeTree_apply_back
(self : betree_BeTree_t) (key : u64) (msg : betree_Message_t) (st : state) :
result betree_BeTree_t
@@ -882,7 +931,8 @@ let betree_BeTree_apply_back
betree_Node_apply_back self.root self.params self.node_id_cnt key msg st in
Return { self with node_id_cnt = nic; root = n }
-(** [betree_main::betree::BeTree::{6}::insert]: forward function *)
+(** [betree_main::betree::{betree_main::betree::BeTree#6}::insert]: forward function
+ Source: 'src/betree.rs', lines 874:4-874:52 *)
let betree_BeTree_insert
(self : betree_BeTree_t) (key : u64) (value : u64) (st : state) :
result (state & unit)
@@ -893,26 +943,30 @@ let betree_BeTree_insert
in
Return (st0, ())
-(** [betree_main::betree::BeTree::{6}::insert]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::BeTree#6}::insert]: backward function 0
+ Source: 'src/betree.rs', lines 874:4-874:52 *)
let betree_BeTree_insert_back
(self : betree_BeTree_t) (key : u64) (value : u64) (st : state) :
result betree_BeTree_t
=
betree_BeTree_apply_back self key (Betree_Message_Insert value) st
-(** [betree_main::betree::BeTree::{6}::delete]: forward function *)
+(** [betree_main::betree::{betree_main::betree::BeTree#6}::delete]: forward function
+ Source: 'src/betree.rs', lines 880:4-880:38 *)
let betree_BeTree_delete
(self : betree_BeTree_t) (key : u64) (st : state) : result (state & unit) =
let* (st0, _) = betree_BeTree_apply self key Betree_Message_Delete st in
let* _ = betree_BeTree_apply_back self key Betree_Message_Delete st in
Return (st0, ())
-(** [betree_main::betree::BeTree::{6}::delete]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::BeTree#6}::delete]: backward function 0
+ Source: 'src/betree.rs', lines 880:4-880:38 *)
let betree_BeTree_delete_back
(self : betree_BeTree_t) (key : u64) (st : state) : result betree_BeTree_t =
betree_BeTree_apply_back self key Betree_Message_Delete st
-(** [betree_main::betree::BeTree::{6}::upsert]: forward function *)
+(** [betree_main::betree::{betree_main::betree::BeTree#6}::upsert]: forward function
+ Source: 'src/betree.rs', lines 886:4-886:59 *)
let betree_BeTree_upsert
(self : betree_BeTree_t) (key : u64) (upd : betree_UpsertFunState_t)
(st : state) :
@@ -923,7 +977,8 @@ let betree_BeTree_upsert
let* _ = betree_BeTree_apply_back self key (Betree_Message_Upsert upd) st in
Return (st0, ())
-(** [betree_main::betree::BeTree::{6}::upsert]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::BeTree#6}::upsert]: backward function 0
+ Source: 'src/betree.rs', lines 886:4-886:59 *)
let betree_BeTree_upsert_back
(self : betree_BeTree_t) (key : u64) (upd : betree_UpsertFunState_t)
(st : state) :
@@ -931,20 +986,23 @@ let betree_BeTree_upsert_back
=
betree_BeTree_apply_back self key (Betree_Message_Upsert upd) st
-(** [betree_main::betree::BeTree::{6}::lookup]: forward function *)
+(** [betree_main::betree::{betree_main::betree::BeTree#6}::lookup]: forward function
+ Source: 'src/betree.rs', lines 895:4-895:62 *)
let betree_BeTree_lookup
(self : betree_BeTree_t) (key : u64) (st : state) :
result (state & (option u64))
=
betree_Node_lookup self.root key st
-(** [betree_main::betree::BeTree::{6}::lookup]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::BeTree#6}::lookup]: backward function 0
+ Source: 'src/betree.rs', lines 895:4-895:62 *)
let betree_BeTree_lookup_back
(self : betree_BeTree_t) (key : u64) (st : state) : result betree_BeTree_t =
let* n = betree_Node_lookup_back self.root key st in
Return { self with root = n }
-(** [betree_main::main]: forward function *)
+(** [betree_main::main]: forward function
+ Source: 'src/betree_main.rs', lines 5:0-5:9 *)
let main : result unit =
Return ()
diff --git a/tests/fstar/betree/BetreeMain.Opaque.fsti b/tests/fstar/betree/BetreeMain.Opaque.fsti
index c5d0a814..b89c8718 100644
--- a/tests/fstar/betree/BetreeMain.Opaque.fsti
+++ b/tests/fstar/betree/BetreeMain.Opaque.fsti
@@ -6,25 +6,30 @@ include BetreeMain.Types
#set-options "--z3rlimit 50 --fuel 1 --ifuel 1"
-(** [betree_main::betree_utils::load_internal_node]: forward function *)
+(** [betree_main::betree_utils::load_internal_node]: forward function
+ Source: 'src/betree_utils.rs', lines 98:0-98:63 *)
val betree_utils_load_internal_node
: u64 -> state -> result (state & (betree_List_t (u64 & betree_Message_t)))
-(** [betree_main::betree_utils::store_internal_node]: forward function *)
+(** [betree_main::betree_utils::store_internal_node]: forward function
+ Source: 'src/betree_utils.rs', lines 115:0-115:71 *)
val betree_utils_store_internal_node
:
u64 -> betree_List_t (u64 & betree_Message_t) -> state -> result (state &
unit)
-(** [betree_main::betree_utils::load_leaf_node]: forward function *)
+(** [betree_main::betree_utils::load_leaf_node]: forward function
+ Source: 'src/betree_utils.rs', lines 132:0-132:55 *)
val betree_utils_load_leaf_node
: u64 -> state -> result (state & (betree_List_t (u64 & u64)))
-(** [betree_main::betree_utils::store_leaf_node]: forward function *)
+(** [betree_main::betree_utils::store_leaf_node]: forward function
+ Source: 'src/betree_utils.rs', lines 145:0-145:63 *)
val betree_utils_store_leaf_node
: u64 -> betree_List_t (u64 & u64) -> state -> result (state & unit)
-(** [core::option::Option::{0}::unwrap]: forward function *)
+(** [core::option::{core::option::Option<T>}::unwrap]: forward function
+ Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/core/src/option.rs', lines 932:4-932:34 *)
val core_option_Option_unwrap
(t : Type0) : option t -> state -> result (state & t)
diff --git a/tests/fstar/betree/BetreeMain.Types.fsti b/tests/fstar/betree/BetreeMain.Types.fsti
index 9320f6b7..a098ec19 100644
--- a/tests/fstar/betree/BetreeMain.Types.fsti
+++ b/tests/fstar/betree/BetreeMain.Types.fsti
@@ -5,43 +5,52 @@ open Primitives
#set-options "--z3rlimit 50 --fuel 1 --ifuel 1"
-(** [betree_main::betree::List] *)
+(** [betree_main::betree::List]
+ Source: 'src/betree.rs', lines 17:0-17:23 *)
type betree_List_t (t : Type0) =
| Betree_List_Cons : t -> betree_List_t t -> betree_List_t t
| Betree_List_Nil : betree_List_t t
-(** [betree_main::betree::UpsertFunState] *)
+(** [betree_main::betree::UpsertFunState]
+ Source: 'src/betree.rs', lines 63:0-63:23 *)
type betree_UpsertFunState_t =
| Betree_UpsertFunState_Add : u64 -> betree_UpsertFunState_t
| Betree_UpsertFunState_Sub : u64 -> betree_UpsertFunState_t
-(** [betree_main::betree::Message] *)
+(** [betree_main::betree::Message]
+ Source: 'src/betree.rs', lines 69:0-69:23 *)
type betree_Message_t =
| Betree_Message_Insert : u64 -> betree_Message_t
| Betree_Message_Delete : betree_Message_t
| Betree_Message_Upsert : betree_UpsertFunState_t -> betree_Message_t
-(** [betree_main::betree::Leaf] *)
+(** [betree_main::betree::Leaf]
+ Source: 'src/betree.rs', lines 167:0-167:11 *)
type betree_Leaf_t = { id : u64; size : u64; }
-(** [betree_main::betree::Internal] *)
+(** [betree_main::betree::Internal]
+ Source: 'src/betree.rs', lines 156:0-156:15 *)
type betree_Internal_t =
{
id : u64; pivot : u64; left : betree_Node_t; right : betree_Node_t;
}
-(** [betree_main::betree::Node] *)
+(** [betree_main::betree::Node]
+ Source: 'src/betree.rs', lines 179:0-179:9 *)
and betree_Node_t =
| Betree_Node_Internal : betree_Internal_t -> betree_Node_t
| Betree_Node_Leaf : betree_Leaf_t -> betree_Node_t
-(** [betree_main::betree::Params] *)
+(** [betree_main::betree::Params]
+ Source: 'src/betree.rs', lines 187:0-187:13 *)
type betree_Params_t = { min_flush_size : u64; split_size : u64; }
-(** [betree_main::betree::NodeIdCounter] *)
+(** [betree_main::betree::NodeIdCounter]
+ Source: 'src/betree.rs', lines 201:0-201:20 *)
type betree_NodeIdCounter_t = { next_node_id : u64; }
-(** [betree_main::betree::BeTree] *)
+(** [betree_main::betree::BeTree]
+ Source: 'src/betree.rs', lines 218:0-218:17 *)
type betree_BeTree_t =
{
params : betree_Params_t;
diff --git a/tests/fstar/betree/Primitives.fst b/tests/fstar/betree/Primitives.fst
index 3297803c..94322ead 100644
--- a/tests/fstar/betree/Primitives.fst
+++ b/tests/fstar/betree/Primitives.fst
@@ -351,14 +351,14 @@ let alloc_boxed_Box_deref_mut (t : Type0) (x : t) : result t = Return x
let alloc_boxed_Box_deref_mut_back (t : Type) (_ : t) (x : t) : result t = Return x
// Trait instance
-let alloc_boxed_Box_coreOpsDerefInst (self : Type0) : core_ops_deref_Deref self = {
+let alloc_boxed_Box_coreopsDerefInst (self : Type0) : core_ops_deref_Deref self = {
target = self;
deref = alloc_boxed_Box_deref self;
}
// Trait instance
-let alloc_boxed_Box_coreOpsDerefMutInst (self : Type0) : core_ops_deref_DerefMut self = {
- derefInst = alloc_boxed_Box_coreOpsDerefInst self;
+let alloc_boxed_Box_coreopsDerefMutInst (self : Type0) : core_ops_deref_DerefMut self = {
+ derefInst = alloc_boxed_Box_coreopsDerefInst self;
deref_mut = alloc_boxed_Box_deref_mut self;
deref_mut_back = alloc_boxed_Box_deref_mut_back self;
}
@@ -483,23 +483,23 @@ let core_slice_index_Slice_index
| Some x -> Return x
// [core::slice::index::Range:::get]: forward function
-let core_slice_index_Range_get (t : Type0) (i : core_ops_range_Range usize) (s : slice t) :
+let core_slice_index_RangeUsize_get (t : Type0) (i : core_ops_range_Range usize) (s : slice t) :
result (option (slice t)) =
admit () // TODO
// [core::slice::index::Range::get_mut]: forward function
-let core_slice_index_Range_get_mut
+let core_slice_index_RangeUsize_get_mut
(t : Type0) : core_ops_range_Range usize → slice t → result (option (slice t)) =
admit () // TODO
// [core::slice::index::Range::get_mut]: backward function 0
-let core_slice_index_Range_get_mut_back
+let core_slice_index_RangeUsize_get_mut_back
(t : Type0) :
core_ops_range_Range usize → slice t → option (slice t) → result (slice t) =
admit () // TODO
// [core::slice::index::Range::get_unchecked]: forward function
-let core_slice_index_Range_get_unchecked
+let core_slice_index_RangeUsize_get_unchecked
(t : Type0) :
core_ops_range_Range usize → const_raw_ptr (slice t) → result (const_raw_ptr (slice t)) =
// Don't know what the model should be - for now we always fail to make
@@ -507,7 +507,7 @@ let core_slice_index_Range_get_unchecked
fun _ _ -> Fail Failure
// [core::slice::index::Range::get_unchecked_mut]: forward function
-let core_slice_index_Range_get_unchecked_mut
+let core_slice_index_RangeUsize_get_unchecked_mut
(t : Type0) :
core_ops_range_Range usize → mut_raw_ptr (slice t) → result (mut_raw_ptr (slice t)) =
// Don't know what the model should be - for now we always fail to make
@@ -515,17 +515,17 @@ let core_slice_index_Range_get_unchecked_mut
fun _ _ -> Fail Failure
// [core::slice::index::Range::index]: forward function
-let core_slice_index_Range_index
+let core_slice_index_RangeUsize_index
(t : Type0) : core_ops_range_Range usize → slice t → result (slice t) =
admit () // TODO
// [core::slice::index::Range::index_mut]: forward function
-let core_slice_index_Range_index_mut
+let core_slice_index_RangeUsize_index_mut
(t : Type0) : core_ops_range_Range usize → slice t → result (slice t) =
admit () // TODO
// [core::slice::index::Range::index_mut]: backward function 0
-let core_slice_index_Range_index_mut_back
+let core_slice_index_RangeUsize_index_mut_back
(t : Type0) : core_ops_range_Range usize → slice t → slice t → result (slice t) =
admit () // TODO
@@ -559,44 +559,44 @@ let core_array_Array_index_mut_back
(a : array t n) (i : idx) (x : inst.indexInst.output) : result (array t n) =
admit () // TODO
-// Trait implementation: [core::slice::index::[T]]
-let core_slice_index_Slice_coreopsindexIndexInst (t idx : Type0)
- (inst : core_slice_index_SliceIndex idx (slice t)) :
- core_ops_index_Index (slice t) idx = {
- output = inst.output;
- index = core_slice_index_Slice_index t idx inst;
-}
-
// Trait implementation: [core::slice::index::private_slice_index::Range]
-let core_slice_index_private_slice_index_Range_coresliceindexprivate_slice_indexSealedInst
+let core_slice_index_private_slice_index_SealedRangeUsizeInst
: core_slice_index_private_slice_index_Sealed (core_ops_range_Range usize) = ()
// Trait implementation: [core::slice::index::Range]
-let core_slice_index_Range_coresliceindexSliceIndexInst (t : Type0) :
+let core_slice_index_SliceIndexRangeUsizeSliceTInst (t : Type0) :
core_slice_index_SliceIndex (core_ops_range_Range usize) (slice t) = {
- sealedInst = core_slice_index_private_slice_index_Range_coresliceindexprivate_slice_indexSealedInst;
+ sealedInst = core_slice_index_private_slice_index_SealedRangeUsizeInst;
output = slice t;
- get = core_slice_index_Range_get t;
- get_mut = core_slice_index_Range_get_mut t;
- get_mut_back = core_slice_index_Range_get_mut_back t;
- get_unchecked = core_slice_index_Range_get_unchecked t;
- get_unchecked_mut = core_slice_index_Range_get_unchecked_mut t;
- index = core_slice_index_Range_index t;
- index_mut = core_slice_index_Range_index_mut t;
- index_mut_back = core_slice_index_Range_index_mut_back t;
+ get = core_slice_index_RangeUsize_get t;
+ get_mut = core_slice_index_RangeUsize_get_mut t;
+ get_mut_back = core_slice_index_RangeUsize_get_mut_back t;
+ get_unchecked = core_slice_index_RangeUsize_get_unchecked t;
+ get_unchecked_mut = core_slice_index_RangeUsize_get_unchecked_mut t;
+ index = core_slice_index_RangeUsize_index t;
+ index_mut = core_slice_index_RangeUsize_index_mut t;
+ index_mut_back = core_slice_index_RangeUsize_index_mut_back t;
+}
+
+// Trait implementation: [core::slice::index::[T]]
+let core_ops_index_IndexSliceTIInst (t idx : Type0)
+ (inst : core_slice_index_SliceIndex idx (slice t)) :
+ core_ops_index_Index (slice t) idx = {
+ output = inst.output;
+ index = core_slice_index_Slice_index t idx inst;
}
// Trait implementation: [core::slice::index::[T]]
-let core_slice_index_Slice_coreopsindexIndexMutInst (t idx : Type0)
+let core_ops_index_IndexMutSliceTIInst (t idx : Type0)
(inst : core_slice_index_SliceIndex idx (slice t)) :
core_ops_index_IndexMut (slice t) idx = {
- indexInst = core_slice_index_Slice_coreopsindexIndexInst t idx inst;
+ indexInst = core_ops_index_IndexSliceTIInst t idx inst;
index_mut = core_slice_index_Slice_index_mut t idx inst;
index_mut_back = core_slice_index_Slice_index_mut_back t idx inst;
}
// Trait implementation: [core::array::[T; N]]
-let core_array_Array_coreopsindexIndexInst (t idx : Type0) (n : usize)
+let core_ops_index_IndexArrayInst (t idx : Type0) (n : usize)
(inst : core_ops_index_Index (slice t) idx) :
core_ops_index_Index (array t n) idx = {
output = inst.output;
@@ -604,10 +604,10 @@ let core_array_Array_coreopsindexIndexInst (t idx : Type0) (n : usize)
}
// Trait implementation: [core::array::[T; N]]
-let core_array_Array_coreopsindexIndexMutInst (t idx : Type0) (n : usize)
+let core_ops_index_IndexMutArrayIInst (t idx : Type0) (n : usize)
(inst : core_ops_index_IndexMut (slice t) idx) :
core_ops_index_IndexMut (array t n) idx = {
- indexInst = core_array_Array_coreopsindexIndexInst t idx n inst.indexInst;
+ indexInst = core_ops_index_IndexArrayInst t idx n inst.indexInst;
index_mut = core_array_Array_index_mut t idx n inst;
index_mut_back = core_array_Array_index_mut_back t idx n inst;
}
@@ -651,13 +651,13 @@ let core_slice_index_usize_index_mut_back
admit () // TODO
// Trait implementation: [core::slice::index::private_slice_index::usize]
-let core_slice_index_private_slice_index_usize_coresliceindexprivate_slice_indexSealedInst
+let core_slice_index_private_slice_index_SealedUsizeInst
: core_slice_index_private_slice_index_Sealed usize = ()
// Trait implementation: [core::slice::index::usize]
-let core_slice_index_usize_coresliceindexSliceIndexInst (t : Type0) :
+let core_slice_index_SliceIndexUsizeSliceTInst (t : Type0) :
core_slice_index_SliceIndex usize (slice t) = {
- sealedInst = core_slice_index_private_slice_index_usize_coresliceindexprivate_slice_indexSealedInst;
+ sealedInst = core_slice_index_private_slice_index_SealedUsizeInst;
output = t;
get = core_slice_index_usize_get t;
get_mut = core_slice_index_usize_get_mut t;
@@ -706,24 +706,24 @@ let alloc_vec_Vec_coreopsindexIndexMutInst (t idx : Type0)
let alloc_vec_Vec_index_eq (#a : Type0) (v : alloc_vec_Vec a) (i : usize) :
Lemma (
- alloc_vec_Vec_index a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i ==
+ alloc_vec_Vec_index a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i ==
alloc_vec_Vec_index_usize v i)
- [SMTPat (alloc_vec_Vec_index a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i)]
+ [SMTPat (alloc_vec_Vec_index a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i)]
=
admit()
let alloc_vec_Vec_index_mut_eq (#a : Type0) (v : alloc_vec_Vec a) (i : usize) :
Lemma (
- alloc_vec_Vec_index_mut a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i ==
+ alloc_vec_Vec_index_mut a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i ==
alloc_vec_Vec_index_usize v i)
- [SMTPat (alloc_vec_Vec_index_mut a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i)]
+ [SMTPat (alloc_vec_Vec_index_mut a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i)]
=
admit()
let alloc_vec_Vec_index_mut_back_eq (#a : Type0) (v : alloc_vec_Vec a) (i : usize) (x : a) :
Lemma (
- alloc_vec_Vec_index_mut_back a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i x ==
+ alloc_vec_Vec_index_mut_back a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i x ==
alloc_vec_Vec_update_usize v i x)
- [SMTPat (alloc_vec_Vec_index_mut_back a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i x)]
+ [SMTPat (alloc_vec_Vec_index_mut_back a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i x)]
=
admit()
diff --git a/tests/fstar/betree_back_stateful/BetreeMain.Clauses.Template.fst b/tests/fstar/betree_back_stateful/BetreeMain.Clauses.Template.fst
index 8722f0bf..4ae29302 100644
--- a/tests/fstar/betree_back_stateful/BetreeMain.Clauses.Template.fst
+++ b/tests/fstar/betree_back_stateful/BetreeMain.Clauses.Template.fst
@@ -6,94 +6,109 @@ open BetreeMain.Types
#set-options "--z3rlimit 50 --fuel 1 --ifuel 1"
-(** [betree_main::betree::List::{1}::len]: decreases clause *)
+(** [betree_main::betree::{betree_main::betree::List<T>#1}::len]: decreases clause
+ Source: 'src/betree.rs', lines 276:4-276:24 *)
unfold
let betree_List_len_decreases (t : Type0) (self : betree_List_t t) : nat =
admit ()
-(** [betree_main::betree::List::{1}::split_at]: decreases clause *)
+(** [betree_main::betree::{betree_main::betree::List<T>#1}::split_at]: decreases clause
+ Source: 'src/betree.rs', lines 284:4-284:51 *)
unfold
let betree_List_split_at_decreases (t : Type0) (self : betree_List_t t)
(n : u64) : nat =
admit ()
-(** [betree_main::betree::List::{2}::partition_at_pivot]: decreases clause *)
+(** [betree_main::betree::{betree_main::betree::List<(u64, T)>#2}::partition_at_pivot]: decreases clause
+ Source: 'src/betree.rs', lines 339:4-339:73 *)
unfold
-let betree_List_partition_at_pivot_decreases (t : Type0)
+let betree_ListTupleU64T_partition_at_pivot_decreases (t : Type0)
(self : betree_List_t (u64 & t)) (pivot : u64) : nat =
admit ()
-(** [betree_main::betree::Node::{5}::lookup_first_message_for_key]: decreases clause *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::lookup_first_message_for_key]: decreases clause
+ Source: 'src/betree.rs', lines 789:4-792:34 *)
unfold
let betree_Node_lookup_first_message_for_key_decreases (key : u64)
(msgs : betree_List_t (u64 & betree_Message_t)) : nat =
admit ()
-(** [betree_main::betree::Node::{5}::apply_upserts]: decreases clause *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply_upserts]: decreases clause
+ Source: 'src/betree.rs', lines 819:4-819:90 *)
unfold
let betree_Node_apply_upserts_decreases
(msgs : betree_List_t (u64 & betree_Message_t)) (prev : option u64)
(key : u64) (st : state) : nat =
admit ()
-(** [betree_main::betree::Node::{5}::lookup_in_bindings]: decreases clause *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::lookup_in_bindings]: decreases clause
+ Source: 'src/betree.rs', lines 636:4-636:80 *)
unfold
let betree_Node_lookup_in_bindings_decreases (key : u64)
(bindings : betree_List_t (u64 & u64)) : nat =
admit ()
-(** [betree_main::betree::Internal::{4}::lookup_in_children]: decreases clause *)
+(** [betree_main::betree::{betree_main::betree::Internal#4}::lookup_in_children]: decreases clause
+ Source: 'src/betree.rs', lines 395:4-395:63 *)
unfold
let betree_Internal_lookup_in_children_decreases (self : betree_Internal_t)
(key : u64) (st : state) : nat =
admit ()
-(** [betree_main::betree::Node::{5}::lookup]: decreases clause *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::lookup]: decreases clause
+ Source: 'src/betree.rs', lines 709:4-709:58 *)
unfold
let betree_Node_lookup_decreases (self : betree_Node_t) (key : u64)
(st : state) : nat =
admit ()
-(** [betree_main::betree::Node::{5}::filter_messages_for_key]: decreases clause *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::filter_messages_for_key]: decreases clause
+ Source: 'src/betree.rs', lines 674:4-674:77 *)
unfold
let betree_Node_filter_messages_for_key_decreases (key : u64)
(msgs : betree_List_t (u64 & betree_Message_t)) : nat =
admit ()
-(** [betree_main::betree::Node::{5}::lookup_first_message_after_key]: decreases clause *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::lookup_first_message_after_key]: decreases clause
+ Source: 'src/betree.rs', lines 689:4-692:34 *)
unfold
let betree_Node_lookup_first_message_after_key_decreases (key : u64)
(msgs : betree_List_t (u64 & betree_Message_t)) : nat =
admit ()
-(** [betree_main::betree::Node::{5}::apply_messages_to_internal]: decreases clause *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply_messages_to_internal]: decreases clause
+ Source: 'src/betree.rs', lines 502:4-505:5 *)
unfold
let betree_Node_apply_messages_to_internal_decreases
(msgs : betree_List_t (u64 & betree_Message_t))
(new_msgs : betree_List_t (u64 & betree_Message_t)) : nat =
admit ()
-(** [betree_main::betree::Node::{5}::lookup_mut_in_bindings]: decreases clause *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::lookup_mut_in_bindings]: decreases clause
+ Source: 'src/betree.rs', lines 653:4-656:32 *)
unfold
let betree_Node_lookup_mut_in_bindings_decreases (key : u64)
(bindings : betree_List_t (u64 & u64)) : nat =
admit ()
-(** [betree_main::betree::Node::{5}::apply_messages_to_leaf]: decreases clause *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply_messages_to_leaf]: decreases clause
+ Source: 'src/betree.rs', lines 444:4-447:5 *)
unfold
let betree_Node_apply_messages_to_leaf_decreases
(bindings : betree_List_t (u64 & u64))
(new_msgs : betree_List_t (u64 & betree_Message_t)) : nat =
admit ()
-(** [betree_main::betree::Internal::{4}::flush]: decreases clause *)
+(** [betree_main::betree::{betree_main::betree::Internal#4}::flush]: decreases clause
+ Source: 'src/betree.rs', lines 410:4-415:26 *)
unfold
let betree_Internal_flush_decreases (self : betree_Internal_t)
(params : betree_Params_t) (node_id_cnt : betree_NodeIdCounter_t)
(content : betree_List_t (u64 & betree_Message_t)) (st : state) : nat =
admit ()
-(** [betree_main::betree::Node::{5}::apply_messages]: decreases clause *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply_messages]: decreases clause
+ Source: 'src/betree.rs', lines 588:4-593:5 *)
unfold
let betree_Node_apply_messages_decreases (self : betree_Node_t)
(params : betree_Params_t) (node_id_cnt : betree_NodeIdCounter_t)
diff --git a/tests/fstar/betree_back_stateful/BetreeMain.Clauses.fst b/tests/fstar/betree_back_stateful/BetreeMain.Clauses.fst
index cda7b920..21f953d1 100644
--- a/tests/fstar/betree_back_stateful/BetreeMain.Clauses.fst
+++ b/tests/fstar/betree_back_stateful/BetreeMain.Clauses.fst
@@ -114,7 +114,7 @@ let betree_List_split_at_decreases (t : Type0) (self : betree_List_t t)
(** [betree_main::betree::List::{2}::partition_at_pivot]: decreases clause *)
unfold
-let betree_List_partition_at_pivot_decreases (t : Type0)
+let betree_ListTupleU64T_partition_at_pivot_decreases (t : Type0)
(self : betree_List_t (u64 & t)) (pivot : u64) : betree_List_t (u64 & t) =
self
diff --git a/tests/fstar/betree_back_stateful/BetreeMain.Funs.fst b/tests/fstar/betree_back_stateful/BetreeMain.Funs.fst
index 08c4f615..a2586431 100644
--- a/tests/fstar/betree_back_stateful/BetreeMain.Funs.fst
+++ b/tests/fstar/betree_back_stateful/BetreeMain.Funs.fst
@@ -8,14 +8,16 @@ include BetreeMain.Clauses
#set-options "--z3rlimit 50 --fuel 1 --ifuel 1"
-(** [betree_main::betree::load_internal_node]: forward function *)
+(** [betree_main::betree::load_internal_node]: forward function
+ Source: 'src/betree.rs', lines 36:0-36:52 *)
let betree_load_internal_node
(id : u64) (st : state) :
result (state & (betree_List_t (u64 & betree_Message_t)))
=
betree_utils_load_internal_node id st
-(** [betree_main::betree::store_internal_node]: forward function *)
+(** [betree_main::betree::store_internal_node]: forward function
+ Source: 'src/betree.rs', lines 41:0-41:60 *)
let betree_store_internal_node
(id : u64) (content : betree_List_t (u64 & betree_Message_t)) (st : state) :
result (state & unit)
@@ -23,12 +25,14 @@ let betree_store_internal_node
let* (st0, _) = betree_utils_store_internal_node id content st in
Return (st0, ())
-(** [betree_main::betree::load_leaf_node]: forward function *)
+(** [betree_main::betree::load_leaf_node]: forward function
+ Source: 'src/betree.rs', lines 46:0-46:44 *)
let betree_load_leaf_node
(id : u64) (st : state) : result (state & (betree_List_t (u64 & u64))) =
betree_utils_load_leaf_node id st
-(** [betree_main::betree::store_leaf_node]: forward function *)
+(** [betree_main::betree::store_leaf_node]: forward function
+ Source: 'src/betree.rs', lines 51:0-51:52 *)
let betree_store_leaf_node
(id : u64) (content : betree_List_t (u64 & u64)) (st : state) :
result (state & unit)
@@ -36,29 +40,35 @@ let betree_store_leaf_node
let* (st0, _) = betree_utils_store_leaf_node id content st in
Return (st0, ())
-(** [betree_main::betree::fresh_node_id]: forward function *)
+(** [betree_main::betree::fresh_node_id]: forward function
+ Source: 'src/betree.rs', lines 55:0-55:48 *)
let betree_fresh_node_id (counter : u64) : result u64 =
let* _ = u64_add counter 1 in Return counter
-(** [betree_main::betree::fresh_node_id]: backward function 0 *)
+(** [betree_main::betree::fresh_node_id]: backward function 0
+ Source: 'src/betree.rs', lines 55:0-55:48 *)
let betree_fresh_node_id_back (counter : u64) : result u64 =
u64_add counter 1
-(** [betree_main::betree::NodeIdCounter::{0}::new]: forward function *)
+(** [betree_main::betree::{betree_main::betree::NodeIdCounter}::new]: forward function
+ Source: 'src/betree.rs', lines 206:4-206:20 *)
let betree_NodeIdCounter_new : result betree_NodeIdCounter_t =
Return { next_node_id = 0 }
-(** [betree_main::betree::NodeIdCounter::{0}::fresh_id]: forward function *)
+(** [betree_main::betree::{betree_main::betree::NodeIdCounter}::fresh_id]: forward function
+ Source: 'src/betree.rs', lines 210:4-210:36 *)
let betree_NodeIdCounter_fresh_id
(self : betree_NodeIdCounter_t) : result u64 =
let* _ = u64_add self.next_node_id 1 in Return self.next_node_id
-(** [betree_main::betree::NodeIdCounter::{0}::fresh_id]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::NodeIdCounter}::fresh_id]: backward function 0
+ Source: 'src/betree.rs', lines 210:4-210:36 *)
let betree_NodeIdCounter_fresh_id_back
(self : betree_NodeIdCounter_t) : result betree_NodeIdCounter_t =
let* i = u64_add self.next_node_id 1 in Return { next_node_id = i }
-(** [betree_main::betree::upsert_update]: forward function *)
+(** [betree_main::betree::upsert_update]: forward function
+ Source: 'src/betree.rs', lines 234:0-234:70 *)
let betree_upsert_update
(prev : option u64) (st : betree_UpsertFunState_t) : result u64 =
begin match prev with
@@ -77,7 +87,8 @@ let betree_upsert_update
end
end
-(** [betree_main::betree::List::{1}::len]: forward function *)
+(** [betree_main::betree::{betree_main::betree::List<T>#1}::len]: forward function
+ Source: 'src/betree.rs', lines 276:4-276:24 *)
let rec betree_List_len
(t : Type0) (self : betree_List_t t) :
Tot (result u64) (decreases (betree_List_len_decreases t self))
@@ -87,7 +98,8 @@ let rec betree_List_len
| Betree_List_Nil -> Return 0
end
-(** [betree_main::betree::List::{1}::split_at]: forward function *)
+(** [betree_main::betree::{betree_main::betree::List<T>#1}::split_at]: forward function
+ Source: 'src/betree.rs', lines 284:4-284:51 *)
let rec betree_List_split_at
(t : Type0) (self : betree_List_t t) (n : u64) :
Tot (result ((betree_List_t t) & (betree_List_t t)))
@@ -106,15 +118,17 @@ let rec betree_List_split_at
| Betree_List_Nil -> Fail Failure
end
-(** [betree_main::betree::List::{1}::push_front]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [betree_main::betree::{betree_main::betree::List<T>#1}::push_front]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/betree.rs', lines 299:4-299:34 *)
let betree_List_push_front
(t : Type0) (self : betree_List_t t) (x : t) : result (betree_List_t t) =
let tl = core_mem_replace (betree_List_t t) self Betree_List_Nil in
let l = tl in
Return (Betree_List_Cons x l)
-(** [betree_main::betree::List::{1}::pop_front]: forward function *)
+(** [betree_main::betree::{betree_main::betree::List<T>#1}::pop_front]: forward function
+ Source: 'src/betree.rs', lines 306:4-306:32 *)
let betree_List_pop_front (t : Type0) (self : betree_List_t t) : result t =
let ls = core_mem_replace (betree_List_t t) self Betree_List_Nil in
begin match ls with
@@ -122,7 +136,8 @@ let betree_List_pop_front (t : Type0) (self : betree_List_t t) : result t =
| Betree_List_Nil -> Fail Failure
end
-(** [betree_main::betree::List::{1}::pop_front]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::List<T>#1}::pop_front]: backward function 0
+ Source: 'src/betree.rs', lines 306:4-306:32 *)
let betree_List_pop_front_back
(t : Type0) (self : betree_List_t t) : result (betree_List_t t) =
let ls = core_mem_replace (betree_List_t t) self Betree_List_Nil in
@@ -131,26 +146,29 @@ let betree_List_pop_front_back
| Betree_List_Nil -> Fail Failure
end
-(** [betree_main::betree::List::{1}::hd]: forward function *)
+(** [betree_main::betree::{betree_main::betree::List<T>#1}::hd]: forward function
+ Source: 'src/betree.rs', lines 318:4-318:22 *)
let betree_List_hd (t : Type0) (self : betree_List_t t) : result t =
begin match self with
| Betree_List_Cons hd l -> Return hd
| Betree_List_Nil -> Fail Failure
end
-(** [betree_main::betree::List::{2}::head_has_key]: forward function *)
-let betree_List_head_has_key
+(** [betree_main::betree::{betree_main::betree::List<(u64, T)>#2}::head_has_key]: forward function
+ Source: 'src/betree.rs', lines 327:4-327:44 *)
+let betree_ListTupleU64T_head_has_key
(t : Type0) (self : betree_List_t (u64 & t)) (key : u64) : result bool =
begin match self with
| Betree_List_Cons hd l -> let (i, _) = hd in Return (i = key)
| Betree_List_Nil -> Return false
end
-(** [betree_main::betree::List::{2}::partition_at_pivot]: forward function *)
-let rec betree_List_partition_at_pivot
+(** [betree_main::betree::{betree_main::betree::List<(u64, T)>#2}::partition_at_pivot]: forward function
+ Source: 'src/betree.rs', lines 339:4-339:73 *)
+let rec betree_ListTupleU64T_partition_at_pivot
(t : Type0) (self : betree_List_t (u64 & t)) (pivot : u64) :
Tot (result ((betree_List_t (u64 & t)) & (betree_List_t (u64 & t))))
- (decreases (betree_List_partition_at_pivot_decreases t self pivot))
+ (decreases (betree_ListTupleU64T_partition_at_pivot_decreases t self pivot))
=
begin match self with
| Betree_List_Cons hd tl ->
@@ -158,14 +176,15 @@ let rec betree_List_partition_at_pivot
if i >= pivot
then Return (Betree_List_Nil, Betree_List_Cons (i, x) tl)
else
- let* p = betree_List_partition_at_pivot t tl pivot in
+ let* p = betree_ListTupleU64T_partition_at_pivot t tl pivot in
let (ls0, ls1) = p in
let l = ls0 in
Return (Betree_List_Cons (i, x) l, ls1)
| Betree_List_Nil -> Return (Betree_List_Nil, Betree_List_Nil)
end
-(** [betree_main::betree::Leaf::{3}::split]: forward function *)
+(** [betree_main::betree::{betree_main::betree::Leaf#3}::split]: forward function
+ Source: 'src/betree.rs', lines 359:4-364:17 *)
let betree_Leaf_split
(self : betree_Leaf_t) (content : betree_List_t (u64 & u64))
(params : betree_Params_t) (node_id_cnt : betree_NodeIdCounter_t)
@@ -185,7 +204,8 @@ let betree_Leaf_split
let n0 = Betree_Node_Leaf { id = id1; size = params.split_size } in
Return (st1, { id = self.id; pivot = pivot; left = n; right = n0 })
-(** [betree_main::betree::Leaf::{3}::split]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::Leaf#3}::split]: backward function 0
+ Source: 'src/betree.rs', lines 359:4-364:17 *)
let betree_Leaf_split_back0
(self : betree_Leaf_t) (content : betree_List_t (u64 & u64))
(params : betree_Params_t) (node_id_cnt : betree_NodeIdCounter_t)
@@ -202,7 +222,8 @@ let betree_Leaf_split_back0
let* _ = betree_store_leaf_node id1 content1 st1 in
Return (st0, ())
-(** [betree_main::betree::Leaf::{3}::split]: backward function 1 *)
+(** [betree_main::betree::{betree_main::betree::Leaf#3}::split]: backward function 1
+ Source: 'src/betree.rs', lines 359:4-364:17 *)
let betree_Leaf_split_back1
(self : betree_Leaf_t) (content : betree_List_t (u64 & u64))
(params : betree_Params_t) (node_id_cnt : betree_NodeIdCounter_t)
@@ -219,7 +240,8 @@ let betree_Leaf_split_back1
let* _ = betree_store_leaf_node id1 content1 st1 in
Return (st0, ())
-(** [betree_main::betree::Leaf::{3}::split]: backward function 2 *)
+(** [betree_main::betree::{betree_main::betree::Leaf#3}::split]: backward function 2
+ Source: 'src/betree.rs', lines 359:4-364:17 *)
let betree_Leaf_split_back2
(self : betree_Leaf_t) (content : betree_List_t (u64 & u64))
(params : betree_Params_t) (node_id_cnt : betree_NodeIdCounter_t)
@@ -237,7 +259,8 @@ let betree_Leaf_split_back2
let* node_id_cnt1 = betree_NodeIdCounter_fresh_id_back node_id_cnt0 in
Return (st0, node_id_cnt1)
-(** [betree_main::betree::Node::{5}::lookup_first_message_for_key]: forward function *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::lookup_first_message_for_key]: forward function
+ Source: 'src/betree.rs', lines 789:4-792:34 *)
let rec betree_Node_lookup_first_message_for_key
(key : u64) (msgs : betree_List_t (u64 & betree_Message_t)) :
Tot (result (betree_List_t (u64 & betree_Message_t)))
@@ -252,7 +275,8 @@ let rec betree_Node_lookup_first_message_for_key
| Betree_List_Nil -> Return Betree_List_Nil
end
-(** [betree_main::betree::Node::{5}::lookup_first_message_for_key]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::lookup_first_message_for_key]: backward function 0
+ Source: 'src/betree.rs', lines 789:4-792:34 *)
let rec betree_Node_lookup_first_message_for_key_back
(key : u64) (msgs : betree_List_t (u64 & betree_Message_t))
(ret : betree_List_t (u64 & betree_Message_t)) :
@@ -271,14 +295,15 @@ let rec betree_Node_lookup_first_message_for_key_back
| Betree_List_Nil -> Return ret
end
-(** [betree_main::betree::Node::{5}::apply_upserts]: forward function *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply_upserts]: forward function
+ Source: 'src/betree.rs', lines 819:4-819:90 *)
let rec betree_Node_apply_upserts
(msgs : betree_List_t (u64 & betree_Message_t)) (prev : option u64)
(key : u64) (st : state) :
Tot (result (state & u64))
(decreases (betree_Node_apply_upserts_decreases msgs prev key st))
=
- let* b = betree_List_head_has_key betree_Message_t msgs key in
+ let* b = betree_ListTupleU64T_head_has_key betree_Message_t msgs key in
if b
then
let* msg = betree_List_pop_front (u64 & betree_Message_t) msgs in
@@ -298,14 +323,15 @@ let rec betree_Node_apply_upserts
Betree_Message_Insert v) in
Return (st0, v)
-(** [betree_main::betree::Node::{5}::apply_upserts]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply_upserts]: backward function 0
+ Source: 'src/betree.rs', lines 819:4-819:90 *)
let rec betree_Node_apply_upserts_back
(msgs : betree_List_t (u64 & betree_Message_t)) (prev : option u64)
(key : u64) (st : state) (st0 : state) :
Tot (result (state & (betree_List_t (u64 & betree_Message_t))))
(decreases (betree_Node_apply_upserts_decreases msgs prev key st))
=
- let* b = betree_List_head_has_key betree_Message_t msgs key in
+ let* b = betree_ListTupleU64T_head_has_key betree_Message_t msgs key in
if b
then
let* msg = betree_List_pop_front (u64 & betree_Message_t) msgs in
@@ -325,7 +351,8 @@ let rec betree_Node_apply_upserts_back
Betree_Message_Insert v) in
Return (st0, msgs0)
-(** [betree_main::betree::Node::{5}::lookup_in_bindings]: forward function *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::lookup_in_bindings]: forward function
+ Source: 'src/betree.rs', lines 636:4-636:80 *)
let rec betree_Node_lookup_in_bindings
(key : u64) (bindings : betree_List_t (u64 & u64)) :
Tot (result (option u64))
@@ -340,7 +367,8 @@ let rec betree_Node_lookup_in_bindings
| Betree_List_Nil -> Return None
end
-(** [betree_main::betree::Internal::{4}::lookup_in_children]: forward function *)
+(** [betree_main::betree::{betree_main::betree::Internal#4}::lookup_in_children]: forward function
+ Source: 'src/betree.rs', lines 395:4-395:63 *)
let rec betree_Internal_lookup_in_children
(self : betree_Internal_t) (key : u64) (st : state) :
Tot (result (state & (option u64)))
@@ -350,7 +378,8 @@ let rec betree_Internal_lookup_in_children
then betree_Node_lookup self.left key st
else betree_Node_lookup self.right key st
-(** [betree_main::betree::Internal::{4}::lookup_in_children]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::Internal#4}::lookup_in_children]: backward function 0
+ Source: 'src/betree.rs', lines 395:4-395:63 *)
and betree_Internal_lookup_in_children_back
(self : betree_Internal_t) (key : u64) (st : state) (st0 : state) :
Tot (result (state & betree_Internal_t))
@@ -364,7 +393,8 @@ and betree_Internal_lookup_in_children_back
let* (st1, n) = betree_Node_lookup_back self.right key st st0 in
Return (st1, { self with right = n })
-(** [betree_main::betree::Node::{5}::lookup]: forward function *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::lookup]: forward function
+ Source: 'src/betree.rs', lines 709:4-709:58 *)
and betree_Node_lookup
(self : betree_Node_t) (key : u64) (st : state) :
Tot (result (state & (option u64)))
@@ -424,7 +454,8 @@ and betree_Node_lookup
Return (st0, o)
end
-(** [betree_main::betree::Node::{5}::lookup]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::lookup]: backward function 0
+ Source: 'src/betree.rs', lines 709:4-709:58 *)
and betree_Node_lookup_back
(self : betree_Node_t) (key : u64) (st : state) (st0 : state) :
Tot (result (state & betree_Node_t))
@@ -486,8 +517,9 @@ and betree_Node_lookup_back
Return (st0, Betree_Node_Leaf node)
end
-(** [betree_main::betree::Node::{5}::filter_messages_for_key]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::filter_messages_for_key]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/betree.rs', lines 674:4-674:77 *)
let rec betree_Node_filter_messages_for_key
(key : u64) (msgs : betree_List_t (u64 & betree_Message_t)) :
Tot (result (betree_List_t (u64 & betree_Message_t)))
@@ -506,7 +538,8 @@ let rec betree_Node_filter_messages_for_key
| Betree_List_Nil -> Return Betree_List_Nil
end
-(** [betree_main::betree::Node::{5}::lookup_first_message_after_key]: forward function *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::lookup_first_message_after_key]: forward function
+ Source: 'src/betree.rs', lines 689:4-692:34 *)
let rec betree_Node_lookup_first_message_after_key
(key : u64) (msgs : betree_List_t (u64 & betree_Message_t)) :
Tot (result (betree_List_t (u64 & betree_Message_t)))
@@ -521,7 +554,8 @@ let rec betree_Node_lookup_first_message_after_key
| Betree_List_Nil -> Return Betree_List_Nil
end
-(** [betree_main::betree::Node::{5}::lookup_first_message_after_key]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::lookup_first_message_after_key]: backward function 0
+ Source: 'src/betree.rs', lines 689:4-692:34 *)
let rec betree_Node_lookup_first_message_after_key_back
(key : u64) (msgs : betree_List_t (u64 & betree_Message_t))
(ret : betree_List_t (u64 & betree_Message_t)) :
@@ -540,15 +574,16 @@ let rec betree_Node_lookup_first_message_after_key_back
| Betree_List_Nil -> Return ret
end
-(** [betree_main::betree::Node::{5}::apply_to_internal]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply_to_internal]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/betree.rs', lines 521:4-521:89 *)
let betree_Node_apply_to_internal
(msgs : betree_List_t (u64 & betree_Message_t)) (key : u64)
(new_msg : betree_Message_t) :
result (betree_List_t (u64 & betree_Message_t))
=
let* msgs0 = betree_Node_lookup_first_message_for_key key msgs in
- let* b = betree_List_head_has_key betree_Message_t msgs0 key in
+ let* b = betree_ListTupleU64T_head_has_key betree_Message_t msgs0 key in
if b
then
begin match new_msg with
@@ -599,8 +634,9 @@ let betree_Node_apply_to_internal
betree_List_push_front (u64 & betree_Message_t) msgs0 (key, new_msg) in
betree_Node_lookup_first_message_for_key_back key msgs msgs1
-(** [betree_main::betree::Node::{5}::apply_messages_to_internal]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply_messages_to_internal]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/betree.rs', lines 502:4-505:5 *)
let rec betree_Node_apply_messages_to_internal
(msgs : betree_List_t (u64 & betree_Message_t))
(new_msgs : betree_List_t (u64 & betree_Message_t)) :
@@ -615,7 +651,8 @@ let rec betree_Node_apply_messages_to_internal
| Betree_List_Nil -> Return msgs
end
-(** [betree_main::betree::Node::{5}::lookup_mut_in_bindings]: forward function *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::lookup_mut_in_bindings]: forward function
+ Source: 'src/betree.rs', lines 653:4-656:32 *)
let rec betree_Node_lookup_mut_in_bindings
(key : u64) (bindings : betree_List_t (u64 & u64)) :
Tot (result (betree_List_t (u64 & u64)))
@@ -630,7 +667,8 @@ let rec betree_Node_lookup_mut_in_bindings
| Betree_List_Nil -> Return Betree_List_Nil
end
-(** [betree_main::betree::Node::{5}::lookup_mut_in_bindings]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::lookup_mut_in_bindings]: backward function 0
+ Source: 'src/betree.rs', lines 653:4-656:32 *)
let rec betree_Node_lookup_mut_in_bindings_back
(key : u64) (bindings : betree_List_t (u64 & u64))
(ret : betree_List_t (u64 & u64)) :
@@ -648,15 +686,16 @@ let rec betree_Node_lookup_mut_in_bindings_back
| Betree_List_Nil -> Return ret
end
-(** [betree_main::betree::Node::{5}::apply_to_leaf]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply_to_leaf]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/betree.rs', lines 460:4-460:87 *)
let betree_Node_apply_to_leaf
(bindings : betree_List_t (u64 & u64)) (key : u64)
(new_msg : betree_Message_t) :
result (betree_List_t (u64 & u64))
=
let* bindings0 = betree_Node_lookup_mut_in_bindings key bindings in
- let* b = betree_List_head_has_key u64 bindings0 key in
+ let* b = betree_ListTupleU64T_head_has_key u64 bindings0 key in
if b
then
let* hd = betree_List_pop_front (u64 & u64) bindings0 in
@@ -688,8 +727,9 @@ let betree_Node_apply_to_leaf
betree_Node_lookup_mut_in_bindings_back key bindings bindings1
end
-(** [betree_main::betree::Node::{5}::apply_messages_to_leaf]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply_messages_to_leaf]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/betree.rs', lines 444:4-447:5 *)
let rec betree_Node_apply_messages_to_leaf
(bindings : betree_List_t (u64 & u64))
(new_msgs : betree_List_t (u64 & betree_Message_t)) :
@@ -704,7 +744,8 @@ let rec betree_Node_apply_messages_to_leaf
| Betree_List_Nil -> Return bindings
end
-(** [betree_main::betree::Internal::{4}::flush]: forward function *)
+(** [betree_main::betree::{betree_main::betree::Internal#4}::flush]: forward function
+ Source: 'src/betree.rs', lines 410:4-415:26 *)
let rec betree_Internal_flush
(self : betree_Internal_t) (params : betree_Params_t)
(node_id_cnt : betree_NodeIdCounter_t)
@@ -713,7 +754,8 @@ let rec betree_Internal_flush
(decreases (
betree_Internal_flush_decreases self params node_id_cnt content st))
=
- let* p = betree_List_partition_at_pivot betree_Message_t content self.pivot
+ let* p =
+ betree_ListTupleU64T_partition_at_pivot betree_Message_t content self.pivot
in
let (msgs_left, msgs_right) = p in
let* len_left = betree_List_len (u64 & betree_Message_t) msgs_left in
@@ -752,7 +794,8 @@ let rec betree_Internal_flush
st st1 in
Return (st2, msgs_left)
-(** [betree_main::betree::Internal::{4}::flush]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::Internal#4}::flush]: backward function 0
+ Source: 'src/betree.rs', lines 410:4-415:26 *)
and betree_Internal_flush_back'a
(self : betree_Internal_t) (params : betree_Params_t)
(node_id_cnt : betree_NodeIdCounter_t)
@@ -762,7 +805,8 @@ and betree_Internal_flush_back'a
(decreases (
betree_Internal_flush_decreases self params node_id_cnt content st))
=
- let* p = betree_List_partition_at_pivot betree_Message_t content self.pivot
+ let* p =
+ betree_ListTupleU64T_partition_at_pivot betree_Message_t content self.pivot
in
let (msgs_left, msgs_right) = p in
let* len_left = betree_List_len (u64 & betree_Message_t) msgs_left in
@@ -801,7 +845,8 @@ and betree_Internal_flush_back'a
st st2 in
Return (st0, ({ self with right = n }, node_id_cnt0))
-(** [betree_main::betree::Internal::{4}::flush]: backward function 1 *)
+(** [betree_main::betree::{betree_main::betree::Internal#4}::flush]: backward function 1
+ Source: 'src/betree.rs', lines 410:4-415:26 *)
and betree_Internal_flush_back1
(self : betree_Internal_t) (params : betree_Params_t)
(node_id_cnt : betree_NodeIdCounter_t)
@@ -811,7 +856,8 @@ and betree_Internal_flush_back1
(decreases (
betree_Internal_flush_decreases self params node_id_cnt content st))
=
- let* p = betree_List_partition_at_pivot betree_Message_t content self.pivot
+ let* p =
+ betree_ListTupleU64T_partition_at_pivot betree_Message_t content self.pivot
in
let (msgs_left, msgs_right) = p in
let* len_left = betree_List_len (u64 & betree_Message_t) msgs_left in
@@ -850,7 +896,8 @@ and betree_Internal_flush_back1
st st2 in
Return (st0, ())
-(** [betree_main::betree::Node::{5}::apply_messages]: forward function *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply_messages]: forward function
+ Source: 'src/betree.rs', lines 588:4-593:5 *)
and betree_Node_apply_messages
(self : betree_Node_t) (params : betree_Params_t)
(node_id_cnt : betree_NodeIdCounter_t)
@@ -891,7 +938,8 @@ and betree_Node_apply_messages
Return (st1, ())
end
-(** [betree_main::betree::Node::{5}::apply_messages]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply_messages]: backward function 0
+ Source: 'src/betree.rs', lines 588:4-593:5 *)
and betree_Node_apply_messages_back'a
(self : betree_Node_t) (params : betree_Params_t)
(node_id_cnt : betree_NodeIdCounter_t)
@@ -937,7 +985,8 @@ and betree_Node_apply_messages_back'a
Return (st0, (Betree_Node_Leaf { node with size = len }, node_id_cnt))
end
-(** [betree_main::betree::Node::{5}::apply_messages]: backward function 1 *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply_messages]: backward function 1
+ Source: 'src/betree.rs', lines 588:4-593:5 *)
and betree_Node_apply_messages_back1
(self : betree_Node_t) (params : betree_Params_t)
(node_id_cnt : betree_NodeIdCounter_t)
@@ -979,7 +1028,8 @@ and betree_Node_apply_messages_back1
let* _ = betree_store_leaf_node node.id content0 st1 in Return (st0, ())
end
-(** [betree_main::betree::Node::{5}::apply]: forward function *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply]: forward function
+ Source: 'src/betree.rs', lines 576:4-582:5 *)
let betree_Node_apply
(self : betree_Node_t) (params : betree_Params_t)
(node_id_cnt : betree_NodeIdCounter_t) (key : u64)
@@ -996,7 +1046,8 @@ let betree_Node_apply
betree_Node_apply_messages_back1 self params node_id_cnt (Betree_List_Cons
(key, new_msg) l) st st1
-(** [betree_main::betree::Node::{5}::apply]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply]: backward function 0
+ Source: 'src/betree.rs', lines 576:4-582:5 *)
let betree_Node_apply_back'a
(self : betree_Node_t) (params : betree_Params_t)
(node_id_cnt : betree_NodeIdCounter_t) (key : u64)
@@ -1015,7 +1066,8 @@ let betree_Node_apply_back'a
(key, new_msg) l) st st2 in
Return (st0, (self0, node_id_cnt0))
-(** [betree_main::betree::Node::{5}::apply]: backward function 1 *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply]: backward function 1
+ Source: 'src/betree.rs', lines 576:4-582:5 *)
let betree_Node_apply_back1
(self : betree_Node_t) (params : betree_Params_t)
(node_id_cnt : betree_NodeIdCounter_t) (key : u64)
@@ -1034,7 +1086,8 @@ let betree_Node_apply_back1
(key, new_msg) l) st st2 in
Return (st0, ())
-(** [betree_main::betree::BeTree::{6}::new]: forward function *)
+(** [betree_main::betree::{betree_main::betree::BeTree#6}::new]: forward function
+ Source: 'src/betree.rs', lines 849:4-849:60 *)
let betree_BeTree_new
(min_flush_size : u64) (split_size : u64) (st : state) :
result (state & betree_BeTree_t)
@@ -1050,7 +1103,8 @@ let betree_BeTree_new
root = (Betree_Node_Leaf { id = id; size = 0 })
})
-(** [betree_main::betree::BeTree::{6}::apply]: forward function *)
+(** [betree_main::betree::{betree_main::betree::BeTree#6}::apply]: forward function
+ Source: 'src/betree.rs', lines 868:4-868:47 *)
let betree_BeTree_apply
(self : betree_BeTree_t) (key : u64) (msg : betree_Message_t) (st : state) :
result (state & unit)
@@ -1062,7 +1116,8 @@ let betree_BeTree_apply
st0 in
betree_Node_apply_back1 self.root self.params self.node_id_cnt key msg st st1
-(** [betree_main::betree::BeTree::{6}::apply]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::BeTree#6}::apply]: backward function 0
+ Source: 'src/betree.rs', lines 868:4-868:47 *)
let betree_BeTree_apply_back
(self : betree_BeTree_t) (key : u64) (msg : betree_Message_t) (st : state)
(st0 : state) :
@@ -1078,7 +1133,8 @@ let betree_BeTree_apply_back
st2 in
Return (st0, { self with node_id_cnt = nic; root = n })
-(** [betree_main::betree::BeTree::{6}::insert]: forward function *)
+(** [betree_main::betree::{betree_main::betree::BeTree#6}::insert]: forward function
+ Source: 'src/betree.rs', lines 874:4-874:52 *)
let betree_BeTree_insert
(self : betree_BeTree_t) (key : u64) (value : u64) (st : state) :
result (state & unit)
@@ -1089,7 +1145,8 @@ let betree_BeTree_insert
betree_BeTree_apply_back self key (Betree_Message_Insert value) st st0 in
Return (st1, ())
-(** [betree_main::betree::BeTree::{6}::insert]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::BeTree#6}::insert]: backward function 0
+ Source: 'src/betree.rs', lines 874:4-874:52 *)
let betree_BeTree_insert_back
(self : betree_BeTree_t) (key : u64) (value : u64) (st : state) (st0 : state)
:
@@ -1101,7 +1158,8 @@ let betree_BeTree_insert_back
betree_BeTree_apply_back self key (Betree_Message_Insert value) st st1 in
Return (st0, self0)
-(** [betree_main::betree::BeTree::{6}::delete]: forward function *)
+(** [betree_main::betree::{betree_main::betree::BeTree#6}::delete]: forward function
+ Source: 'src/betree.rs', lines 880:4-880:38 *)
let betree_BeTree_delete
(self : betree_BeTree_t) (key : u64) (st : state) : result (state & unit) =
let* (st0, _) = betree_BeTree_apply self key Betree_Message_Delete st in
@@ -1109,7 +1167,8 @@ let betree_BeTree_delete
betree_BeTree_apply_back self key Betree_Message_Delete st st0 in
Return (st1, ())
-(** [betree_main::betree::BeTree::{6}::delete]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::BeTree#6}::delete]: backward function 0
+ Source: 'src/betree.rs', lines 880:4-880:38 *)
let betree_BeTree_delete_back
(self : betree_BeTree_t) (key : u64) (st : state) (st0 : state) :
result (state & betree_BeTree_t)
@@ -1119,7 +1178,8 @@ let betree_BeTree_delete_back
betree_BeTree_apply_back self key Betree_Message_Delete st st1 in
Return (st0, self0)
-(** [betree_main::betree::BeTree::{6}::upsert]: forward function *)
+(** [betree_main::betree::{betree_main::betree::BeTree#6}::upsert]: forward function
+ Source: 'src/betree.rs', lines 886:4-886:59 *)
let betree_BeTree_upsert
(self : betree_BeTree_t) (key : u64) (upd : betree_UpsertFunState_t)
(st : state) :
@@ -1131,7 +1191,8 @@ let betree_BeTree_upsert
betree_BeTree_apply_back self key (Betree_Message_Upsert upd) st st0 in
Return (st1, ())
-(** [betree_main::betree::BeTree::{6}::upsert]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::BeTree#6}::upsert]: backward function 0
+ Source: 'src/betree.rs', lines 886:4-886:59 *)
let betree_BeTree_upsert_back
(self : betree_BeTree_t) (key : u64) (upd : betree_UpsertFunState_t)
(st : state) (st0 : state) :
@@ -1143,14 +1204,16 @@ let betree_BeTree_upsert_back
betree_BeTree_apply_back self key (Betree_Message_Upsert upd) st st1 in
Return (st0, self0)
-(** [betree_main::betree::BeTree::{6}::lookup]: forward function *)
+(** [betree_main::betree::{betree_main::betree::BeTree#6}::lookup]: forward function
+ Source: 'src/betree.rs', lines 895:4-895:62 *)
let betree_BeTree_lookup
(self : betree_BeTree_t) (key : u64) (st : state) :
result (state & (option u64))
=
betree_Node_lookup self.root key st
-(** [betree_main::betree::BeTree::{6}::lookup]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::BeTree#6}::lookup]: backward function 0
+ Source: 'src/betree.rs', lines 895:4-895:62 *)
let betree_BeTree_lookup_back
(self : betree_BeTree_t) (key : u64) (st : state) (st0 : state) :
result (state & betree_BeTree_t)
@@ -1158,7 +1221,8 @@ let betree_BeTree_lookup_back
let* (st1, n) = betree_Node_lookup_back self.root key st st0 in
Return (st1, { self with root = n })
-(** [betree_main::main]: forward function *)
+(** [betree_main::main]: forward function
+ Source: 'src/betree_main.rs', lines 5:0-5:9 *)
let main : result unit =
Return ()
diff --git a/tests/fstar/betree_back_stateful/BetreeMain.Opaque.fsti b/tests/fstar/betree_back_stateful/BetreeMain.Opaque.fsti
index c5d0a814..b89c8718 100644
--- a/tests/fstar/betree_back_stateful/BetreeMain.Opaque.fsti
+++ b/tests/fstar/betree_back_stateful/BetreeMain.Opaque.fsti
@@ -6,25 +6,30 @@ include BetreeMain.Types
#set-options "--z3rlimit 50 --fuel 1 --ifuel 1"
-(** [betree_main::betree_utils::load_internal_node]: forward function *)
+(** [betree_main::betree_utils::load_internal_node]: forward function
+ Source: 'src/betree_utils.rs', lines 98:0-98:63 *)
val betree_utils_load_internal_node
: u64 -> state -> result (state & (betree_List_t (u64 & betree_Message_t)))
-(** [betree_main::betree_utils::store_internal_node]: forward function *)
+(** [betree_main::betree_utils::store_internal_node]: forward function
+ Source: 'src/betree_utils.rs', lines 115:0-115:71 *)
val betree_utils_store_internal_node
:
u64 -> betree_List_t (u64 & betree_Message_t) -> state -> result (state &
unit)
-(** [betree_main::betree_utils::load_leaf_node]: forward function *)
+(** [betree_main::betree_utils::load_leaf_node]: forward function
+ Source: 'src/betree_utils.rs', lines 132:0-132:55 *)
val betree_utils_load_leaf_node
: u64 -> state -> result (state & (betree_List_t (u64 & u64)))
-(** [betree_main::betree_utils::store_leaf_node]: forward function *)
+(** [betree_main::betree_utils::store_leaf_node]: forward function
+ Source: 'src/betree_utils.rs', lines 145:0-145:63 *)
val betree_utils_store_leaf_node
: u64 -> betree_List_t (u64 & u64) -> state -> result (state & unit)
-(** [core::option::Option::{0}::unwrap]: forward function *)
+(** [core::option::{core::option::Option<T>}::unwrap]: forward function
+ Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/core/src/option.rs', lines 932:4-932:34 *)
val core_option_Option_unwrap
(t : Type0) : option t -> state -> result (state & t)
diff --git a/tests/fstar/betree_back_stateful/BetreeMain.Types.fsti b/tests/fstar/betree_back_stateful/BetreeMain.Types.fsti
index 9320f6b7..a098ec19 100644
--- a/tests/fstar/betree_back_stateful/BetreeMain.Types.fsti
+++ b/tests/fstar/betree_back_stateful/BetreeMain.Types.fsti
@@ -5,43 +5,52 @@ open Primitives
#set-options "--z3rlimit 50 --fuel 1 --ifuel 1"
-(** [betree_main::betree::List] *)
+(** [betree_main::betree::List]
+ Source: 'src/betree.rs', lines 17:0-17:23 *)
type betree_List_t (t : Type0) =
| Betree_List_Cons : t -> betree_List_t t -> betree_List_t t
| Betree_List_Nil : betree_List_t t
-(** [betree_main::betree::UpsertFunState] *)
+(** [betree_main::betree::UpsertFunState]
+ Source: 'src/betree.rs', lines 63:0-63:23 *)
type betree_UpsertFunState_t =
| Betree_UpsertFunState_Add : u64 -> betree_UpsertFunState_t
| Betree_UpsertFunState_Sub : u64 -> betree_UpsertFunState_t
-(** [betree_main::betree::Message] *)
+(** [betree_main::betree::Message]
+ Source: 'src/betree.rs', lines 69:0-69:23 *)
type betree_Message_t =
| Betree_Message_Insert : u64 -> betree_Message_t
| Betree_Message_Delete : betree_Message_t
| Betree_Message_Upsert : betree_UpsertFunState_t -> betree_Message_t
-(** [betree_main::betree::Leaf] *)
+(** [betree_main::betree::Leaf]
+ Source: 'src/betree.rs', lines 167:0-167:11 *)
type betree_Leaf_t = { id : u64; size : u64; }
-(** [betree_main::betree::Internal] *)
+(** [betree_main::betree::Internal]
+ Source: 'src/betree.rs', lines 156:0-156:15 *)
type betree_Internal_t =
{
id : u64; pivot : u64; left : betree_Node_t; right : betree_Node_t;
}
-(** [betree_main::betree::Node] *)
+(** [betree_main::betree::Node]
+ Source: 'src/betree.rs', lines 179:0-179:9 *)
and betree_Node_t =
| Betree_Node_Internal : betree_Internal_t -> betree_Node_t
| Betree_Node_Leaf : betree_Leaf_t -> betree_Node_t
-(** [betree_main::betree::Params] *)
+(** [betree_main::betree::Params]
+ Source: 'src/betree.rs', lines 187:0-187:13 *)
type betree_Params_t = { min_flush_size : u64; split_size : u64; }
-(** [betree_main::betree::NodeIdCounter] *)
+(** [betree_main::betree::NodeIdCounter]
+ Source: 'src/betree.rs', lines 201:0-201:20 *)
type betree_NodeIdCounter_t = { next_node_id : u64; }
-(** [betree_main::betree::BeTree] *)
+(** [betree_main::betree::BeTree]
+ Source: 'src/betree.rs', lines 218:0-218:17 *)
type betree_BeTree_t =
{
params : betree_Params_t;
diff --git a/tests/fstar/betree_back_stateful/Primitives.fst b/tests/fstar/betree_back_stateful/Primitives.fst
index 3297803c..94322ead 100644
--- a/tests/fstar/betree_back_stateful/Primitives.fst
+++ b/tests/fstar/betree_back_stateful/Primitives.fst
@@ -351,14 +351,14 @@ let alloc_boxed_Box_deref_mut (t : Type0) (x : t) : result t = Return x
let alloc_boxed_Box_deref_mut_back (t : Type) (_ : t) (x : t) : result t = Return x
// Trait instance
-let alloc_boxed_Box_coreOpsDerefInst (self : Type0) : core_ops_deref_Deref self = {
+let alloc_boxed_Box_coreopsDerefInst (self : Type0) : core_ops_deref_Deref self = {
target = self;
deref = alloc_boxed_Box_deref self;
}
// Trait instance
-let alloc_boxed_Box_coreOpsDerefMutInst (self : Type0) : core_ops_deref_DerefMut self = {
- derefInst = alloc_boxed_Box_coreOpsDerefInst self;
+let alloc_boxed_Box_coreopsDerefMutInst (self : Type0) : core_ops_deref_DerefMut self = {
+ derefInst = alloc_boxed_Box_coreopsDerefInst self;
deref_mut = alloc_boxed_Box_deref_mut self;
deref_mut_back = alloc_boxed_Box_deref_mut_back self;
}
@@ -483,23 +483,23 @@ let core_slice_index_Slice_index
| Some x -> Return x
// [core::slice::index::Range:::get]: forward function
-let core_slice_index_Range_get (t : Type0) (i : core_ops_range_Range usize) (s : slice t) :
+let core_slice_index_RangeUsize_get (t : Type0) (i : core_ops_range_Range usize) (s : slice t) :
result (option (slice t)) =
admit () // TODO
// [core::slice::index::Range::get_mut]: forward function
-let core_slice_index_Range_get_mut
+let core_slice_index_RangeUsize_get_mut
(t : Type0) : core_ops_range_Range usize → slice t → result (option (slice t)) =
admit () // TODO
// [core::slice::index::Range::get_mut]: backward function 0
-let core_slice_index_Range_get_mut_back
+let core_slice_index_RangeUsize_get_mut_back
(t : Type0) :
core_ops_range_Range usize → slice t → option (slice t) → result (slice t) =
admit () // TODO
// [core::slice::index::Range::get_unchecked]: forward function
-let core_slice_index_Range_get_unchecked
+let core_slice_index_RangeUsize_get_unchecked
(t : Type0) :
core_ops_range_Range usize → const_raw_ptr (slice t) → result (const_raw_ptr (slice t)) =
// Don't know what the model should be - for now we always fail to make
@@ -507,7 +507,7 @@ let core_slice_index_Range_get_unchecked
fun _ _ -> Fail Failure
// [core::slice::index::Range::get_unchecked_mut]: forward function
-let core_slice_index_Range_get_unchecked_mut
+let core_slice_index_RangeUsize_get_unchecked_mut
(t : Type0) :
core_ops_range_Range usize → mut_raw_ptr (slice t) → result (mut_raw_ptr (slice t)) =
// Don't know what the model should be - for now we always fail to make
@@ -515,17 +515,17 @@ let core_slice_index_Range_get_unchecked_mut
fun _ _ -> Fail Failure
// [core::slice::index::Range::index]: forward function
-let core_slice_index_Range_index
+let core_slice_index_RangeUsize_index
(t : Type0) : core_ops_range_Range usize → slice t → result (slice t) =
admit () // TODO
// [core::slice::index::Range::index_mut]: forward function
-let core_slice_index_Range_index_mut
+let core_slice_index_RangeUsize_index_mut
(t : Type0) : core_ops_range_Range usize → slice t → result (slice t) =
admit () // TODO
// [core::slice::index::Range::index_mut]: backward function 0
-let core_slice_index_Range_index_mut_back
+let core_slice_index_RangeUsize_index_mut_back
(t : Type0) : core_ops_range_Range usize → slice t → slice t → result (slice t) =
admit () // TODO
@@ -559,44 +559,44 @@ let core_array_Array_index_mut_back
(a : array t n) (i : idx) (x : inst.indexInst.output) : result (array t n) =
admit () // TODO
-// Trait implementation: [core::slice::index::[T]]
-let core_slice_index_Slice_coreopsindexIndexInst (t idx : Type0)
- (inst : core_slice_index_SliceIndex idx (slice t)) :
- core_ops_index_Index (slice t) idx = {
- output = inst.output;
- index = core_slice_index_Slice_index t idx inst;
-}
-
// Trait implementation: [core::slice::index::private_slice_index::Range]
-let core_slice_index_private_slice_index_Range_coresliceindexprivate_slice_indexSealedInst
+let core_slice_index_private_slice_index_SealedRangeUsizeInst
: core_slice_index_private_slice_index_Sealed (core_ops_range_Range usize) = ()
// Trait implementation: [core::slice::index::Range]
-let core_slice_index_Range_coresliceindexSliceIndexInst (t : Type0) :
+let core_slice_index_SliceIndexRangeUsizeSliceTInst (t : Type0) :
core_slice_index_SliceIndex (core_ops_range_Range usize) (slice t) = {
- sealedInst = core_slice_index_private_slice_index_Range_coresliceindexprivate_slice_indexSealedInst;
+ sealedInst = core_slice_index_private_slice_index_SealedRangeUsizeInst;
output = slice t;
- get = core_slice_index_Range_get t;
- get_mut = core_slice_index_Range_get_mut t;
- get_mut_back = core_slice_index_Range_get_mut_back t;
- get_unchecked = core_slice_index_Range_get_unchecked t;
- get_unchecked_mut = core_slice_index_Range_get_unchecked_mut t;
- index = core_slice_index_Range_index t;
- index_mut = core_slice_index_Range_index_mut t;
- index_mut_back = core_slice_index_Range_index_mut_back t;
+ get = core_slice_index_RangeUsize_get t;
+ get_mut = core_slice_index_RangeUsize_get_mut t;
+ get_mut_back = core_slice_index_RangeUsize_get_mut_back t;
+ get_unchecked = core_slice_index_RangeUsize_get_unchecked t;
+ get_unchecked_mut = core_slice_index_RangeUsize_get_unchecked_mut t;
+ index = core_slice_index_RangeUsize_index t;
+ index_mut = core_slice_index_RangeUsize_index_mut t;
+ index_mut_back = core_slice_index_RangeUsize_index_mut_back t;
+}
+
+// Trait implementation: [core::slice::index::[T]]
+let core_ops_index_IndexSliceTIInst (t idx : Type0)
+ (inst : core_slice_index_SliceIndex idx (slice t)) :
+ core_ops_index_Index (slice t) idx = {
+ output = inst.output;
+ index = core_slice_index_Slice_index t idx inst;
}
// Trait implementation: [core::slice::index::[T]]
-let core_slice_index_Slice_coreopsindexIndexMutInst (t idx : Type0)
+let core_ops_index_IndexMutSliceTIInst (t idx : Type0)
(inst : core_slice_index_SliceIndex idx (slice t)) :
core_ops_index_IndexMut (slice t) idx = {
- indexInst = core_slice_index_Slice_coreopsindexIndexInst t idx inst;
+ indexInst = core_ops_index_IndexSliceTIInst t idx inst;
index_mut = core_slice_index_Slice_index_mut t idx inst;
index_mut_back = core_slice_index_Slice_index_mut_back t idx inst;
}
// Trait implementation: [core::array::[T; N]]
-let core_array_Array_coreopsindexIndexInst (t idx : Type0) (n : usize)
+let core_ops_index_IndexArrayInst (t idx : Type0) (n : usize)
(inst : core_ops_index_Index (slice t) idx) :
core_ops_index_Index (array t n) idx = {
output = inst.output;
@@ -604,10 +604,10 @@ let core_array_Array_coreopsindexIndexInst (t idx : Type0) (n : usize)
}
// Trait implementation: [core::array::[T; N]]
-let core_array_Array_coreopsindexIndexMutInst (t idx : Type0) (n : usize)
+let core_ops_index_IndexMutArrayIInst (t idx : Type0) (n : usize)
(inst : core_ops_index_IndexMut (slice t) idx) :
core_ops_index_IndexMut (array t n) idx = {
- indexInst = core_array_Array_coreopsindexIndexInst t idx n inst.indexInst;
+ indexInst = core_ops_index_IndexArrayInst t idx n inst.indexInst;
index_mut = core_array_Array_index_mut t idx n inst;
index_mut_back = core_array_Array_index_mut_back t idx n inst;
}
@@ -651,13 +651,13 @@ let core_slice_index_usize_index_mut_back
admit () // TODO
// Trait implementation: [core::slice::index::private_slice_index::usize]
-let core_slice_index_private_slice_index_usize_coresliceindexprivate_slice_indexSealedInst
+let core_slice_index_private_slice_index_SealedUsizeInst
: core_slice_index_private_slice_index_Sealed usize = ()
// Trait implementation: [core::slice::index::usize]
-let core_slice_index_usize_coresliceindexSliceIndexInst (t : Type0) :
+let core_slice_index_SliceIndexUsizeSliceTInst (t : Type0) :
core_slice_index_SliceIndex usize (slice t) = {
- sealedInst = core_slice_index_private_slice_index_usize_coresliceindexprivate_slice_indexSealedInst;
+ sealedInst = core_slice_index_private_slice_index_SealedUsizeInst;
output = t;
get = core_slice_index_usize_get t;
get_mut = core_slice_index_usize_get_mut t;
@@ -706,24 +706,24 @@ let alloc_vec_Vec_coreopsindexIndexMutInst (t idx : Type0)
let alloc_vec_Vec_index_eq (#a : Type0) (v : alloc_vec_Vec a) (i : usize) :
Lemma (
- alloc_vec_Vec_index a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i ==
+ alloc_vec_Vec_index a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i ==
alloc_vec_Vec_index_usize v i)
- [SMTPat (alloc_vec_Vec_index a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i)]
+ [SMTPat (alloc_vec_Vec_index a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i)]
=
admit()
let alloc_vec_Vec_index_mut_eq (#a : Type0) (v : alloc_vec_Vec a) (i : usize) :
Lemma (
- alloc_vec_Vec_index_mut a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i ==
+ alloc_vec_Vec_index_mut a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i ==
alloc_vec_Vec_index_usize v i)
- [SMTPat (alloc_vec_Vec_index_mut a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i)]
+ [SMTPat (alloc_vec_Vec_index_mut a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i)]
=
admit()
let alloc_vec_Vec_index_mut_back_eq (#a : Type0) (v : alloc_vec_Vec a) (i : usize) (x : a) :
Lemma (
- alloc_vec_Vec_index_mut_back a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i x ==
+ alloc_vec_Vec_index_mut_back a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i x ==
alloc_vec_Vec_update_usize v i x)
- [SMTPat (alloc_vec_Vec_index_mut_back a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i x)]
+ [SMTPat (alloc_vec_Vec_index_mut_back a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i x)]
=
admit()
diff --git a/tests/fstar/hashmap/Hashmap.Clauses.Template.fst b/tests/fstar/hashmap/Hashmap.Clauses.Template.fst
index a1f81666..2733b371 100644
--- a/tests/fstar/hashmap/Hashmap.Clauses.Template.fst
+++ b/tests/fstar/hashmap/Hashmap.Clauses.Template.fst
@@ -6,55 +6,64 @@ open Hashmap.Types
#set-options "--z3rlimit 50 --fuel 1 --ifuel 1"
-(** [hashmap::HashMap::{0}::allocate_slots]: decreases clause *)
+(** [hashmap::{hashmap::HashMap<T>}::allocate_slots]: decreases clause
+ Source: 'src/hashmap.rs', lines 50:4-56:5 *)
unfold
let hashMap_allocate_slots_loop_decreases (t : Type0)
(slots : alloc_vec_Vec (list_t t)) (n : usize) : nat =
admit ()
-(** [hashmap::HashMap::{0}::clear]: decreases clause *)
+(** [hashmap::{hashmap::HashMap<T>}::clear]: decreases clause
+ Source: 'src/hashmap.rs', lines 80:4-88:5 *)
unfold
let hashMap_clear_loop_decreases (t : Type0) (slots : alloc_vec_Vec (list_t t))
(i : usize) : nat =
admit ()
-(** [hashmap::HashMap::{0}::insert_in_list]: decreases clause *)
+(** [hashmap::{hashmap::HashMap<T>}::insert_in_list]: decreases clause
+ Source: 'src/hashmap.rs', lines 97:4-114:5 *)
unfold
let hashMap_insert_in_list_loop_decreases (t : Type0) (key : usize) (value : t)
(ls : list_t t) : nat =
admit ()
-(** [hashmap::HashMap::{0}::move_elements_from_list]: decreases clause *)
+(** [hashmap::{hashmap::HashMap<T>}::move_elements_from_list]: decreases clause
+ Source: 'src/hashmap.rs', lines 183:4-196:5 *)
unfold
let hashMap_move_elements_from_list_loop_decreases (t : Type0)
(ntable : hashMap_t t) (ls : list_t t) : nat =
admit ()
-(** [hashmap::HashMap::{0}::move_elements]: decreases clause *)
+(** [hashmap::{hashmap::HashMap<T>}::move_elements]: decreases clause
+ Source: 'src/hashmap.rs', lines 171:4-180:5 *)
unfold
let hashMap_move_elements_loop_decreases (t : Type0) (ntable : hashMap_t t)
(slots : alloc_vec_Vec (list_t t)) (i : usize) : nat =
admit ()
-(** [hashmap::HashMap::{0}::contains_key_in_list]: decreases clause *)
+(** [hashmap::{hashmap::HashMap<T>}::contains_key_in_list]: decreases clause
+ Source: 'src/hashmap.rs', lines 206:4-219:5 *)
unfold
let hashMap_contains_key_in_list_loop_decreases (t : Type0) (key : usize)
(ls : list_t t) : nat =
admit ()
-(** [hashmap::HashMap::{0}::get_in_list]: decreases clause *)
+(** [hashmap::{hashmap::HashMap<T>}::get_in_list]: decreases clause
+ Source: 'src/hashmap.rs', lines 224:4-237:5 *)
unfold
let hashMap_get_in_list_loop_decreases (t : Type0) (key : usize)
(ls : list_t t) : nat =
admit ()
-(** [hashmap::HashMap::{0}::get_mut_in_list]: decreases clause *)
+(** [hashmap::{hashmap::HashMap<T>}::get_mut_in_list]: decreases clause
+ Source: 'src/hashmap.rs', lines 245:4-254:5 *)
unfold
let hashMap_get_mut_in_list_loop_decreases (t : Type0) (ls : list_t t)
(key : usize) : nat =
admit ()
-(** [hashmap::HashMap::{0}::remove_from_list]: decreases clause *)
+(** [hashmap::{hashmap::HashMap<T>}::remove_from_list]: decreases clause
+ Source: 'src/hashmap.rs', lines 265:4-291:5 *)
unfold
let hashMap_remove_from_list_loop_decreases (t : Type0) (key : usize)
(ls : list_t t) : nat =
diff --git a/tests/fstar/hashmap/Hashmap.Funs.fst b/tests/fstar/hashmap/Hashmap.Funs.fst
index 0e31e364..e6cd1411 100644
--- a/tests/fstar/hashmap/Hashmap.Funs.fst
+++ b/tests/fstar/hashmap/Hashmap.Funs.fst
@@ -7,11 +7,13 @@ include Hashmap.Clauses
#set-options "--z3rlimit 50 --fuel 1 --ifuel 1"
-(** [hashmap::hash_key]: forward function *)
+(** [hashmap::hash_key]: forward function
+ Source: 'src/hashmap.rs', lines 27:0-27:32 *)
let hash_key (k : usize) : result usize =
Return k
-(** [hashmap::HashMap::{0}::allocate_slots]: loop 0: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::allocate_slots]: loop 0: forward function
+ Source: 'src/hashmap.rs', lines 50:4-56:5 *)
let rec hashMap_allocate_slots_loop
(t : Type0) (slots : alloc_vec_Vec (list_t t)) (n : usize) :
Tot (result (alloc_vec_Vec (list_t t)))
@@ -24,14 +26,16 @@ let rec hashMap_allocate_slots_loop
hashMap_allocate_slots_loop t slots0 n0
else Return slots
-(** [hashmap::HashMap::{0}::allocate_slots]: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::allocate_slots]: forward function
+ Source: 'src/hashmap.rs', lines 50:4-50:76 *)
let hashMap_allocate_slots
(t : Type0) (slots : alloc_vec_Vec (list_t t)) (n : usize) :
result (alloc_vec_Vec (list_t t))
=
hashMap_allocate_slots_loop t slots n
-(** [hashmap::HashMap::{0}::new_with_capacity]: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::new_with_capacity]: forward function
+ Source: 'src/hashmap.rs', lines 59:4-63:13 *)
let hashMap_new_with_capacity
(t : Type0) (capacity : usize) (max_load_dividend : usize)
(max_load_divisor : usize) :
@@ -49,12 +53,14 @@ let hashMap_new_with_capacity
slots = slots
}
-(** [hashmap::HashMap::{0}::new]: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::new]: forward function
+ Source: 'src/hashmap.rs', lines 75:4-75:24 *)
let hashMap_new (t : Type0) : result (hashMap_t t) =
hashMap_new_with_capacity t 32 4 5
-(** [hashmap::HashMap::{0}::clear]: loop 0: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap::{hashmap::HashMap<T>}::clear]: loop 0: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 80:4-88:5 *)
let rec hashMap_clear_loop
(t : Type0) (slots : alloc_vec_Vec (list_t t)) (i : usize) :
Tot (result (alloc_vec_Vec (list_t t)))
@@ -66,22 +72,25 @@ let rec hashMap_clear_loop
let* i1 = usize_add i 1 in
let* slots0 =
alloc_vec_Vec_index_mut_back (list_t t) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (list_t t)) slots
- i List_Nil in
+ (core_slice_index_SliceIndexUsizeSliceTInst (list_t t)) slots i
+ List_Nil in
hashMap_clear_loop t slots0 i1
else Return slots
-(** [hashmap::HashMap::{0}::clear]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap::{hashmap::HashMap<T>}::clear]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 80:4-80:27 *)
let hashMap_clear (t : Type0) (self : hashMap_t t) : result (hashMap_t t) =
let* v = hashMap_clear_loop t self.slots 0 in
Return { self with num_entries = 0; slots = v }
-(** [hashmap::HashMap::{0}::len]: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::len]: forward function
+ Source: 'src/hashmap.rs', lines 90:4-90:30 *)
let hashMap_len (t : Type0) (self : hashMap_t t) : result usize =
Return self.num_entries
-(** [hashmap::HashMap::{0}::insert_in_list]: loop 0: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::insert_in_list]: loop 0: forward function
+ Source: 'src/hashmap.rs', lines 97:4-114:5 *)
let rec hashMap_insert_in_list_loop
(t : Type0) (key : usize) (value : t) (ls : list_t t) :
Tot (result bool)
@@ -95,12 +104,14 @@ let rec hashMap_insert_in_list_loop
| List_Nil -> Return true
end
-(** [hashmap::HashMap::{0}::insert_in_list]: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::insert_in_list]: forward function
+ Source: 'src/hashmap.rs', lines 97:4-97:71 *)
let hashMap_insert_in_list
(t : Type0) (key : usize) (value : t) (ls : list_t t) : result bool =
hashMap_insert_in_list_loop t key value ls
-(** [hashmap::HashMap::{0}::insert_in_list]: loop 0: backward function 0 *)
+(** [hashmap::{hashmap::HashMap<T>}::insert_in_list]: loop 0: backward function 0
+ Source: 'src/hashmap.rs', lines 97:4-114:5 *)
let rec hashMap_insert_in_list_loop_back
(t : Type0) (key : usize) (value : t) (ls : list_t t) :
Tot (result (list_t t))
@@ -116,13 +127,15 @@ let rec hashMap_insert_in_list_loop_back
| List_Nil -> let l = List_Nil in Return (List_Cons key value l)
end
-(** [hashmap::HashMap::{0}::insert_in_list]: backward function 0 *)
+(** [hashmap::{hashmap::HashMap<T>}::insert_in_list]: backward function 0
+ Source: 'src/hashmap.rs', lines 97:4-97:71 *)
let hashMap_insert_in_list_back
(t : Type0) (key : usize) (value : t) (ls : list_t t) : result (list_t t) =
hashMap_insert_in_list_loop_back t key value ls
-(** [hashmap::HashMap::{0}::insert_no_resize]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap::{hashmap::HashMap<T>}::insert_no_resize]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 117:4-117:54 *)
let hashMap_insert_no_resize
(t : Type0) (self : hashMap_t t) (key : usize) (value : t) :
result (hashMap_t t)
@@ -132,8 +145,8 @@ let hashMap_insert_no_resize
let* hash_mod = usize_rem hash i in
let* l =
alloc_vec_Vec_index_mut (list_t t) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (list_t t))
- self.slots hash_mod in
+ (core_slice_index_SliceIndexUsizeSliceTInst (list_t t)) self.slots
+ hash_mod in
let* inserted = hashMap_insert_in_list t key value l in
if inserted
then
@@ -141,19 +154,20 @@ let hashMap_insert_no_resize
let* l0 = hashMap_insert_in_list_back t key value l in
let* v =
alloc_vec_Vec_index_mut_back (list_t t) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (list_t t))
- self.slots hash_mod l0 in
+ (core_slice_index_SliceIndexUsizeSliceTInst (list_t t)) self.slots
+ hash_mod l0 in
Return { self with num_entries = i0; slots = v }
else
let* l0 = hashMap_insert_in_list_back t key value l in
let* v =
alloc_vec_Vec_index_mut_back (list_t t) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (list_t t))
- self.slots hash_mod l0 in
+ (core_slice_index_SliceIndexUsizeSliceTInst (list_t t)) self.slots
+ hash_mod l0 in
Return { self with slots = v }
-(** [hashmap::HashMap::{0}::move_elements_from_list]: loop 0: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap::{hashmap::HashMap<T>}::move_elements_from_list]: loop 0: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 183:4-196:5 *)
let rec hashMap_move_elements_from_list_loop
(t : Type0) (ntable : hashMap_t t) (ls : list_t t) :
Tot (result (hashMap_t t))
@@ -166,14 +180,16 @@ let rec hashMap_move_elements_from_list_loop
| List_Nil -> Return ntable
end
-(** [hashmap::HashMap::{0}::move_elements_from_list]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap::{hashmap::HashMap<T>}::move_elements_from_list]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 183:4-183:72 *)
let hashMap_move_elements_from_list
(t : Type0) (ntable : hashMap_t t) (ls : list_t t) : result (hashMap_t t) =
hashMap_move_elements_from_list_loop t ntable ls
-(** [hashmap::HashMap::{0}::move_elements]: loop 0: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap::{hashmap::HashMap<T>}::move_elements]: loop 0: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 171:4-180:5 *)
let rec hashMap_move_elements_loop
(t : Type0) (ntable : hashMap_t t) (slots : alloc_vec_Vec (list_t t))
(i : usize) :
@@ -185,21 +201,20 @@ let rec hashMap_move_elements_loop
then
let* l =
alloc_vec_Vec_index_mut (list_t t) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (list_t t)) slots
- i in
+ (core_slice_index_SliceIndexUsizeSliceTInst (list_t t)) slots i in
let ls = core_mem_replace (list_t t) l List_Nil in
let* ntable0 = hashMap_move_elements_from_list t ntable ls in
let* i1 = usize_add i 1 in
let l0 = core_mem_replace_back (list_t t) l List_Nil in
let* slots0 =
alloc_vec_Vec_index_mut_back (list_t t) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (list_t t)) slots
- i l0 in
+ (core_slice_index_SliceIndexUsizeSliceTInst (list_t t)) slots i l0 in
hashMap_move_elements_loop t ntable0 slots0 i1
else Return (ntable, slots)
-(** [hashmap::HashMap::{0}::move_elements]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap::{hashmap::HashMap<T>}::move_elements]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 171:4-171:95 *)
let hashMap_move_elements
(t : Type0) (ntable : hashMap_t t) (slots : alloc_vec_Vec (list_t t))
(i : usize) :
@@ -207,8 +222,9 @@ let hashMap_move_elements
=
hashMap_move_elements_loop t ntable slots i
-(** [hashmap::HashMap::{0}::try_resize]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap::{hashmap::HashMap<T>}::try_resize]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 140:4-140:28 *)
let hashMap_try_resize
(t : Type0) (self : hashMap_t t) : result (hashMap_t t) =
let* max_usize = scalar_cast U32 Usize core_u32_max in
@@ -226,8 +242,9 @@ let hashMap_try_resize
}
else Return { self with max_load_factor = (i, i0) }
-(** [hashmap::HashMap::{0}::insert]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap::{hashmap::HashMap<T>}::insert]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 129:4-129:48 *)
let hashMap_insert
(t : Type0) (self : hashMap_t t) (key : usize) (value : t) :
result (hashMap_t t)
@@ -236,7 +253,8 @@ let hashMap_insert
let* i = hashMap_len t self0 in
if i > self0.max_load then hashMap_try_resize t self0 else Return self0
-(** [hashmap::HashMap::{0}::contains_key_in_list]: loop 0: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::contains_key_in_list]: loop 0: forward function
+ Source: 'src/hashmap.rs', lines 206:4-219:5 *)
let rec hashMap_contains_key_in_list_loop
(t : Type0) (key : usize) (ls : list_t t) :
Tot (result bool)
@@ -250,12 +268,14 @@ let rec hashMap_contains_key_in_list_loop
| List_Nil -> Return false
end
-(** [hashmap::HashMap::{0}::contains_key_in_list]: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::contains_key_in_list]: forward function
+ Source: 'src/hashmap.rs', lines 206:4-206:68 *)
let hashMap_contains_key_in_list
(t : Type0) (key : usize) (ls : list_t t) : result bool =
hashMap_contains_key_in_list_loop t key ls
-(** [hashmap::HashMap::{0}::contains_key]: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::contains_key]: forward function
+ Source: 'src/hashmap.rs', lines 199:4-199:49 *)
let hashMap_contains_key
(t : Type0) (self : hashMap_t t) (key : usize) : result bool =
let* hash = hash_key key in
@@ -263,11 +283,12 @@ let hashMap_contains_key
let* hash_mod = usize_rem hash i in
let* l =
alloc_vec_Vec_index (list_t t) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (list_t t))
- self.slots hash_mod in
+ (core_slice_index_SliceIndexUsizeSliceTInst (list_t t)) self.slots
+ hash_mod in
hashMap_contains_key_in_list t key l
-(** [hashmap::HashMap::{0}::get_in_list]: loop 0: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::get_in_list]: loop 0: forward function
+ Source: 'src/hashmap.rs', lines 224:4-237:5 *)
let rec hashMap_get_in_list_loop
(t : Type0) (key : usize) (ls : list_t t) :
Tot (result t) (decreases (hashMap_get_in_list_loop_decreases t key ls))
@@ -278,22 +299,25 @@ let rec hashMap_get_in_list_loop
| List_Nil -> Fail Failure
end
-(** [hashmap::HashMap::{0}::get_in_list]: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::get_in_list]: forward function
+ Source: 'src/hashmap.rs', lines 224:4-224:70 *)
let hashMap_get_in_list (t : Type0) (key : usize) (ls : list_t t) : result t =
hashMap_get_in_list_loop t key ls
-(** [hashmap::HashMap::{0}::get]: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::get]: forward function
+ Source: 'src/hashmap.rs', lines 239:4-239:55 *)
let hashMap_get (t : Type0) (self : hashMap_t t) (key : usize) : result t =
let* hash = hash_key key in
let i = alloc_vec_Vec_len (list_t t) self.slots in
let* hash_mod = usize_rem hash i in
let* l =
alloc_vec_Vec_index (list_t t) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (list_t t))
- self.slots hash_mod in
+ (core_slice_index_SliceIndexUsizeSliceTInst (list_t t)) self.slots
+ hash_mod in
hashMap_get_in_list t key l
-(** [hashmap::HashMap::{0}::get_mut_in_list]: loop 0: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::get_mut_in_list]: loop 0: forward function
+ Source: 'src/hashmap.rs', lines 245:4-254:5 *)
let rec hashMap_get_mut_in_list_loop
(t : Type0) (ls : list_t t) (key : usize) :
Tot (result t) (decreases (hashMap_get_mut_in_list_loop_decreases t ls key))
@@ -304,12 +328,14 @@ let rec hashMap_get_mut_in_list_loop
| List_Nil -> Fail Failure
end
-(** [hashmap::HashMap::{0}::get_mut_in_list]: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::get_mut_in_list]: forward function
+ Source: 'src/hashmap.rs', lines 245:4-245:86 *)
let hashMap_get_mut_in_list
(t : Type0) (ls : list_t t) (key : usize) : result t =
hashMap_get_mut_in_list_loop t ls key
-(** [hashmap::HashMap::{0}::get_mut_in_list]: loop 0: backward function 0 *)
+(** [hashmap::{hashmap::HashMap<T>}::get_mut_in_list]: loop 0: backward function 0
+ Source: 'src/hashmap.rs', lines 245:4-254:5 *)
let rec hashMap_get_mut_in_list_loop_back
(t : Type0) (ls : list_t t) (key : usize) (ret : t) :
Tot (result (list_t t))
@@ -325,23 +351,26 @@ let rec hashMap_get_mut_in_list_loop_back
| List_Nil -> Fail Failure
end
-(** [hashmap::HashMap::{0}::get_mut_in_list]: backward function 0 *)
+(** [hashmap::{hashmap::HashMap<T>}::get_mut_in_list]: backward function 0
+ Source: 'src/hashmap.rs', lines 245:4-245:86 *)
let hashMap_get_mut_in_list_back
(t : Type0) (ls : list_t t) (key : usize) (ret : t) : result (list_t t) =
hashMap_get_mut_in_list_loop_back t ls key ret
-(** [hashmap::HashMap::{0}::get_mut]: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::get_mut]: forward function
+ Source: 'src/hashmap.rs', lines 257:4-257:67 *)
let hashMap_get_mut (t : Type0) (self : hashMap_t t) (key : usize) : result t =
let* hash = hash_key key in
let i = alloc_vec_Vec_len (list_t t) self.slots in
let* hash_mod = usize_rem hash i in
let* l =
alloc_vec_Vec_index_mut (list_t t) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (list_t t))
- self.slots hash_mod in
+ (core_slice_index_SliceIndexUsizeSliceTInst (list_t t)) self.slots
+ hash_mod in
hashMap_get_mut_in_list t l key
-(** [hashmap::HashMap::{0}::get_mut]: backward function 0 *)
+(** [hashmap::{hashmap::HashMap<T>}::get_mut]: backward function 0
+ Source: 'src/hashmap.rs', lines 257:4-257:67 *)
let hashMap_get_mut_back
(t : Type0) (self : hashMap_t t) (key : usize) (ret : t) :
result (hashMap_t t)
@@ -351,16 +380,17 @@ let hashMap_get_mut_back
let* hash_mod = usize_rem hash i in
let* l =
alloc_vec_Vec_index_mut (list_t t) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (list_t t))
- self.slots hash_mod in
+ (core_slice_index_SliceIndexUsizeSliceTInst (list_t t)) self.slots
+ hash_mod in
let* l0 = hashMap_get_mut_in_list_back t l key ret in
let* v =
alloc_vec_Vec_index_mut_back (list_t t) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (list_t t))
- self.slots hash_mod l0 in
+ (core_slice_index_SliceIndexUsizeSliceTInst (list_t t)) self.slots
+ hash_mod l0 in
Return { self with slots = v }
-(** [hashmap::HashMap::{0}::remove_from_list]: loop 0: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::remove_from_list]: loop 0: forward function
+ Source: 'src/hashmap.rs', lines 265:4-291:5 *)
let rec hashMap_remove_from_list_loop
(t : Type0) (key : usize) (ls : list_t t) :
Tot (result (option t))
@@ -379,12 +409,14 @@ let rec hashMap_remove_from_list_loop
| List_Nil -> Return None
end
-(** [hashmap::HashMap::{0}::remove_from_list]: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::remove_from_list]: forward function
+ Source: 'src/hashmap.rs', lines 265:4-265:69 *)
let hashMap_remove_from_list
(t : Type0) (key : usize) (ls : list_t t) : result (option t) =
hashMap_remove_from_list_loop t key ls
-(** [hashmap::HashMap::{0}::remove_from_list]: loop 0: backward function 1 *)
+(** [hashmap::{hashmap::HashMap<T>}::remove_from_list]: loop 0: backward function 1
+ Source: 'src/hashmap.rs', lines 265:4-291:5 *)
let rec hashMap_remove_from_list_loop_back
(t : Type0) (key : usize) (ls : list_t t) :
Tot (result (list_t t))
@@ -405,12 +437,14 @@ let rec hashMap_remove_from_list_loop_back
| List_Nil -> Return List_Nil
end
-(** [hashmap::HashMap::{0}::remove_from_list]: backward function 1 *)
+(** [hashmap::{hashmap::HashMap<T>}::remove_from_list]: backward function 1
+ Source: 'src/hashmap.rs', lines 265:4-265:69 *)
let hashMap_remove_from_list_back
(t : Type0) (key : usize) (ls : list_t t) : result (list_t t) =
hashMap_remove_from_list_loop_back t key ls
-(** [hashmap::HashMap::{0}::remove]: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::remove]: forward function
+ Source: 'src/hashmap.rs', lines 294:4-294:52 *)
let hashMap_remove
(t : Type0) (self : hashMap_t t) (key : usize) : result (option t) =
let* hash = hash_key key in
@@ -418,15 +452,16 @@ let hashMap_remove
let* hash_mod = usize_rem hash i in
let* l =
alloc_vec_Vec_index_mut (list_t t) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (list_t t))
- self.slots hash_mod in
+ (core_slice_index_SliceIndexUsizeSliceTInst (list_t t)) self.slots
+ hash_mod in
let* x = hashMap_remove_from_list t key l in
begin match x with
| None -> Return None
| Some x0 -> let* _ = usize_sub self.num_entries 1 in Return (Some x0)
end
-(** [hashmap::HashMap::{0}::remove]: backward function 0 *)
+(** [hashmap::{hashmap::HashMap<T>}::remove]: backward function 0
+ Source: 'src/hashmap.rs', lines 294:4-294:52 *)
let hashMap_remove_back
(t : Type0) (self : hashMap_t t) (key : usize) : result (hashMap_t t) =
let* hash = hash_key key in
@@ -434,28 +469,29 @@ let hashMap_remove_back
let* hash_mod = usize_rem hash i in
let* l =
alloc_vec_Vec_index_mut (list_t t) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (list_t t))
- self.slots hash_mod in
+ (core_slice_index_SliceIndexUsizeSliceTInst (list_t t)) self.slots
+ hash_mod in
let* x = hashMap_remove_from_list t key l in
begin match x with
| None ->
let* l0 = hashMap_remove_from_list_back t key l in
let* v =
alloc_vec_Vec_index_mut_back (list_t t) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (list_t t))
- self.slots hash_mod l0 in
+ (core_slice_index_SliceIndexUsizeSliceTInst (list_t t)) self.slots
+ hash_mod l0 in
Return { self with slots = v }
| Some x0 ->
let* i0 = usize_sub self.num_entries 1 in
let* l0 = hashMap_remove_from_list_back t key l in
let* v =
alloc_vec_Vec_index_mut_back (list_t t) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (list_t t))
- self.slots hash_mod l0 in
+ (core_slice_index_SliceIndexUsizeSliceTInst (list_t t)) self.slots
+ hash_mod l0 in
Return { self with num_entries = i0; slots = v }
end
-(** [hashmap::test1]: forward function *)
+(** [hashmap::test1]: forward function
+ Source: 'src/hashmap.rs', lines 315:0-315:10 *)
let test1 : result unit =
let* hm = hashMap_new u64 in
let* hm0 = hashMap_insert u64 hm 0 42 in
diff --git a/tests/fstar/hashmap/Hashmap.Types.fst b/tests/fstar/hashmap/Hashmap.Types.fst
index 753730fe..ef96b1e9 100644
--- a/tests/fstar/hashmap/Hashmap.Types.fst
+++ b/tests/fstar/hashmap/Hashmap.Types.fst
@@ -5,12 +5,14 @@ open Primitives
#set-options "--z3rlimit 50 --fuel 1 --ifuel 1"
-(** [hashmap::List] *)
+(** [hashmap::List]
+ Source: 'src/hashmap.rs', lines 19:0-19:16 *)
type list_t (t : Type0) =
| List_Cons : usize -> t -> list_t t -> list_t t
| List_Nil : list_t t
-(** [hashmap::HashMap] *)
+(** [hashmap::HashMap]
+ Source: 'src/hashmap.rs', lines 35:0-35:21 *)
type hashMap_t (t : Type0) =
{
num_entries : usize;
diff --git a/tests/fstar/hashmap/Primitives.fst b/tests/fstar/hashmap/Primitives.fst
index 3297803c..94322ead 100644
--- a/tests/fstar/hashmap/Primitives.fst
+++ b/tests/fstar/hashmap/Primitives.fst
@@ -351,14 +351,14 @@ let alloc_boxed_Box_deref_mut (t : Type0) (x : t) : result t = Return x
let alloc_boxed_Box_deref_mut_back (t : Type) (_ : t) (x : t) : result t = Return x
// Trait instance
-let alloc_boxed_Box_coreOpsDerefInst (self : Type0) : core_ops_deref_Deref self = {
+let alloc_boxed_Box_coreopsDerefInst (self : Type0) : core_ops_deref_Deref self = {
target = self;
deref = alloc_boxed_Box_deref self;
}
// Trait instance
-let alloc_boxed_Box_coreOpsDerefMutInst (self : Type0) : core_ops_deref_DerefMut self = {
- derefInst = alloc_boxed_Box_coreOpsDerefInst self;
+let alloc_boxed_Box_coreopsDerefMutInst (self : Type0) : core_ops_deref_DerefMut self = {
+ derefInst = alloc_boxed_Box_coreopsDerefInst self;
deref_mut = alloc_boxed_Box_deref_mut self;
deref_mut_back = alloc_boxed_Box_deref_mut_back self;
}
@@ -483,23 +483,23 @@ let core_slice_index_Slice_index
| Some x -> Return x
// [core::slice::index::Range:::get]: forward function
-let core_slice_index_Range_get (t : Type0) (i : core_ops_range_Range usize) (s : slice t) :
+let core_slice_index_RangeUsize_get (t : Type0) (i : core_ops_range_Range usize) (s : slice t) :
result (option (slice t)) =
admit () // TODO
// [core::slice::index::Range::get_mut]: forward function
-let core_slice_index_Range_get_mut
+let core_slice_index_RangeUsize_get_mut
(t : Type0) : core_ops_range_Range usize → slice t → result (option (slice t)) =
admit () // TODO
// [core::slice::index::Range::get_mut]: backward function 0
-let core_slice_index_Range_get_mut_back
+let core_slice_index_RangeUsize_get_mut_back
(t : Type0) :
core_ops_range_Range usize → slice t → option (slice t) → result (slice t) =
admit () // TODO
// [core::slice::index::Range::get_unchecked]: forward function
-let core_slice_index_Range_get_unchecked
+let core_slice_index_RangeUsize_get_unchecked
(t : Type0) :
core_ops_range_Range usize → const_raw_ptr (slice t) → result (const_raw_ptr (slice t)) =
// Don't know what the model should be - for now we always fail to make
@@ -507,7 +507,7 @@ let core_slice_index_Range_get_unchecked
fun _ _ -> Fail Failure
// [core::slice::index::Range::get_unchecked_mut]: forward function
-let core_slice_index_Range_get_unchecked_mut
+let core_slice_index_RangeUsize_get_unchecked_mut
(t : Type0) :
core_ops_range_Range usize → mut_raw_ptr (slice t) → result (mut_raw_ptr (slice t)) =
// Don't know what the model should be - for now we always fail to make
@@ -515,17 +515,17 @@ let core_slice_index_Range_get_unchecked_mut
fun _ _ -> Fail Failure
// [core::slice::index::Range::index]: forward function
-let core_slice_index_Range_index
+let core_slice_index_RangeUsize_index
(t : Type0) : core_ops_range_Range usize → slice t → result (slice t) =
admit () // TODO
// [core::slice::index::Range::index_mut]: forward function
-let core_slice_index_Range_index_mut
+let core_slice_index_RangeUsize_index_mut
(t : Type0) : core_ops_range_Range usize → slice t → result (slice t) =
admit () // TODO
// [core::slice::index::Range::index_mut]: backward function 0
-let core_slice_index_Range_index_mut_back
+let core_slice_index_RangeUsize_index_mut_back
(t : Type0) : core_ops_range_Range usize → slice t → slice t → result (slice t) =
admit () // TODO
@@ -559,44 +559,44 @@ let core_array_Array_index_mut_back
(a : array t n) (i : idx) (x : inst.indexInst.output) : result (array t n) =
admit () // TODO
-// Trait implementation: [core::slice::index::[T]]
-let core_slice_index_Slice_coreopsindexIndexInst (t idx : Type0)
- (inst : core_slice_index_SliceIndex idx (slice t)) :
- core_ops_index_Index (slice t) idx = {
- output = inst.output;
- index = core_slice_index_Slice_index t idx inst;
-}
-
// Trait implementation: [core::slice::index::private_slice_index::Range]
-let core_slice_index_private_slice_index_Range_coresliceindexprivate_slice_indexSealedInst
+let core_slice_index_private_slice_index_SealedRangeUsizeInst
: core_slice_index_private_slice_index_Sealed (core_ops_range_Range usize) = ()
// Trait implementation: [core::slice::index::Range]
-let core_slice_index_Range_coresliceindexSliceIndexInst (t : Type0) :
+let core_slice_index_SliceIndexRangeUsizeSliceTInst (t : Type0) :
core_slice_index_SliceIndex (core_ops_range_Range usize) (slice t) = {
- sealedInst = core_slice_index_private_slice_index_Range_coresliceindexprivate_slice_indexSealedInst;
+ sealedInst = core_slice_index_private_slice_index_SealedRangeUsizeInst;
output = slice t;
- get = core_slice_index_Range_get t;
- get_mut = core_slice_index_Range_get_mut t;
- get_mut_back = core_slice_index_Range_get_mut_back t;
- get_unchecked = core_slice_index_Range_get_unchecked t;
- get_unchecked_mut = core_slice_index_Range_get_unchecked_mut t;
- index = core_slice_index_Range_index t;
- index_mut = core_slice_index_Range_index_mut t;
- index_mut_back = core_slice_index_Range_index_mut_back t;
+ get = core_slice_index_RangeUsize_get t;
+ get_mut = core_slice_index_RangeUsize_get_mut t;
+ get_mut_back = core_slice_index_RangeUsize_get_mut_back t;
+ get_unchecked = core_slice_index_RangeUsize_get_unchecked t;
+ get_unchecked_mut = core_slice_index_RangeUsize_get_unchecked_mut t;
+ index = core_slice_index_RangeUsize_index t;
+ index_mut = core_slice_index_RangeUsize_index_mut t;
+ index_mut_back = core_slice_index_RangeUsize_index_mut_back t;
+}
+
+// Trait implementation: [core::slice::index::[T]]
+let core_ops_index_IndexSliceTIInst (t idx : Type0)
+ (inst : core_slice_index_SliceIndex idx (slice t)) :
+ core_ops_index_Index (slice t) idx = {
+ output = inst.output;
+ index = core_slice_index_Slice_index t idx inst;
}
// Trait implementation: [core::slice::index::[T]]
-let core_slice_index_Slice_coreopsindexIndexMutInst (t idx : Type0)
+let core_ops_index_IndexMutSliceTIInst (t idx : Type0)
(inst : core_slice_index_SliceIndex idx (slice t)) :
core_ops_index_IndexMut (slice t) idx = {
- indexInst = core_slice_index_Slice_coreopsindexIndexInst t idx inst;
+ indexInst = core_ops_index_IndexSliceTIInst t idx inst;
index_mut = core_slice_index_Slice_index_mut t idx inst;
index_mut_back = core_slice_index_Slice_index_mut_back t idx inst;
}
// Trait implementation: [core::array::[T; N]]
-let core_array_Array_coreopsindexIndexInst (t idx : Type0) (n : usize)
+let core_ops_index_IndexArrayInst (t idx : Type0) (n : usize)
(inst : core_ops_index_Index (slice t) idx) :
core_ops_index_Index (array t n) idx = {
output = inst.output;
@@ -604,10 +604,10 @@ let core_array_Array_coreopsindexIndexInst (t idx : Type0) (n : usize)
}
// Trait implementation: [core::array::[T; N]]
-let core_array_Array_coreopsindexIndexMutInst (t idx : Type0) (n : usize)
+let core_ops_index_IndexMutArrayIInst (t idx : Type0) (n : usize)
(inst : core_ops_index_IndexMut (slice t) idx) :
core_ops_index_IndexMut (array t n) idx = {
- indexInst = core_array_Array_coreopsindexIndexInst t idx n inst.indexInst;
+ indexInst = core_ops_index_IndexArrayInst t idx n inst.indexInst;
index_mut = core_array_Array_index_mut t idx n inst;
index_mut_back = core_array_Array_index_mut_back t idx n inst;
}
@@ -651,13 +651,13 @@ let core_slice_index_usize_index_mut_back
admit () // TODO
// Trait implementation: [core::slice::index::private_slice_index::usize]
-let core_slice_index_private_slice_index_usize_coresliceindexprivate_slice_indexSealedInst
+let core_slice_index_private_slice_index_SealedUsizeInst
: core_slice_index_private_slice_index_Sealed usize = ()
// Trait implementation: [core::slice::index::usize]
-let core_slice_index_usize_coresliceindexSliceIndexInst (t : Type0) :
+let core_slice_index_SliceIndexUsizeSliceTInst (t : Type0) :
core_slice_index_SliceIndex usize (slice t) = {
- sealedInst = core_slice_index_private_slice_index_usize_coresliceindexprivate_slice_indexSealedInst;
+ sealedInst = core_slice_index_private_slice_index_SealedUsizeInst;
output = t;
get = core_slice_index_usize_get t;
get_mut = core_slice_index_usize_get_mut t;
@@ -706,24 +706,24 @@ let alloc_vec_Vec_coreopsindexIndexMutInst (t idx : Type0)
let alloc_vec_Vec_index_eq (#a : Type0) (v : alloc_vec_Vec a) (i : usize) :
Lemma (
- alloc_vec_Vec_index a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i ==
+ alloc_vec_Vec_index a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i ==
alloc_vec_Vec_index_usize v i)
- [SMTPat (alloc_vec_Vec_index a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i)]
+ [SMTPat (alloc_vec_Vec_index a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i)]
=
admit()
let alloc_vec_Vec_index_mut_eq (#a : Type0) (v : alloc_vec_Vec a) (i : usize) :
Lemma (
- alloc_vec_Vec_index_mut a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i ==
+ alloc_vec_Vec_index_mut a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i ==
alloc_vec_Vec_index_usize v i)
- [SMTPat (alloc_vec_Vec_index_mut a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i)]
+ [SMTPat (alloc_vec_Vec_index_mut a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i)]
=
admit()
let alloc_vec_Vec_index_mut_back_eq (#a : Type0) (v : alloc_vec_Vec a) (i : usize) (x : a) :
Lemma (
- alloc_vec_Vec_index_mut_back a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i x ==
+ alloc_vec_Vec_index_mut_back a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i x ==
alloc_vec_Vec_update_usize v i x)
- [SMTPat (alloc_vec_Vec_index_mut_back a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i x)]
+ [SMTPat (alloc_vec_Vec_index_mut_back a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i x)]
=
admit()
diff --git a/tests/fstar/hashmap_on_disk/HashmapMain.Clauses.Template.fst b/tests/fstar/hashmap_on_disk/HashmapMain.Clauses.Template.fst
index 61885ac7..7b274f59 100644
--- a/tests/fstar/hashmap_on_disk/HashmapMain.Clauses.Template.fst
+++ b/tests/fstar/hashmap_on_disk/HashmapMain.Clauses.Template.fst
@@ -6,56 +6,65 @@ open HashmapMain.Types
#set-options "--z3rlimit 50 --fuel 1 --ifuel 1"
-(** [hashmap_main::hashmap::HashMap::{0}::allocate_slots]: decreases clause *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::allocate_slots]: decreases clause
+ Source: 'src/hashmap.rs', lines 50:4-56:5 *)
unfold
let hashmap_HashMap_allocate_slots_loop_decreases (t : Type0)
(slots : alloc_vec_Vec (hashmap_List_t t)) (n : usize) : nat =
admit ()
-(** [hashmap_main::hashmap::HashMap::{0}::clear]: decreases clause *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::clear]: decreases clause
+ Source: 'src/hashmap.rs', lines 80:4-88:5 *)
unfold
let hashmap_HashMap_clear_loop_decreases (t : Type0)
(slots : alloc_vec_Vec (hashmap_List_t t)) (i : usize) : nat =
admit ()
-(** [hashmap_main::hashmap::HashMap::{0}::insert_in_list]: decreases clause *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::insert_in_list]: decreases clause
+ Source: 'src/hashmap.rs', lines 97:4-114:5 *)
unfold
let hashmap_HashMap_insert_in_list_loop_decreases (t : Type0) (key : usize)
(value : t) (ls : hashmap_List_t t) : nat =
admit ()
-(** [hashmap_main::hashmap::HashMap::{0}::move_elements_from_list]: decreases clause *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::move_elements_from_list]: decreases clause
+ Source: 'src/hashmap.rs', lines 183:4-196:5 *)
unfold
let hashmap_HashMap_move_elements_from_list_loop_decreases (t : Type0)
(ntable : hashmap_HashMap_t t) (ls : hashmap_List_t t) : nat =
admit ()
-(** [hashmap_main::hashmap::HashMap::{0}::move_elements]: decreases clause *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::move_elements]: decreases clause
+ Source: 'src/hashmap.rs', lines 171:4-180:5 *)
unfold
let hashmap_HashMap_move_elements_loop_decreases (t : Type0)
(ntable : hashmap_HashMap_t t) (slots : alloc_vec_Vec (hashmap_List_t t))
(i : usize) : nat =
admit ()
-(** [hashmap_main::hashmap::HashMap::{0}::contains_key_in_list]: decreases clause *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::contains_key_in_list]: decreases clause
+ Source: 'src/hashmap.rs', lines 206:4-219:5 *)
unfold
let hashmap_HashMap_contains_key_in_list_loop_decreases (t : Type0)
(key : usize) (ls : hashmap_List_t t) : nat =
admit ()
-(** [hashmap_main::hashmap::HashMap::{0}::get_in_list]: decreases clause *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::get_in_list]: decreases clause
+ Source: 'src/hashmap.rs', lines 224:4-237:5 *)
unfold
let hashmap_HashMap_get_in_list_loop_decreases (t : Type0) (key : usize)
(ls : hashmap_List_t t) : nat =
admit ()
-(** [hashmap_main::hashmap::HashMap::{0}::get_mut_in_list]: decreases clause *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::get_mut_in_list]: decreases clause
+ Source: 'src/hashmap.rs', lines 245:4-254:5 *)
unfold
let hashmap_HashMap_get_mut_in_list_loop_decreases (t : Type0)
(ls : hashmap_List_t t) (key : usize) : nat =
admit ()
-(** [hashmap_main::hashmap::HashMap::{0}::remove_from_list]: decreases clause *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::remove_from_list]: decreases clause
+ Source: 'src/hashmap.rs', lines 265:4-291:5 *)
unfold
let hashmap_HashMap_remove_from_list_loop_decreases (t : Type0) (key : usize)
(ls : hashmap_List_t t) : nat =
diff --git a/tests/fstar/hashmap_on_disk/HashmapMain.Funs.fst b/tests/fstar/hashmap_on_disk/HashmapMain.Funs.fst
index 5f227596..fa570309 100644
--- a/tests/fstar/hashmap_on_disk/HashmapMain.Funs.fst
+++ b/tests/fstar/hashmap_on_disk/HashmapMain.Funs.fst
@@ -8,11 +8,13 @@ include HashmapMain.Clauses
#set-options "--z3rlimit 50 --fuel 1 --ifuel 1"
-(** [hashmap_main::hashmap::hash_key]: forward function *)
+(** [hashmap_main::hashmap::hash_key]: forward function
+ Source: 'src/hashmap.rs', lines 27:0-27:32 *)
let hashmap_hash_key (k : usize) : result usize =
Return k
-(** [hashmap_main::hashmap::HashMap::{0}::allocate_slots]: loop 0: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::allocate_slots]: loop 0: forward function
+ Source: 'src/hashmap.rs', lines 50:4-56:5 *)
let rec hashmap_HashMap_allocate_slots_loop
(t : Type0) (slots : alloc_vec_Vec (hashmap_List_t t)) (n : usize) :
Tot (result (alloc_vec_Vec (hashmap_List_t t)))
@@ -26,14 +28,16 @@ let rec hashmap_HashMap_allocate_slots_loop
hashmap_HashMap_allocate_slots_loop t slots0 n0
else Return slots
-(** [hashmap_main::hashmap::HashMap::{0}::allocate_slots]: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::allocate_slots]: forward function
+ Source: 'src/hashmap.rs', lines 50:4-50:76 *)
let hashmap_HashMap_allocate_slots
(t : Type0) (slots : alloc_vec_Vec (hashmap_List_t t)) (n : usize) :
result (alloc_vec_Vec (hashmap_List_t t))
=
hashmap_HashMap_allocate_slots_loop t slots n
-(** [hashmap_main::hashmap::HashMap::{0}::new_with_capacity]: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::new_with_capacity]: forward function
+ Source: 'src/hashmap.rs', lines 59:4-63:13 *)
let hashmap_HashMap_new_with_capacity
(t : Type0) (capacity : usize) (max_load_dividend : usize)
(max_load_divisor : usize) :
@@ -51,12 +55,14 @@ let hashmap_HashMap_new_with_capacity
slots = slots
}
-(** [hashmap_main::hashmap::HashMap::{0}::new]: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::new]: forward function
+ Source: 'src/hashmap.rs', lines 75:4-75:24 *)
let hashmap_HashMap_new (t : Type0) : result (hashmap_HashMap_t t) =
hashmap_HashMap_new_with_capacity t 32 4 5
-(** [hashmap_main::hashmap::HashMap::{0}::clear]: loop 0: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::clear]: loop 0: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 80:4-88:5 *)
let rec hashmap_HashMap_clear_loop
(t : Type0) (slots : alloc_vec_Vec (hashmap_List_t t)) (i : usize) :
Tot (result (alloc_vec_Vec (hashmap_List_t t)))
@@ -68,24 +74,27 @@ let rec hashmap_HashMap_clear_loop
let* i1 = usize_add i 1 in
let* slots0 =
alloc_vec_Vec_index_mut_back (hashmap_List_t t) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (hashmap_List_t
- t)) slots i Hashmap_List_Nil in
+ (core_slice_index_SliceIndexUsizeSliceTInst (hashmap_List_t t)) slots i
+ Hashmap_List_Nil in
hashmap_HashMap_clear_loop t slots0 i1
else Return slots
-(** [hashmap_main::hashmap::HashMap::{0}::clear]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::clear]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 80:4-80:27 *)
let hashmap_HashMap_clear
(t : Type0) (self : hashmap_HashMap_t t) : result (hashmap_HashMap_t t) =
let* v = hashmap_HashMap_clear_loop t self.slots 0 in
Return { self with num_entries = 0; slots = v }
-(** [hashmap_main::hashmap::HashMap::{0}::len]: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::len]: forward function
+ Source: 'src/hashmap.rs', lines 90:4-90:30 *)
let hashmap_HashMap_len
(t : Type0) (self : hashmap_HashMap_t t) : result usize =
Return self.num_entries
-(** [hashmap_main::hashmap::HashMap::{0}::insert_in_list]: loop 0: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::insert_in_list]: loop 0: forward function
+ Source: 'src/hashmap.rs', lines 97:4-114:5 *)
let rec hashmap_HashMap_insert_in_list_loop
(t : Type0) (key : usize) (value : t) (ls : hashmap_List_t t) :
Tot (result bool)
@@ -99,12 +108,14 @@ let rec hashmap_HashMap_insert_in_list_loop
| Hashmap_List_Nil -> Return true
end
-(** [hashmap_main::hashmap::HashMap::{0}::insert_in_list]: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::insert_in_list]: forward function
+ Source: 'src/hashmap.rs', lines 97:4-97:71 *)
let hashmap_HashMap_insert_in_list
(t : Type0) (key : usize) (value : t) (ls : hashmap_List_t t) : result bool =
hashmap_HashMap_insert_in_list_loop t key value ls
-(** [hashmap_main::hashmap::HashMap::{0}::insert_in_list]: loop 0: backward function 0 *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::insert_in_list]: loop 0: backward function 0
+ Source: 'src/hashmap.rs', lines 97:4-114:5 *)
let rec hashmap_HashMap_insert_in_list_loop_back
(t : Type0) (key : usize) (value : t) (ls : hashmap_List_t t) :
Tot (result (hashmap_List_t t))
@@ -121,15 +132,17 @@ let rec hashmap_HashMap_insert_in_list_loop_back
let l = Hashmap_List_Nil in Return (Hashmap_List_Cons key value l)
end
-(** [hashmap_main::hashmap::HashMap::{0}::insert_in_list]: backward function 0 *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::insert_in_list]: backward function 0
+ Source: 'src/hashmap.rs', lines 97:4-97:71 *)
let hashmap_HashMap_insert_in_list_back
(t : Type0) (key : usize) (value : t) (ls : hashmap_List_t t) :
result (hashmap_List_t t)
=
hashmap_HashMap_insert_in_list_loop_back t key value ls
-(** [hashmap_main::hashmap::HashMap::{0}::insert_no_resize]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::insert_no_resize]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 117:4-117:54 *)
let hashmap_HashMap_insert_no_resize
(t : Type0) (self : hashmap_HashMap_t t) (key : usize) (value : t) :
result (hashmap_HashMap_t t)
@@ -139,7 +152,7 @@ let hashmap_HashMap_insert_no_resize
let* hash_mod = usize_rem hash i in
let* l =
alloc_vec_Vec_index_mut (hashmap_List_t t) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (hashmap_List_t t))
+ (core_slice_index_SliceIndexUsizeSliceTInst (hashmap_List_t t))
self.slots hash_mod in
let* inserted = hashmap_HashMap_insert_in_list t key value l in
if inserted
@@ -148,19 +161,20 @@ let hashmap_HashMap_insert_no_resize
let* l0 = hashmap_HashMap_insert_in_list_back t key value l in
let* v =
alloc_vec_Vec_index_mut_back (hashmap_List_t t) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (hashmap_List_t
- t)) self.slots hash_mod l0 in
+ (core_slice_index_SliceIndexUsizeSliceTInst (hashmap_List_t t))
+ self.slots hash_mod l0 in
Return { self with num_entries = i0; slots = v }
else
let* l0 = hashmap_HashMap_insert_in_list_back t key value l in
let* v =
alloc_vec_Vec_index_mut_back (hashmap_List_t t) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (hashmap_List_t
- t)) self.slots hash_mod l0 in
+ (core_slice_index_SliceIndexUsizeSliceTInst (hashmap_List_t t))
+ self.slots hash_mod l0 in
Return { self with slots = v }
-(** [hashmap_main::hashmap::HashMap::{0}::move_elements_from_list]: loop 0: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::move_elements_from_list]: loop 0: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 183:4-196:5 *)
let rec hashmap_HashMap_move_elements_from_list_loop
(t : Type0) (ntable : hashmap_HashMap_t t) (ls : hashmap_List_t t) :
Tot (result (hashmap_HashMap_t t))
@@ -174,16 +188,18 @@ let rec hashmap_HashMap_move_elements_from_list_loop
| Hashmap_List_Nil -> Return ntable
end
-(** [hashmap_main::hashmap::HashMap::{0}::move_elements_from_list]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::move_elements_from_list]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 183:4-183:72 *)
let hashmap_HashMap_move_elements_from_list
(t : Type0) (ntable : hashmap_HashMap_t t) (ls : hashmap_List_t t) :
result (hashmap_HashMap_t t)
=
hashmap_HashMap_move_elements_from_list_loop t ntable ls
-(** [hashmap_main::hashmap::HashMap::{0}::move_elements]: loop 0: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::move_elements]: loop 0: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 171:4-180:5 *)
let rec hashmap_HashMap_move_elements_loop
(t : Type0) (ntable : hashmap_HashMap_t t)
(slots : alloc_vec_Vec (hashmap_List_t t)) (i : usize) :
@@ -195,21 +211,22 @@ let rec hashmap_HashMap_move_elements_loop
then
let* l =
alloc_vec_Vec_index_mut (hashmap_List_t t) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (hashmap_List_t
- t)) slots i in
+ (core_slice_index_SliceIndexUsizeSliceTInst (hashmap_List_t t)) slots i
+ in
let ls = core_mem_replace (hashmap_List_t t) l Hashmap_List_Nil in
let* ntable0 = hashmap_HashMap_move_elements_from_list t ntable ls in
let* i1 = usize_add i 1 in
let l0 = core_mem_replace_back (hashmap_List_t t) l Hashmap_List_Nil in
let* slots0 =
alloc_vec_Vec_index_mut_back (hashmap_List_t t) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (hashmap_List_t
- t)) slots i l0 in
+ (core_slice_index_SliceIndexUsizeSliceTInst (hashmap_List_t t)) slots i
+ l0 in
hashmap_HashMap_move_elements_loop t ntable0 slots0 i1
else Return (ntable, slots)
-(** [hashmap_main::hashmap::HashMap::{0}::move_elements]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::move_elements]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 171:4-171:95 *)
let hashmap_HashMap_move_elements
(t : Type0) (ntable : hashmap_HashMap_t t)
(slots : alloc_vec_Vec (hashmap_List_t t)) (i : usize) :
@@ -217,8 +234,9 @@ let hashmap_HashMap_move_elements
=
hashmap_HashMap_move_elements_loop t ntable slots i
-(** [hashmap_main::hashmap::HashMap::{0}::try_resize]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::try_resize]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 140:4-140:28 *)
let hashmap_HashMap_try_resize
(t : Type0) (self : hashmap_HashMap_t t) : result (hashmap_HashMap_t t) =
let* max_usize = scalar_cast U32 Usize core_u32_max in
@@ -236,8 +254,9 @@ let hashmap_HashMap_try_resize
}
else Return { self with max_load_factor = (i, i0) }
-(** [hashmap_main::hashmap::HashMap::{0}::insert]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::insert]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 129:4-129:48 *)
let hashmap_HashMap_insert
(t : Type0) (self : hashmap_HashMap_t t) (key : usize) (value : t) :
result (hashmap_HashMap_t t)
@@ -248,7 +267,8 @@ let hashmap_HashMap_insert
then hashmap_HashMap_try_resize t self0
else Return self0
-(** [hashmap_main::hashmap::HashMap::{0}::contains_key_in_list]: loop 0: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::contains_key_in_list]: loop 0: forward function
+ Source: 'src/hashmap.rs', lines 206:4-219:5 *)
let rec hashmap_HashMap_contains_key_in_list_loop
(t : Type0) (key : usize) (ls : hashmap_List_t t) :
Tot (result bool)
@@ -262,12 +282,14 @@ let rec hashmap_HashMap_contains_key_in_list_loop
| Hashmap_List_Nil -> Return false
end
-(** [hashmap_main::hashmap::HashMap::{0}::contains_key_in_list]: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::contains_key_in_list]: forward function
+ Source: 'src/hashmap.rs', lines 206:4-206:68 *)
let hashmap_HashMap_contains_key_in_list
(t : Type0) (key : usize) (ls : hashmap_List_t t) : result bool =
hashmap_HashMap_contains_key_in_list_loop t key ls
-(** [hashmap_main::hashmap::HashMap::{0}::contains_key]: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::contains_key]: forward function
+ Source: 'src/hashmap.rs', lines 199:4-199:49 *)
let hashmap_HashMap_contains_key
(t : Type0) (self : hashmap_HashMap_t t) (key : usize) : result bool =
let* hash = hashmap_hash_key key in
@@ -275,11 +297,12 @@ let hashmap_HashMap_contains_key
let* hash_mod = usize_rem hash i in
let* l =
alloc_vec_Vec_index (hashmap_List_t t) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (hashmap_List_t t))
+ (core_slice_index_SliceIndexUsizeSliceTInst (hashmap_List_t t))
self.slots hash_mod in
hashmap_HashMap_contains_key_in_list t key l
-(** [hashmap_main::hashmap::HashMap::{0}::get_in_list]: loop 0: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::get_in_list]: loop 0: forward function
+ Source: 'src/hashmap.rs', lines 224:4-237:5 *)
let rec hashmap_HashMap_get_in_list_loop
(t : Type0) (key : usize) (ls : hashmap_List_t t) :
Tot (result t)
@@ -293,12 +316,14 @@ let rec hashmap_HashMap_get_in_list_loop
| Hashmap_List_Nil -> Fail Failure
end
-(** [hashmap_main::hashmap::HashMap::{0}::get_in_list]: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::get_in_list]: forward function
+ Source: 'src/hashmap.rs', lines 224:4-224:70 *)
let hashmap_HashMap_get_in_list
(t : Type0) (key : usize) (ls : hashmap_List_t t) : result t =
hashmap_HashMap_get_in_list_loop t key ls
-(** [hashmap_main::hashmap::HashMap::{0}::get]: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::get]: forward function
+ Source: 'src/hashmap.rs', lines 239:4-239:55 *)
let hashmap_HashMap_get
(t : Type0) (self : hashmap_HashMap_t t) (key : usize) : result t =
let* hash = hashmap_hash_key key in
@@ -306,11 +331,12 @@ let hashmap_HashMap_get
let* hash_mod = usize_rem hash i in
let* l =
alloc_vec_Vec_index (hashmap_List_t t) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (hashmap_List_t t))
+ (core_slice_index_SliceIndexUsizeSliceTInst (hashmap_List_t t))
self.slots hash_mod in
hashmap_HashMap_get_in_list t key l
-(** [hashmap_main::hashmap::HashMap::{0}::get_mut_in_list]: loop 0: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::get_mut_in_list]: loop 0: forward function
+ Source: 'src/hashmap.rs', lines 245:4-254:5 *)
let rec hashmap_HashMap_get_mut_in_list_loop
(t : Type0) (ls : hashmap_List_t t) (key : usize) :
Tot (result t)
@@ -324,12 +350,14 @@ let rec hashmap_HashMap_get_mut_in_list_loop
| Hashmap_List_Nil -> Fail Failure
end
-(** [hashmap_main::hashmap::HashMap::{0}::get_mut_in_list]: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::get_mut_in_list]: forward function
+ Source: 'src/hashmap.rs', lines 245:4-245:86 *)
let hashmap_HashMap_get_mut_in_list
(t : Type0) (ls : hashmap_List_t t) (key : usize) : result t =
hashmap_HashMap_get_mut_in_list_loop t ls key
-(** [hashmap_main::hashmap::HashMap::{0}::get_mut_in_list]: loop 0: backward function 0 *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::get_mut_in_list]: loop 0: backward function 0
+ Source: 'src/hashmap.rs', lines 245:4-254:5 *)
let rec hashmap_HashMap_get_mut_in_list_loop_back
(t : Type0) (ls : hashmap_List_t t) (key : usize) (ret : t) :
Tot (result (hashmap_List_t t))
@@ -345,14 +373,16 @@ let rec hashmap_HashMap_get_mut_in_list_loop_back
| Hashmap_List_Nil -> Fail Failure
end
-(** [hashmap_main::hashmap::HashMap::{0}::get_mut_in_list]: backward function 0 *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::get_mut_in_list]: backward function 0
+ Source: 'src/hashmap.rs', lines 245:4-245:86 *)
let hashmap_HashMap_get_mut_in_list_back
(t : Type0) (ls : hashmap_List_t t) (key : usize) (ret : t) :
result (hashmap_List_t t)
=
hashmap_HashMap_get_mut_in_list_loop_back t ls key ret
-(** [hashmap_main::hashmap::HashMap::{0}::get_mut]: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::get_mut]: forward function
+ Source: 'src/hashmap.rs', lines 257:4-257:67 *)
let hashmap_HashMap_get_mut
(t : Type0) (self : hashmap_HashMap_t t) (key : usize) : result t =
let* hash = hashmap_hash_key key in
@@ -360,11 +390,12 @@ let hashmap_HashMap_get_mut
let* hash_mod = usize_rem hash i in
let* l =
alloc_vec_Vec_index_mut (hashmap_List_t t) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (hashmap_List_t t))
+ (core_slice_index_SliceIndexUsizeSliceTInst (hashmap_List_t t))
self.slots hash_mod in
hashmap_HashMap_get_mut_in_list t l key
-(** [hashmap_main::hashmap::HashMap::{0}::get_mut]: backward function 0 *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::get_mut]: backward function 0
+ Source: 'src/hashmap.rs', lines 257:4-257:67 *)
let hashmap_HashMap_get_mut_back
(t : Type0) (self : hashmap_HashMap_t t) (key : usize) (ret : t) :
result (hashmap_HashMap_t t)
@@ -374,16 +405,17 @@ let hashmap_HashMap_get_mut_back
let* hash_mod = usize_rem hash i in
let* l =
alloc_vec_Vec_index_mut (hashmap_List_t t) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (hashmap_List_t t))
+ (core_slice_index_SliceIndexUsizeSliceTInst (hashmap_List_t t))
self.slots hash_mod in
let* l0 = hashmap_HashMap_get_mut_in_list_back t l key ret in
let* v =
alloc_vec_Vec_index_mut_back (hashmap_List_t t) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (hashmap_List_t t))
+ (core_slice_index_SliceIndexUsizeSliceTInst (hashmap_List_t t))
self.slots hash_mod l0 in
Return { self with slots = v }
-(** [hashmap_main::hashmap::HashMap::{0}::remove_from_list]: loop 0: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::remove_from_list]: loop 0: forward function
+ Source: 'src/hashmap.rs', lines 265:4-291:5 *)
let rec hashmap_HashMap_remove_from_list_loop
(t : Type0) (key : usize) (ls : hashmap_List_t t) :
Tot (result (option t))
@@ -404,12 +436,14 @@ let rec hashmap_HashMap_remove_from_list_loop
| Hashmap_List_Nil -> Return None
end
-(** [hashmap_main::hashmap::HashMap::{0}::remove_from_list]: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::remove_from_list]: forward function
+ Source: 'src/hashmap.rs', lines 265:4-265:69 *)
let hashmap_HashMap_remove_from_list
(t : Type0) (key : usize) (ls : hashmap_List_t t) : result (option t) =
hashmap_HashMap_remove_from_list_loop t key ls
-(** [hashmap_main::hashmap::HashMap::{0}::remove_from_list]: loop 0: backward function 1 *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::remove_from_list]: loop 0: backward function 1
+ Source: 'src/hashmap.rs', lines 265:4-291:5 *)
let rec hashmap_HashMap_remove_from_list_loop_back
(t : Type0) (key : usize) (ls : hashmap_List_t t) :
Tot (result (hashmap_List_t t))
@@ -432,14 +466,16 @@ let rec hashmap_HashMap_remove_from_list_loop_back
| Hashmap_List_Nil -> Return Hashmap_List_Nil
end
-(** [hashmap_main::hashmap::HashMap::{0}::remove_from_list]: backward function 1 *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::remove_from_list]: backward function 1
+ Source: 'src/hashmap.rs', lines 265:4-265:69 *)
let hashmap_HashMap_remove_from_list_back
(t : Type0) (key : usize) (ls : hashmap_List_t t) :
result (hashmap_List_t t)
=
hashmap_HashMap_remove_from_list_loop_back t key ls
-(** [hashmap_main::hashmap::HashMap::{0}::remove]: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::remove]: forward function
+ Source: 'src/hashmap.rs', lines 294:4-294:52 *)
let hashmap_HashMap_remove
(t : Type0) (self : hashmap_HashMap_t t) (key : usize) : result (option t) =
let* hash = hashmap_hash_key key in
@@ -447,7 +483,7 @@ let hashmap_HashMap_remove
let* hash_mod = usize_rem hash i in
let* l =
alloc_vec_Vec_index_mut (hashmap_List_t t) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (hashmap_List_t t))
+ (core_slice_index_SliceIndexUsizeSliceTInst (hashmap_List_t t))
self.slots hash_mod in
let* x = hashmap_HashMap_remove_from_list t key l in
begin match x with
@@ -455,7 +491,8 @@ let hashmap_HashMap_remove
| Some x0 -> let* _ = usize_sub self.num_entries 1 in Return (Some x0)
end
-(** [hashmap_main::hashmap::HashMap::{0}::remove]: backward function 0 *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::remove]: backward function 0
+ Source: 'src/hashmap.rs', lines 294:4-294:52 *)
let hashmap_HashMap_remove_back
(t : Type0) (self : hashmap_HashMap_t t) (key : usize) :
result (hashmap_HashMap_t t)
@@ -465,7 +502,7 @@ let hashmap_HashMap_remove_back
let* hash_mod = usize_rem hash i in
let* l =
alloc_vec_Vec_index_mut (hashmap_List_t t) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (hashmap_List_t t))
+ (core_slice_index_SliceIndexUsizeSliceTInst (hashmap_List_t t))
self.slots hash_mod in
let* x = hashmap_HashMap_remove_from_list t key l in
begin match x with
@@ -473,20 +510,21 @@ let hashmap_HashMap_remove_back
let* l0 = hashmap_HashMap_remove_from_list_back t key l in
let* v =
alloc_vec_Vec_index_mut_back (hashmap_List_t t) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (hashmap_List_t
- t)) self.slots hash_mod l0 in
+ (core_slice_index_SliceIndexUsizeSliceTInst (hashmap_List_t t))
+ self.slots hash_mod l0 in
Return { self with slots = v }
| Some x0 ->
let* i0 = usize_sub self.num_entries 1 in
let* l0 = hashmap_HashMap_remove_from_list_back t key l in
let* v =
alloc_vec_Vec_index_mut_back (hashmap_List_t t) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (hashmap_List_t
- t)) self.slots hash_mod l0 in
+ (core_slice_index_SliceIndexUsizeSliceTInst (hashmap_List_t t))
+ self.slots hash_mod l0 in
Return { self with num_entries = i0; slots = v }
end
-(** [hashmap_main::hashmap::test1]: forward function *)
+(** [hashmap_main::hashmap::test1]: forward function
+ Source: 'src/hashmap.rs', lines 315:0-315:10 *)
let hashmap_test1 : result unit =
let* hm = hashmap_HashMap_new u64 in
let* hm0 = hashmap_HashMap_insert u64 hm 0 42 in
@@ -522,7 +560,8 @@ let hashmap_test1 : result unit =
if not (i3 = 256) then Fail Failure else Return ()
end
-(** [hashmap_main::insert_on_disk]: forward function *)
+(** [hashmap_main::insert_on_disk]: forward function
+ Source: 'src/hashmap_main.rs', lines 7:0-7:43 *)
let insert_on_disk
(key : usize) (value : u64) (st : state) : result (state & unit) =
let* (st0, hm) = hashmap_utils_deserialize st in
@@ -530,7 +569,8 @@ let insert_on_disk
let* (st1, _) = hashmap_utils_serialize hm0 st0 in
Return (st1, ())
-(** [hashmap_main::main]: forward function *)
+(** [hashmap_main::main]: forward function
+ Source: 'src/hashmap_main.rs', lines 16:0-16:13 *)
let main : result unit =
Return ()
diff --git a/tests/fstar/hashmap_on_disk/HashmapMain.Opaque.fsti b/tests/fstar/hashmap_on_disk/HashmapMain.Opaque.fsti
index d6cecf36..1f47eb33 100644
--- a/tests/fstar/hashmap_on_disk/HashmapMain.Opaque.fsti
+++ b/tests/fstar/hashmap_on_disk/HashmapMain.Opaque.fsti
@@ -6,11 +6,13 @@ include HashmapMain.Types
#set-options "--z3rlimit 50 --fuel 1 --ifuel 1"
-(** [hashmap_main::hashmap_utils::deserialize]: forward function *)
+(** [hashmap_main::hashmap_utils::deserialize]: forward function
+ Source: 'src/hashmap_utils.rs', lines 10:0-10:43 *)
val hashmap_utils_deserialize
: state -> result (state & (hashmap_HashMap_t u64))
-(** [hashmap_main::hashmap_utils::serialize]: forward function *)
+(** [hashmap_main::hashmap_utils::serialize]: forward function
+ Source: 'src/hashmap_utils.rs', lines 5:0-5:42 *)
val hashmap_utils_serialize
: hashmap_HashMap_t u64 -> state -> result (state & unit)
diff --git a/tests/fstar/hashmap_on_disk/HashmapMain.Types.fsti b/tests/fstar/hashmap_on_disk/HashmapMain.Types.fsti
index 24b78c2a..e77954ad 100644
--- a/tests/fstar/hashmap_on_disk/HashmapMain.Types.fsti
+++ b/tests/fstar/hashmap_on_disk/HashmapMain.Types.fsti
@@ -5,12 +5,14 @@ open Primitives
#set-options "--z3rlimit 50 --fuel 1 --ifuel 1"
-(** [hashmap_main::hashmap::List] *)
+(** [hashmap_main::hashmap::List]
+ Source: 'src/hashmap.rs', lines 19:0-19:16 *)
type hashmap_List_t (t : Type0) =
| Hashmap_List_Cons : usize -> t -> hashmap_List_t t -> hashmap_List_t t
| Hashmap_List_Nil : hashmap_List_t t
-(** [hashmap_main::hashmap::HashMap] *)
+(** [hashmap_main::hashmap::HashMap]
+ Source: 'src/hashmap.rs', lines 35:0-35:21 *)
type hashmap_HashMap_t (t : Type0) =
{
num_entries : usize;
diff --git a/tests/fstar/hashmap_on_disk/Primitives.fst b/tests/fstar/hashmap_on_disk/Primitives.fst
index 3297803c..94322ead 100644
--- a/tests/fstar/hashmap_on_disk/Primitives.fst
+++ b/tests/fstar/hashmap_on_disk/Primitives.fst
@@ -351,14 +351,14 @@ let alloc_boxed_Box_deref_mut (t : Type0) (x : t) : result t = Return x
let alloc_boxed_Box_deref_mut_back (t : Type) (_ : t) (x : t) : result t = Return x
// Trait instance
-let alloc_boxed_Box_coreOpsDerefInst (self : Type0) : core_ops_deref_Deref self = {
+let alloc_boxed_Box_coreopsDerefInst (self : Type0) : core_ops_deref_Deref self = {
target = self;
deref = alloc_boxed_Box_deref self;
}
// Trait instance
-let alloc_boxed_Box_coreOpsDerefMutInst (self : Type0) : core_ops_deref_DerefMut self = {
- derefInst = alloc_boxed_Box_coreOpsDerefInst self;
+let alloc_boxed_Box_coreopsDerefMutInst (self : Type0) : core_ops_deref_DerefMut self = {
+ derefInst = alloc_boxed_Box_coreopsDerefInst self;
deref_mut = alloc_boxed_Box_deref_mut self;
deref_mut_back = alloc_boxed_Box_deref_mut_back self;
}
@@ -483,23 +483,23 @@ let core_slice_index_Slice_index
| Some x -> Return x
// [core::slice::index::Range:::get]: forward function
-let core_slice_index_Range_get (t : Type0) (i : core_ops_range_Range usize) (s : slice t) :
+let core_slice_index_RangeUsize_get (t : Type0) (i : core_ops_range_Range usize) (s : slice t) :
result (option (slice t)) =
admit () // TODO
// [core::slice::index::Range::get_mut]: forward function
-let core_slice_index_Range_get_mut
+let core_slice_index_RangeUsize_get_mut
(t : Type0) : core_ops_range_Range usize → slice t → result (option (slice t)) =
admit () // TODO
// [core::slice::index::Range::get_mut]: backward function 0
-let core_slice_index_Range_get_mut_back
+let core_slice_index_RangeUsize_get_mut_back
(t : Type0) :
core_ops_range_Range usize → slice t → option (slice t) → result (slice t) =
admit () // TODO
// [core::slice::index::Range::get_unchecked]: forward function
-let core_slice_index_Range_get_unchecked
+let core_slice_index_RangeUsize_get_unchecked
(t : Type0) :
core_ops_range_Range usize → const_raw_ptr (slice t) → result (const_raw_ptr (slice t)) =
// Don't know what the model should be - for now we always fail to make
@@ -507,7 +507,7 @@ let core_slice_index_Range_get_unchecked
fun _ _ -> Fail Failure
// [core::slice::index::Range::get_unchecked_mut]: forward function
-let core_slice_index_Range_get_unchecked_mut
+let core_slice_index_RangeUsize_get_unchecked_mut
(t : Type0) :
core_ops_range_Range usize → mut_raw_ptr (slice t) → result (mut_raw_ptr (slice t)) =
// Don't know what the model should be - for now we always fail to make
@@ -515,17 +515,17 @@ let core_slice_index_Range_get_unchecked_mut
fun _ _ -> Fail Failure
// [core::slice::index::Range::index]: forward function
-let core_slice_index_Range_index
+let core_slice_index_RangeUsize_index
(t : Type0) : core_ops_range_Range usize → slice t → result (slice t) =
admit () // TODO
// [core::slice::index::Range::index_mut]: forward function
-let core_slice_index_Range_index_mut
+let core_slice_index_RangeUsize_index_mut
(t : Type0) : core_ops_range_Range usize → slice t → result (slice t) =
admit () // TODO
// [core::slice::index::Range::index_mut]: backward function 0
-let core_slice_index_Range_index_mut_back
+let core_slice_index_RangeUsize_index_mut_back
(t : Type0) : core_ops_range_Range usize → slice t → slice t → result (slice t) =
admit () // TODO
@@ -559,44 +559,44 @@ let core_array_Array_index_mut_back
(a : array t n) (i : idx) (x : inst.indexInst.output) : result (array t n) =
admit () // TODO
-// Trait implementation: [core::slice::index::[T]]
-let core_slice_index_Slice_coreopsindexIndexInst (t idx : Type0)
- (inst : core_slice_index_SliceIndex idx (slice t)) :
- core_ops_index_Index (slice t) idx = {
- output = inst.output;
- index = core_slice_index_Slice_index t idx inst;
-}
-
// Trait implementation: [core::slice::index::private_slice_index::Range]
-let core_slice_index_private_slice_index_Range_coresliceindexprivate_slice_indexSealedInst
+let core_slice_index_private_slice_index_SealedRangeUsizeInst
: core_slice_index_private_slice_index_Sealed (core_ops_range_Range usize) = ()
// Trait implementation: [core::slice::index::Range]
-let core_slice_index_Range_coresliceindexSliceIndexInst (t : Type0) :
+let core_slice_index_SliceIndexRangeUsizeSliceTInst (t : Type0) :
core_slice_index_SliceIndex (core_ops_range_Range usize) (slice t) = {
- sealedInst = core_slice_index_private_slice_index_Range_coresliceindexprivate_slice_indexSealedInst;
+ sealedInst = core_slice_index_private_slice_index_SealedRangeUsizeInst;
output = slice t;
- get = core_slice_index_Range_get t;
- get_mut = core_slice_index_Range_get_mut t;
- get_mut_back = core_slice_index_Range_get_mut_back t;
- get_unchecked = core_slice_index_Range_get_unchecked t;
- get_unchecked_mut = core_slice_index_Range_get_unchecked_mut t;
- index = core_slice_index_Range_index t;
- index_mut = core_slice_index_Range_index_mut t;
- index_mut_back = core_slice_index_Range_index_mut_back t;
+ get = core_slice_index_RangeUsize_get t;
+ get_mut = core_slice_index_RangeUsize_get_mut t;
+ get_mut_back = core_slice_index_RangeUsize_get_mut_back t;
+ get_unchecked = core_slice_index_RangeUsize_get_unchecked t;
+ get_unchecked_mut = core_slice_index_RangeUsize_get_unchecked_mut t;
+ index = core_slice_index_RangeUsize_index t;
+ index_mut = core_slice_index_RangeUsize_index_mut t;
+ index_mut_back = core_slice_index_RangeUsize_index_mut_back t;
+}
+
+// Trait implementation: [core::slice::index::[T]]
+let core_ops_index_IndexSliceTIInst (t idx : Type0)
+ (inst : core_slice_index_SliceIndex idx (slice t)) :
+ core_ops_index_Index (slice t) idx = {
+ output = inst.output;
+ index = core_slice_index_Slice_index t idx inst;
}
// Trait implementation: [core::slice::index::[T]]
-let core_slice_index_Slice_coreopsindexIndexMutInst (t idx : Type0)
+let core_ops_index_IndexMutSliceTIInst (t idx : Type0)
(inst : core_slice_index_SliceIndex idx (slice t)) :
core_ops_index_IndexMut (slice t) idx = {
- indexInst = core_slice_index_Slice_coreopsindexIndexInst t idx inst;
+ indexInst = core_ops_index_IndexSliceTIInst t idx inst;
index_mut = core_slice_index_Slice_index_mut t idx inst;
index_mut_back = core_slice_index_Slice_index_mut_back t idx inst;
}
// Trait implementation: [core::array::[T; N]]
-let core_array_Array_coreopsindexIndexInst (t idx : Type0) (n : usize)
+let core_ops_index_IndexArrayInst (t idx : Type0) (n : usize)
(inst : core_ops_index_Index (slice t) idx) :
core_ops_index_Index (array t n) idx = {
output = inst.output;
@@ -604,10 +604,10 @@ let core_array_Array_coreopsindexIndexInst (t idx : Type0) (n : usize)
}
// Trait implementation: [core::array::[T; N]]
-let core_array_Array_coreopsindexIndexMutInst (t idx : Type0) (n : usize)
+let core_ops_index_IndexMutArrayIInst (t idx : Type0) (n : usize)
(inst : core_ops_index_IndexMut (slice t) idx) :
core_ops_index_IndexMut (array t n) idx = {
- indexInst = core_array_Array_coreopsindexIndexInst t idx n inst.indexInst;
+ indexInst = core_ops_index_IndexArrayInst t idx n inst.indexInst;
index_mut = core_array_Array_index_mut t idx n inst;
index_mut_back = core_array_Array_index_mut_back t idx n inst;
}
@@ -651,13 +651,13 @@ let core_slice_index_usize_index_mut_back
admit () // TODO
// Trait implementation: [core::slice::index::private_slice_index::usize]
-let core_slice_index_private_slice_index_usize_coresliceindexprivate_slice_indexSealedInst
+let core_slice_index_private_slice_index_SealedUsizeInst
: core_slice_index_private_slice_index_Sealed usize = ()
// Trait implementation: [core::slice::index::usize]
-let core_slice_index_usize_coresliceindexSliceIndexInst (t : Type0) :
+let core_slice_index_SliceIndexUsizeSliceTInst (t : Type0) :
core_slice_index_SliceIndex usize (slice t) = {
- sealedInst = core_slice_index_private_slice_index_usize_coresliceindexprivate_slice_indexSealedInst;
+ sealedInst = core_slice_index_private_slice_index_SealedUsizeInst;
output = t;
get = core_slice_index_usize_get t;
get_mut = core_slice_index_usize_get_mut t;
@@ -706,24 +706,24 @@ let alloc_vec_Vec_coreopsindexIndexMutInst (t idx : Type0)
let alloc_vec_Vec_index_eq (#a : Type0) (v : alloc_vec_Vec a) (i : usize) :
Lemma (
- alloc_vec_Vec_index a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i ==
+ alloc_vec_Vec_index a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i ==
alloc_vec_Vec_index_usize v i)
- [SMTPat (alloc_vec_Vec_index a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i)]
+ [SMTPat (alloc_vec_Vec_index a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i)]
=
admit()
let alloc_vec_Vec_index_mut_eq (#a : Type0) (v : alloc_vec_Vec a) (i : usize) :
Lemma (
- alloc_vec_Vec_index_mut a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i ==
+ alloc_vec_Vec_index_mut a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i ==
alloc_vec_Vec_index_usize v i)
- [SMTPat (alloc_vec_Vec_index_mut a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i)]
+ [SMTPat (alloc_vec_Vec_index_mut a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i)]
=
admit()
let alloc_vec_Vec_index_mut_back_eq (#a : Type0) (v : alloc_vec_Vec a) (i : usize) (x : a) :
Lemma (
- alloc_vec_Vec_index_mut_back a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i x ==
+ alloc_vec_Vec_index_mut_back a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i x ==
alloc_vec_Vec_update_usize v i x)
- [SMTPat (alloc_vec_Vec_index_mut_back a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i x)]
+ [SMTPat (alloc_vec_Vec_index_mut_back a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i x)]
=
admit()
diff --git a/tests/fstar/misc/Constants.fst b/tests/fstar/misc/Constants.fst
index c21d6a5f..daeefbb0 100644
--- a/tests/fstar/misc/Constants.fst
+++ b/tests/fstar/misc/Constants.fst
@@ -5,113 +5,141 @@ open Primitives
#set-options "--z3rlimit 50 --fuel 1 --ifuel 1"
-(** [constants::X0] *)
+(** [constants::X0]
+ Source: 'src/constants.rs', lines 5:0-5:17 *)
let x0_body : result u32 = Return 0
let x0_c : u32 = eval_global x0_body
-(** [constants::X1] *)
+(** [constants::X1]
+ Source: 'src/constants.rs', lines 7:0-7:17 *)
let x1_body : result u32 = Return core_u32_max
let x1_c : u32 = eval_global x1_body
-(** [constants::X2] *)
+(** [constants::X2]
+ Source: 'src/constants.rs', lines 10:0-10:17 *)
let x2_body : result u32 = Return 3
let x2_c : u32 = eval_global x2_body
-(** [constants::incr]: forward function *)
+(** [constants::incr]: forward function
+ Source: 'src/constants.rs', lines 17:0-17:32 *)
let incr (n : u32) : result u32 =
u32_add n 1
-(** [constants::X3] *)
+(** [constants::X3]
+ Source: 'src/constants.rs', lines 15:0-15:17 *)
let x3_body : result u32 = incr 32
let x3_c : u32 = eval_global x3_body
-(** [constants::mk_pair0]: forward function *)
+(** [constants::mk_pair0]: forward function
+ Source: 'src/constants.rs', lines 23:0-23:51 *)
let mk_pair0 (x : u32) (y : u32) : result (u32 & u32) =
Return (x, y)
-(** [constants::Pair] *)
+(** [constants::Pair]
+ Source: 'src/constants.rs', lines 36:0-36:23 *)
type pair_t (t1 t2 : Type0) = { x : t1; y : t2; }
-(** [constants::mk_pair1]: forward function *)
+(** [constants::mk_pair1]: forward function
+ Source: 'src/constants.rs', lines 27:0-27:55 *)
let mk_pair1 (x : u32) (y : u32) : result (pair_t u32 u32) =
Return { x = x; y = y }
-(** [constants::P0] *)
+(** [constants::P0]
+ Source: 'src/constants.rs', lines 31:0-31:24 *)
let p0_body : result (u32 & u32) = mk_pair0 0 1
let p0_c : (u32 & u32) = eval_global p0_body
-(** [constants::P1] *)
+(** [constants::P1]
+ Source: 'src/constants.rs', lines 32:0-32:28 *)
let p1_body : result (pair_t u32 u32) = mk_pair1 0 1
let p1_c : pair_t u32 u32 = eval_global p1_body
-(** [constants::P2] *)
+(** [constants::P2]
+ Source: 'src/constants.rs', lines 33:0-33:24 *)
let p2_body : result (u32 & u32) = Return (0, 1)
let p2_c : (u32 & u32) = eval_global p2_body
-(** [constants::P3] *)
+(** [constants::P3]
+ Source: 'src/constants.rs', lines 34:0-34:28 *)
let p3_body : result (pair_t u32 u32) = Return { x = 0; y = 1 }
let p3_c : pair_t u32 u32 = eval_global p3_body
-(** [constants::Wrap] *)
+(** [constants::Wrap]
+ Source: 'src/constants.rs', lines 49:0-49:18 *)
type wrap_t (t : Type0) = { value : t; }
-(** [constants::Wrap::{0}::new]: forward function *)
+(** [constants::{constants::Wrap<T>}::new]: forward function
+ Source: 'src/constants.rs', lines 54:4-54:41 *)
let wrap_new (t : Type0) (value : t) : result (wrap_t t) =
Return { value = value }
-(** [constants::Y] *)
+(** [constants::Y]
+ Source: 'src/constants.rs', lines 41:0-41:22 *)
let y_body : result (wrap_t i32) = wrap_new i32 2
let y_c : wrap_t i32 = eval_global y_body
-(** [constants::unwrap_y]: forward function *)
+(** [constants::unwrap_y]: forward function
+ Source: 'src/constants.rs', lines 43:0-43:30 *)
let unwrap_y : result i32 =
Return y_c.value
-(** [constants::YVAL] *)
+(** [constants::YVAL]
+ Source: 'src/constants.rs', lines 47:0-47:19 *)
let yval_body : result i32 = unwrap_y
let yval_c : i32 = eval_global yval_body
-(** [constants::get_z1::Z1] *)
+(** [constants::get_z1::Z1]
+ Source: 'src/constants.rs', lines 62:4-62:17 *)
let get_z1_z1_body : result i32 = Return 3
let get_z1_z1_c : i32 = eval_global get_z1_z1_body
-(** [constants::get_z1]: forward function *)
+(** [constants::get_z1]: forward function
+ Source: 'src/constants.rs', lines 61:0-61:28 *)
let get_z1 : result i32 =
Return get_z1_z1_c
-(** [constants::add]: forward function *)
+(** [constants::add]: forward function
+ Source: 'src/constants.rs', lines 66:0-66:39 *)
let add (a : i32) (b : i32) : result i32 =
i32_add a b
-(** [constants::Q1] *)
+(** [constants::Q1]
+ Source: 'src/constants.rs', lines 74:0-74:17 *)
let q1_body : result i32 = Return 5
let q1_c : i32 = eval_global q1_body
-(** [constants::Q2] *)
+(** [constants::Q2]
+ Source: 'src/constants.rs', lines 75:0-75:17 *)
let q2_body : result i32 = Return q1_c
let q2_c : i32 = eval_global q2_body
-(** [constants::Q3] *)
+(** [constants::Q3]
+ Source: 'src/constants.rs', lines 76:0-76:17 *)
let q3_body : result i32 = add q2_c 3
let q3_c : i32 = eval_global q3_body
-(** [constants::get_z2]: forward function *)
+(** [constants::get_z2]: forward function
+ Source: 'src/constants.rs', lines 70:0-70:28 *)
let get_z2 : result i32 =
let* i = get_z1 in let* i0 = add i q3_c in add q1_c i0
-(** [constants::S1] *)
+(** [constants::S1]
+ Source: 'src/constants.rs', lines 80:0-80:18 *)
let s1_body : result u32 = Return 6
let s1_c : u32 = eval_global s1_body
-(** [constants::S2] *)
+(** [constants::S2]
+ Source: 'src/constants.rs', lines 81:0-81:18 *)
let s2_body : result u32 = incr s1_c
let s2_c : u32 = eval_global s2_body
-(** [constants::S3] *)
+(** [constants::S3]
+ Source: 'src/constants.rs', lines 82:0-82:29 *)
let s3_body : result (pair_t u32 u32) = Return p3_c
let s3_c : pair_t u32 u32 = eval_global s3_body
-(** [constants::S4] *)
+(** [constants::S4]
+ Source: 'src/constants.rs', lines 83:0-83:29 *)
let s4_body : result (pair_t u32 u32) = mk_pair1 7 8
let s4_c : pair_t u32 u32 = eval_global s4_body
diff --git a/tests/fstar/misc/External.Funs.fst b/tests/fstar/misc/External.Funs.fst
index e26014ac..4d13fb71 100644
--- a/tests/fstar/misc/External.Funs.fst
+++ b/tests/fstar/misc/External.Funs.fst
@@ -7,14 +7,16 @@ include External.Opaque
#set-options "--z3rlimit 50 --fuel 1 --ifuel 1"
-(** [external::swap]: forward function *)
+(** [external::swap]: forward function
+ Source: 'src/external.rs', lines 6:0-6:46 *)
let swap (t : Type0) (x : t) (y : t) (st : state) : result (state & unit) =
let* (st0, _) = core_mem_swap t x y st in
let* (st1, _) = core_mem_swap_back0 t x y st st0 in
let* (st2, _) = core_mem_swap_back1 t x y st st1 in
Return (st2, ())
-(** [external::swap]: backward function 0 *)
+(** [external::swap]: backward function 0
+ Source: 'src/external.rs', lines 6:0-6:46 *)
let swap_back
(t : Type0) (x : t) (y : t) (st : state) (st0 : state) :
result (state & (t & t))
@@ -24,13 +26,15 @@ let swap_back
let* (_, y0) = core_mem_swap_back1 t x y st st2 in
Return (st0, (x0, y0))
-(** [external::test_new_non_zero_u32]: forward function *)
+(** [external::test_new_non_zero_u32]: forward function
+ Source: 'src/external.rs', lines 11:0-11:60 *)
let test_new_non_zero_u32
(x : u32) (st : state) : result (state & core_num_nonzero_NonZeroU32_t) =
let* (st0, o) = core_num_nonzero_NonZeroU32_new x st in
core_option_Option_unwrap core_num_nonzero_NonZeroU32_t o st0
-(** [external::test_vec]: forward function *)
+(** [external::test_vec]: forward function
+ Source: 'src/external.rs', lines 17:0-17:17 *)
let test_vec : result unit =
let v = alloc_vec_Vec_new u32 in
let* _ = alloc_vec_Vec_push u32 v 0 in
@@ -39,14 +43,16 @@ let test_vec : result unit =
(** Unit test for [external::test_vec] *)
let _ = assert_norm (test_vec = Return ())
-(** [external::custom_swap]: forward function *)
+(** [external::custom_swap]: forward function
+ Source: 'src/external.rs', lines 24:0-24:66 *)
let custom_swap (t : Type0) (x : t) (y : t) (st : state) : result (state & t) =
let* (st0, _) = core_mem_swap t x y st in
let* (st1, x0) = core_mem_swap_back0 t x y st st0 in
let* (st2, _) = core_mem_swap_back1 t x y st st1 in
Return (st2, x0)
-(** [external::custom_swap]: backward function 0 *)
+(** [external::custom_swap]: backward function 0
+ Source: 'src/external.rs', lines 24:0-24:66 *)
let custom_swap_back
(t : Type0) (x : t) (y : t) (st : state) (ret : t) (st0 : state) :
result (state & (t & t))
@@ -56,18 +62,21 @@ let custom_swap_back
let* (_, y0) = core_mem_swap_back1 t x y st st2 in
Return (st0, (ret, y0))
-(** [external::test_custom_swap]: forward function *)
+(** [external::test_custom_swap]: forward function
+ Source: 'src/external.rs', lines 29:0-29:59 *)
let test_custom_swap (x : u32) (y : u32) (st : state) : result (state & unit) =
let* (st0, _) = custom_swap u32 x y st in Return (st0, ())
-(** [external::test_custom_swap]: backward function 0 *)
+(** [external::test_custom_swap]: backward function 0
+ Source: 'src/external.rs', lines 29:0-29:59 *)
let test_custom_swap_back
(x : u32) (y : u32) (st : state) (st0 : state) :
result (state & (u32 & u32))
=
custom_swap_back u32 x y st 1 st0
-(** [external::test_swap_non_zero]: forward function *)
+(** [external::test_swap_non_zero]: forward function
+ Source: 'src/external.rs', lines 35:0-35:44 *)
let test_swap_non_zero (x : u32) (st : state) : result (state & u32) =
let* (st0, _) = swap u32 x 0 st in
let* (st1, (x0, _)) = swap_back u32 x 0 st st0 in
diff --git a/tests/fstar/misc/External.Opaque.fsti b/tests/fstar/misc/External.Opaque.fsti
index 85cf285c..ea1a70c2 100644
--- a/tests/fstar/misc/External.Opaque.fsti
+++ b/tests/fstar/misc/External.Opaque.fsti
@@ -6,22 +6,27 @@ include External.Types
#set-options "--z3rlimit 50 --fuel 1 --ifuel 1"
-(** [core::mem::swap]: forward function *)
+(** [core::mem::swap]: forward function
+ Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/core/src/mem/mod.rs', lines 726:0-726:42 *)
val core_mem_swap (t : Type0) : t -> t -> state -> result (state & unit)
-(** [core::mem::swap]: backward function 0 *)
+(** [core::mem::swap]: backward function 0
+ Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/core/src/mem/mod.rs', lines 726:0-726:42 *)
val core_mem_swap_back0
(t : Type0) : t -> t -> state -> state -> result (state & t)
-(** [core::mem::swap]: backward function 1 *)
+(** [core::mem::swap]: backward function 1
+ Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/core/src/mem/mod.rs', lines 726:0-726:42 *)
val core_mem_swap_back1
(t : Type0) : t -> t -> state -> state -> result (state & t)
-(** [core::num::nonzero::NonZeroU32::{14}::new]: forward function *)
+(** [core::num::nonzero::{core::num::nonzero::NonZeroU32#14}::new]: forward function
+ Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/core/src/num/nonzero.rs', lines 79:16-79:57 *)
val core_num_nonzero_NonZeroU32_new
: u32 -> state -> result (state & (option core_num_nonzero_NonZeroU32_t))
-(** [core::option::Option::{0}::unwrap]: forward function *)
+(** [core::option::{core::option::Option<T>}::unwrap]: forward function
+ Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/core/src/option.rs', lines 932:4-932:34 *)
val core_option_Option_unwrap
(t : Type0) : option t -> state -> result (state & t)
diff --git a/tests/fstar/misc/External.Types.fsti b/tests/fstar/misc/External.Types.fsti
index 78b5228d..0cb9fd0e 100644
--- a/tests/fstar/misc/External.Types.fsti
+++ b/tests/fstar/misc/External.Types.fsti
@@ -5,7 +5,8 @@ open Primitives
#set-options "--z3rlimit 50 --fuel 1 --ifuel 1"
-(** [core::num::nonzero::NonZeroU32] *)
+(** [core::num::nonzero::NonZeroU32]
+ Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/core/src/num/nonzero.rs', lines 50:12-50:33 *)
val core_num_nonzero_NonZeroU32_t : Type0
(** The state type used in the state-error monad *)
diff --git a/tests/fstar/misc/Loops.Clauses.Template.fst b/tests/fstar/misc/Loops.Clauses.Template.fst
index 9920bdc1..6be351c6 100644
--- a/tests/fstar/misc/Loops.Clauses.Template.fst
+++ b/tests/fstar/misc/Loops.Clauses.Template.fst
@@ -6,105 +6,124 @@ open Loops.Types
#set-options "--z3rlimit 50 --fuel 1 --ifuel 1"
-(** [loops::sum]: decreases clause *)
+(** [loops::sum]: decreases clause
+ Source: 'src/loops.rs', lines 4:0-14:1 *)
unfold let sum_loop_decreases (max : u32) (i : u32) (s : u32) : nat = admit ()
-(** [loops::sum_with_mut_borrows]: decreases clause *)
+(** [loops::sum_with_mut_borrows]: decreases clause
+ Source: 'src/loops.rs', lines 19:0-31:1 *)
unfold
let sum_with_mut_borrows_loop_decreases (max : u32) (mi : u32) (ms : u32) : nat
=
admit ()
-(** [loops::sum_with_shared_borrows]: decreases clause *)
+(** [loops::sum_with_shared_borrows]: decreases clause
+ Source: 'src/loops.rs', lines 34:0-48:1 *)
unfold
let sum_with_shared_borrows_loop_decreases (max : u32) (i : u32) (s : u32) :
nat =
admit ()
-(** [loops::clear]: decreases clause *)
+(** [loops::clear]: decreases clause
+ Source: 'src/loops.rs', lines 52:0-58:1 *)
unfold
let clear_loop_decreases (v : alloc_vec_Vec u32) (i : usize) : nat = admit ()
-(** [loops::list_mem]: decreases clause *)
+(** [loops::list_mem]: decreases clause
+ Source: 'src/loops.rs', lines 66:0-75:1 *)
unfold let list_mem_loop_decreases (x : u32) (ls : list_t u32) : nat = admit ()
-(** [loops::list_nth_mut_loop]: decreases clause *)
+(** [loops::list_nth_mut_loop]: decreases clause
+ Source: 'src/loops.rs', lines 78:0-88:1 *)
unfold
let list_nth_mut_loop_loop_decreases (t : Type0) (ls : list_t t) (i : u32) :
nat =
admit ()
-(** [loops::list_nth_shared_loop]: decreases clause *)
+(** [loops::list_nth_shared_loop]: decreases clause
+ Source: 'src/loops.rs', lines 91:0-101:1 *)
unfold
let list_nth_shared_loop_loop_decreases (t : Type0) (ls : list_t t) (i : u32) :
nat =
admit ()
-(** [loops::get_elem_mut]: decreases clause *)
+(** [loops::get_elem_mut]: decreases clause
+ Source: 'src/loops.rs', lines 103:0-117:1 *)
unfold
let get_elem_mut_loop_decreases (x : usize) (ls : list_t usize) : nat =
admit ()
-(** [loops::get_elem_shared]: decreases clause *)
+(** [loops::get_elem_shared]: decreases clause
+ Source: 'src/loops.rs', lines 119:0-133:1 *)
unfold
let get_elem_shared_loop_decreases (x : usize) (ls : list_t usize) : nat =
admit ()
-(** [loops::list_nth_mut_loop_with_id]: decreases clause *)
+(** [loops::list_nth_mut_loop_with_id]: decreases clause
+ Source: 'src/loops.rs', lines 144:0-155:1 *)
unfold
let list_nth_mut_loop_with_id_loop_decreases (t : Type0) (i : u32)
(ls : list_t t) : nat =
admit ()
-(** [loops::list_nth_shared_loop_with_id]: decreases clause *)
+(** [loops::list_nth_shared_loop_with_id]: decreases clause
+ Source: 'src/loops.rs', lines 158:0-169:1 *)
unfold
let list_nth_shared_loop_with_id_loop_decreases (t : Type0) (i : u32)
(ls : list_t t) : nat =
admit ()
-(** [loops::list_nth_mut_loop_pair]: decreases clause *)
+(** [loops::list_nth_mut_loop_pair]: decreases clause
+ Source: 'src/loops.rs', lines 174:0-195:1 *)
unfold
let list_nth_mut_loop_pair_loop_decreases (t : Type0) (ls0 : list_t t)
(ls1 : list_t t) (i : u32) : nat =
admit ()
-(** [loops::list_nth_shared_loop_pair]: decreases clause *)
+(** [loops::list_nth_shared_loop_pair]: decreases clause
+ Source: 'src/loops.rs', lines 198:0-219:1 *)
unfold
let list_nth_shared_loop_pair_loop_decreases (t : Type0) (ls0 : list_t t)
(ls1 : list_t t) (i : u32) : nat =
admit ()
-(** [loops::list_nth_mut_loop_pair_merge]: decreases clause *)
+(** [loops::list_nth_mut_loop_pair_merge]: decreases clause
+ Source: 'src/loops.rs', lines 223:0-238:1 *)
unfold
let list_nth_mut_loop_pair_merge_loop_decreases (t : Type0) (ls0 : list_t t)
(ls1 : list_t t) (i : u32) : nat =
admit ()
-(** [loops::list_nth_shared_loop_pair_merge]: decreases clause *)
+(** [loops::list_nth_shared_loop_pair_merge]: decreases clause
+ Source: 'src/loops.rs', lines 241:0-256:1 *)
unfold
let list_nth_shared_loop_pair_merge_loop_decreases (t : Type0) (ls0 : list_t t)
(ls1 : list_t t) (i : u32) : nat =
admit ()
-(** [loops::list_nth_mut_shared_loop_pair]: decreases clause *)
+(** [loops::list_nth_mut_shared_loop_pair]: decreases clause
+ Source: 'src/loops.rs', lines 259:0-274:1 *)
unfold
let list_nth_mut_shared_loop_pair_loop_decreases (t : Type0) (ls0 : list_t t)
(ls1 : list_t t) (i : u32) : nat =
admit ()
-(** [loops::list_nth_mut_shared_loop_pair_merge]: decreases clause *)
+(** [loops::list_nth_mut_shared_loop_pair_merge]: decreases clause
+ Source: 'src/loops.rs', lines 278:0-293:1 *)
unfold
let list_nth_mut_shared_loop_pair_merge_loop_decreases (t : Type0)
(ls0 : list_t t) (ls1 : list_t t) (i : u32) : nat =
admit ()
-(** [loops::list_nth_shared_mut_loop_pair]: decreases clause *)
+(** [loops::list_nth_shared_mut_loop_pair]: decreases clause
+ Source: 'src/loops.rs', lines 297:0-312:1 *)
unfold
let list_nth_shared_mut_loop_pair_loop_decreases (t : Type0) (ls0 : list_t t)
(ls1 : list_t t) (i : u32) : nat =
admit ()
-(** [loops::list_nth_shared_mut_loop_pair_merge]: decreases clause *)
+(** [loops::list_nth_shared_mut_loop_pair_merge]: decreases clause
+ Source: 'src/loops.rs', lines 316:0-331:1 *)
unfold
let list_nth_shared_mut_loop_pair_merge_loop_decreases (t : Type0)
(ls0 : list_t t) (ls1 : list_t t) (i : u32) : nat =
diff --git a/tests/fstar/misc/Loops.Funs.fst b/tests/fstar/misc/Loops.Funs.fst
index 0f755351..d2ac5561 100644
--- a/tests/fstar/misc/Loops.Funs.fst
+++ b/tests/fstar/misc/Loops.Funs.fst
@@ -7,7 +7,8 @@ include Loops.Clauses
#set-options "--z3rlimit 50 --fuel 1 --ifuel 1"
-(** [loops::sum]: loop 0: forward function *)
+(** [loops::sum]: loop 0: forward function
+ Source: 'src/loops.rs', lines 4:0-14:1 *)
let rec sum_loop
(max : u32) (i : u32) (s : u32) :
Tot (result u32) (decreases (sum_loop_decreases max i s))
@@ -16,11 +17,13 @@ let rec sum_loop
then let* s0 = u32_add s i in let* i0 = u32_add i 1 in sum_loop max i0 s0
else u32_mul s 2
-(** [loops::sum]: forward function *)
+(** [loops::sum]: forward function
+ Source: 'src/loops.rs', lines 4:0-4:27 *)
let sum (max : u32) : result u32 =
sum_loop max 0 0
-(** [loops::sum_with_mut_borrows]: loop 0: forward function *)
+(** [loops::sum_with_mut_borrows]: loop 0: forward function
+ Source: 'src/loops.rs', lines 19:0-31:1 *)
let rec sum_with_mut_borrows_loop
(max : u32) (mi : u32) (ms : u32) :
Tot (result u32) (decreases (sum_with_mut_borrows_loop_decreases max mi ms))
@@ -32,11 +35,13 @@ let rec sum_with_mut_borrows_loop
sum_with_mut_borrows_loop max mi0 ms0
else u32_mul ms 2
-(** [loops::sum_with_mut_borrows]: forward function *)
+(** [loops::sum_with_mut_borrows]: forward function
+ Source: 'src/loops.rs', lines 19:0-19:44 *)
let sum_with_mut_borrows (max : u32) : result u32 =
sum_with_mut_borrows_loop max 0 0
-(** [loops::sum_with_shared_borrows]: loop 0: forward function *)
+(** [loops::sum_with_shared_borrows]: loop 0: forward function
+ Source: 'src/loops.rs', lines 34:0-48:1 *)
let rec sum_with_shared_borrows_loop
(max : u32) (i : u32) (s : u32) :
Tot (result u32) (decreases (sum_with_shared_borrows_loop_decreases max i s))
@@ -48,12 +53,14 @@ let rec sum_with_shared_borrows_loop
sum_with_shared_borrows_loop max i0 s0
else u32_mul s 2
-(** [loops::sum_with_shared_borrows]: forward function *)
+(** [loops::sum_with_shared_borrows]: forward function
+ Source: 'src/loops.rs', lines 34:0-34:47 *)
let sum_with_shared_borrows (max : u32) : result u32 =
sum_with_shared_borrows_loop max 0 0
(** [loops::clear]: loop 0: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/loops.rs', lines 52:0-58:1 *)
let rec clear_loop
(v : alloc_vec_Vec u32) (i : usize) :
Tot (result (alloc_vec_Vec u32)) (decreases (clear_loop_decreases v i))
@@ -64,16 +71,18 @@ let rec clear_loop
let* i1 = usize_add i 1 in
let* v0 =
alloc_vec_Vec_index_mut_back u32 usize
- (core_slice_index_usize_coresliceindexSliceIndexInst u32) v i 0 in
+ (core_slice_index_SliceIndexUsizeSliceTInst u32) v i 0 in
clear_loop v0 i1
else Return v
(** [loops::clear]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/loops.rs', lines 52:0-52:30 *)
let clear (v : alloc_vec_Vec u32) : result (alloc_vec_Vec u32) =
clear_loop v 0
-(** [loops::list_mem]: loop 0: forward function *)
+(** [loops::list_mem]: loop 0: forward function
+ Source: 'src/loops.rs', lines 66:0-75:1 *)
let rec list_mem_loop
(x : u32) (ls : list_t u32) :
Tot (result bool) (decreases (list_mem_loop_decreases x ls))
@@ -83,11 +92,13 @@ let rec list_mem_loop
| List_Nil -> Return false
end
-(** [loops::list_mem]: forward function *)
+(** [loops::list_mem]: forward function
+ Source: 'src/loops.rs', lines 66:0-66:52 *)
let list_mem (x : u32) (ls : list_t u32) : result bool =
list_mem_loop x ls
-(** [loops::list_nth_mut_loop]: loop 0: forward function *)
+(** [loops::list_nth_mut_loop]: loop 0: forward function
+ Source: 'src/loops.rs', lines 78:0-88:1 *)
let rec list_nth_mut_loop_loop
(t : Type0) (ls : list_t t) (i : u32) :
Tot (result t) (decreases (list_nth_mut_loop_loop_decreases t ls i))
@@ -100,11 +111,13 @@ let rec list_nth_mut_loop_loop
| List_Nil -> Fail Failure
end
-(** [loops::list_nth_mut_loop]: forward function *)
+(** [loops::list_nth_mut_loop]: forward function
+ Source: 'src/loops.rs', lines 78:0-78:71 *)
let list_nth_mut_loop (t : Type0) (ls : list_t t) (i : u32) : result t =
list_nth_mut_loop_loop t ls i
-(** [loops::list_nth_mut_loop]: loop 0: backward function 0 *)
+(** [loops::list_nth_mut_loop]: loop 0: backward function 0
+ Source: 'src/loops.rs', lines 78:0-88:1 *)
let rec list_nth_mut_loop_loop_back
(t : Type0) (ls : list_t t) (i : u32) (ret : t) :
Tot (result (list_t t)) (decreases (list_nth_mut_loop_loop_decreases t ls i))
@@ -120,12 +133,14 @@ let rec list_nth_mut_loop_loop_back
| List_Nil -> Fail Failure
end
-(** [loops::list_nth_mut_loop]: backward function 0 *)
+(** [loops::list_nth_mut_loop]: backward function 0
+ Source: 'src/loops.rs', lines 78:0-78:71 *)
let list_nth_mut_loop_back
(t : Type0) (ls : list_t t) (i : u32) (ret : t) : result (list_t t) =
list_nth_mut_loop_loop_back t ls i ret
-(** [loops::list_nth_shared_loop]: loop 0: forward function *)
+(** [loops::list_nth_shared_loop]: loop 0: forward function
+ Source: 'src/loops.rs', lines 91:0-101:1 *)
let rec list_nth_shared_loop_loop
(t : Type0) (ls : list_t t) (i : u32) :
Tot (result t) (decreases (list_nth_shared_loop_loop_decreases t ls i))
@@ -138,11 +153,13 @@ let rec list_nth_shared_loop_loop
| List_Nil -> Fail Failure
end
-(** [loops::list_nth_shared_loop]: forward function *)
+(** [loops::list_nth_shared_loop]: forward function
+ Source: 'src/loops.rs', lines 91:0-91:66 *)
let list_nth_shared_loop (t : Type0) (ls : list_t t) (i : u32) : result t =
list_nth_shared_loop_loop t ls i
-(** [loops::get_elem_mut]: loop 0: forward function *)
+(** [loops::get_elem_mut]: loop 0: forward function
+ Source: 'src/loops.rs', lines 103:0-117:1 *)
let rec get_elem_mut_loop
(x : usize) (ls : list_t usize) :
Tot (result usize) (decreases (get_elem_mut_loop_decreases x ls))
@@ -152,16 +169,17 @@ let rec get_elem_mut_loop
| List_Nil -> Fail Failure
end
-(** [loops::get_elem_mut]: forward function *)
+(** [loops::get_elem_mut]: forward function
+ Source: 'src/loops.rs', lines 103:0-103:73 *)
let get_elem_mut
(slots : alloc_vec_Vec (list_t usize)) (x : usize) : result usize =
let* l =
alloc_vec_Vec_index_mut (list_t usize) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (list_t usize))
- slots 0 in
+ (core_slice_index_SliceIndexUsizeSliceTInst (list_t usize)) slots 0 in
get_elem_mut_loop x l
-(** [loops::get_elem_mut]: loop 0: backward function 0 *)
+(** [loops::get_elem_mut]: loop 0: backward function 0
+ Source: 'src/loops.rs', lines 103:0-117:1 *)
let rec get_elem_mut_loop_back
(x : usize) (ls : list_t usize) (ret : usize) :
Tot (result (list_t usize)) (decreases (get_elem_mut_loop_decreases x ls))
@@ -174,21 +192,21 @@ let rec get_elem_mut_loop_back
| List_Nil -> Fail Failure
end
-(** [loops::get_elem_mut]: backward function 0 *)
+(** [loops::get_elem_mut]: backward function 0
+ Source: 'src/loops.rs', lines 103:0-103:73 *)
let get_elem_mut_back
(slots : alloc_vec_Vec (list_t usize)) (x : usize) (ret : usize) :
result (alloc_vec_Vec (list_t usize))
=
let* l =
alloc_vec_Vec_index_mut (list_t usize) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (list_t usize))
- slots 0 in
+ (core_slice_index_SliceIndexUsizeSliceTInst (list_t usize)) slots 0 in
let* l0 = get_elem_mut_loop_back x l ret in
alloc_vec_Vec_index_mut_back (list_t usize) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (list_t usize)) slots
- 0 l0
+ (core_slice_index_SliceIndexUsizeSliceTInst (list_t usize)) slots 0 l0
-(** [loops::get_elem_shared]: loop 0: forward function *)
+(** [loops::get_elem_shared]: loop 0: forward function
+ Source: 'src/loops.rs', lines 119:0-133:1 *)
let rec get_elem_shared_loop
(x : usize) (ls : list_t usize) :
Tot (result usize) (decreases (get_elem_shared_loop_decreases x ls))
@@ -198,29 +216,33 @@ let rec get_elem_shared_loop
| List_Nil -> Fail Failure
end
-(** [loops::get_elem_shared]: forward function *)
+(** [loops::get_elem_shared]: forward function
+ Source: 'src/loops.rs', lines 119:0-119:68 *)
let get_elem_shared
(slots : alloc_vec_Vec (list_t usize)) (x : usize) : result usize =
let* l =
alloc_vec_Vec_index (list_t usize) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (list_t usize))
- slots 0 in
+ (core_slice_index_SliceIndexUsizeSliceTInst (list_t usize)) slots 0 in
get_elem_shared_loop x l
-(** [loops::id_mut]: forward function *)
+(** [loops::id_mut]: forward function
+ Source: 'src/loops.rs', lines 135:0-135:50 *)
let id_mut (t : Type0) (ls : list_t t) : result (list_t t) =
Return ls
-(** [loops::id_mut]: backward function 0 *)
+(** [loops::id_mut]: backward function 0
+ Source: 'src/loops.rs', lines 135:0-135:50 *)
let id_mut_back
(t : Type0) (ls : list_t t) (ret : list_t t) : result (list_t t) =
Return ret
-(** [loops::id_shared]: forward function *)
+(** [loops::id_shared]: forward function
+ Source: 'src/loops.rs', lines 139:0-139:45 *)
let id_shared (t : Type0) (ls : list_t t) : result (list_t t) =
Return ls
-(** [loops::list_nth_mut_loop_with_id]: loop 0: forward function *)
+(** [loops::list_nth_mut_loop_with_id]: loop 0: forward function
+ Source: 'src/loops.rs', lines 144:0-155:1 *)
let rec list_nth_mut_loop_with_id_loop
(t : Type0) (i : u32) (ls : list_t t) :
Tot (result t) (decreases (list_nth_mut_loop_with_id_loop_decreases t i ls))
@@ -233,12 +255,14 @@ let rec list_nth_mut_loop_with_id_loop
| List_Nil -> Fail Failure
end
-(** [loops::list_nth_mut_loop_with_id]: forward function *)
+(** [loops::list_nth_mut_loop_with_id]: forward function
+ Source: 'src/loops.rs', lines 144:0-144:75 *)
let list_nth_mut_loop_with_id
(t : Type0) (ls : list_t t) (i : u32) : result t =
let* ls0 = id_mut t ls in list_nth_mut_loop_with_id_loop t i ls0
-(** [loops::list_nth_mut_loop_with_id]: loop 0: backward function 0 *)
+(** [loops::list_nth_mut_loop_with_id]: loop 0: backward function 0
+ Source: 'src/loops.rs', lines 144:0-155:1 *)
let rec list_nth_mut_loop_with_id_loop_back
(t : Type0) (i : u32) (ls : list_t t) (ret : t) :
Tot (result (list_t t))
@@ -255,14 +279,16 @@ let rec list_nth_mut_loop_with_id_loop_back
| List_Nil -> Fail Failure
end
-(** [loops::list_nth_mut_loop_with_id]: backward function 0 *)
+(** [loops::list_nth_mut_loop_with_id]: backward function 0
+ Source: 'src/loops.rs', lines 144:0-144:75 *)
let list_nth_mut_loop_with_id_back
(t : Type0) (ls : list_t t) (i : u32) (ret : t) : result (list_t t) =
let* ls0 = id_mut t ls in
let* l = list_nth_mut_loop_with_id_loop_back t i ls0 ret in
id_mut_back t ls l
-(** [loops::list_nth_shared_loop_with_id]: loop 0: forward function *)
+(** [loops::list_nth_shared_loop_with_id]: loop 0: forward function
+ Source: 'src/loops.rs', lines 158:0-169:1 *)
let rec list_nth_shared_loop_with_id_loop
(t : Type0) (i : u32) (ls : list_t t) :
Tot (result t)
@@ -276,12 +302,14 @@ let rec list_nth_shared_loop_with_id_loop
| List_Nil -> Fail Failure
end
-(** [loops::list_nth_shared_loop_with_id]: forward function *)
+(** [loops::list_nth_shared_loop_with_id]: forward function
+ Source: 'src/loops.rs', lines 158:0-158:70 *)
let list_nth_shared_loop_with_id
(t : Type0) (ls : list_t t) (i : u32) : result t =
let* ls0 = id_shared t ls in list_nth_shared_loop_with_id_loop t i ls0
-(** [loops::list_nth_mut_loop_pair]: loop 0: forward function *)
+(** [loops::list_nth_mut_loop_pair]: loop 0: forward function
+ Source: 'src/loops.rs', lines 174:0-195:1 *)
let rec list_nth_mut_loop_pair_loop
(t : Type0) (ls0 : list_t t) (ls1 : list_t t) (i : u32) :
Tot (result (t & t))
@@ -299,12 +327,14 @@ let rec list_nth_mut_loop_pair_loop
| List_Nil -> Fail Failure
end
-(** [loops::list_nth_mut_loop_pair]: forward function *)
+(** [loops::list_nth_mut_loop_pair]: forward function
+ Source: 'src/loops.rs', lines 174:0-178:27 *)
let list_nth_mut_loop_pair
(t : Type0) (ls0 : list_t t) (ls1 : list_t t) (i : u32) : result (t & t) =
list_nth_mut_loop_pair_loop t ls0 ls1 i
-(** [loops::list_nth_mut_loop_pair]: loop 0: backward function 0 *)
+(** [loops::list_nth_mut_loop_pair]: loop 0: backward function 0
+ Source: 'src/loops.rs', lines 174:0-195:1 *)
let rec list_nth_mut_loop_pair_loop_back'a
(t : Type0) (ls0 : list_t t) (ls1 : list_t t) (i : u32) (ret : t) :
Tot (result (list_t t))
@@ -325,14 +355,16 @@ let rec list_nth_mut_loop_pair_loop_back'a
| List_Nil -> Fail Failure
end
-(** [loops::list_nth_mut_loop_pair]: backward function 0 *)
+(** [loops::list_nth_mut_loop_pair]: backward function 0
+ Source: 'src/loops.rs', lines 174:0-178:27 *)
let list_nth_mut_loop_pair_back'a
(t : Type0) (ls0 : list_t t) (ls1 : list_t t) (i : u32) (ret : t) :
result (list_t t)
=
list_nth_mut_loop_pair_loop_back'a t ls0 ls1 i ret
-(** [loops::list_nth_mut_loop_pair]: loop 0: backward function 1 *)
+(** [loops::list_nth_mut_loop_pair]: loop 0: backward function 1
+ Source: 'src/loops.rs', lines 174:0-195:1 *)
let rec list_nth_mut_loop_pair_loop_back'b
(t : Type0) (ls0 : list_t t) (ls1 : list_t t) (i : u32) (ret : t) :
Tot (result (list_t t))
@@ -353,14 +385,16 @@ let rec list_nth_mut_loop_pair_loop_back'b
| List_Nil -> Fail Failure
end
-(** [loops::list_nth_mut_loop_pair]: backward function 1 *)
+(** [loops::list_nth_mut_loop_pair]: backward function 1
+ Source: 'src/loops.rs', lines 174:0-178:27 *)
let list_nth_mut_loop_pair_back'b
(t : Type0) (ls0 : list_t t) (ls1 : list_t t) (i : u32) (ret : t) :
result (list_t t)
=
list_nth_mut_loop_pair_loop_back'b t ls0 ls1 i ret
-(** [loops::list_nth_shared_loop_pair]: loop 0: forward function *)
+(** [loops::list_nth_shared_loop_pair]: loop 0: forward function
+ Source: 'src/loops.rs', lines 198:0-219:1 *)
let rec list_nth_shared_loop_pair_loop
(t : Type0) (ls0 : list_t t) (ls1 : list_t t) (i : u32) :
Tot (result (t & t))
@@ -378,12 +412,14 @@ let rec list_nth_shared_loop_pair_loop
| List_Nil -> Fail Failure
end
-(** [loops::list_nth_shared_loop_pair]: forward function *)
+(** [loops::list_nth_shared_loop_pair]: forward function
+ Source: 'src/loops.rs', lines 198:0-202:19 *)
let list_nth_shared_loop_pair
(t : Type0) (ls0 : list_t t) (ls1 : list_t t) (i : u32) : result (t & t) =
list_nth_shared_loop_pair_loop t ls0 ls1 i
-(** [loops::list_nth_mut_loop_pair_merge]: loop 0: forward function *)
+(** [loops::list_nth_mut_loop_pair_merge]: loop 0: forward function
+ Source: 'src/loops.rs', lines 223:0-238:1 *)
let rec list_nth_mut_loop_pair_merge_loop
(t : Type0) (ls0 : list_t t) (ls1 : list_t t) (i : u32) :
Tot (result (t & t))
@@ -402,12 +438,14 @@ let rec list_nth_mut_loop_pair_merge_loop
| List_Nil -> Fail Failure
end
-(** [loops::list_nth_mut_loop_pair_merge]: forward function *)
+(** [loops::list_nth_mut_loop_pair_merge]: forward function
+ Source: 'src/loops.rs', lines 223:0-227:27 *)
let list_nth_mut_loop_pair_merge
(t : Type0) (ls0 : list_t t) (ls1 : list_t t) (i : u32) : result (t & t) =
list_nth_mut_loop_pair_merge_loop t ls0 ls1 i
-(** [loops::list_nth_mut_loop_pair_merge]: loop 0: backward function 0 *)
+(** [loops::list_nth_mut_loop_pair_merge]: loop 0: backward function 0
+ Source: 'src/loops.rs', lines 223:0-238:1 *)
let rec list_nth_mut_loop_pair_merge_loop_back
(t : Type0) (ls0 : list_t t) (ls1 : list_t t) (i : u32) (ret : (t & t)) :
Tot (result ((list_t t) & (list_t t)))
@@ -429,14 +467,16 @@ let rec list_nth_mut_loop_pair_merge_loop_back
| List_Nil -> Fail Failure
end
-(** [loops::list_nth_mut_loop_pair_merge]: backward function 0 *)
+(** [loops::list_nth_mut_loop_pair_merge]: backward function 0
+ Source: 'src/loops.rs', lines 223:0-227:27 *)
let list_nth_mut_loop_pair_merge_back
(t : Type0) (ls0 : list_t t) (ls1 : list_t t) (i : u32) (ret : (t & t)) :
result ((list_t t) & (list_t t))
=
list_nth_mut_loop_pair_merge_loop_back t ls0 ls1 i ret
-(** [loops::list_nth_shared_loop_pair_merge]: loop 0: forward function *)
+(** [loops::list_nth_shared_loop_pair_merge]: loop 0: forward function
+ Source: 'src/loops.rs', lines 241:0-256:1 *)
let rec list_nth_shared_loop_pair_merge_loop
(t : Type0) (ls0 : list_t t) (ls1 : list_t t) (i : u32) :
Tot (result (t & t))
@@ -456,12 +496,14 @@ let rec list_nth_shared_loop_pair_merge_loop
| List_Nil -> Fail Failure
end
-(** [loops::list_nth_shared_loop_pair_merge]: forward function *)
+(** [loops::list_nth_shared_loop_pair_merge]: forward function
+ Source: 'src/loops.rs', lines 241:0-245:19 *)
let list_nth_shared_loop_pair_merge
(t : Type0) (ls0 : list_t t) (ls1 : list_t t) (i : u32) : result (t & t) =
list_nth_shared_loop_pair_merge_loop t ls0 ls1 i
-(** [loops::list_nth_mut_shared_loop_pair]: loop 0: forward function *)
+(** [loops::list_nth_mut_shared_loop_pair]: loop 0: forward function
+ Source: 'src/loops.rs', lines 259:0-274:1 *)
let rec list_nth_mut_shared_loop_pair_loop
(t : Type0) (ls0 : list_t t) (ls1 : list_t t) (i : u32) :
Tot (result (t & t))
@@ -481,12 +523,14 @@ let rec list_nth_mut_shared_loop_pair_loop
| List_Nil -> Fail Failure
end
-(** [loops::list_nth_mut_shared_loop_pair]: forward function *)
+(** [loops::list_nth_mut_shared_loop_pair]: forward function
+ Source: 'src/loops.rs', lines 259:0-263:23 *)
let list_nth_mut_shared_loop_pair
(t : Type0) (ls0 : list_t t) (ls1 : list_t t) (i : u32) : result (t & t) =
list_nth_mut_shared_loop_pair_loop t ls0 ls1 i
-(** [loops::list_nth_mut_shared_loop_pair]: loop 0: backward function 0 *)
+(** [loops::list_nth_mut_shared_loop_pair]: loop 0: backward function 0
+ Source: 'src/loops.rs', lines 259:0-274:1 *)
let rec list_nth_mut_shared_loop_pair_loop_back
(t : Type0) (ls0 : list_t t) (ls1 : list_t t) (i : u32) (ret : t) :
Tot (result (list_t t))
@@ -507,14 +551,16 @@ let rec list_nth_mut_shared_loop_pair_loop_back
| List_Nil -> Fail Failure
end
-(** [loops::list_nth_mut_shared_loop_pair]: backward function 0 *)
+(** [loops::list_nth_mut_shared_loop_pair]: backward function 0
+ Source: 'src/loops.rs', lines 259:0-263:23 *)
let list_nth_mut_shared_loop_pair_back
(t : Type0) (ls0 : list_t t) (ls1 : list_t t) (i : u32) (ret : t) :
result (list_t t)
=
list_nth_mut_shared_loop_pair_loop_back t ls0 ls1 i ret
-(** [loops::list_nth_mut_shared_loop_pair_merge]: loop 0: forward function *)
+(** [loops::list_nth_mut_shared_loop_pair_merge]: loop 0: forward function
+ Source: 'src/loops.rs', lines 278:0-293:1 *)
let rec list_nth_mut_shared_loop_pair_merge_loop
(t : Type0) (ls0 : list_t t) (ls1 : list_t t) (i : u32) :
Tot (result (t & t))
@@ -534,12 +580,14 @@ let rec list_nth_mut_shared_loop_pair_merge_loop
| List_Nil -> Fail Failure
end
-(** [loops::list_nth_mut_shared_loop_pair_merge]: forward function *)
+(** [loops::list_nth_mut_shared_loop_pair_merge]: forward function
+ Source: 'src/loops.rs', lines 278:0-282:23 *)
let list_nth_mut_shared_loop_pair_merge
(t : Type0) (ls0 : list_t t) (ls1 : list_t t) (i : u32) : result (t & t) =
list_nth_mut_shared_loop_pair_merge_loop t ls0 ls1 i
-(** [loops::list_nth_mut_shared_loop_pair_merge]: loop 0: backward function 0 *)
+(** [loops::list_nth_mut_shared_loop_pair_merge]: loop 0: backward function 0
+ Source: 'src/loops.rs', lines 278:0-293:1 *)
let rec list_nth_mut_shared_loop_pair_merge_loop_back
(t : Type0) (ls0 : list_t t) (ls1 : list_t t) (i : u32) (ret : t) :
Tot (result (list_t t))
@@ -561,14 +609,16 @@ let rec list_nth_mut_shared_loop_pair_merge_loop_back
| List_Nil -> Fail Failure
end
-(** [loops::list_nth_mut_shared_loop_pair_merge]: backward function 0 *)
+(** [loops::list_nth_mut_shared_loop_pair_merge]: backward function 0
+ Source: 'src/loops.rs', lines 278:0-282:23 *)
let list_nth_mut_shared_loop_pair_merge_back
(t : Type0) (ls0 : list_t t) (ls1 : list_t t) (i : u32) (ret : t) :
result (list_t t)
=
list_nth_mut_shared_loop_pair_merge_loop_back t ls0 ls1 i ret
-(** [loops::list_nth_shared_mut_loop_pair]: loop 0: forward function *)
+(** [loops::list_nth_shared_mut_loop_pair]: loop 0: forward function
+ Source: 'src/loops.rs', lines 297:0-312:1 *)
let rec list_nth_shared_mut_loop_pair_loop
(t : Type0) (ls0 : list_t t) (ls1 : list_t t) (i : u32) :
Tot (result (t & t))
@@ -588,12 +638,14 @@ let rec list_nth_shared_mut_loop_pair_loop
| List_Nil -> Fail Failure
end
-(** [loops::list_nth_shared_mut_loop_pair]: forward function *)
+(** [loops::list_nth_shared_mut_loop_pair]: forward function
+ Source: 'src/loops.rs', lines 297:0-301:23 *)
let list_nth_shared_mut_loop_pair
(t : Type0) (ls0 : list_t t) (ls1 : list_t t) (i : u32) : result (t & t) =
list_nth_shared_mut_loop_pair_loop t ls0 ls1 i
-(** [loops::list_nth_shared_mut_loop_pair]: loop 0: backward function 1 *)
+(** [loops::list_nth_shared_mut_loop_pair]: loop 0: backward function 1
+ Source: 'src/loops.rs', lines 297:0-312:1 *)
let rec list_nth_shared_mut_loop_pair_loop_back
(t : Type0) (ls0 : list_t t) (ls1 : list_t t) (i : u32) (ret : t) :
Tot (result (list_t t))
@@ -614,14 +666,16 @@ let rec list_nth_shared_mut_loop_pair_loop_back
| List_Nil -> Fail Failure
end
-(** [loops::list_nth_shared_mut_loop_pair]: backward function 1 *)
+(** [loops::list_nth_shared_mut_loop_pair]: backward function 1
+ Source: 'src/loops.rs', lines 297:0-301:23 *)
let list_nth_shared_mut_loop_pair_back
(t : Type0) (ls0 : list_t t) (ls1 : list_t t) (i : u32) (ret : t) :
result (list_t t)
=
list_nth_shared_mut_loop_pair_loop_back t ls0 ls1 i ret
-(** [loops::list_nth_shared_mut_loop_pair_merge]: loop 0: forward function *)
+(** [loops::list_nth_shared_mut_loop_pair_merge]: loop 0: forward function
+ Source: 'src/loops.rs', lines 316:0-331:1 *)
let rec list_nth_shared_mut_loop_pair_merge_loop
(t : Type0) (ls0 : list_t t) (ls1 : list_t t) (i : u32) :
Tot (result (t & t))
@@ -641,12 +695,14 @@ let rec list_nth_shared_mut_loop_pair_merge_loop
| List_Nil -> Fail Failure
end
-(** [loops::list_nth_shared_mut_loop_pair_merge]: forward function *)
+(** [loops::list_nth_shared_mut_loop_pair_merge]: forward function
+ Source: 'src/loops.rs', lines 316:0-320:23 *)
let list_nth_shared_mut_loop_pair_merge
(t : Type0) (ls0 : list_t t) (ls1 : list_t t) (i : u32) : result (t & t) =
list_nth_shared_mut_loop_pair_merge_loop t ls0 ls1 i
-(** [loops::list_nth_shared_mut_loop_pair_merge]: loop 0: backward function 0 *)
+(** [loops::list_nth_shared_mut_loop_pair_merge]: loop 0: backward function 0
+ Source: 'src/loops.rs', lines 316:0-331:1 *)
let rec list_nth_shared_mut_loop_pair_merge_loop_back
(t : Type0) (ls0 : list_t t) (ls1 : list_t t) (i : u32) (ret : t) :
Tot (result (list_t t))
@@ -668,7 +724,8 @@ let rec list_nth_shared_mut_loop_pair_merge_loop_back
| List_Nil -> Fail Failure
end
-(** [loops::list_nth_shared_mut_loop_pair_merge]: backward function 0 *)
+(** [loops::list_nth_shared_mut_loop_pair_merge]: backward function 0
+ Source: 'src/loops.rs', lines 316:0-320:23 *)
let list_nth_shared_mut_loop_pair_merge_back
(t : Type0) (ls0 : list_t t) (ls1 : list_t t) (i : u32) (ret : t) :
result (list_t t)
diff --git a/tests/fstar/misc/Loops.Types.fst b/tests/fstar/misc/Loops.Types.fst
index c622c548..8aa38290 100644
--- a/tests/fstar/misc/Loops.Types.fst
+++ b/tests/fstar/misc/Loops.Types.fst
@@ -5,7 +5,8 @@ open Primitives
#set-options "--z3rlimit 50 --fuel 1 --ifuel 1"
-(** [loops::List] *)
+(** [loops::List]
+ Source: 'src/loops.rs', lines 60:0-60:16 *)
type list_t (t : Type0) =
| List_Cons : t -> list_t t -> list_t t
| List_Nil : list_t t
diff --git a/tests/fstar/misc/NoNestedBorrows.fst b/tests/fstar/misc/NoNestedBorrows.fst
index e97927aa..2e14d67d 100644
--- a/tests/fstar/misc/NoNestedBorrows.fst
+++ b/tests/fstar/misc/NoNestedBorrows.fst
@@ -5,83 +5,103 @@ open Primitives
#set-options "--z3rlimit 50 --fuel 1 --ifuel 1"
-(** [no_nested_borrows::Pair] *)
+(** [no_nested_borrows::Pair]
+ Source: 'src/no_nested_borrows.rs', lines 4:0-4:23 *)
type pair_t (t1 t2 : Type0) = { x : t1; y : t2; }
-(** [no_nested_borrows::List] *)
+(** [no_nested_borrows::List]
+ Source: 'src/no_nested_borrows.rs', lines 9:0-9:16 *)
type list_t (t : Type0) =
| List_Cons : t -> list_t t -> list_t t
| List_Nil : list_t t
-(** [no_nested_borrows::One] *)
+(** [no_nested_borrows::One]
+ Source: 'src/no_nested_borrows.rs', lines 20:0-20:16 *)
type one_t (t1 : Type0) = | One_One : t1 -> one_t t1
-(** [no_nested_borrows::EmptyEnum] *)
+(** [no_nested_borrows::EmptyEnum]
+ Source: 'src/no_nested_borrows.rs', lines 26:0-26:18 *)
type emptyEnum_t = | EmptyEnum_Empty : emptyEnum_t
-(** [no_nested_borrows::Enum] *)
+(** [no_nested_borrows::Enum]
+ Source: 'src/no_nested_borrows.rs', lines 32:0-32:13 *)
type enum_t = | Enum_Variant1 : enum_t | Enum_Variant2 : enum_t
-(** [no_nested_borrows::EmptyStruct] *)
+(** [no_nested_borrows::EmptyStruct]
+ Source: 'src/no_nested_borrows.rs', lines 39:0-39:22 *)
type emptyStruct_t = unit
-(** [no_nested_borrows::Sum] *)
+(** [no_nested_borrows::Sum]
+ Source: 'src/no_nested_borrows.rs', lines 41:0-41:20 *)
type sum_t (t1 t2 : Type0) =
| Sum_Left : t1 -> sum_t t1 t2
| Sum_Right : t2 -> sum_t t1 t2
-(** [no_nested_borrows::neg_test]: forward function *)
+(** [no_nested_borrows::neg_test]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 48:0-48:30 *)
let neg_test (x : i32) : result i32 =
i32_neg x
-(** [no_nested_borrows::add_test]: forward function *)
+(** [no_nested_borrows::add_test]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 54:0-54:38 *)
let add_test (x : u32) (y : u32) : result u32 =
u32_add x y
-(** [no_nested_borrows::subs_test]: forward function *)
+(** [no_nested_borrows::subs_test]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 60:0-60:39 *)
let subs_test (x : u32) (y : u32) : result u32 =
u32_sub x y
-(** [no_nested_borrows::div_test]: forward function *)
+(** [no_nested_borrows::div_test]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 66:0-66:38 *)
let div_test (x : u32) (y : u32) : result u32 =
u32_div x y
-(** [no_nested_borrows::div_test1]: forward function *)
+(** [no_nested_borrows::div_test1]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 73:0-73:31 *)
let div_test1 (x : u32) : result u32 =
u32_div x 2
-(** [no_nested_borrows::rem_test]: forward function *)
+(** [no_nested_borrows::rem_test]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 78:0-78:38 *)
let rem_test (x : u32) (y : u32) : result u32 =
u32_rem x y
-(** [no_nested_borrows::mul_test]: forward function *)
+(** [no_nested_borrows::mul_test]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 82:0-82:38 *)
let mul_test (x : u32) (y : u32) : result u32 =
u32_mul x y
-(** [no_nested_borrows::CONST0] *)
+(** [no_nested_borrows::CONST0]
+ Source: 'src/no_nested_borrows.rs', lines 91:0-91:23 *)
let const0_body : result usize = usize_add 1 1
let const0_c : usize = eval_global const0_body
-(** [no_nested_borrows::CONST1] *)
+(** [no_nested_borrows::CONST1]
+ Source: 'src/no_nested_borrows.rs', lines 92:0-92:23 *)
let const1_body : result usize = usize_mul 2 2
let const1_c : usize = eval_global const1_body
-(** [no_nested_borrows::cast_test]: forward function *)
+(** [no_nested_borrows::cast_test]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 94:0-94:31 *)
let cast_test (x : u32) : result i32 =
scalar_cast U32 I32 x
-(** [no_nested_borrows::test2]: forward function *)
+(** [no_nested_borrows::test2]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 99:0-99:14 *)
let test2 : result unit =
let* _ = u32_add 23 44 in Return ()
(** Unit test for [no_nested_borrows::test2] *)
let _ = assert_norm (test2 = Return ())
-(** [no_nested_borrows::get_max]: forward function *)
+(** [no_nested_borrows::get_max]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 111:0-111:37 *)
let get_max (x : u32) (y : u32) : result u32 =
if x >= y then Return x else Return y
-(** [no_nested_borrows::test3]: forward function *)
+(** [no_nested_borrows::test3]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 119:0-119:14 *)
let test3 : result unit =
let* x = get_max 4 3 in
let* y = get_max 10 11 in
@@ -91,21 +111,24 @@ let test3 : result unit =
(** Unit test for [no_nested_borrows::test3] *)
let _ = assert_norm (test3 = Return ())
-(** [no_nested_borrows::test_neg1]: forward function *)
+(** [no_nested_borrows::test_neg1]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 126:0-126:18 *)
let test_neg1 : result unit =
let* y = i32_neg 3 in if not (y = -3) then Fail Failure else Return ()
(** Unit test for [no_nested_borrows::test_neg1] *)
let _ = assert_norm (test_neg1 = Return ())
-(** [no_nested_borrows::refs_test1]: forward function *)
+(** [no_nested_borrows::refs_test1]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 133:0-133:19 *)
let refs_test1 : result unit =
if not (1 = 1) then Fail Failure else Return ()
(** Unit test for [no_nested_borrows::refs_test1] *)
let _ = assert_norm (refs_test1 = Return ())
-(** [no_nested_borrows::refs_test2]: forward function *)
+(** [no_nested_borrows::refs_test2]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 144:0-144:19 *)
let refs_test2 : result unit =
if not (2 = 2)
then Fail Failure
@@ -120,47 +143,58 @@ let refs_test2 : result unit =
(** Unit test for [no_nested_borrows::refs_test2] *)
let _ = assert_norm (refs_test2 = Return ())
-(** [no_nested_borrows::test_list1]: forward function *)
+(** [no_nested_borrows::test_list1]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 160:0-160:19 *)
let test_list1 : result unit =
Return ()
(** Unit test for [no_nested_borrows::test_list1] *)
let _ = assert_norm (test_list1 = Return ())
-(** [no_nested_borrows::test_box1]: forward function *)
+(** [no_nested_borrows::test_box1]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 165:0-165:18 *)
let test_box1 : result unit =
- let b = 1 in let x = b in if not (x = 1) then Fail Failure else Return ()
+ let b = 0 in
+ let* b0 = alloc_boxed_Box_deref_mut_back i32 b 1 in
+ let* x = alloc_boxed_Box_deref i32 b0 in
+ if not (x = 1) then Fail Failure else Return ()
(** Unit test for [no_nested_borrows::test_box1] *)
let _ = assert_norm (test_box1 = Return ())
-(** [no_nested_borrows::copy_int]: forward function *)
+(** [no_nested_borrows::copy_int]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 175:0-175:30 *)
let copy_int (x : i32) : result i32 =
Return x
-(** [no_nested_borrows::test_unreachable]: forward function *)
+(** [no_nested_borrows::test_unreachable]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 181:0-181:32 *)
let test_unreachable (b : bool) : result unit =
if b then Fail Failure else Return ()
-(** [no_nested_borrows::test_panic]: forward function *)
+(** [no_nested_borrows::test_panic]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 189:0-189:26 *)
let test_panic (b : bool) : result unit =
if b then Fail Failure else Return ()
-(** [no_nested_borrows::test_copy_int]: forward function *)
+(** [no_nested_borrows::test_copy_int]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 196:0-196:22 *)
let test_copy_int : result unit =
let* y = copy_int 0 in if not (0 = y) then Fail Failure else Return ()
(** Unit test for [no_nested_borrows::test_copy_int] *)
let _ = assert_norm (test_copy_int = Return ())
-(** [no_nested_borrows::is_cons]: forward function *)
+(** [no_nested_borrows::is_cons]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 203:0-203:38 *)
let is_cons (t : Type0) (l : list_t t) : result bool =
begin match l with
| List_Cons x l0 -> Return true
| List_Nil -> Return false
end
-(** [no_nested_borrows::test_is_cons]: forward function *)
+(** [no_nested_borrows::test_is_cons]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 210:0-210:21 *)
let test_is_cons : result unit =
let l = List_Nil in
let* b = is_cons i32 (List_Cons 0 l) in
@@ -169,14 +203,16 @@ let test_is_cons : result unit =
(** Unit test for [no_nested_borrows::test_is_cons] *)
let _ = assert_norm (test_is_cons = Return ())
-(** [no_nested_borrows::split_list]: forward function *)
+(** [no_nested_borrows::split_list]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 216:0-216:48 *)
let split_list (t : Type0) (l : list_t t) : result (t & (list_t t)) =
begin match l with
| List_Cons hd tl -> Return (hd, tl)
| List_Nil -> Fail Failure
end
-(** [no_nested_borrows::test_split_list]: forward function *)
+(** [no_nested_borrows::test_split_list]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 224:0-224:24 *)
let test_split_list : result unit =
let l = List_Nil in
let* p = split_list i32 (List_Cons 0 l) in
@@ -186,16 +222,19 @@ let test_split_list : result unit =
(** Unit test for [no_nested_borrows::test_split_list] *)
let _ = assert_norm (test_split_list = Return ())
-(** [no_nested_borrows::choose]: forward function *)
+(** [no_nested_borrows::choose]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 231:0-231:70 *)
let choose (t : Type0) (b : bool) (x : t) (y : t) : result t =
if b then Return x else Return y
-(** [no_nested_borrows::choose]: backward function 0 *)
+(** [no_nested_borrows::choose]: backward function 0
+ Source: 'src/no_nested_borrows.rs', lines 231:0-231:70 *)
let choose_back
(t : Type0) (b : bool) (x : t) (y : t) (ret : t) : result (t & t) =
if b then Return (ret, y) else Return (x, ret)
-(** [no_nested_borrows::choose_test]: forward function *)
+(** [no_nested_borrows::choose_test]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 239:0-239:20 *)
let choose_test : result unit =
let* z = choose i32 true 0 0 in
let* z0 = i32_add z 1 in
@@ -210,28 +249,33 @@ let choose_test : result unit =
(** Unit test for [no_nested_borrows::choose_test] *)
let _ = assert_norm (choose_test = Return ())
-(** [no_nested_borrows::test_char]: forward function *)
+(** [no_nested_borrows::test_char]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 251:0-251:26 *)
let test_char : result char =
Return 'a'
-(** [no_nested_borrows::Tree] *)
+(** [no_nested_borrows::Tree]
+ Source: 'src/no_nested_borrows.rs', lines 256:0-256:16 *)
type tree_t (t : Type0) =
| Tree_Leaf : t -> tree_t t
| Tree_Node : t -> nodeElem_t t -> tree_t t -> tree_t t
-(** [no_nested_borrows::NodeElem] *)
+(** [no_nested_borrows::NodeElem]
+ Source: 'src/no_nested_borrows.rs', lines 261:0-261:20 *)
and nodeElem_t (t : Type0) =
| NodeElem_Cons : tree_t t -> nodeElem_t t -> nodeElem_t t
| NodeElem_Nil : nodeElem_t t
-(** [no_nested_borrows::list_length]: forward function *)
+(** [no_nested_borrows::list_length]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 296:0-296:48 *)
let rec list_length (t : Type0) (l : list_t t) : result u32 =
begin match l with
| List_Cons x l1 -> let* i = list_length t l1 in u32_add 1 i
| List_Nil -> Return 0
end
-(** [no_nested_borrows::list_nth_shared]: forward function *)
+(** [no_nested_borrows::list_nth_shared]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 304:0-304:62 *)
let rec list_nth_shared (t : Type0) (l : list_t t) (i : u32) : result t =
begin match l with
| List_Cons x tl ->
@@ -241,7 +285,8 @@ let rec list_nth_shared (t : Type0) (l : list_t t) (i : u32) : result t =
| List_Nil -> Fail Failure
end
-(** [no_nested_borrows::list_nth_mut]: forward function *)
+(** [no_nested_borrows::list_nth_mut]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 320:0-320:67 *)
let rec list_nth_mut (t : Type0) (l : list_t t) (i : u32) : result t =
begin match l with
| List_Cons x tl ->
@@ -249,7 +294,8 @@ let rec list_nth_mut (t : Type0) (l : list_t t) (i : u32) : result t =
| List_Nil -> Fail Failure
end
-(** [no_nested_borrows::list_nth_mut]: backward function 0 *)
+(** [no_nested_borrows::list_nth_mut]: backward function 0
+ Source: 'src/no_nested_borrows.rs', lines 320:0-320:67 *)
let rec list_nth_mut_back
(t : Type0) (l : list_t t) (i : u32) (ret : t) : result (list_t t) =
begin match l with
@@ -263,7 +309,8 @@ let rec list_nth_mut_back
| List_Nil -> Fail Failure
end
-(** [no_nested_borrows::list_rev_aux]: forward function *)
+(** [no_nested_borrows::list_rev_aux]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 336:0-336:63 *)
let rec list_rev_aux
(t : Type0) (li : list_t t) (lo : list_t t) : result (list_t t) =
begin match li with
@@ -272,11 +319,13 @@ let rec list_rev_aux
end
(** [no_nested_borrows::list_rev]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/no_nested_borrows.rs', lines 350:0-350:42 *)
let list_rev (t : Type0) (l : list_t t) : result (list_t t) =
let li = core_mem_replace (list_t t) l List_Nil in list_rev_aux t li List_Nil
-(** [no_nested_borrows::test_list_functions]: forward function *)
+(** [no_nested_borrows::test_list_functions]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 355:0-355:28 *)
let test_list_functions : result unit =
let l = List_Nil in
let l0 = List_Cons 2 l in
@@ -312,75 +361,92 @@ let test_list_functions : result unit =
(** Unit test for [no_nested_borrows::test_list_functions] *)
let _ = assert_norm (test_list_functions = Return ())
-(** [no_nested_borrows::id_mut_pair1]: forward function *)
+(** [no_nested_borrows::id_mut_pair1]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 371:0-371:89 *)
let id_mut_pair1 (t1 t2 : Type0) (x : t1) (y : t2) : result (t1 & t2) =
Return (x, y)
-(** [no_nested_borrows::id_mut_pair1]: backward function 0 *)
+(** [no_nested_borrows::id_mut_pair1]: backward function 0
+ Source: 'src/no_nested_borrows.rs', lines 371:0-371:89 *)
let id_mut_pair1_back
(t1 t2 : Type0) (x : t1) (y : t2) (ret : (t1 & t2)) : result (t1 & t2) =
let (x0, x1) = ret in Return (x0, x1)
-(** [no_nested_borrows::id_mut_pair2]: forward function *)
+(** [no_nested_borrows::id_mut_pair2]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 375:0-375:88 *)
let id_mut_pair2 (t1 t2 : Type0) (p : (t1 & t2)) : result (t1 & t2) =
let (x, x0) = p in Return (x, x0)
-(** [no_nested_borrows::id_mut_pair2]: backward function 0 *)
+(** [no_nested_borrows::id_mut_pair2]: backward function 0
+ Source: 'src/no_nested_borrows.rs', lines 375:0-375:88 *)
let id_mut_pair2_back
(t1 t2 : Type0) (p : (t1 & t2)) (ret : (t1 & t2)) : result (t1 & t2) =
let (x, x0) = ret in Return (x, x0)
-(** [no_nested_borrows::id_mut_pair3]: forward function *)
+(** [no_nested_borrows::id_mut_pair3]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 379:0-379:93 *)
let id_mut_pair3 (t1 t2 : Type0) (x : t1) (y : t2) : result (t1 & t2) =
Return (x, y)
-(** [no_nested_borrows::id_mut_pair3]: backward function 0 *)
+(** [no_nested_borrows::id_mut_pair3]: backward function 0
+ Source: 'src/no_nested_borrows.rs', lines 379:0-379:93 *)
let id_mut_pair3_back'a
(t1 t2 : Type0) (x : t1) (y : t2) (ret : t1) : result t1 =
Return ret
-(** [no_nested_borrows::id_mut_pair3]: backward function 1 *)
+(** [no_nested_borrows::id_mut_pair3]: backward function 1
+ Source: 'src/no_nested_borrows.rs', lines 379:0-379:93 *)
let id_mut_pair3_back'b
(t1 t2 : Type0) (x : t1) (y : t2) (ret : t2) : result t2 =
Return ret
-(** [no_nested_borrows::id_mut_pair4]: forward function *)
+(** [no_nested_borrows::id_mut_pair4]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 383:0-383:92 *)
let id_mut_pair4 (t1 t2 : Type0) (p : (t1 & t2)) : result (t1 & t2) =
let (x, x0) = p in Return (x, x0)
-(** [no_nested_borrows::id_mut_pair4]: backward function 0 *)
+(** [no_nested_borrows::id_mut_pair4]: backward function 0
+ Source: 'src/no_nested_borrows.rs', lines 383:0-383:92 *)
let id_mut_pair4_back'a
(t1 t2 : Type0) (p : (t1 & t2)) (ret : t1) : result t1 =
Return ret
-(** [no_nested_borrows::id_mut_pair4]: backward function 1 *)
+(** [no_nested_borrows::id_mut_pair4]: backward function 1
+ Source: 'src/no_nested_borrows.rs', lines 383:0-383:92 *)
let id_mut_pair4_back'b
(t1 t2 : Type0) (p : (t1 & t2)) (ret : t2) : result t2 =
Return ret
-(** [no_nested_borrows::StructWithTuple] *)
+(** [no_nested_borrows::StructWithTuple]
+ Source: 'src/no_nested_borrows.rs', lines 390:0-390:34 *)
type structWithTuple_t (t1 t2 : Type0) = { p : (t1 & t2); }
-(** [no_nested_borrows::new_tuple1]: forward function *)
+(** [no_nested_borrows::new_tuple1]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 394:0-394:48 *)
let new_tuple1 : result (structWithTuple_t u32 u32) =
Return { p = (1, 2) }
-(** [no_nested_borrows::new_tuple2]: forward function *)
+(** [no_nested_borrows::new_tuple2]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 398:0-398:48 *)
let new_tuple2 : result (structWithTuple_t i16 i16) =
Return { p = (1, 2) }
-(** [no_nested_borrows::new_tuple3]: forward function *)
+(** [no_nested_borrows::new_tuple3]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 402:0-402:48 *)
let new_tuple3 : result (structWithTuple_t u64 i64) =
Return { p = (1, 2) }
-(** [no_nested_borrows::StructWithPair] *)
+(** [no_nested_borrows::StructWithPair]
+ Source: 'src/no_nested_borrows.rs', lines 407:0-407:33 *)
type structWithPair_t (t1 t2 : Type0) = { p : pair_t t1 t2; }
-(** [no_nested_borrows::new_pair1]: forward function *)
+(** [no_nested_borrows::new_pair1]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 411:0-411:46 *)
let new_pair1 : result (structWithPair_t u32 u32) =
Return { p = { x = 1; y = 2 } }
-(** [no_nested_borrows::test_constants]: forward function *)
+(** [no_nested_borrows::test_constants]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 419:0-419:23 *)
let test_constants : result unit =
let* swt = new_tuple1 in
let (i, _) = swt.p in
@@ -403,7 +469,8 @@ let test_constants : result unit =
(** Unit test for [no_nested_borrows::test_constants] *)
let _ = assert_norm (test_constants = Return ())
-(** [no_nested_borrows::test_weird_borrows1]: forward function *)
+(** [no_nested_borrows::test_weird_borrows1]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 428:0-428:28 *)
let test_weird_borrows1 : result unit =
Return ()
@@ -411,24 +478,29 @@ let test_weird_borrows1 : result unit =
let _ = assert_norm (test_weird_borrows1 = Return ())
(** [no_nested_borrows::test_mem_replace]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/no_nested_borrows.rs', lines 438:0-438:37 *)
let test_mem_replace (px : u32) : result u32 =
let y = core_mem_replace u32 px 1 in
if not (y = 0) then Fail Failure else Return 2
-(** [no_nested_borrows::test_shared_borrow_bool1]: forward function *)
+(** [no_nested_borrows::test_shared_borrow_bool1]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 445:0-445:47 *)
let test_shared_borrow_bool1 (b : bool) : result u32 =
if b then Return 0 else Return 1
-(** [no_nested_borrows::test_shared_borrow_bool2]: forward function *)
+(** [no_nested_borrows::test_shared_borrow_bool2]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 458:0-458:40 *)
let test_shared_borrow_bool2 : result u32 =
Return 0
-(** [no_nested_borrows::test_shared_borrow_enum1]: forward function *)
+(** [no_nested_borrows::test_shared_borrow_enum1]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 473:0-473:52 *)
let test_shared_borrow_enum1 (l : list_t u32) : result u32 =
begin match l with | List_Cons i l0 -> Return 1 | List_Nil -> Return 0 end
-(** [no_nested_borrows::test_shared_borrow_enum2]: forward function *)
+(** [no_nested_borrows::test_shared_borrow_enum2]: forward function
+ Source: 'src/no_nested_borrows.rs', lines 485:0-485:40 *)
let test_shared_borrow_enum2 : result u32 =
Return 0
diff --git a/tests/fstar/misc/Paper.fst b/tests/fstar/misc/Paper.fst
index bfb710dc..14bc59e8 100644
--- a/tests/fstar/misc/Paper.fst
+++ b/tests/fstar/misc/Paper.fst
@@ -6,27 +6,32 @@ open Primitives
#set-options "--z3rlimit 50 --fuel 1 --ifuel 1"
(** [paper::ref_incr]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/paper.rs', lines 4:0-4:28 *)
let ref_incr (x : i32) : result i32 =
i32_add x 1
-(** [paper::test_incr]: forward function *)
+(** [paper::test_incr]: forward function
+ Source: 'src/paper.rs', lines 8:0-8:18 *)
let test_incr : result unit =
let* x = ref_incr 0 in if not (x = 1) then Fail Failure else Return ()
(** Unit test for [paper::test_incr] *)
let _ = assert_norm (test_incr = Return ())
-(** [paper::choose]: forward function *)
+(** [paper::choose]: forward function
+ Source: 'src/paper.rs', lines 15:0-15:70 *)
let choose (t : Type0) (b : bool) (x : t) (y : t) : result t =
if b then Return x else Return y
-(** [paper::choose]: backward function 0 *)
+(** [paper::choose]: backward function 0
+ Source: 'src/paper.rs', lines 15:0-15:70 *)
let choose_back
(t : Type0) (b : bool) (x : t) (y : t) (ret : t) : result (t & t) =
if b then Return (ret, y) else Return (x, ret)
-(** [paper::test_choose]: forward function *)
+(** [paper::test_choose]: forward function
+ Source: 'src/paper.rs', lines 23:0-23:20 *)
let test_choose : result unit =
let* z = choose i32 true 0 0 in
let* z0 = i32_add z 1 in
@@ -41,12 +46,14 @@ let test_choose : result unit =
(** Unit test for [paper::test_choose] *)
let _ = assert_norm (test_choose = Return ())
-(** [paper::List] *)
+(** [paper::List]
+ Source: 'src/paper.rs', lines 35:0-35:16 *)
type list_t (t : Type0) =
| List_Cons : t -> list_t t -> list_t t
| List_Nil : list_t t
-(** [paper::list_nth_mut]: forward function *)
+(** [paper::list_nth_mut]: forward function
+ Source: 'src/paper.rs', lines 42:0-42:67 *)
let rec list_nth_mut (t : Type0) (l : list_t t) (i : u32) : result t =
begin match l with
| List_Cons x tl ->
@@ -54,7 +61,8 @@ let rec list_nth_mut (t : Type0) (l : list_t t) (i : u32) : result t =
| List_Nil -> Fail Failure
end
-(** [paper::list_nth_mut]: backward function 0 *)
+(** [paper::list_nth_mut]: backward function 0
+ Source: 'src/paper.rs', lines 42:0-42:67 *)
let rec list_nth_mut_back
(t : Type0) (l : list_t t) (i : u32) (ret : t) : result (list_t t) =
begin match l with
@@ -68,14 +76,16 @@ let rec list_nth_mut_back
| List_Nil -> Fail Failure
end
-(** [paper::sum]: forward function *)
+(** [paper::sum]: forward function
+ Source: 'src/paper.rs', lines 57:0-57:32 *)
let rec sum (l : list_t i32) : result i32 =
begin match l with
| List_Cons x tl -> let* i = sum tl in i32_add x i
| List_Nil -> Return 0
end
-(** [paper::test_nth]: forward function *)
+(** [paper::test_nth]: forward function
+ Source: 'src/paper.rs', lines 68:0-68:17 *)
let test_nth : result unit =
let l = List_Nil in
let l0 = List_Cons 3 l in
@@ -89,7 +99,8 @@ let test_nth : result unit =
(** Unit test for [paper::test_nth] *)
let _ = assert_norm (test_nth = Return ())
-(** [paper::call_choose]: forward function *)
+(** [paper::call_choose]: forward function
+ Source: 'src/paper.rs', lines 76:0-76:44 *)
let call_choose (p : (u32 & u32)) : result u32 =
let (px, py) = p in
let* pz = choose u32 true px py in
diff --git a/tests/fstar/misc/PoloniusList.fst b/tests/fstar/misc/PoloniusList.fst
index 428c4210..188b22d8 100644
--- a/tests/fstar/misc/PoloniusList.fst
+++ b/tests/fstar/misc/PoloniusList.fst
@@ -5,12 +5,14 @@ open Primitives
#set-options "--z3rlimit 50 --fuel 1 --ifuel 1"
-(** [polonius_list::List] *)
+(** [polonius_list::List]
+ Source: 'src/polonius_list.rs', lines 3:0-3:16 *)
type list_t (t : Type0) =
| List_Cons : t -> list_t t -> list_t t
| List_Nil : list_t t
-(** [polonius_list::get_list_at_x]: forward function *)
+(** [polonius_list::get_list_at_x]: forward function
+ Source: 'src/polonius_list.rs', lines 13:0-13:76 *)
let rec get_list_at_x (ls : list_t u32) (x : u32) : result (list_t u32) =
begin match ls with
| List_Cons hd tl ->
@@ -18,7 +20,8 @@ let rec get_list_at_x (ls : list_t u32) (x : u32) : result (list_t u32) =
| List_Nil -> Return List_Nil
end
-(** [polonius_list::get_list_at_x]: backward function 0 *)
+(** [polonius_list::get_list_at_x]: backward function 0
+ Source: 'src/polonius_list.rs', lines 13:0-13:76 *)
let rec get_list_at_x_back
(ls : list_t u32) (x : u32) (ret : list_t u32) : result (list_t u32) =
begin match ls with
diff --git a/tests/fstar/misc/Primitives.fst b/tests/fstar/misc/Primitives.fst
index 3297803c..94322ead 100644
--- a/tests/fstar/misc/Primitives.fst
+++ b/tests/fstar/misc/Primitives.fst
@@ -351,14 +351,14 @@ let alloc_boxed_Box_deref_mut (t : Type0) (x : t) : result t = Return x
let alloc_boxed_Box_deref_mut_back (t : Type) (_ : t) (x : t) : result t = Return x
// Trait instance
-let alloc_boxed_Box_coreOpsDerefInst (self : Type0) : core_ops_deref_Deref self = {
+let alloc_boxed_Box_coreopsDerefInst (self : Type0) : core_ops_deref_Deref self = {
target = self;
deref = alloc_boxed_Box_deref self;
}
// Trait instance
-let alloc_boxed_Box_coreOpsDerefMutInst (self : Type0) : core_ops_deref_DerefMut self = {
- derefInst = alloc_boxed_Box_coreOpsDerefInst self;
+let alloc_boxed_Box_coreopsDerefMutInst (self : Type0) : core_ops_deref_DerefMut self = {
+ derefInst = alloc_boxed_Box_coreopsDerefInst self;
deref_mut = alloc_boxed_Box_deref_mut self;
deref_mut_back = alloc_boxed_Box_deref_mut_back self;
}
@@ -483,23 +483,23 @@ let core_slice_index_Slice_index
| Some x -> Return x
// [core::slice::index::Range:::get]: forward function
-let core_slice_index_Range_get (t : Type0) (i : core_ops_range_Range usize) (s : slice t) :
+let core_slice_index_RangeUsize_get (t : Type0) (i : core_ops_range_Range usize) (s : slice t) :
result (option (slice t)) =
admit () // TODO
// [core::slice::index::Range::get_mut]: forward function
-let core_slice_index_Range_get_mut
+let core_slice_index_RangeUsize_get_mut
(t : Type0) : core_ops_range_Range usize → slice t → result (option (slice t)) =
admit () // TODO
// [core::slice::index::Range::get_mut]: backward function 0
-let core_slice_index_Range_get_mut_back
+let core_slice_index_RangeUsize_get_mut_back
(t : Type0) :
core_ops_range_Range usize → slice t → option (slice t) → result (slice t) =
admit () // TODO
// [core::slice::index::Range::get_unchecked]: forward function
-let core_slice_index_Range_get_unchecked
+let core_slice_index_RangeUsize_get_unchecked
(t : Type0) :
core_ops_range_Range usize → const_raw_ptr (slice t) → result (const_raw_ptr (slice t)) =
// Don't know what the model should be - for now we always fail to make
@@ -507,7 +507,7 @@ let core_slice_index_Range_get_unchecked
fun _ _ -> Fail Failure
// [core::slice::index::Range::get_unchecked_mut]: forward function
-let core_slice_index_Range_get_unchecked_mut
+let core_slice_index_RangeUsize_get_unchecked_mut
(t : Type0) :
core_ops_range_Range usize → mut_raw_ptr (slice t) → result (mut_raw_ptr (slice t)) =
// Don't know what the model should be - for now we always fail to make
@@ -515,17 +515,17 @@ let core_slice_index_Range_get_unchecked_mut
fun _ _ -> Fail Failure
// [core::slice::index::Range::index]: forward function
-let core_slice_index_Range_index
+let core_slice_index_RangeUsize_index
(t : Type0) : core_ops_range_Range usize → slice t → result (slice t) =
admit () // TODO
// [core::slice::index::Range::index_mut]: forward function
-let core_slice_index_Range_index_mut
+let core_slice_index_RangeUsize_index_mut
(t : Type0) : core_ops_range_Range usize → slice t → result (slice t) =
admit () // TODO
// [core::slice::index::Range::index_mut]: backward function 0
-let core_slice_index_Range_index_mut_back
+let core_slice_index_RangeUsize_index_mut_back
(t : Type0) : core_ops_range_Range usize → slice t → slice t → result (slice t) =
admit () // TODO
@@ -559,44 +559,44 @@ let core_array_Array_index_mut_back
(a : array t n) (i : idx) (x : inst.indexInst.output) : result (array t n) =
admit () // TODO
-// Trait implementation: [core::slice::index::[T]]
-let core_slice_index_Slice_coreopsindexIndexInst (t idx : Type0)
- (inst : core_slice_index_SliceIndex idx (slice t)) :
- core_ops_index_Index (slice t) idx = {
- output = inst.output;
- index = core_slice_index_Slice_index t idx inst;
-}
-
// Trait implementation: [core::slice::index::private_slice_index::Range]
-let core_slice_index_private_slice_index_Range_coresliceindexprivate_slice_indexSealedInst
+let core_slice_index_private_slice_index_SealedRangeUsizeInst
: core_slice_index_private_slice_index_Sealed (core_ops_range_Range usize) = ()
// Trait implementation: [core::slice::index::Range]
-let core_slice_index_Range_coresliceindexSliceIndexInst (t : Type0) :
+let core_slice_index_SliceIndexRangeUsizeSliceTInst (t : Type0) :
core_slice_index_SliceIndex (core_ops_range_Range usize) (slice t) = {
- sealedInst = core_slice_index_private_slice_index_Range_coresliceindexprivate_slice_indexSealedInst;
+ sealedInst = core_slice_index_private_slice_index_SealedRangeUsizeInst;
output = slice t;
- get = core_slice_index_Range_get t;
- get_mut = core_slice_index_Range_get_mut t;
- get_mut_back = core_slice_index_Range_get_mut_back t;
- get_unchecked = core_slice_index_Range_get_unchecked t;
- get_unchecked_mut = core_slice_index_Range_get_unchecked_mut t;
- index = core_slice_index_Range_index t;
- index_mut = core_slice_index_Range_index_mut t;
- index_mut_back = core_slice_index_Range_index_mut_back t;
+ get = core_slice_index_RangeUsize_get t;
+ get_mut = core_slice_index_RangeUsize_get_mut t;
+ get_mut_back = core_slice_index_RangeUsize_get_mut_back t;
+ get_unchecked = core_slice_index_RangeUsize_get_unchecked t;
+ get_unchecked_mut = core_slice_index_RangeUsize_get_unchecked_mut t;
+ index = core_slice_index_RangeUsize_index t;
+ index_mut = core_slice_index_RangeUsize_index_mut t;
+ index_mut_back = core_slice_index_RangeUsize_index_mut_back t;
+}
+
+// Trait implementation: [core::slice::index::[T]]
+let core_ops_index_IndexSliceTIInst (t idx : Type0)
+ (inst : core_slice_index_SliceIndex idx (slice t)) :
+ core_ops_index_Index (slice t) idx = {
+ output = inst.output;
+ index = core_slice_index_Slice_index t idx inst;
}
// Trait implementation: [core::slice::index::[T]]
-let core_slice_index_Slice_coreopsindexIndexMutInst (t idx : Type0)
+let core_ops_index_IndexMutSliceTIInst (t idx : Type0)
(inst : core_slice_index_SliceIndex idx (slice t)) :
core_ops_index_IndexMut (slice t) idx = {
- indexInst = core_slice_index_Slice_coreopsindexIndexInst t idx inst;
+ indexInst = core_ops_index_IndexSliceTIInst t idx inst;
index_mut = core_slice_index_Slice_index_mut t idx inst;
index_mut_back = core_slice_index_Slice_index_mut_back t idx inst;
}
// Trait implementation: [core::array::[T; N]]
-let core_array_Array_coreopsindexIndexInst (t idx : Type0) (n : usize)
+let core_ops_index_IndexArrayInst (t idx : Type0) (n : usize)
(inst : core_ops_index_Index (slice t) idx) :
core_ops_index_Index (array t n) idx = {
output = inst.output;
@@ -604,10 +604,10 @@ let core_array_Array_coreopsindexIndexInst (t idx : Type0) (n : usize)
}
// Trait implementation: [core::array::[T; N]]
-let core_array_Array_coreopsindexIndexMutInst (t idx : Type0) (n : usize)
+let core_ops_index_IndexMutArrayIInst (t idx : Type0) (n : usize)
(inst : core_ops_index_IndexMut (slice t) idx) :
core_ops_index_IndexMut (array t n) idx = {
- indexInst = core_array_Array_coreopsindexIndexInst t idx n inst.indexInst;
+ indexInst = core_ops_index_IndexArrayInst t idx n inst.indexInst;
index_mut = core_array_Array_index_mut t idx n inst;
index_mut_back = core_array_Array_index_mut_back t idx n inst;
}
@@ -651,13 +651,13 @@ let core_slice_index_usize_index_mut_back
admit () // TODO
// Trait implementation: [core::slice::index::private_slice_index::usize]
-let core_slice_index_private_slice_index_usize_coresliceindexprivate_slice_indexSealedInst
+let core_slice_index_private_slice_index_SealedUsizeInst
: core_slice_index_private_slice_index_Sealed usize = ()
// Trait implementation: [core::slice::index::usize]
-let core_slice_index_usize_coresliceindexSliceIndexInst (t : Type0) :
+let core_slice_index_SliceIndexUsizeSliceTInst (t : Type0) :
core_slice_index_SliceIndex usize (slice t) = {
- sealedInst = core_slice_index_private_slice_index_usize_coresliceindexprivate_slice_indexSealedInst;
+ sealedInst = core_slice_index_private_slice_index_SealedUsizeInst;
output = t;
get = core_slice_index_usize_get t;
get_mut = core_slice_index_usize_get_mut t;
@@ -706,24 +706,24 @@ let alloc_vec_Vec_coreopsindexIndexMutInst (t idx : Type0)
let alloc_vec_Vec_index_eq (#a : Type0) (v : alloc_vec_Vec a) (i : usize) :
Lemma (
- alloc_vec_Vec_index a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i ==
+ alloc_vec_Vec_index a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i ==
alloc_vec_Vec_index_usize v i)
- [SMTPat (alloc_vec_Vec_index a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i)]
+ [SMTPat (alloc_vec_Vec_index a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i)]
=
admit()
let alloc_vec_Vec_index_mut_eq (#a : Type0) (v : alloc_vec_Vec a) (i : usize) :
Lemma (
- alloc_vec_Vec_index_mut a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i ==
+ alloc_vec_Vec_index_mut a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i ==
alloc_vec_Vec_index_usize v i)
- [SMTPat (alloc_vec_Vec_index_mut a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i)]
+ [SMTPat (alloc_vec_Vec_index_mut a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i)]
=
admit()
let alloc_vec_Vec_index_mut_back_eq (#a : Type0) (v : alloc_vec_Vec a) (i : usize) (x : a) :
Lemma (
- alloc_vec_Vec_index_mut_back a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i x ==
+ alloc_vec_Vec_index_mut_back a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i x ==
alloc_vec_Vec_update_usize v i x)
- [SMTPat (alloc_vec_Vec_index_mut_back a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i x)]
+ [SMTPat (alloc_vec_Vec_index_mut_back a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i x)]
=
admit()
diff --git a/tests/fstar/traits/Primitives.fst b/tests/fstar/traits/Primitives.fst
index 3297803c..94322ead 100644
--- a/tests/fstar/traits/Primitives.fst
+++ b/tests/fstar/traits/Primitives.fst
@@ -351,14 +351,14 @@ let alloc_boxed_Box_deref_mut (t : Type0) (x : t) : result t = Return x
let alloc_boxed_Box_deref_mut_back (t : Type) (_ : t) (x : t) : result t = Return x
// Trait instance
-let alloc_boxed_Box_coreOpsDerefInst (self : Type0) : core_ops_deref_Deref self = {
+let alloc_boxed_Box_coreopsDerefInst (self : Type0) : core_ops_deref_Deref self = {
target = self;
deref = alloc_boxed_Box_deref self;
}
// Trait instance
-let alloc_boxed_Box_coreOpsDerefMutInst (self : Type0) : core_ops_deref_DerefMut self = {
- derefInst = alloc_boxed_Box_coreOpsDerefInst self;
+let alloc_boxed_Box_coreopsDerefMutInst (self : Type0) : core_ops_deref_DerefMut self = {
+ derefInst = alloc_boxed_Box_coreopsDerefInst self;
deref_mut = alloc_boxed_Box_deref_mut self;
deref_mut_back = alloc_boxed_Box_deref_mut_back self;
}
@@ -483,23 +483,23 @@ let core_slice_index_Slice_index
| Some x -> Return x
// [core::slice::index::Range:::get]: forward function
-let core_slice_index_Range_get (t : Type0) (i : core_ops_range_Range usize) (s : slice t) :
+let core_slice_index_RangeUsize_get (t : Type0) (i : core_ops_range_Range usize) (s : slice t) :
result (option (slice t)) =
admit () // TODO
// [core::slice::index::Range::get_mut]: forward function
-let core_slice_index_Range_get_mut
+let core_slice_index_RangeUsize_get_mut
(t : Type0) : core_ops_range_Range usize → slice t → result (option (slice t)) =
admit () // TODO
// [core::slice::index::Range::get_mut]: backward function 0
-let core_slice_index_Range_get_mut_back
+let core_slice_index_RangeUsize_get_mut_back
(t : Type0) :
core_ops_range_Range usize → slice t → option (slice t) → result (slice t) =
admit () // TODO
// [core::slice::index::Range::get_unchecked]: forward function
-let core_slice_index_Range_get_unchecked
+let core_slice_index_RangeUsize_get_unchecked
(t : Type0) :
core_ops_range_Range usize → const_raw_ptr (slice t) → result (const_raw_ptr (slice t)) =
// Don't know what the model should be - for now we always fail to make
@@ -507,7 +507,7 @@ let core_slice_index_Range_get_unchecked
fun _ _ -> Fail Failure
// [core::slice::index::Range::get_unchecked_mut]: forward function
-let core_slice_index_Range_get_unchecked_mut
+let core_slice_index_RangeUsize_get_unchecked_mut
(t : Type0) :
core_ops_range_Range usize → mut_raw_ptr (slice t) → result (mut_raw_ptr (slice t)) =
// Don't know what the model should be - for now we always fail to make
@@ -515,17 +515,17 @@ let core_slice_index_Range_get_unchecked_mut
fun _ _ -> Fail Failure
// [core::slice::index::Range::index]: forward function
-let core_slice_index_Range_index
+let core_slice_index_RangeUsize_index
(t : Type0) : core_ops_range_Range usize → slice t → result (slice t) =
admit () // TODO
// [core::slice::index::Range::index_mut]: forward function
-let core_slice_index_Range_index_mut
+let core_slice_index_RangeUsize_index_mut
(t : Type0) : core_ops_range_Range usize → slice t → result (slice t) =
admit () // TODO
// [core::slice::index::Range::index_mut]: backward function 0
-let core_slice_index_Range_index_mut_back
+let core_slice_index_RangeUsize_index_mut_back
(t : Type0) : core_ops_range_Range usize → slice t → slice t → result (slice t) =
admit () // TODO
@@ -559,44 +559,44 @@ let core_array_Array_index_mut_back
(a : array t n) (i : idx) (x : inst.indexInst.output) : result (array t n) =
admit () // TODO
-// Trait implementation: [core::slice::index::[T]]
-let core_slice_index_Slice_coreopsindexIndexInst (t idx : Type0)
- (inst : core_slice_index_SliceIndex idx (slice t)) :
- core_ops_index_Index (slice t) idx = {
- output = inst.output;
- index = core_slice_index_Slice_index t idx inst;
-}
-
// Trait implementation: [core::slice::index::private_slice_index::Range]
-let core_slice_index_private_slice_index_Range_coresliceindexprivate_slice_indexSealedInst
+let core_slice_index_private_slice_index_SealedRangeUsizeInst
: core_slice_index_private_slice_index_Sealed (core_ops_range_Range usize) = ()
// Trait implementation: [core::slice::index::Range]
-let core_slice_index_Range_coresliceindexSliceIndexInst (t : Type0) :
+let core_slice_index_SliceIndexRangeUsizeSliceTInst (t : Type0) :
core_slice_index_SliceIndex (core_ops_range_Range usize) (slice t) = {
- sealedInst = core_slice_index_private_slice_index_Range_coresliceindexprivate_slice_indexSealedInst;
+ sealedInst = core_slice_index_private_slice_index_SealedRangeUsizeInst;
output = slice t;
- get = core_slice_index_Range_get t;
- get_mut = core_slice_index_Range_get_mut t;
- get_mut_back = core_slice_index_Range_get_mut_back t;
- get_unchecked = core_slice_index_Range_get_unchecked t;
- get_unchecked_mut = core_slice_index_Range_get_unchecked_mut t;
- index = core_slice_index_Range_index t;
- index_mut = core_slice_index_Range_index_mut t;
- index_mut_back = core_slice_index_Range_index_mut_back t;
+ get = core_slice_index_RangeUsize_get t;
+ get_mut = core_slice_index_RangeUsize_get_mut t;
+ get_mut_back = core_slice_index_RangeUsize_get_mut_back t;
+ get_unchecked = core_slice_index_RangeUsize_get_unchecked t;
+ get_unchecked_mut = core_slice_index_RangeUsize_get_unchecked_mut t;
+ index = core_slice_index_RangeUsize_index t;
+ index_mut = core_slice_index_RangeUsize_index_mut t;
+ index_mut_back = core_slice_index_RangeUsize_index_mut_back t;
+}
+
+// Trait implementation: [core::slice::index::[T]]
+let core_ops_index_IndexSliceTIInst (t idx : Type0)
+ (inst : core_slice_index_SliceIndex idx (slice t)) :
+ core_ops_index_Index (slice t) idx = {
+ output = inst.output;
+ index = core_slice_index_Slice_index t idx inst;
}
// Trait implementation: [core::slice::index::[T]]
-let core_slice_index_Slice_coreopsindexIndexMutInst (t idx : Type0)
+let core_ops_index_IndexMutSliceTIInst (t idx : Type0)
(inst : core_slice_index_SliceIndex idx (slice t)) :
core_ops_index_IndexMut (slice t) idx = {
- indexInst = core_slice_index_Slice_coreopsindexIndexInst t idx inst;
+ indexInst = core_ops_index_IndexSliceTIInst t idx inst;
index_mut = core_slice_index_Slice_index_mut t idx inst;
index_mut_back = core_slice_index_Slice_index_mut_back t idx inst;
}
// Trait implementation: [core::array::[T; N]]
-let core_array_Array_coreopsindexIndexInst (t idx : Type0) (n : usize)
+let core_ops_index_IndexArrayInst (t idx : Type0) (n : usize)
(inst : core_ops_index_Index (slice t) idx) :
core_ops_index_Index (array t n) idx = {
output = inst.output;
@@ -604,10 +604,10 @@ let core_array_Array_coreopsindexIndexInst (t idx : Type0) (n : usize)
}
// Trait implementation: [core::array::[T; N]]
-let core_array_Array_coreopsindexIndexMutInst (t idx : Type0) (n : usize)
+let core_ops_index_IndexMutArrayIInst (t idx : Type0) (n : usize)
(inst : core_ops_index_IndexMut (slice t) idx) :
core_ops_index_IndexMut (array t n) idx = {
- indexInst = core_array_Array_coreopsindexIndexInst t idx n inst.indexInst;
+ indexInst = core_ops_index_IndexArrayInst t idx n inst.indexInst;
index_mut = core_array_Array_index_mut t idx n inst;
index_mut_back = core_array_Array_index_mut_back t idx n inst;
}
@@ -651,13 +651,13 @@ let core_slice_index_usize_index_mut_back
admit () // TODO
// Trait implementation: [core::slice::index::private_slice_index::usize]
-let core_slice_index_private_slice_index_usize_coresliceindexprivate_slice_indexSealedInst
+let core_slice_index_private_slice_index_SealedUsizeInst
: core_slice_index_private_slice_index_Sealed usize = ()
// Trait implementation: [core::slice::index::usize]
-let core_slice_index_usize_coresliceindexSliceIndexInst (t : Type0) :
+let core_slice_index_SliceIndexUsizeSliceTInst (t : Type0) :
core_slice_index_SliceIndex usize (slice t) = {
- sealedInst = core_slice_index_private_slice_index_usize_coresliceindexprivate_slice_indexSealedInst;
+ sealedInst = core_slice_index_private_slice_index_SealedUsizeInst;
output = t;
get = core_slice_index_usize_get t;
get_mut = core_slice_index_usize_get_mut t;
@@ -706,24 +706,24 @@ let alloc_vec_Vec_coreopsindexIndexMutInst (t idx : Type0)
let alloc_vec_Vec_index_eq (#a : Type0) (v : alloc_vec_Vec a) (i : usize) :
Lemma (
- alloc_vec_Vec_index a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i ==
+ alloc_vec_Vec_index a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i ==
alloc_vec_Vec_index_usize v i)
- [SMTPat (alloc_vec_Vec_index a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i)]
+ [SMTPat (alloc_vec_Vec_index a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i)]
=
admit()
let alloc_vec_Vec_index_mut_eq (#a : Type0) (v : alloc_vec_Vec a) (i : usize) :
Lemma (
- alloc_vec_Vec_index_mut a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i ==
+ alloc_vec_Vec_index_mut a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i ==
alloc_vec_Vec_index_usize v i)
- [SMTPat (alloc_vec_Vec_index_mut a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i)]
+ [SMTPat (alloc_vec_Vec_index_mut a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i)]
=
admit()
let alloc_vec_Vec_index_mut_back_eq (#a : Type0) (v : alloc_vec_Vec a) (i : usize) (x : a) :
Lemma (
- alloc_vec_Vec_index_mut_back a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i x ==
+ alloc_vec_Vec_index_mut_back a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i x ==
alloc_vec_Vec_update_usize v i x)
- [SMTPat (alloc_vec_Vec_index_mut_back a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i x)]
+ [SMTPat (alloc_vec_Vec_index_mut_back a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i x)]
=
admit()
diff --git a/tests/fstar/traits/Traits.fst b/tests/fstar/traits/Traits.fst
index 318efa2b..4cb9fbf1 100644
--- a/tests/fstar/traits/Traits.fst
+++ b/tests/fstar/traits/Traits.fst
@@ -5,186 +5,238 @@ open Primitives
#set-options "--z3rlimit 50 --fuel 1 --ifuel 1"
-(** Trait declaration: [traits::BoolTrait] *)
+(** Trait declaration: [traits::BoolTrait]
+ Source: 'src/traits.rs', lines 1:0-1:19 *)
noeq type boolTrait_t (self : Type0) = { get_bool : self -> result bool; }
-(** [traits::Bool::{0}::get_bool]: forward function *)
+(** [traits::{bool}::get_bool]: forward function
+ Source: 'src/traits.rs', lines 12:4-12:30 *)
let bool_get_bool (self : bool) : result bool =
Return self
-(** Trait implementation: [traits::Bool::{0}] *)
-let bool_BoolTraitInst : boolTrait_t bool = { get_bool = bool_get_bool; }
+(** Trait implementation: [traits::{bool}]
+ Source: 'src/traits.rs', lines 11:0-11:23 *)
+let traits_BoolTraitBoolInst : boolTrait_t bool = { get_bool = bool_get_bool; }
-(** [traits::BoolTrait::ret_true]: forward function *)
+(** [traits::BoolTrait::ret_true]: forward function
+ Source: 'src/traits.rs', lines 6:4-6:30 *)
let boolTrait_ret_true
(#self : Type0) (self_clause : boolTrait_t self) (self0 : self) :
result bool
=
Return true
-(** [traits::test_bool_trait_bool]: forward function *)
+(** [traits::test_bool_trait_bool]: forward function
+ Source: 'src/traits.rs', lines 17:0-17:44 *)
let test_bool_trait_bool (x : bool) : result bool =
let* b = bool_get_bool x in
- if b then boolTrait_ret_true bool_BoolTraitInst x else Return false
+ if b then boolTrait_ret_true traits_BoolTraitBoolInst x else Return false
-(** [traits::Option::{1}::get_bool]: forward function *)
+(** [traits::{core::option::Option<T>#1}::get_bool]: forward function
+ Source: 'src/traits.rs', lines 23:4-23:30 *)
let option_get_bool (t : Type0) (self : option t) : result bool =
begin match self with | None -> Return false | Some x -> Return true end
-(** Trait implementation: [traits::Option::{1}] *)
-let option_BoolTraitInst (t : Type0) : boolTrait_t (option t) = {
+(** Trait implementation: [traits::{core::option::Option<T>#1}]
+ Source: 'src/traits.rs', lines 22:0-22:31 *)
+let traits_BoolTraitcoreoptionOptionTInst (t : Type0) : boolTrait_t (option t)
+ = {
get_bool = option_get_bool t;
}
-(** [traits::test_bool_trait_option]: forward function *)
+(** [traits::test_bool_trait_option]: forward function
+ Source: 'src/traits.rs', lines 31:0-31:54 *)
let test_bool_trait_option (t : Type0) (x : option t) : result bool =
let* b = option_get_bool t x in
- if b then boolTrait_ret_true (option_BoolTraitInst t) x else Return false
-
-(** [traits::test_bool_trait]: forward function *)
-let test_bool_trait (t : Type0) (inst : boolTrait_t t) (x : t) : result bool =
- inst.get_bool x
-
-(** Trait declaration: [traits::ToU64] *)
+ if b
+ then boolTrait_ret_true (traits_BoolTraitcoreoptionOptionTInst t) x
+ else Return false
+
+(** [traits::test_bool_trait]: forward function
+ Source: 'src/traits.rs', lines 35:0-35:50 *)
+let test_bool_trait
+ (t : Type0) (boolTraitTInst : boolTrait_t t) (x : t) : result bool =
+ boolTraitTInst.get_bool x
+
+(** Trait declaration: [traits::ToU64]
+ Source: 'src/traits.rs', lines 39:0-39:15 *)
noeq type toU64_t (self : Type0) = { to_u64 : self -> result u64; }
-(** [traits::u64::{2}::to_u64]: forward function *)
+(** [traits::{u64#2}::to_u64]: forward function
+ Source: 'src/traits.rs', lines 44:4-44:26 *)
let u64_to_u64 (self : u64) : result u64 =
Return self
-(** Trait implementation: [traits::u64::{2}] *)
-let u64_ToU64Inst : toU64_t u64 = { to_u64 = u64_to_u64; }
+(** Trait implementation: [traits::{u64#2}]
+ Source: 'src/traits.rs', lines 43:0-43:18 *)
+let traits_ToU64U64Inst : toU64_t u64 = { to_u64 = u64_to_u64; }
-(** [traits::Tuple2::{3}::to_u64]: forward function *)
-let tuple2_to_u64
- (a : Type0) (inst : toU64_t a) (self : (a & a)) : result u64 =
+(** [traits::{(A, A)#3}::to_u64]: forward function
+ Source: 'src/traits.rs', lines 50:4-50:26 *)
+let pair_to_u64
+ (a : Type0) (toU64AInst : toU64_t a) (self : (a & a)) : result u64 =
let (x, x0) = self in
- let* i = inst.to_u64 x in
- let* i0 = inst.to_u64 x0 in
+ let* i = toU64AInst.to_u64 x in
+ let* i0 = toU64AInst.to_u64 x0 in
u64_add i i0
-(** Trait implementation: [traits::Tuple2::{3}] *)
-let tuple2_ToU64Inst (a : Type0) (inst : toU64_t a) : toU64_t (a & a) = {
- to_u64 = tuple2_to_u64 a inst;
+(** Trait implementation: [traits::{(A, A)#3}]
+ Source: 'src/traits.rs', lines 49:0-49:31 *)
+let traits_ToU64TupleAAInst (a : Type0) (toU64AInst : toU64_t a) : toU64_t (a &
+ a) = {
+ to_u64 = pair_to_u64 a toU64AInst;
}
-(** [traits::f]: forward function *)
-let f (t : Type0) (inst : toU64_t t) (x : (t & t)) : result u64 =
- tuple2_to_u64 t inst x
+(** [traits::f]: forward function
+ Source: 'src/traits.rs', lines 55:0-55:36 *)
+let f (t : Type0) (toU64TInst : toU64_t t) (x : (t & t)) : result u64 =
+ pair_to_u64 t toU64TInst x
-(** [traits::g]: forward function *)
-let g (t : Type0) (inst : toU64_t (t & t)) (x : (t & t)) : result u64 =
- inst.to_u64 x
+(** [traits::g]: forward function
+ Source: 'src/traits.rs', lines 59:0-61:18 *)
+let g
+ (t : Type0) (toU64TupleTTInst : toU64_t (t & t)) (x : (t & t)) : result u64 =
+ toU64TupleTTInst.to_u64 x
-(** [traits::h0]: forward function *)
+(** [traits::h0]: forward function
+ Source: 'src/traits.rs', lines 66:0-66:24 *)
let h0 (x : u64) : result u64 =
u64_to_u64 x
-(** [traits::Wrapper] *)
+(** [traits::Wrapper]
+ Source: 'src/traits.rs', lines 70:0-70:21 *)
type wrapper_t (t : Type0) = { x : t; }
-(** [traits::Wrapper::{4}::to_u64]: forward function *)
+(** [traits::{traits::Wrapper<T>#4}::to_u64]: forward function
+ Source: 'src/traits.rs', lines 75:4-75:26 *)
let wrapper_to_u64
- (t : Type0) (inst : toU64_t t) (self : wrapper_t t) : result u64 =
- inst.to_u64 self.x
-
-(** Trait implementation: [traits::Wrapper::{4}] *)
-let wrapper_ToU64Inst (t : Type0) (inst : toU64_t t) : toU64_t (wrapper_t t)
- = {
- to_u64 = wrapper_to_u64 t inst;
+ (t : Type0) (toU64TInst : toU64_t t) (self : wrapper_t t) : result u64 =
+ toU64TInst.to_u64 self.x
+
+(** Trait implementation: [traits::{traits::Wrapper<T>#4}]
+ Source: 'src/traits.rs', lines 74:0-74:35 *)
+let traits_ToU64traitsWrapperTInst (t : Type0) (toU64TInst : toU64_t t) :
+ toU64_t (wrapper_t t) = {
+ to_u64 = wrapper_to_u64 t toU64TInst;
}
-(** [traits::h1]: forward function *)
+(** [traits::h1]: forward function
+ Source: 'src/traits.rs', lines 80:0-80:33 *)
let h1 (x : wrapper_t u64) : result u64 =
- wrapper_to_u64 u64 u64_ToU64Inst x
+ wrapper_to_u64 u64 traits_ToU64U64Inst x
-(** [traits::h2]: forward function *)
-let h2 (t : Type0) (inst : toU64_t t) (x : wrapper_t t) : result u64 =
- wrapper_to_u64 t inst x
+(** [traits::h2]: forward function
+ Source: 'src/traits.rs', lines 84:0-84:41 *)
+let h2 (t : Type0) (toU64TInst : toU64_t t) (x : wrapper_t t) : result u64 =
+ wrapper_to_u64 t toU64TInst x
-(** Trait declaration: [traits::ToType] *)
+(** Trait declaration: [traits::ToType]
+ Source: 'src/traits.rs', lines 88:0-88:19 *)
noeq type toType_t (self t : Type0) = { to_type : self -> result t; }
-(** [traits::u64::{5}::to_type]: forward function *)
+(** [traits::{u64#5}::to_type]: forward function
+ Source: 'src/traits.rs', lines 93:4-93:28 *)
let u64_to_type (self : u64) : result bool =
Return (self > 0)
-(** Trait implementation: [traits::u64::{5}] *)
-let u64_ToTypeInst : toType_t u64 bool = { to_type = u64_to_type; }
+(** Trait implementation: [traits::{u64#5}]
+ Source: 'src/traits.rs', lines 92:0-92:25 *)
+let traits_ToTypeU64BoolInst : toType_t u64 bool = { to_type = u64_to_type; }
-(** Trait declaration: [traits::OfType] *)
+(** Trait declaration: [traits::OfType]
+ Source: 'src/traits.rs', lines 98:0-98:16 *)
noeq type ofType_t (self : Type0) = {
- of_type : (t : Type0) -> (inst : toType_t t self) -> t -> result self;
+ of_type : (t : Type0) -> (toTypeTSelfInst : toType_t t self) -> t -> result
+ self;
}
-(** [traits::h3]: forward function *)
+(** [traits::h3]: forward function
+ Source: 'src/traits.rs', lines 104:0-104:50 *)
let h3
- (t1 t2 : Type0) (inst : ofType_t t1) (inst0 : toType_t t2 t1) (y : t2) :
+ (t1 t2 : Type0) (ofTypeT1Inst : ofType_t t1) (toTypeT2T1Inst : toType_t t2
+ t1) (y : t2) :
result t1
=
- inst.of_type t2 inst0 y
+ ofTypeT1Inst.of_type t2 toTypeT2T1Inst y
-(** Trait declaration: [traits::OfTypeBis] *)
+(** Trait declaration: [traits::OfTypeBis]
+ Source: 'src/traits.rs', lines 109:0-109:36 *)
noeq type ofTypeBis_t (self t : Type0) = {
- parent_clause_0 : toType_t t self;
+ toTypeTSelfInst : toType_t t self;
of_type : t -> result self;
}
-(** [traits::h4]: forward function *)
+(** [traits::h4]: forward function
+ Source: 'src/traits.rs', lines 118:0-118:57 *)
let h4
- (t1 t2 : Type0) (inst : ofTypeBis_t t1 t2) (inst0 : toType_t t2 t1)
- (y : t2) :
+ (t1 t2 : Type0) (ofTypeBisT1T2Inst : ofTypeBis_t t1 t2) (toTypeT2T1Inst :
+ toType_t t2 t1) (y : t2) :
result t1
=
- inst.of_type y
+ ofTypeBisT1T2Inst.of_type y
-(** [traits::TestType] *)
+(** [traits::TestType]
+ Source: 'src/traits.rs', lines 122:0-122:22 *)
type testType_t (t : Type0) = { _0 : t; }
-(** [traits::TestType::{6}::test::TestType1] *)
+(** [traits::{traits::TestType<T>#6}::test::TestType1]
+ Source: 'src/traits.rs', lines 127:8-127:24 *)
type testType_test_TestType1_t = { _0 : u64; }
-(** Trait declaration: [traits::TestType::{6}::test::TestTrait] *)
+(** Trait declaration: [traits::{traits::TestType<T>#6}::test::TestTrait]
+ Source: 'src/traits.rs', lines 128:8-128:23 *)
noeq type testType_test_TestTrait_t (self : Type0) = {
test : self -> result bool;
}
-(** [traits::TestType::{6}::test::TestType1::{0}::test]: forward function *)
+(** [traits::{traits::TestType<T>#6}::test::{traits::{traits::TestType<T>#6}::test::TestType1}::test]: forward function
+ Source: 'src/traits.rs', lines 139:12-139:34 *)
let testType_test_TestType1_test
(self : testType_test_TestType1_t) : result bool =
Return (self._0 > 1)
-(** Trait implementation: [traits::TestType::{6}::test::TestType1::{0}] *)
-let testType_test_TestType1_TestType_test_TestTraitInst :
+(** Trait implementation: [traits::{traits::TestType<T>#6}::test::{traits::{traits::TestType<T>#6}::test::TestType1}]
+ Source: 'src/traits.rs', lines 138:8-138:36 *)
+let traits_TestType_test_TestTraittraitstraitsTestTypeTtestTestType1Inst :
testType_test_TestTrait_t testType_test_TestType1_t = {
test = testType_test_TestType1_test;
}
-(** [traits::TestType::{6}::test]: forward function *)
+(** [traits::{traits::TestType<T>#6}::test]: forward function
+ Source: 'src/traits.rs', lines 126:4-126:36 *)
let testType_test
- (t : Type0) (inst : toU64_t t) (self : testType_t t) (x : t) : result bool =
- let* x0 = inst.to_u64 x in
+ (t : Type0) (toU64TInst : toU64_t t) (self : testType_t t) (x : t) :
+ result bool
+ =
+ let* x0 = toU64TInst.to_u64 x in
if x0 > 0 then testType_test_TestType1_test { _0 = 0 } else Return false
-(** [traits::BoolWrapper] *)
+(** [traits::BoolWrapper]
+ Source: 'src/traits.rs', lines 150:0-150:22 *)
type boolWrapper_t = { _0 : bool; }
-(** [traits::BoolWrapper::{7}::to_type]: forward function *)
+(** [traits::{traits::BoolWrapper#7}::to_type]: forward function
+ Source: 'src/traits.rs', lines 156:4-156:25 *)
let boolWrapper_to_type
- (t : Type0) (inst : toType_t bool t) (self : boolWrapper_t) : result t =
- inst.to_type self._0
+ (t : Type0) (toTypeBoolTInst : toType_t bool t) (self : boolWrapper_t) :
+ result t
+ =
+ toTypeBoolTInst.to_type self._0
-(** Trait implementation: [traits::BoolWrapper::{7}] *)
-let boolWrapper_ToTypeInst (t : Type0) (inst : toType_t bool t) : toType_t
- boolWrapper_t t = {
- to_type = boolWrapper_to_type t inst;
+(** Trait implementation: [traits::{traits::BoolWrapper#7}]
+ Source: 'src/traits.rs', lines 152:0-152:33 *)
+let traits_ToTypetraitsBoolWrapperTInst (t : Type0) (toTypeBoolTInst : toType_t
+ bool t) : toType_t boolWrapper_t t = {
+ to_type = boolWrapper_to_type t toTypeBoolTInst;
}
-(** [traits::WithConstTy::LEN2] *)
+(** [traits::WithConstTy::LEN2]
+ Source: 'src/traits.rs', lines 164:4-164:21 *)
let with_const_ty_len2_body : result usize = Return 32
let with_const_ty_len2_c : usize = eval_global with_const_ty_len2_body
-(** Trait declaration: [traits::WithConstTy] *)
+(** Trait declaration: [traits::WithConstTy]
+ Source: 'src/traits.rs', lines 161:0-161:39 *)
noeq type withConstTy_t (self : Type0) (len : usize) = {
cLEN1 : usize;
cLEN2 : usize;
@@ -194,108 +246,137 @@ noeq type withConstTy_t (self : Type0) (len : usize) = {
f : tW -> array u8 len -> result tW;
}
-(** [traits::Bool::{8}::LEN1] *)
+(** [traits::{bool#8}::LEN1]
+ Source: 'src/traits.rs', lines 175:4-175:21 *)
let bool_len1_body : result usize = Return 12
let bool_len1_c : usize = eval_global bool_len1_body
-(** [traits::Bool::{8}::f]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [traits::{bool#8}::f]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/traits.rs', lines 180:4-180:39 *)
let bool_f (i : u64) (a : array u8 32) : result u64 =
Return i
-(** Trait implementation: [traits::Bool::{8}] *)
-let bool_WithConstTyInst : withConstTy_t bool 32 = {
+(** Trait implementation: [traits::{bool#8}]
+ Source: 'src/traits.rs', lines 174:0-174:29 *)
+let traits_WithConstTyBool32Inst : withConstTy_t bool 32 = {
cLEN1 = bool_len1_c;
cLEN2 = with_const_ty_len2_c;
tV = u8;
tW = u64;
- tW_clause_0 = u64_ToU64Inst;
+ tW_clause_0 = traits_ToU64U64Inst;
f = bool_f;
}
-(** [traits::use_with_const_ty1]: forward function *)
+(** [traits::use_with_const_ty1]: forward function
+ Source: 'src/traits.rs', lines 183:0-183:75 *)
let use_with_const_ty1
- (h : Type0) (len : usize) (inst : withConstTy_t h len) : result usize =
- let i = inst.cLEN1 in Return i
+ (h : Type0) (len : usize) (withConstTyHLENInst : withConstTy_t h len) :
+ result usize
+ =
+ let i = withConstTyHLENInst.cLEN1 in Return i
-(** [traits::use_with_const_ty2]: forward function *)
+(** [traits::use_with_const_ty2]: forward function
+ Source: 'src/traits.rs', lines 187:0-187:73 *)
let use_with_const_ty2
- (h : Type0) (len : usize) (inst : withConstTy_t h len) (w : inst.tW) :
+ (h : Type0) (len : usize) (withConstTyHLENInst : withConstTy_t h len)
+ (w : withConstTyHLENInst.tW) :
result unit
=
Return ()
-(** [traits::use_with_const_ty3]: forward function *)
+(** [traits::use_with_const_ty3]: forward function
+ Source: 'src/traits.rs', lines 189:0-189:80 *)
let use_with_const_ty3
- (h : Type0) (len : usize) (inst : withConstTy_t h len) (x : inst.tW) :
+ (h : Type0) (len : usize) (withConstTyHLENInst : withConstTy_t h len)
+ (x : withConstTyHLENInst.tW) :
result u64
=
- inst.tW_clause_0.to_u64 x
+ withConstTyHLENInst.tW_clause_0.to_u64 x
-(** [traits::test_where1]: forward function *)
+(** [traits::test_where1]: forward function
+ Source: 'src/traits.rs', lines 193:0-193:40 *)
let test_where1 (t : Type0) (_x : t) : result unit =
Return ()
-(** [traits::test_where2]: forward function *)
+(** [traits::test_where2]: forward function
+ Source: 'src/traits.rs', lines 194:0-194:57 *)
let test_where2
- (t : Type0) (inst : withConstTy_t t 32) (_x : u32) : result unit =
+ (t : Type0) (withConstTyT32Inst : withConstTy_t t 32) (_x : u32) :
+ result unit
+ =
Return ()
-(** [alloc::string::String] *)
+(** [alloc::string::String]
+ Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/alloc/src/string.rs', lines 365:0-365:17 *)
assume type alloc_string_String_t : Type0
-(** Trait declaration: [traits::ParentTrait0] *)
+(** Trait declaration: [traits::ParentTrait0]
+ Source: 'src/traits.rs', lines 200:0-200:22 *)
noeq type parentTrait0_t (self : Type0) = {
tW : Type0;
get_name : self -> result alloc_string_String_t;
get_w : self -> result tW;
}
-(** Trait declaration: [traits::ParentTrait1] *)
+(** Trait declaration: [traits::ParentTrait1]
+ Source: 'src/traits.rs', lines 205:0-205:22 *)
type parentTrait1_t (self : Type0) = unit
-(** Trait declaration: [traits::ChildTrait] *)
+(** Trait declaration: [traits::ChildTrait]
+ Source: 'src/traits.rs', lines 206:0-206:49 *)
noeq type childTrait_t (self : Type0) = {
- parent_clause_0 : parentTrait0_t self;
- parent_clause_1 : parentTrait1_t self;
+ parentTrait0SelfInst : parentTrait0_t self;
+ parentTrait1SelfInst : parentTrait1_t self;
}
-(** [traits::test_child_trait1]: forward function *)
+(** [traits::test_child_trait1]: forward function
+ Source: 'src/traits.rs', lines 209:0-209:56 *)
let test_child_trait1
- (t : Type0) (inst : childTrait_t t) (x : t) : result alloc_string_String_t =
- inst.parent_clause_0.get_name x
+ (t : Type0) (childTraitTInst : childTrait_t t) (x : t) :
+ result alloc_string_String_t
+ =
+ childTraitTInst.parentTrait0SelfInst.get_name x
-(** [traits::test_child_trait2]: forward function *)
+(** [traits::test_child_trait2]: forward function
+ Source: 'src/traits.rs', lines 213:0-213:54 *)
let test_child_trait2
- (t : Type0) (inst : childTrait_t t) (x : t) :
- result inst.parent_clause_0.tW
+ (t : Type0) (childTraitTInst : childTrait_t t) (x : t) :
+ result childTraitTInst.parentTrait0SelfInst.tW
=
- inst.parent_clause_0.get_w x
+ childTraitTInst.parentTrait0SelfInst.get_w x
-(** [traits::order1]: forward function *)
+(** [traits::order1]: forward function
+ Source: 'src/traits.rs', lines 219:0-219:59 *)
let order1
- (t u : Type0) (inst : parentTrait0_t t) (inst0 : parentTrait0_t u) :
+ (t u : Type0) (parentTrait0TInst : parentTrait0_t t) (parentTrait0UInst :
+ parentTrait0_t u) :
result unit
=
Return ()
-(** Trait declaration: [traits::ChildTrait1] *)
+(** Trait declaration: [traits::ChildTrait1]
+ Source: 'src/traits.rs', lines 222:0-222:35 *)
noeq type childTrait1_t (self : Type0) = {
- parent_clause_0 : parentTrait1_t self;
+ parentTrait1SelfInst : parentTrait1_t self;
}
-(** Trait implementation: [traits::usize::{9}] *)
-let usize_ParentTrait1Inst : parentTrait1_t usize = ()
+(** Trait implementation: [traits::{usize#9}]
+ Source: 'src/traits.rs', lines 224:0-224:27 *)
+let traits_ParentTrait1UsizeInst : parentTrait1_t usize = ()
-(** Trait implementation: [traits::usize::{10}] *)
-let usize_ChildTrait1Inst : childTrait1_t usize = {
- parent_clause_0 = usize_ParentTrait1Inst;
+(** Trait implementation: [traits::{usize#10}]
+ Source: 'src/traits.rs', lines 225:0-225:26 *)
+let traits_ChildTrait1UsizeInst : childTrait1_t usize = {
+ parentTrait1SelfInst = traits_ParentTrait1UsizeInst;
}
-(** Trait declaration: [traits::Iterator] *)
+(** Trait declaration: [traits::Iterator]
+ Source: 'src/traits.rs', lines 229:0-229:18 *)
noeq type iterator_t (self : Type0) = { tItem : Type0; }
-(** Trait declaration: [traits::IntoIterator] *)
+(** Trait declaration: [traits::IntoIterator]
+ Source: 'src/traits.rs', lines 233:0-233:22 *)
noeq type intoIterator_t (self : Type0) = {
tItem : Type0;
tIntoIter : Type0;
@@ -303,69 +384,84 @@ noeq type intoIterator_t (self : Type0) = {
into_iter : self -> result tIntoIter;
}
-(** Trait declaration: [traits::FromResidual] *)
+(** Trait declaration: [traits::FromResidual]
+ Source: 'src/traits.rs', lines 250:0-250:21 *)
type fromResidual_t (self t : Type0) = unit
-(** Trait declaration: [traits::Try] *)
+(** Trait declaration: [traits::Try]
+ Source: 'src/traits.rs', lines 246:0-246:48 *)
noeq type try_t (self : Type0) = {
tResidual : Type0;
- parent_clause_0 : fromResidual_t self tResidual;
+ fromResidualSelftraitsTrySelfResidualInst : fromResidual_t self tResidual;
}
-(** Trait declaration: [traits::WithTarget] *)
+(** Trait declaration: [traits::WithTarget]
+ Source: 'src/traits.rs', lines 252:0-252:20 *)
noeq type withTarget_t (self : Type0) = { tTarget : Type0; }
-(** Trait declaration: [traits::ParentTrait2] *)
+(** Trait declaration: [traits::ParentTrait2]
+ Source: 'src/traits.rs', lines 256:0-256:22 *)
noeq type parentTrait2_t (self : Type0) = {
tU : Type0;
tU_clause_0 : withTarget_t tU;
}
-(** Trait declaration: [traits::ChildTrait2] *)
+(** Trait declaration: [traits::ChildTrait2]
+ Source: 'src/traits.rs', lines 260:0-260:35 *)
noeq type childTrait2_t (self : Type0) = {
- parent_clause_0 : parentTrait2_t self;
- convert : parent_clause_0.tU -> result parent_clause_0.tU_clause_0.tTarget;
+ parentTrait2SelfInst : parentTrait2_t self;
+ convert : parentTrait2SelfInst.tU -> result
+ parentTrait2SelfInst.tU_clause_0.tTarget;
}
-(** Trait implementation: [traits::u32::{11}] *)
-let u32_WithTargetInst : withTarget_t u32 = { tTarget = u32; }
+(** Trait implementation: [traits::{u32#11}]
+ Source: 'src/traits.rs', lines 264:0-264:23 *)
+let traits_WithTargetU32Inst : withTarget_t u32 = { tTarget = u32; }
-(** Trait implementation: [traits::u32::{12}] *)
-let u32_ParentTrait2Inst : parentTrait2_t u32 = {
+(** Trait implementation: [traits::{u32#12}]
+ Source: 'src/traits.rs', lines 268:0-268:25 *)
+let traits_ParentTrait2U32Inst : parentTrait2_t u32 = {
tU = u32;
- tU_clause_0 = u32_WithTargetInst;
+ tU_clause_0 = traits_WithTargetU32Inst;
}
-(** [traits::u32::{13}::convert]: forward function *)
+(** [traits::{u32#13}::convert]: forward function
+ Source: 'src/traits.rs', lines 273:4-273:29 *)
let u32_convert (x : u32) : result u32 =
Return x
-(** Trait implementation: [traits::u32::{13}] *)
-let u32_ChildTrait2Inst : childTrait2_t u32 = {
- parent_clause_0 = u32_ParentTrait2Inst;
+(** Trait implementation: [traits::{u32#13}]
+ Source: 'src/traits.rs', lines 272:0-272:24 *)
+let traits_ChildTrait2U32Inst : childTrait2_t u32 = {
+ parentTrait2SelfInst = traits_ParentTrait2U32Inst;
convert = u32_convert;
}
-(** [traits::incr_u32]: forward function *)
-let incr_u32 (x : u32) : result u32 =
- u32_add x 1
-
-(** Trait declaration: [traits::CFnOnce] *)
+(** Trait declaration: [traits::CFnOnce]
+ Source: 'src/traits.rs', lines 286:0-286:23 *)
noeq type cFnOnce_t (self args : Type0) = {
tOutput : Type0;
call_once : self -> args -> result tOutput;
}
-(** Trait declaration: [traits::CFnMut] *)
+(** Trait declaration: [traits::CFnMut]
+ Source: 'src/traits.rs', lines 292:0-292:37 *)
noeq type cFnMut_t (self args : Type0) = {
- parent_clause_0 : cFnOnce_t self args;
- call_mut : self -> args -> result parent_clause_0.tOutput;
- call_mut_back : self -> args -> parent_clause_0.tOutput -> result self;
+ cFnOnceSelfArgsInst : cFnOnce_t self args;
+ call_mut : self -> args -> result cFnOnceSelfArgsInst.tOutput;
+ call_mut_back : self -> args -> cFnOnceSelfArgsInst.tOutput -> result self;
}
-(** Trait declaration: [traits::CFn] *)
+(** Trait declaration: [traits::CFn]
+ Source: 'src/traits.rs', lines 296:0-296:33 *)
noeq type cFn_t (self args : Type0) = {
- parent_clause_0 : cFnMut_t self args;
- call_mut : self -> args -> result parent_clause_0.parent_clause_0.tOutput;
+ cFnMutSelfArgsInst : cFnMut_t self args;
+ call_mut : self -> args -> result
+ cFnMutSelfArgsInst.cFnOnceSelfArgsInst.tOutput;
}
+(** [traits::incr_u32]: forward function
+ Source: 'src/traits.rs', lines 300:0-300:30 *)
+let incr_u32 (x : u32) : result u32 =
+ u32_add x 1
+