summaryrefslogtreecommitdiff
path: root/tests/fstar
diff options
context:
space:
mode:
authorSon Ho2023-11-21 14:57:38 +0100
committerSon Ho2023-11-21 14:57:38 +0100
commit137cc7335e64fcb70c254e7fd2a6fa353fb43e61 (patch)
treef703dc52640670ad9e634ea0d6cc93c0c98cbede /tests/fstar
parentd564a010893653edea0df518e0b740fadf7df031 (diff)
Regenerate the files
Diffstat (limited to '')
-rw-r--r--tests/fstar/array/Array.Clauses.Template.fst6
-rw-r--r--tests/fstar/array/Array.Funs.fst186
-rw-r--r--tests/fstar/array/Array.Types.fst3
-rw-r--r--tests/fstar/betree/BetreeMain.Clauses.Template.fst45
-rw-r--r--tests/fstar/betree/BetreeMain.Funs.fst168
-rw-r--r--tests/fstar/betree/BetreeMain.Opaque.fsti15
-rw-r--r--tests/fstar/betree/BetreeMain.Types.fsti27
-rw-r--r--tests/fstar/betree_back_stateful/BetreeMain.Clauses.Template.fst45
-rw-r--r--tests/fstar/betree_back_stateful/BetreeMain.Funs.fst183
-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/hashmap/Hashmap.Clauses.Template.fst27
-rw-r--r--tests/fstar/hashmap/Hashmap.Funs.fst114
-rw-r--r--tests/fstar/hashmap/Hashmap.Types.fst6
-rw-r--r--tests/fstar/hashmap_on_disk/HashmapMain.Clauses.Template.fst27
-rw-r--r--tests/fstar/hashmap_on_disk/HashmapMain.Funs.fst120
-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/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.fst183
-rw-r--r--tests/fstar/misc/Loops.Types.fst3
-rw-r--r--tests/fstar/misc/NoNestedBorrows.fst207
-rw-r--r--tests/fstar/misc/Paper.fst33
-rw-r--r--tests/fstar/misc/PoloniusList.fst9
-rw-r--r--tests/fstar/traits/Traits.fst219
29 files changed, 1244 insertions, 622 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 50fff38d..a8722a4f 100644
--- a/tests/fstar/array/Array.Funs.fst
+++ b/tests/fstar/array/Array.Funs.fst
@@ -8,84 +8,102 @@ 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_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_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)
@@ -94,20 +112,24 @@ let slice_subslice_mut__back
(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
@@ -115,7 +137,8 @@ let array_subslice_shared_
(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
@@ -123,7 +146,8 @@ let array_subslice_mut_
(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)
@@ -133,21 +157,25 @@ let array_subslice_mut__back
(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,7 +291,8 @@ 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
@@ -262,27 +307,33 @@ let range_all : result unit =
(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))
@@ -296,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))
@@ -316,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_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
@@ -353,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/betree/BetreeMain.Clauses.Template.fst b/tests/fstar/betree/BetreeMain.Clauses.Template.fst
index 4d16d8d3..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::{betree_main::betree::List<T>#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::{betree_main::betree::List<T>#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::{betree_main::betree::List<(u64, T)>#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_ListTupleU64T_partition_at_pivot_decreases (t : Type0)
(self : betree_List_t (u64 & t)) (pivot : u64) : nat =
admit ()
-(** [betree_main::betree::{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::{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::{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::{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::{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::{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::{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::{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::{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::{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::{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::{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.Funs.fst b/tests/fstar/betree/BetreeMain.Funs.fst
index 2ccbac60..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::{betree_main::betree::NodeIdCounter}::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::{betree_main::betree::NodeIdCounter}::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::{betree_main::betree::NodeIdCounter}::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::{betree_main::betree::List<T>#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::{betree_main::betree::List<T>#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)))
@@ -107,14 +119,16 @@ let rec betree_List_split_at
end
(** [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 ()) *)
+ (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::{betree_main::betree::List<T>#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::{betree_main::betree::List<T>#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,14 +146,16 @@ let betree_List_pop_front_back
| Betree_List_Nil -> Fail Failure
end
-(** [betree_main::betree::{betree_main::betree::List<T>#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::{betree_main::betree::List<(u64, T)>#2}::head_has_key]: forward function *)
+(** [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
@@ -146,7 +163,8 @@ let betree_ListTupleU64T_head_has_key
| Betree_List_Nil -> Return false
end
-(** [betree_main::betree::{betree_main::betree::List<(u64, T)>#2}::partition_at_pivot]: forward function *)
+(** [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))))
@@ -165,7 +183,8 @@ let rec betree_ListTupleU64T_partition_at_pivot
| Betree_List_Nil -> Return (Betree_List_Nil, Betree_List_Nil)
end
-(** [betree_main::betree::{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::{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::{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::{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,7 +258,8 @@ let rec betree_Node_lookup_first_message_for_key_back
| Betree_List_Nil -> Return ret
end
-(** [betree_main::betree::{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) :
@@ -263,7 +286,8 @@ let rec betree_Node_apply_upserts
Betree_Message_Insert v) in
Return (st0, v)
-(** [betree_main::betree::{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) :
@@ -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::{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::{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::{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::{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::{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)
@@ -446,7 +475,8 @@ and betree_Node_lookup_back
end
(** [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 ()) *)
+ (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::{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::{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)) :
@@ -500,7 +532,8 @@ let rec betree_Node_lookup_first_message_after_key_back
end
(** [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 ()) *)
+ (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) :
@@ -559,7 +592,8 @@ let betree_Node_apply_to_internal
betree_Node_lookup_first_message_for_key_back key msgs msgs1
(** [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 ()) *)
+ (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::{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::{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)) :
@@ -608,7 +644,8 @@ let rec betree_Node_lookup_mut_in_bindings_back
end
(** [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 ()) *)
+ (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) :
@@ -648,7 +685,8 @@ let betree_Node_apply_to_leaf
end
(** [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 ()) *)
+ (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::{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)
@@ -703,7 +742,8 @@ let rec betree_Internal_flush
st in
Return (st0, msgs_left)
-(** [betree_main::betree::{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)
@@ -738,7 +778,8 @@ and betree_Internal_flush_back
st in
Return ({ self with right = n }, node_id_cnt0)
-(** [betree_main::betree::{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)
@@ -778,7 +819,8 @@ and betree_Node_apply_messages
Return (st1, ())
end
-(** [betree_main::betree::{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)
@@ -821,7 +863,8 @@ and betree_Node_apply_messages_back
Return (Betree_Node_Leaf { node with size = len }, node_id_cnt)
end
-(** [betree_main::betree::{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)
@@ -837,7 +880,8 @@ let betree_Node_apply
(key, new_msg) l) st in
Return (st0, ())
-(** [betree_main::betree::{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)
@@ -848,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_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)
@@ -864,7 +909,8 @@ let betree_BeTree_new
root = (Betree_Node_Leaf { id = id; size = 0 })
})
-(** [betree_main::betree::{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)
@@ -875,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_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
@@ -884,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_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)
@@ -895,26 +943,30 @@ let betree_BeTree_insert
in
Return (st0, ())
-(** [betree_main::betree::{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_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_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_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) :
@@ -925,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_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) :
@@ -933,20 +986,23 @@ let betree_BeTree_upsert_back
=
betree_BeTree_apply_back self key (Betree_Message_Upsert upd) st
-(** [betree_main::betree::{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_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 23d2e60e..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::{core::option::Option<T>}::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_back_stateful/BetreeMain.Clauses.Template.fst b/tests/fstar/betree_back_stateful/BetreeMain.Clauses.Template.fst
index 4d16d8d3..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::{betree_main::betree::List<T>#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::{betree_main::betree::List<T>#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::{betree_main::betree::List<(u64, T)>#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_ListTupleU64T_partition_at_pivot_decreases (t : Type0)
(self : betree_List_t (u64 & t)) (pivot : u64) : nat =
admit ()
-(** [betree_main::betree::{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::{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::{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::{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::{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::{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::{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::{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::{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::{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::{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::{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.Funs.fst b/tests/fstar/betree_back_stateful/BetreeMain.Funs.fst
index b46ca0a0..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::{betree_main::betree::NodeIdCounter}::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::{betree_main::betree::NodeIdCounter}::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::{betree_main::betree::NodeIdCounter}::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::{betree_main::betree::List<T>#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::{betree_main::betree::List<T>#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)))
@@ -107,14 +119,16 @@ let rec betree_List_split_at
end
(** [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 ()) *)
+ (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::{betree_main::betree::List<T>#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::{betree_main::betree::List<T>#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,14 +146,16 @@ let betree_List_pop_front_back
| Betree_List_Nil -> Fail Failure
end
-(** [betree_main::betree::{betree_main::betree::List<T>#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::{betree_main::betree::List<(u64, T)>#2}::head_has_key]: forward function *)
+(** [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
@@ -146,7 +163,8 @@ let betree_ListTupleU64T_head_has_key
| Betree_List_Nil -> Return false
end
-(** [betree_main::betree::{betree_main::betree::List<(u64, T)>#2}::partition_at_pivot]: forward function *)
+(** [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))))
@@ -165,7 +183,8 @@ let rec betree_ListTupleU64T_partition_at_pivot
| Betree_List_Nil -> Return (Betree_List_Nil, Betree_List_Nil)
end
-(** [betree_main::betree::{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::{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::{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::{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::{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::{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,7 +295,8 @@ let rec betree_Node_lookup_first_message_for_key_back
| Betree_List_Nil -> Return ret
end
-(** [betree_main::betree::{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) :
@@ -298,7 +323,8 @@ let rec betree_Node_apply_upserts
Betree_Message_Insert v) in
Return (st0, v)
-(** [betree_main::betree::{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) :
@@ -325,7 +351,8 @@ let rec betree_Node_apply_upserts_back
Betree_Message_Insert v) in
Return (st0, msgs0)
-(** [betree_main::betree::{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::{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::{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::{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::{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))
@@ -487,7 +518,8 @@ and betree_Node_lookup_back
end
(** [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 ()) *)
+ (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::{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::{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)) :
@@ -541,7 +575,8 @@ let rec betree_Node_lookup_first_message_after_key_back
end
(** [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 ()) *)
+ (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) :
@@ -600,7 +635,8 @@ let betree_Node_apply_to_internal
betree_Node_lookup_first_message_for_key_back key msgs msgs1
(** [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 ()) *)
+ (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::{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::{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)) :
@@ -649,7 +687,8 @@ let rec betree_Node_lookup_mut_in_bindings_back
end
(** [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 ()) *)
+ (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) :
@@ -689,7 +728,8 @@ let betree_Node_apply_to_leaf
end
(** [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 ()) *)
+ (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::{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)
@@ -753,7 +794,8 @@ let rec betree_Internal_flush
st st1 in
Return (st2, msgs_left)
-(** [betree_main::betree::{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)
@@ -803,7 +845,8 @@ and betree_Internal_flush_back'a
st st2 in
Return (st0, ({ self with right = n }, node_id_cnt0))
-(** [betree_main::betree::{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)
@@ -853,7 +896,8 @@ and betree_Internal_flush_back1
st st2 in
Return (st0, ())
-(** [betree_main::betree::{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)
@@ -894,7 +938,8 @@ and betree_Node_apply_messages
Return (st1, ())
end
-(** [betree_main::betree::{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)
@@ -940,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::{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)
@@ -982,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::{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)
@@ -999,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::{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)
@@ -1018,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::{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)
@@ -1037,7 +1086,8 @@ let betree_Node_apply_back1
(key, new_msg) l) st st2 in
Return (st0, ())
-(** [betree_main::betree::{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)
@@ -1053,7 +1103,8 @@ let betree_BeTree_new
root = (Betree_Node_Leaf { id = id; size = 0 })
})
-(** [betree_main::betree::{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)
@@ -1065,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_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) :
@@ -1081,7 +1133,8 @@ let betree_BeTree_apply_back
st2 in
Return (st0, { self with node_id_cnt = nic; root = n })
-(** [betree_main::betree::{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)
@@ -1092,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_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)
:
@@ -1104,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_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
@@ -1112,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_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)
@@ -1122,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_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) :
@@ -1134,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_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) :
@@ -1146,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_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_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)
@@ -1161,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 23d2e60e..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::{core::option::Option<T>}::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/hashmap/Hashmap.Clauses.Template.fst b/tests/fstar/hashmap/Hashmap.Clauses.Template.fst
index d6156720..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::HashMap<T>}::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::HashMap<T>}::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::HashMap<T>}::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::HashMap<T>}::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::HashMap<T>}::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::HashMap<T>}::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::HashMap<T>}::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::HashMap<T>}::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::HashMap<T>}::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 77e0b46a..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::HashMap<T>}::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::HashMap<T>}::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::HashMap<T>}::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::HashMap<T>}::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::HashMap<T>}::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/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)))
@@ -72,16 +78,19 @@ let rec hashMap_clear_loop
else Return slots
(** [hashmap::{hashmap::HashMap<T>}::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/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::HashMap<T>}::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::HashMap<T>}::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::HashMap<T>}::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::HashMap<T>}::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::HashMap<T>}::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::HashMap<T>}::insert_no_resize]: 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/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)
@@ -153,7 +166,8 @@ let hashMap_insert_no_resize
Return { self with slots = v }
(** [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 ()) *)
+ (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))
@@ -167,13 +181,15 @@ let rec hashMap_move_elements_from_list_loop
end
(** [hashmap::{hashmap::HashMap<T>}::move_elements_from_list]: 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/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::HashMap<T>}::move_elements]: 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/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) :
@@ -197,7 +213,8 @@ let rec hashMap_move_elements_loop
else Return (ntable, slots)
(** [hashmap::{hashmap::HashMap<T>}::move_elements]: 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/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) :
@@ -206,7 +223,8 @@ let hashMap_move_elements
hashMap_move_elements_loop t ntable slots i
(** [hashmap::{hashmap::HashMap<T>}::try_resize]: 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/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
@@ -225,7 +243,8 @@ let hashMap_try_resize
else Return { self with max_load_factor = (i, i0) }
(** [hashmap::{hashmap::HashMap<T>}::insert]: 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/hashmap.rs', lines 129:4-129:48 *)
let hashMap_insert
(t : Type0) (self : hashMap_t t) (key : usize) (value : t) :
result (hashMap_t t)
@@ -234,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::HashMap<T>}::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)
@@ -248,12 +268,14 @@ let rec hashMap_contains_key_in_list_loop
| List_Nil -> Return false
end
-(** [hashmap::{hashmap::HashMap<T>}::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::HashMap<T>}::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
@@ -265,7 +287,8 @@ let hashMap_contains_key
hash_mod in
hashMap_contains_key_in_list t key l
-(** [hashmap::{hashmap::HashMap<T>}::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))
@@ -276,11 +299,13 @@ let rec hashMap_get_in_list_loop
| List_Nil -> Fail Failure
end
-(** [hashmap::{hashmap::HashMap<T>}::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::HashMap<T>}::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
@@ -291,7 +316,8 @@ let hashMap_get (t : Type0) (self : hashMap_t t) (key : usize) : result t =
hash_mod in
hashMap_get_in_list t key l
-(** [hashmap::{hashmap::HashMap<T>}::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))
@@ -302,12 +328,14 @@ let rec hashMap_get_mut_in_list_loop
| List_Nil -> Fail Failure
end
-(** [hashmap::{hashmap::HashMap<T>}::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::HashMap<T>}::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))
@@ -323,12 +351,14 @@ let rec hashMap_get_mut_in_list_loop_back
| List_Nil -> Fail Failure
end
-(** [hashmap::{hashmap::HashMap<T>}::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::HashMap<T>}::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
@@ -339,7 +369,8 @@ let hashMap_get_mut (t : Type0) (self : hashMap_t t) (key : usize) : result t =
hash_mod in
hashMap_get_mut_in_list t l key
-(** [hashmap::{hashmap::HashMap<T>}::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)
@@ -358,7 +389,8 @@ let hashMap_get_mut_back
hash_mod l0 in
Return { self with slots = v }
-(** [hashmap::{hashmap::HashMap<T>}::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))
@@ -377,12 +409,14 @@ let rec hashMap_remove_from_list_loop
| List_Nil -> Return None
end
-(** [hashmap::{hashmap::HashMap<T>}::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::HashMap<T>}::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))
@@ -403,12 +437,14 @@ let rec hashMap_remove_from_list_loop_back
| List_Nil -> Return List_Nil
end
-(** [hashmap::{hashmap::HashMap<T>}::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::HashMap<T>}::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
@@ -424,7 +460,8 @@ let hashMap_remove
| Some x0 -> let* _ = usize_sub self.num_entries 1 in Return (Some x0)
end
-(** [hashmap::{hashmap::HashMap<T>}::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
@@ -453,7 +490,8 @@ let hashMap_remove_back
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_on_disk/HashmapMain.Clauses.Template.fst b/tests/fstar/hashmap_on_disk/HashmapMain.Clauses.Template.fst
index 106fa94b..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_main::hashmap::HashMap<T>}::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_main::hashmap::HashMap<T>}::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_main::hashmap::HashMap<T>}::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_main::hashmap::HashMap<T>}::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_main::hashmap::HashMap<T>}::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_main::hashmap::HashMap<T>}::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_main::hashmap::HashMap<T>}::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_main::hashmap::HashMap<T>}::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_main::hashmap::HashMap<T>}::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 30bcfb2e..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_main::hashmap::HashMap<T>}::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_main::hashmap::HashMap<T>}::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_main::hashmap::HashMap<T>}::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_main::hashmap::HashMap<T>}::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_main::hashmap::HashMap<T>}::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/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)))
@@ -74,18 +80,21 @@ let rec hashmap_HashMap_clear_loop
else Return slots
(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::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/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_main::hashmap::HashMap<T>}::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_main::hashmap::HashMap<T>}::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_main::hashmap::HashMap<T>}::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_main::hashmap::HashMap<T>}::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,7 +132,8 @@ 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_main::hashmap::HashMap<T>}::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)
@@ -129,7 +141,8 @@ let hashmap_HashMap_insert_in_list_back
hashmap_HashMap_insert_in_list_loop_back t key value ls
(** [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 ()) *)
+ (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)
@@ -160,7 +173,8 @@ let hashmap_HashMap_insert_no_resize
Return { self with slots = v }
(** [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 ()) *)
+ (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))
@@ -175,7 +189,8 @@ let rec hashmap_HashMap_move_elements_from_list_loop
end
(** [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 ()) *)
+ (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)
@@ -183,7 +198,8 @@ let hashmap_HashMap_move_elements_from_list
hashmap_HashMap_move_elements_from_list_loop t ntable ls
(** [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 ()) *)
+ (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) :
@@ -209,7 +225,8 @@ let rec hashmap_HashMap_move_elements_loop
else Return (ntable, slots)
(** [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 ()) *)
+ (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) :
@@ -218,7 +235,8 @@ let hashmap_HashMap_move_elements
hashmap_HashMap_move_elements_loop t ntable slots i
(** [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 ()) *)
+ (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
@@ -237,7 +255,8 @@ let hashmap_HashMap_try_resize
else Return { self with max_load_factor = (i, i0) }
(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::insert]: 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/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_main::hashmap::HashMap<T>}::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_main::hashmap::HashMap<T>}::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_main::hashmap::HashMap<T>}::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
@@ -279,7 +301,8 @@ let hashmap_HashMap_contains_key
self.slots hash_mod in
hashmap_HashMap_contains_key_in_list t key l
-(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::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_main::hashmap::HashMap<T>}::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_main::hashmap::HashMap<T>}::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
@@ -310,7 +335,8 @@ let hashmap_HashMap_get
self.slots hash_mod in
hashmap_HashMap_get_in_list t key l
-(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::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_main::hashmap::HashMap<T>}::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_main::hashmap::HashMap<T>}::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_main::hashmap::HashMap<T>}::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_main::hashmap::HashMap<T>}::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
@@ -364,7 +394,8 @@ let hashmap_HashMap_get_mut
self.slots hash_mod in
hashmap_HashMap_get_mut_in_list t l key
-(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::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)
@@ -383,7 +414,8 @@ let hashmap_HashMap_get_mut_back
self.slots hash_mod l0 in
Return { self with slots = v }
-(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::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_main::hashmap::HashMap<T>}::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_main::hashmap::HashMap<T>}::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_main::hashmap::HashMap<T>}::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_main::hashmap::HashMap<T>}::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
@@ -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_main::hashmap::HashMap<T>}::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)
@@ -486,7 +523,8 @@ let hashmap_HashMap_remove_back
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/misc/Constants.fst b/tests/fstar/misc/Constants.fst
index 2f2fccdb..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::{constants::Wrap<T>}::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 3914a8eb..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::{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::{core::option::Option<T>}::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 4dd3a5dd..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))
@@ -69,11 +76,13 @@ let rec clear_loop
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,7 +169,8 @@ 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 =
@@ -160,7 +178,8 @@ let get_elem_mut
(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))
@@ -173,7 +192,8 @@ 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))
@@ -185,7 +205,8 @@ let get_elem_mut_back
alloc_vec_Vec_index_mut_back (list_t usize) usize
(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))
@@ -195,7 +216,8 @@ 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 =
@@ -203,20 +225,24 @@ let get_elem_shared
(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))
@@ -229,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))
@@ -251,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)
@@ -272,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))
@@ -295,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))
@@ -321,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))
@@ -349,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))
@@ -374,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))
@@ -398,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)))
@@ -425,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))
@@ -452,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))
@@ -477,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))
@@ -503,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))
@@ -530,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))
@@ -557,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))
@@ -584,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))
@@ -610,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))
@@ -637,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))
@@ -664,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 a6269f60..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,14 +143,16 @@ 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 = 0 in
let* b0 = alloc_boxed_Box_deref_mut_back i32 b 1 in
@@ -137,33 +162,39 @@ let test_box1 : result unit =
(** 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
@@ -172,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
@@ -189,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
@@ -213,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 ->
@@ -244,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 ->
@@ -252,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
@@ -266,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
@@ -275,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
@@ -315,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
@@ -406,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 ()
@@ -414,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/traits/Traits.fst b/tests/fstar/traits/Traits.fst
index 7edb27c1..669c1dff 100644
--- a/tests/fstar/traits/Traits.fst
+++ b/tests/fstar/traits/Traits.fst
@@ -5,135 +5,164 @@ 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}::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}] *)
+(** 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 traits_BoolTraitBoolInst x else Return false
-(** [traits::{core::option::Option<T>#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::{core::option::Option<T>#1}] *)
+(** 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 (traits_BoolTraitcoreoptionOptionTInst t) x
else Return false
-(** [traits::test_bool_trait]: forward function *)
+(** [traits::test_bool_trait]: forward function
+ Source: 'src/traits.rs', lines 35:0-35:50 *)
let test_bool_trait (t : Type0) (inst : boolTrait_t t) (x : t) : result bool =
inst.get_bool x
-(** Trait declaration: [traits::ToU64] *)
+(** 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}] *)
+(** 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::{(A, A)#3}::to_u64]: forward function *)
+(** [traits::{(A, A)#3}::to_u64]: forward function
+ Source: 'src/traits.rs', lines 50:4-50:26 *)
let pair_to_u64 (a : Type0) (inst : 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
u64_add i i0
-(** Trait implementation: [traits::{(A, A)#3}] *)
+(** Trait implementation: [traits::{(A, A)#3}]
+ Source: 'src/traits.rs', lines 49:0-49:31 *)
let traits_ToU64TupleAAInst (a : Type0) (inst : toU64_t a) : toU64_t (a & a)
= {
to_u64 = pair_to_u64 a inst;
}
-(** [traits::f]: forward function *)
+(** [traits::f]: forward function
+ Source: 'src/traits.rs', lines 55:0-55:36 *)
let f (t : Type0) (inst : toU64_t t) (x : (t & t)) : result u64 =
pair_to_u64 t inst x
-(** [traits::g]: forward function *)
+(** [traits::g]: forward function
+ Source: 'src/traits.rs', lines 59:0-61:18 *)
let g (t : Type0) (inst : toU64_t (t & t)) (x : (t & t)) : result u64 =
inst.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::{traits::Wrapper<T>#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::{traits::Wrapper<T>#4}] *)
+(** Trait implementation: [traits::{traits::Wrapper<T>#4}]
+ Source: 'src/traits.rs', lines 74:0-74:35 *)
let traits_ToU64traitsWrapperTInst (t : Type0) (inst : toU64_t t) : toU64_t
(wrapper_t t) = {
to_u64 = wrapper_to_u64 t inst;
}
-(** [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 traits_ToU64U64Inst x
-(** [traits::h2]: forward function *)
+(** [traits::h2]: forward function
+ Source: 'src/traits.rs', lines 84:0-84:41 *)
let h2 (t : Type0) (inst : toU64_t t) (x : wrapper_t t) : result u64 =
wrapper_to_u64 t inst 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}] *)
+(** 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;
}
-(** [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) :
result t1
=
inst.of_type t2 inst0 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;
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) :
@@ -141,53 +170,64 @@ let h4
=
inst.of_type y
-(** [traits::TestType] *)
+(** [traits::TestType]
+ Source: 'src/traits.rs', lines 122:0-122:22 *)
type testType_t (t : Type0) = { _0 : t; }
-(** [traits::{traits::TestType<T>#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::{traits::TestType<T>#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::{traits::TestType<T>#6}::test::{traits::{traits::TestType<T>#6}::test::TestType1}::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::{traits::TestType<T>#6}::test::{traits::{traits::TestType<T>#6}::test::TestType1}] *)
+(** 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::{traits::TestType<T>#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
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::{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
-(** Trait implementation: [traits::{traits::BoolWrapper#7}] *)
+(** Trait implementation: [traits::{traits::BoolWrapper#7}]
+ Source: 'src/traits.rs', lines 152:0-152:33 *)
let traits_ToTypetraitsBoolWrapperTInst (t : Type0) (inst : toType_t bool t) :
toType_t boolWrapper_t t = {
to_type = boolWrapper_to_type t inst;
}
-(** [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;
@@ -197,16 +237,19 @@ 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 ()) *)
+ (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}] *)
+(** 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;
@@ -216,89 +259,106 @@ let traits_WithConstTyBool32Inst : withConstTy_t bool 32 = {
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
-(** [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) :
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) :
result u64
=
inst.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 =
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;
}
-(** [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
-(** [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
=
inst.parent_clause_0.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) :
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;
}
-(** Trait implementation: [traits::{usize#9}] *)
+(** 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}] *)
+(** Trait implementation: [traits::{usize#10}]
+ Source: 'src/traits.rs', lines 225:0-225:26 *)
let traits_ChildTrait1UsizeInst : childTrait1_t usize = {
parent_clause_0 = 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;
@@ -306,69 +366,82 @@ 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;
}
-(** 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;
}
-(** Trait implementation: [traits::{u32#11}] *)
+(** 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}] *)
+(** 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 = 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}] *)
+(** Trait implementation: [traits::{u32#13}]
+ Source: 'src/traits.rs', lines 272:0-272:24 *)
let traits_ChildTrait2U32Inst : childTrait2_t u32 = {
parent_clause_0 = traits_ParentTrait2U32Inst;
convert = u32_convert;
}
-(** 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;
}
-(** 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;
}
-(** [traits::incr_u32]: forward function *)
+(** [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