summaryrefslogtreecommitdiff
path: root/tests/coq
diff options
context:
space:
mode:
Diffstat (limited to 'tests/coq')
-rw-r--r--tests/coq/array/Array.v221
-rw-r--r--tests/coq/array/Primitives.v88
-rw-r--r--tests/coq/betree/BetreeMain_Funs.v198
-rw-r--r--tests/coq/betree/BetreeMain_Opaque.v15
-rw-r--r--tests/coq/betree/BetreeMain_Types.v27
-rw-r--r--tests/coq/betree/Primitives.v88
-rw-r--r--tests/coq/hashmap/Hashmap_Funs.v166
-rw-r--r--tests/coq/hashmap/Hashmap_Types.v6
-rw-r--r--tests/coq/hashmap/Primitives.v88
-rw-r--r--tests/coq/hashmap_on_disk/HashmapMain_Funs.v182
-rw-r--r--tests/coq/hashmap_on_disk/HashmapMain_Opaque.v6
-rw-r--r--tests/coq/hashmap_on_disk/HashmapMain_Types.v6
-rw-r--r--tests/coq/hashmap_on_disk/Primitives.v88
-rw-r--r--tests/coq/misc/Constants.v84
-rw-r--r--tests/coq/misc/External_Funs.v27
-rw-r--r--tests/coq/misc/External_Opaque.v15
-rw-r--r--tests/coq/misc/External_Types.v3
-rw-r--r--tests/coq/misc/Loops.v201
-rw-r--r--tests/coq/misc/NoNestedBorrows.v212
-rw-r--r--tests/coq/misc/Paper.v33
-rw-r--r--tests/coq/misc/PoloniusList.v9
-rw-r--r--tests/coq/misc/Primitives.v88
-rw-r--r--tests/coq/traits/Primitives.v88
-rw-r--r--tests/coq/traits/Traits.v434
24 files changed, 1460 insertions, 913 deletions
diff --git a/tests/coq/array/Array.v b/tests/coq/array/Array.v
index 825f73e0..99ff3b03 100644
--- a/tests/coq/array/Array.v
+++ b/tests/coq/array/Array.v
@@ -8,27 +8,32 @@ Import ListNotations.
Local Open Scope Primitives_scope.
Module Array.
-(** [array::AB] *)
+(** [array::AB]
+ Source: 'src/array.rs', lines 3:0-3:11 *)
Inductive AB_t := | AB_A : AB_t | AB_B : AB_t.
(** [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 *)
Definition incr (x : u32) : result u32 :=
u32_add x 1%u32.
-(** [array::array_to_shared_slice_]: forward function *)
+(** [array::array_to_shared_slice_]: forward function
+ Source: 'src/array.rs', lines 16:0-16:53 *)
Definition array_to_shared_slice_
(T : Type) (s : array T 32%usize) : result (slice T) :=
array_to_slice T 32%usize s
.
-(** [array::array_to_mut_slice_]: forward function *)
+(** [array::array_to_mut_slice_]: forward function
+ Source: 'src/array.rs', lines 21:0-21:58 *)
Definition array_to_mut_slice_
(T : Type) (s : array T 32%usize) : result (slice T) :=
array_to_slice T 32%usize 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 *)
Definition array_to_mut_slice__back
(T : Type) (s : array T 32%usize) (ret : slice T) :
result (array T 32%usize)
@@ -36,44 +41,52 @@ Definition array_to_mut_slice__back
array_from_slice T 32%usize s ret
.
-(** [array::array_len]: forward function *)
+(** [array::array_len]: forward function
+ Source: 'src/array.rs', lines 25:0-25:40 *)
Definition array_len (T : Type) (s : array T 32%usize) : result usize :=
s0 <- array_to_slice T 32%usize s; 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 *)
Definition shared_array_len (T : Type) (s : array T 32%usize) : result usize :=
s0 <- array_to_slice T 32%usize s; 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 *)
Definition shared_slice_len (T : Type) (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 *)
Definition index_array_shared
(T : Type) (s : array T 32%usize) (i : usize) : result T :=
array_index_usize T 32%usize s i
.
-(** [array::index_array_u32]: forward function *)
+(** [array::index_array_u32]: forward function
+ Source: 'src/array.rs', lines 44:0-44:53 *)
Definition index_array_u32 (s : array u32 32%usize) (i : usize) : result u32 :=
array_index_usize u32 32%usize s i
.
-(** [array::index_array_copy]: forward function *)
+(** [array::index_array_copy]: forward function
+ Source: 'src/array.rs', lines 48:0-48:45 *)
Definition index_array_copy (x : array u32 32%usize) : result u32 :=
array_index_usize u32 32%usize x 0%usize
.
-(** [array::index_mut_array]: forward function *)
+(** [array::index_mut_array]: forward function
+ Source: 'src/array.rs', lines 52:0-52:62 *)
Definition index_mut_array
(T : Type) (s : array T 32%usize) (i : usize) : result T :=
array_index_usize T 32%usize 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 *)
Definition index_mut_array_back
(T : Type) (s : array T 32%usize) (i : usize) (ret : T) :
result (array T 32%usize)
@@ -81,105 +94,120 @@ Definition index_mut_array_back
array_update_usize T 32%usize s i ret
.
-(** [array::index_slice]: forward function *)
+(** [array::index_slice]: forward function
+ Source: 'src/array.rs', lines 56:0-56:46 *)
Definition index_slice (T : Type) (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 *)
Definition index_mut_slice (T : Type) (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 *)
Definition index_mut_slice_back
(T : Type) (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 *)
Definition slice_subslice_shared_
(x : slice u32) (y : usize) (z : usize) : result (slice u32) :=
core_slice_index_Slice_index u32 (core_ops_range_Range usize)
- (core_slice_index_Range_coresliceindexSliceIndexInst u32) x
+ (core_slice_index_SliceIndexRangeUsizeSliceTInst u32) x
{| core_ops_range_Range_start := y; core_ops_range_Range_end_ := z |}
.
-(** [array::slice_subslice_mut_]: forward function *)
+(** [array::slice_subslice_mut_]: forward function
+ Source: 'src/array.rs', lines 68:0-68:75 *)
Definition slice_subslice_mut_
(x : slice u32) (y : usize) (z : usize) : result (slice u32) :=
core_slice_index_Slice_index_mut u32 (core_ops_range_Range usize)
- (core_slice_index_Range_coresliceindexSliceIndexInst u32) x
+ (core_slice_index_SliceIndexRangeUsizeSliceTInst u32) x
{| core_ops_range_Range_start := y; core_ops_range_Range_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 *)
Definition slice_subslice_mut__back
(x : slice u32) (y : usize) (z : usize) (ret : slice u32) :
result (slice u32)
:=
core_slice_index_Slice_index_mut_back u32 (core_ops_range_Range usize)
- (core_slice_index_Range_coresliceindexSliceIndexInst u32) x
+ (core_slice_index_SliceIndexRangeUsizeSliceTInst u32) x
{| core_ops_range_Range_start := y; core_ops_range_Range_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 *)
Definition array_to_slice_shared_
(x : array u32 32%usize) : result (slice u32) :=
array_to_slice u32 32%usize x
.
-(** [array::array_to_slice_mut_]: forward function *)
+(** [array::array_to_slice_mut_]: forward function
+ Source: 'src/array.rs', lines 76:0-76:59 *)
Definition array_to_slice_mut_ (x : array u32 32%usize) : result (slice u32) :=
array_to_slice u32 32%usize 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 *)
Definition array_to_slice_mut__back
(x : array u32 32%usize) (ret : slice u32) : result (array u32 32%usize) :=
array_from_slice u32 32%usize x ret
.
-(** [array::array_subslice_shared_]: forward function *)
+(** [array::array_subslice_shared_]: forward function
+ Source: 'src/array.rs', lines 80:0-80:74 *)
Definition array_subslice_shared_
(x : array u32 32%usize) (y : usize) (z : usize) : result (slice u32) :=
core_array_Array_index u32 (core_ops_range_Range usize) 32%usize
- (core_slice_index_Slice_coreopsindexIndexInst u32 (core_ops_range_Range
- usize) (core_slice_index_Range_coresliceindexSliceIndexInst u32)) x
+ (core_ops_index_IndexSliceTIInst u32 (core_ops_range_Range usize)
+ (core_slice_index_SliceIndexRangeUsizeSliceTInst u32)) x
{| core_ops_range_Range_start := y; core_ops_range_Range_end_ := z |}
.
-(** [array::array_subslice_mut_]: forward function *)
+(** [array::array_subslice_mut_]: forward function
+ Source: 'src/array.rs', lines 84:0-84:79 *)
Definition array_subslice_mut_
(x : array u32 32%usize) (y : usize) (z : usize) : result (slice u32) :=
core_array_Array_index_mut u32 (core_ops_range_Range usize) 32%usize
- (core_slice_index_Slice_coreopsindexIndexMutInst u32 (core_ops_range_Range
- usize) (core_slice_index_Range_coresliceindexSliceIndexInst u32)) x
+ (core_ops_index_IndexMutSliceTIInst u32 (core_ops_range_Range usize)
+ (core_slice_index_SliceIndexRangeUsizeSliceTInst u32)) x
{| core_ops_range_Range_start := y; core_ops_range_Range_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 *)
Definition array_subslice_mut__back
(x : array u32 32%usize) (y : usize) (z : usize) (ret : slice u32) :
result (array u32 32%usize)
:=
core_array_Array_index_mut_back u32 (core_ops_range_Range usize) 32%usize
- (core_slice_index_Slice_coreopsindexIndexMutInst u32 (core_ops_range_Range
- usize) (core_slice_index_Range_coresliceindexSliceIndexInst u32)) x
+ (core_ops_index_IndexMutSliceTIInst u32 (core_ops_range_Range usize)
+ (core_slice_index_SliceIndexRangeUsizeSliceTInst u32)) x
{| core_ops_range_Range_start := y; core_ops_range_Range_end_ := z |} ret
.
-(** [array::index_slice_0]: forward function *)
+(** [array::index_slice_0]: forward function
+ Source: 'src/array.rs', lines 88:0-88:38 *)
Definition index_slice_0 (T : Type) (s : slice T) : result T :=
slice_index_usize T s 0%usize
.
-(** [array::index_array_0]: forward function *)
+(** [array::index_array_0]: forward function
+ Source: 'src/array.rs', lines 92:0-92:42 *)
Definition index_array_0 (T : Type) (s : array T 32%usize) : result T :=
array_index_usize T 32%usize s 0%usize
.
-(** [array::index_index_array]: forward function *)
+(** [array::index_index_array]: forward function
+ Source: 'src/array.rs', lines 103:0-103:71 *)
Definition index_index_array
(s : array (array u32 32%usize) 32%usize) (i : usize) (j : usize) :
result u32
@@ -188,7 +216,8 @@ Definition index_index_array
array_index_usize u32 32%usize a j
.
-(** [array::update_update_array]: forward function *)
+(** [array::update_update_array]: forward function
+ Source: 'src/array.rs', lines 114:0-114:70 *)
Definition update_update_array
(s : array (array u32 32%usize) 32%usize) (i : usize) (j : usize) :
result unit
@@ -199,30 +228,36 @@ Definition update_update_array
Return tt
.
-(** [array::array_local_deep_copy]: forward function *)
+(** [array::array_local_deep_copy]: forward function
+ Source: 'src/array.rs', lines 118:0-118:43 *)
Definition array_local_deep_copy (x : array u32 32%usize) : result unit :=
Return tt
.
-(** [array::take_array]: forward function *)
+(** [array::take_array]: forward function
+ Source: 'src/array.rs', lines 122:0-122:30 *)
Definition take_array (a : array u32 2%usize) : result unit :=
Return tt.
-(** [array::take_array_borrow]: forward function *)
+(** [array::take_array_borrow]: forward function
+ Source: 'src/array.rs', lines 123:0-123:38 *)
Definition take_array_borrow (a : array u32 2%usize) : result unit :=
Return tt
.
-(** [array::take_slice]: forward function *)
+(** [array::take_slice]: forward function
+ Source: 'src/array.rs', lines 124:0-124:28 *)
Definition take_slice (s : slice u32) : result unit :=
Return tt.
(** [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 *)
Definition 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 *)
Definition take_all : result unit :=
_ <- take_array (mk_array u32 2%usize [ 0%u32; 0%u32 ]);
_ <- take_array_borrow (mk_array u32 2%usize [ 0%u32; 0%u32 ]);
@@ -234,32 +269,38 @@ Definition take_all : result unit :=
Return tt
.
-(** [array::index_array]: forward function *)
+(** [array::index_array]: forward function
+ Source: 'src/array.rs', lines 141:0-141:38 *)
Definition index_array (x : array u32 2%usize) : result u32 :=
array_index_usize u32 2%usize x 0%usize
.
-(** [array::index_array_borrow]: forward function *)
+(** [array::index_array_borrow]: forward function
+ Source: 'src/array.rs', lines 144:0-144:46 *)
Definition index_array_borrow (x : array u32 2%usize) : result u32 :=
array_index_usize u32 2%usize x 0%usize
.
-(** [array::index_slice_u32_0]: forward function *)
+(** [array::index_slice_u32_0]: forward function
+ Source: 'src/array.rs', lines 148:0-148:42 *)
Definition index_slice_u32_0 (x : slice u32) : result u32 :=
slice_index_usize u32 x 0%usize
.
-(** [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 *)
Definition index_mut_slice_u32_0 (x : slice u32) : result u32 :=
slice_index_usize u32 x 0%usize
.
-(** [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 *)
Definition index_mut_slice_u32_0_back (x : slice u32) : result (slice u32) :=
_ <- slice_index_usize u32 x 0%usize; Return x
.
-(** [array::index_all]: forward function *)
+(** [array::index_all]: forward function
+ Source: 'src/array.rs', lines 156:0-156:25 *)
Definition index_all : result u32 :=
i <- index_array (mk_array u32 2%usize [ 0%u32; 0%u32 ]);
i0 <- index_array (mk_array u32 2%usize [ 0%u32; 0%u32 ]);
@@ -277,25 +318,29 @@ Definition index_all : result u32 :=
Return i7
.
-(** [array::update_array]: forward function *)
+(** [array::update_array]: forward function
+ Source: 'src/array.rs', lines 170:0-170:36 *)
Definition update_array (x : array u32 2%usize) : result unit :=
_ <- array_update_usize u32 2%usize x 0%usize 1%u32; Return tt
.
(** [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 *)
Definition update_array_mut_borrow
(x : array u32 2%usize) : result (array u32 2%usize) :=
array_update_usize u32 2%usize x 0%usize 1%u32
.
(** [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 *)
Definition update_mut_slice (x : slice u32) : result (slice u32) :=
slice_update_usize u32 x 0%usize 1%u32
.
-(** [array::update_all]: forward function *)
+(** [array::update_all]: forward function
+ Source: 'src/array.rs', lines 180:0-180:19 *)
Definition update_all : result unit :=
_ <- update_array (mk_array u32 2%usize [ 0%u32; 0%u32 ]);
x <- update_array_mut_borrow (mk_array u32 2%usize [ 0%u32; 0%u32 ]);
@@ -305,13 +350,13 @@ Definition update_all : result unit :=
Return tt
.
-(** [array::range_all]: forward function *)
+(** [array::range_all]: forward function
+ Source: 'src/array.rs', lines 191:0-191:18 *)
Definition range_all : result unit :=
s <-
core_array_Array_index_mut u32 (core_ops_range_Range usize) 4%usize
- (core_slice_index_Slice_coreopsindexIndexMutInst u32
- (core_ops_range_Range usize)
- (core_slice_index_Range_coresliceindexSliceIndexInst u32))
+ (core_ops_index_IndexMutSliceTIInst u32 (core_ops_range_Range usize)
+ (core_slice_index_SliceIndexRangeUsizeSliceTInst u32))
(mk_array u32 4%usize [ 0%u32; 0%u32; 0%u32; 0%u32 ])
{|
core_ops_range_Range_start := 1%usize;
@@ -320,9 +365,8 @@ Definition range_all : result unit :=
s0 <- update_mut_slice s;
_ <-
core_array_Array_index_mut_back u32 (core_ops_range_Range usize) 4%usize
- (core_slice_index_Slice_coreopsindexIndexMutInst u32
- (core_ops_range_Range usize)
- (core_slice_index_Range_coresliceindexSliceIndexInst u32))
+ (core_ops_index_IndexMutSliceTIInst u32 (core_ops_range_Range usize)
+ (core_slice_index_SliceIndexRangeUsizeSliceTInst u32))
(mk_array u32 4%usize [ 0%u32; 0%u32; 0%u32; 0%u32 ])
{|
core_ops_range_Range_start := 1%usize;
@@ -331,32 +375,38 @@ Definition range_all : result unit :=
Return tt
.
-(** [array::deref_array_borrow]: forward function *)
+(** [array::deref_array_borrow]: forward function
+ Source: 'src/array.rs', lines 200:0-200:46 *)
Definition deref_array_borrow (x : array u32 2%usize) : result u32 :=
array_index_usize u32 2%usize x 0%usize
.
-(** [array::deref_array_mut_borrow]: forward function *)
+(** [array::deref_array_mut_borrow]: forward function
+ Source: 'src/array.rs', lines 205:0-205:54 *)
Definition deref_array_mut_borrow (x : array u32 2%usize) : result u32 :=
array_index_usize u32 2%usize x 0%usize
.
-(** [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 *)
Definition deref_array_mut_borrow_back
(x : array u32 2%usize) : result (array u32 2%usize) :=
_ <- array_index_usize u32 2%usize x 0%usize; Return x
.
-(** [array::take_array_t]: forward function *)
+(** [array::take_array_t]: forward function
+ Source: 'src/array.rs', lines 213:0-213:31 *)
Definition take_array_t (a : array AB_t 2%usize) : result unit :=
Return tt.
-(** [array::non_copyable_array]: forward function *)
+(** [array::non_copyable_array]: forward function
+ Source: 'src/array.rs', lines 215:0-215:27 *)
Definition non_copyable_array : result unit :=
_ <- take_array_t (mk_array AB_t 2%usize [ AB_A; AB_B ]); Return tt
.
-(** [array::sum]: loop 0: forward function *)
+(** [array::sum]: loop 0: forward function
+ Source: 'src/array.rs', lines 228:0-236:1 *)
Fixpoint sum_loop
(n : nat) (s : slice u32) (sum0 : u32) (i : usize) : result u32 :=
match n with
@@ -373,12 +423,14 @@ Fixpoint sum_loop
end
.
-(** [array::sum]: forward function *)
+(** [array::sum]: forward function
+ Source: 'src/array.rs', lines 228:0-228:28 *)
Definition sum (n : nat) (s : slice u32) : result u32 :=
sum_loop n s 0%u32 0%usize
.
-(** [array::sum2]: loop 0: forward function *)
+(** [array::sum2]: loop 0: forward function
+ Source: 'src/array.rs', lines 238:0-247:1 *)
Fixpoint sum2_loop
(n : nat) (s : slice u32) (s2 : slice u32) (sum0 : u32) (i : usize) :
result u32
@@ -399,14 +451,16 @@ Fixpoint sum2_loop
end
.
-(** [array::sum2]: forward function *)
+(** [array::sum2]: forward function
+ Source: 'src/array.rs', lines 238:0-238:41 *)
Definition sum2 (n : nat) (s : slice u32) (s2 : slice u32) : result u32 :=
let i := slice_len u32 s in
let i0 := slice_len u32 s2 in
if negb (i s= i0) then Fail_ Failure else sum2_loop n s s2 0%u32 0%usize
.
-(** [array::f0]: forward function *)
+(** [array::f0]: forward function
+ Source: 'src/array.rs', lines 249:0-249:11 *)
Definition f0 : result unit :=
s <- array_to_slice u32 2%usize (mk_array u32 2%usize [ 1%u32; 2%u32 ]);
s0 <- slice_update_usize u32 s 0%usize 1%u32;
@@ -414,7 +468,8 @@ Definition f0 : result unit :=
Return tt
.
-(** [array::f1]: forward function *)
+(** [array::f1]: forward function
+ Source: 'src/array.rs', lines 254:0-254:11 *)
Definition f1 : result unit :=
_ <-
array_update_usize u32 2%usize (mk_array u32 2%usize [ 1%u32; 2%u32 ])
@@ -422,20 +477,23 @@ Definition f1 : result unit :=
Return tt
.
-(** [array::f2]: forward function *)
+(** [array::f2]: forward function
+ Source: 'src/array.rs', lines 259:0-259:17 *)
Definition f2 (i : u32) : result unit :=
Return tt.
-(** [array::f4]: forward function *)
+(** [array::f4]: forward function
+ Source: 'src/array.rs', lines 268:0-268:54 *)
Definition f4
(x : array u32 32%usize) (y : usize) (z : usize) : result (slice u32) :=
core_array_Array_index u32 (core_ops_range_Range usize) 32%usize
- (core_slice_index_Slice_coreopsindexIndexInst u32 (core_ops_range_Range
- usize) (core_slice_index_Range_coresliceindexSliceIndexInst u32)) x
+ (core_ops_index_IndexSliceTIInst u32 (core_ops_range_Range usize)
+ (core_slice_index_SliceIndexRangeUsizeSliceTInst u32)) x
{| core_ops_range_Range_start := y; core_ops_range_Range_end_ := z |}
.
-(** [array::f3]: forward function *)
+(** [array::f3]: forward function
+ Source: 'src/array.rs', lines 261:0-261:18 *)
Definition f3 (n : nat) : result u32 :=
i <-
array_index_usize u32 2%usize (mk_array u32 2%usize [ 1%u32; 2%u32 ])
@@ -447,16 +505,19 @@ Definition f3 (n : nat) : result u32 :=
sum2 n s s0
.
-(** [array::SZ] *)
+(** [array::SZ]
+ Source: 'src/array.rs', lines 272:0-272:19 *)
Definition sz_body : result usize := Return 32%usize.
Definition sz_c : usize := sz_body%global.
-(** [array::f5]: forward function *)
+(** [array::f5]: forward function
+ Source: 'src/array.rs', lines 275:0-275:31 *)
Definition f5 (x : array u32 32%usize) : result u32 :=
array_index_usize u32 32%usize x 0%usize
.
-(** [array::ite]: forward function *)
+(** [array::ite]: forward function
+ Source: 'src/array.rs', lines 280:0-280:12 *)
Definition ite : result unit :=
s <- array_to_slice u32 2%usize (mk_array u32 2%usize [ 0%u32; 0%u32 ]);
s0 <- array_to_slice u32 2%usize (mk_array u32 2%usize [ 0%u32; 0%u32 ]);
diff --git a/tests/coq/array/Primitives.v b/tests/coq/array/Primitives.v
index 85e38f01..83f860b6 100644
--- a/tests/coq/array/Primitives.v
+++ b/tests/coq/array/Primitives.v
@@ -467,14 +467,14 @@ Definition alloc_boxed_Box_deref_mut (T : Type) (x : T) : result T := Return x.
Definition alloc_boxed_Box_deref_mut_back (T : Type) (_ : T) (x : T) : result T := Return x.
(* Trait instance *)
-Definition alloc_boxed_Box_coreOpsDerefInst (Self : Type) : core_ops_deref_Deref Self := {|
+Definition alloc_boxed_Box_coreopsDerefInst (Self : Type) : core_ops_deref_Deref Self := {|
core_ops_deref_Deref_target := Self;
core_ops_deref_Deref_deref := alloc_boxed_Box_deref Self;
|}.
(* Trait instance *)
-Definition alloc_boxed_Box_coreOpsDerefMutInst (Self : Type) : core_ops_deref_DerefMut Self := {|
- core_ops_deref_DerefMut_derefInst := alloc_boxed_Box_coreOpsDerefInst Self;
+Definition alloc_boxed_Box_coreopsDerefMutInst (Self : Type) : core_ops_deref_DerefMut Self := {|
+ core_ops_deref_DerefMut_derefInst := alloc_boxed_Box_coreopsDerefInst Self;
core_ops_deref_DerefMut_deref_mut := alloc_boxed_Box_deref_mut Self;
core_ops_deref_DerefMut_deref_mut_back := alloc_boxed_Box_deref_mut_back Self;
|}.
@@ -576,7 +576,7 @@ Definition alloc_vec_Vec_insert (T: Type) (v: alloc_vec_Vec T) (i: usize) (x: T)
else Fail_ Failure).
(* Helper *)
-Axiom alloc_vec_Vec_index_usize : forall {T : Type} (v : alloc_vec_Vec T) (i : usize) (x : T), result T.
+Axiom alloc_vec_Vec_index_usize : forall {T : Type} (v : alloc_vec_Vec T) (i : usize), result T.
(* Helper *)
Axiom alloc_vec_Vec_update_usize : forall {T : Type} (v : alloc_vec_Vec T) (i : usize) (x : T), result (alloc_vec_Vec T).
@@ -620,18 +620,18 @@ Definition core_slice_index_Slice_index
end.
(* [core::slice::index::Range:::get]: forward function *)
-Axiom core_slice_index_Range_get : forall (T : Type) (i : core_ops_range_Range usize) (s : slice T), result (option (slice T)).
+Axiom core_slice_index_RangeUsize_get : forall (T : Type) (i : core_ops_range_Range usize) (s : slice T), result (option (slice T)).
(* [core::slice::index::Range::get_mut]: forward function *)
-Axiom core_slice_index_Range_get_mut :
+Axiom core_slice_index_RangeUsize_get_mut :
forall (T : Type), core_ops_range_Range usize -> slice T -> result (option (slice T)).
(* [core::slice::index::Range::get_mut]: backward function 0 *)
-Axiom core_slice_index_Range_get_mut_back :
+Axiom core_slice_index_RangeUsize_get_mut_back :
forall (T : Type), core_ops_range_Range usize -> slice T -> option (slice T) -> result (slice T).
(* [core::slice::index::Range::get_unchecked]: forward function *)
-Definition core_slice_index_Range_get_unchecked
+Definition core_slice_index_RangeUsize_get_unchecked
(T : Type) :
core_ops_range_Range usize -> const_raw_ptr (slice T) -> result (const_raw_ptr (slice T)) :=
(* Don't know what the model should be - for now we always fail to make
@@ -639,7 +639,7 @@ Definition core_slice_index_Range_get_unchecked
fun _ _ => Fail_ Failure.
(* [core::slice::index::Range::get_unchecked_mut]: forward function *)
-Definition core_slice_index_Range_get_unchecked_mut
+Definition core_slice_index_RangeUsize_get_unchecked_mut
(T : Type) :
core_ops_range_Range usize -> mut_raw_ptr (slice T) -> result (mut_raw_ptr (slice T)) :=
(* Don't know what the model should be - for now we always fail to make
@@ -647,15 +647,15 @@ Definition core_slice_index_Range_get_unchecked_mut
fun _ _ => Fail_ Failure.
(* [core::slice::index::Range::index]: forward function *)
-Axiom core_slice_index_Range_index :
+Axiom core_slice_index_RangeUsize_index :
forall (T : Type), core_ops_range_Range usize -> slice T -> result (slice T).
(* [core::slice::index::Range::index_mut]: forward function *)
-Axiom core_slice_index_Range_index_mut :
+Axiom core_slice_index_RangeUsize_index_mut :
forall (T : Type), core_ops_range_Range usize -> slice T -> result (slice T).
(* [core::slice::index::Range::index_mut]: backward function 0 *)
-Axiom core_slice_index_Range_index_mut_back :
+Axiom core_slice_index_RangeUsize_index_mut_back :
forall (T : Type), core_ops_range_Range usize -> slice T -> slice T -> result (slice T).
(* [core::slice::index::[T]::index_mut]: forward function *)
@@ -683,44 +683,44 @@ Axiom core_array_Array_index_mut_back :
forall (T Idx : Type) (N : usize) (inst : core_ops_index_IndexMut (slice T) Idx)
(a : array T N) (i : Idx) (x : inst.(core_ops_index_IndexMut_indexInst).(core_ops_index_Index_Output)), result (array T N).
-(* Trait implementation: [core::slice::index::[T]] *)
-Definition core_slice_index_Slice_coreopsindexIndexInst (T Idx : Type)
- (inst : core_slice_index_SliceIndex Idx (slice T)) :
- core_ops_index_Index (slice T) Idx := {|
- core_ops_index_Index_Output := inst.(core_slice_index_SliceIndex_Output);
- core_ops_index_Index_index := core_slice_index_Slice_index T Idx inst;
-|}.
-
(* Trait implementation: [core::slice::index::private_slice_index::Range] *)
-Definition core_slice_index_private_slice_index_Range_coresliceindexprivate_slice_indexSealedInst
+Definition core_slice_index_private_slice_index_SealedRangeUsizeInst
: core_slice_index_private_slice_index_Sealed (core_ops_range_Range usize) := tt.
(* Trait implementation: [core::slice::index::Range] *)
-Definition core_slice_index_Range_coresliceindexSliceIndexInst (T : Type) :
+Definition core_slice_index_SliceIndexRangeUsizeSliceTInst (T : Type) :
core_slice_index_SliceIndex (core_ops_range_Range usize) (slice T) := {|
- core_slice_index_SliceIndex_sealedInst := core_slice_index_private_slice_index_Range_coresliceindexprivate_slice_indexSealedInst;
+ core_slice_index_SliceIndex_sealedInst := core_slice_index_private_slice_index_SealedRangeUsizeInst;
core_slice_index_SliceIndex_Output := slice T;
- core_slice_index_SliceIndex_get := core_slice_index_Range_get T;
- core_slice_index_SliceIndex_get_mut := core_slice_index_Range_get_mut T;
- core_slice_index_SliceIndex_get_mut_back := core_slice_index_Range_get_mut_back T;
- core_slice_index_SliceIndex_get_unchecked := core_slice_index_Range_get_unchecked T;
- core_slice_index_SliceIndex_get_unchecked_mut := core_slice_index_Range_get_unchecked_mut T;
- core_slice_index_SliceIndex_index := core_slice_index_Range_index T;
- core_slice_index_SliceIndex_index_mut := core_slice_index_Range_index_mut T;
- core_slice_index_SliceIndex_index_mut_back := core_slice_index_Range_index_mut_back T;
+ core_slice_index_SliceIndex_get := core_slice_index_RangeUsize_get T;
+ core_slice_index_SliceIndex_get_mut := core_slice_index_RangeUsize_get_mut T;
+ core_slice_index_SliceIndex_get_mut_back := core_slice_index_RangeUsize_get_mut_back T;
+ core_slice_index_SliceIndex_get_unchecked := core_slice_index_RangeUsize_get_unchecked T;
+ core_slice_index_SliceIndex_get_unchecked_mut := core_slice_index_RangeUsize_get_unchecked_mut T;
+ core_slice_index_SliceIndex_index := core_slice_index_RangeUsize_index T;
+ core_slice_index_SliceIndex_index_mut := core_slice_index_RangeUsize_index_mut T;
+ core_slice_index_SliceIndex_index_mut_back := core_slice_index_RangeUsize_index_mut_back T;
+|}.
+
+(* Trait implementation: [core::slice::index::[T]] *)
+Definition core_ops_index_IndexSliceTIInst (T Idx : Type)
+ (inst : core_slice_index_SliceIndex Idx (slice T)) :
+ core_ops_index_Index (slice T) Idx := {|
+ core_ops_index_Index_Output := inst.(core_slice_index_SliceIndex_Output);
+ core_ops_index_Index_index := core_slice_index_Slice_index T Idx inst;
|}.
(* Trait implementation: [core::slice::index::[T]] *)
-Definition core_slice_index_Slice_coreopsindexIndexMutInst (T Idx : Type)
+Definition core_ops_index_IndexMutSliceTIInst (T Idx : Type)
(inst : core_slice_index_SliceIndex Idx (slice T)) :
core_ops_index_IndexMut (slice T) Idx := {|
- core_ops_index_IndexMut_indexInst := core_slice_index_Slice_coreopsindexIndexInst T Idx inst;
+ core_ops_index_IndexMut_indexInst := core_ops_index_IndexSliceTIInst T Idx inst;
core_ops_index_IndexMut_index_mut := core_slice_index_Slice_index_mut T Idx inst;
core_ops_index_IndexMut_index_mut_back := core_slice_index_Slice_index_mut_back T Idx inst;
|}.
(* Trait implementation: [core::array::[T; N]] *)
-Definition core_array_Array_coreopsindexIndexInst (T Idx : Type) (N : usize)
+Definition core_ops_index_IndexArrayInst (T Idx : Type) (N : usize)
(inst : core_ops_index_Index (slice T) Idx) :
core_ops_index_Index (array T N) Idx := {|
core_ops_index_Index_Output := inst.(core_ops_index_Index_Output);
@@ -728,10 +728,10 @@ Definition core_array_Array_coreopsindexIndexInst (T Idx : Type) (N : usize)
|}.
(* Trait implementation: [core::array::[T; N]] *)
-Definition core_array_Array_coreopsindexIndexMutInst (T Idx : Type) (N : usize)
+Definition core_ops_index_IndexMutArrayInst (T Idx : Type) (N : usize)
(inst : core_ops_index_IndexMut (slice T) Idx) :
core_ops_index_IndexMut (array T N) Idx := {|
- core_ops_index_IndexMut_indexInst := core_array_Array_coreopsindexIndexInst T Idx N inst.(core_ops_index_IndexMut_indexInst);
+ core_ops_index_IndexMut_indexInst := core_ops_index_IndexArrayInst T Idx N inst.(core_ops_index_IndexMut_indexInst);
core_ops_index_IndexMut_index_mut := core_array_Array_index_mut T Idx N inst;
core_ops_index_IndexMut_index_mut_back := core_array_Array_index_mut_back T Idx N inst;
|}.
@@ -765,13 +765,13 @@ Axiom core_slice_index_usize_index_mut_back :
forall (T : Type), usize -> slice T -> T -> result (slice T).
(* Trait implementation: [core::slice::index::private_slice_index::usize] *)
-Definition core_slice_index_private_slice_index_usize_coresliceindexprivate_slice_indexSealedInst
+Definition core_slice_index_private_slice_index_SealedUsizeInst
: core_slice_index_private_slice_index_Sealed usize := tt.
(* Trait implementation: [core::slice::index::usize] *)
-Definition core_slice_index_usize_coresliceindexSliceIndexInst (T : Type) :
+Definition core_slice_index_SliceIndexUsizeSliceTInst (T : Type) :
core_slice_index_SliceIndex usize (slice T) := {|
- core_slice_index_SliceIndex_sealedInst := core_slice_index_private_slice_index_usize_coresliceindexprivate_slice_indexSealedInst;
+ core_slice_index_SliceIndex_sealedInst := core_slice_index_private_slice_index_SealedUsizeInst;
core_slice_index_SliceIndex_Output := T;
core_slice_index_SliceIndex_get := core_slice_index_usize_get T;
core_slice_index_SliceIndex_get_mut := core_slice_index_usize_get_mut T;
@@ -815,8 +815,16 @@ Definition alloc_vec_Vec_coreopsindexIndexMutInst (T Idx : Type)
(*** Theorems *)
+Axiom alloc_vec_Vec_index_eq : forall {a : Type} (v : alloc_vec_Vec a) (i : usize) (x : a),
+ alloc_vec_Vec_index a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i =
+ alloc_vec_Vec_index_usize v i.
+
+Axiom alloc_vec_Vec_index_mut_eq : forall {a : Type} (v : alloc_vec_Vec a) (i : usize) (x : a),
+ alloc_vec_Vec_index_mut a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i =
+ alloc_vec_Vec_index_usize v i.
+
Axiom alloc_vec_Vec_index_mut_back_eq : forall {a : Type} (v : alloc_vec_Vec a) (i : usize) (x : a),
- alloc_vec_Vec_index_mut_back a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i x =
+ alloc_vec_Vec_index_mut_back a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i x =
alloc_vec_Vec_update_usize v i x.
End Primitives.
diff --git a/tests/coq/betree/BetreeMain_Funs.v b/tests/coq/betree/BetreeMain_Funs.v
index 261e8270..8e48b17d 100644
--- a/tests/coq/betree/BetreeMain_Funs.v
+++ b/tests/coq/betree/BetreeMain_Funs.v
@@ -12,7 +12,8 @@ Require Export BetreeMain_Opaque.
Import BetreeMain_Opaque.
Module BetreeMain_Funs.
-(** [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 *)
Definition betree_load_internal_node
(id : u64) (st : state) :
result (state * (betree_List_t (u64 * betree_Message_t)))
@@ -20,7 +21,8 @@ Definition betree_load_internal_node
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 *)
Definition betree_store_internal_node
(id : u64) (content : betree_List_t (u64 * betree_Message_t)) (st : state) :
result (state * unit)
@@ -30,13 +32,15 @@ Definition betree_store_internal_node
Return (st0, tt)
.
-(** [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 *)
Definition 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 *)
Definition betree_store_leaf_node
(id : u64) (content : betree_List_t (u64 * u64)) (st : state) :
result (state * unit)
@@ -46,36 +50,42 @@ Definition betree_store_leaf_node
Return (st0, tt)
.
-(** [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 *)
Definition betree_fresh_node_id (counter : u64) : result u64 :=
_ <- u64_add counter 1%u64; 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 *)
Definition betree_fresh_node_id_back (counter : u64) : result u64 :=
u64_add counter 1%u64
.
-(** [betree_main::betree::NodeIdCounter::{0}::new]: forward function *)
+(** [betree_main::betree::{betree_main::betree::NodeIdCounter}::new]: forward function
+ Source: 'src/betree.rs', lines 206:4-206:20 *)
Definition betree_NodeIdCounter_new : result betree_NodeIdCounter_t :=
Return {| betree_NodeIdCounter_next_node_id := 0%u64 |}
.
-(** [betree_main::betree::NodeIdCounter::{0}::fresh_id]: forward function *)
+(** [betree_main::betree::{betree_main::betree::NodeIdCounter}::fresh_id]: forward function
+ Source: 'src/betree.rs', lines 210:4-210:36 *)
Definition betree_NodeIdCounter_fresh_id
(self : betree_NodeIdCounter_t) : result u64 :=
_ <- u64_add self.(betree_NodeIdCounter_next_node_id) 1%u64;
Return self.(betree_NodeIdCounter_next_node_id)
.
-(** [betree_main::betree::NodeIdCounter::{0}::fresh_id]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::NodeIdCounter}::fresh_id]: backward function 0
+ Source: 'src/betree.rs', lines 210:4-210:36 *)
Definition betree_NodeIdCounter_fresh_id_back
(self : betree_NodeIdCounter_t) : result betree_NodeIdCounter_t :=
i <- u64_add self.(betree_NodeIdCounter_next_node_id) 1%u64;
Return {| betree_NodeIdCounter_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 *)
Definition betree_upsert_update
(prev : option u64) (st : betree_UpsertFunState_t) : result u64 :=
match prev with
@@ -95,7 +105,8 @@ Definition betree_upsert_update
end
.
-(** [betree_main::betree::List::{1}::len]: forward function *)
+(** [betree_main::betree::{betree_main::betree::List<T>#1}::len]: forward function
+ Source: 'src/betree.rs', lines 276:4-276:24 *)
Fixpoint betree_List_len
(T : Type) (n : nat) (self : betree_List_t T) : result u64 :=
match n with
@@ -108,7 +119,8 @@ Fixpoint betree_List_len
end
.
-(** [betree_main::betree::List::{1}::split_at]: forward function *)
+(** [betree_main::betree::{betree_main::betree::List<T>#1}::split_at]: forward function
+ Source: 'src/betree.rs', lines 284:4-284:51 *)
Fixpoint betree_List_split_at
(T : Type) (n : nat) (self : betree_List_t T) (n0 : u64) :
result ((betree_List_t T) * (betree_List_t T))
@@ -131,8 +143,9 @@ Fixpoint betree_List_split_at
end
.
-(** [betree_main::betree::List::{1}::push_front]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [betree_main::betree::{betree_main::betree::List<T>#1}::push_front]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/betree.rs', lines 299:4-299:34 *)
Definition betree_List_push_front
(T : Type) (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
@@ -140,7 +153,8 @@ Definition betree_List_push_front
Return (Betree_List_Cons x l)
.
-(** [betree_main::betree::List::{1}::pop_front]: forward function *)
+(** [betree_main::betree::{betree_main::betree::List<T>#1}::pop_front]: forward function
+ Source: 'src/betree.rs', lines 306:4-306:32 *)
Definition betree_List_pop_front
(T : Type) (self : betree_List_t T) : result T :=
let ls := core_mem_replace (betree_List_t T) self Betree_List_Nil in
@@ -150,7 +164,8 @@ Definition betree_List_pop_front
end
.
-(** [betree_main::betree::List::{1}::pop_front]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::List<T>#1}::pop_front]: backward function 0
+ Source: 'src/betree.rs', lines 306:4-306:32 *)
Definition betree_List_pop_front_back
(T : Type) (self : betree_List_t T) : result (betree_List_t T) :=
let ls := core_mem_replace (betree_List_t T) self Betree_List_Nil in
@@ -160,7 +175,8 @@ Definition betree_List_pop_front_back
end
.
-(** [betree_main::betree::List::{1}::hd]: forward function *)
+(** [betree_main::betree::{betree_main::betree::List<T>#1}::hd]: forward function
+ Source: 'src/betree.rs', lines 318:4-318:22 *)
Definition betree_List_hd (T : Type) (self : betree_List_t T) : result T :=
match self with
| Betree_List_Cons hd l => Return hd
@@ -168,8 +184,9 @@ Definition betree_List_hd (T : Type) (self : betree_List_t T) : result T :=
end
.
-(** [betree_main::betree::List::{2}::head_has_key]: forward function *)
-Definition betree_List_head_has_key
+(** [betree_main::betree::{betree_main::betree::List<(u64, T)>#2}::head_has_key]: forward function
+ Source: 'src/betree.rs', lines 327:4-327:44 *)
+Definition betree_ListTupleU64T_head_has_key
(T : Type) (self : betree_List_t (u64 * T)) (key : u64) : result bool :=
match self with
| Betree_List_Cons hd l => let (i, _) := hd in Return (i s= key)
@@ -177,8 +194,9 @@ Definition betree_List_head_has_key
end
.
-(** [betree_main::betree::List::{2}::partition_at_pivot]: forward function *)
-Fixpoint betree_List_partition_at_pivot
+(** [betree_main::betree::{betree_main::betree::List<(u64, T)>#2}::partition_at_pivot]: forward function
+ Source: 'src/betree.rs', lines 339:4-339:73 *)
+Fixpoint betree_ListTupleU64T_partition_at_pivot
(T : Type) (n : nat) (self : betree_List_t (u64 * T)) (pivot : u64) :
result ((betree_List_t (u64 * T)) * (betree_List_t (u64 * T)))
:=
@@ -191,7 +209,7 @@ Fixpoint betree_List_partition_at_pivot
if i s>= pivot
then Return (Betree_List_Nil, Betree_List_Cons (i, t) tl)
else (
- p <- betree_List_partition_at_pivot T n0 tl pivot;
+ p <- betree_ListTupleU64T_partition_at_pivot T n0 tl pivot;
let (ls0, ls1) := p in
let l := ls0 in
Return (Betree_List_Cons (i, t) l, ls1))
@@ -200,7 +218,8 @@ Fixpoint betree_List_partition_at_pivot
end
.
-(** [betree_main::betree::Leaf::{3}::split]: forward function *)
+(** [betree_main::betree::{betree_main::betree::Leaf#3}::split]: forward function
+ Source: 'src/betree.rs', lines 359:4-364:17 *)
Definition betree_Leaf_split
(n : nat) (self : betree_Leaf_t) (content : betree_List_t (u64 * u64))
(params : betree_Params_t) (node_id_cnt : betree_NodeIdCounter_t)
@@ -233,7 +252,8 @@ Definition betree_Leaf_split
Return (st1, mkbetree_Internal_t self.(betree_Leaf_id) pivot n0 n1)
.
-(** [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 *)
Definition betree_Leaf_split_back
(n : nat) (self : betree_Leaf_t) (content : betree_List_t (u64 * u64))
(params : betree_Params_t) (node_id_cnt : betree_NodeIdCounter_t)
@@ -254,7 +274,8 @@ Definition betree_Leaf_split_back
betree_NodeIdCounter_fresh_id_back node_id_cnt0
.
-(** [betree_main::betree::Node::{5}::lookup_first_message_for_key]: forward function *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::lookup_first_message_for_key]: forward function
+ Source: 'src/betree.rs', lines 789:4-792:34 *)
Fixpoint betree_Node_lookup_first_message_for_key
(n : nat) (key : u64) (msgs : betree_List_t (u64 * betree_Message_t)) :
result (betree_List_t (u64 * betree_Message_t))
@@ -273,7 +294,8 @@ Fixpoint betree_Node_lookup_first_message_for_key
end
.
-(** [betree_main::betree::Node::{5}::lookup_first_message_for_key]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::lookup_first_message_for_key]: backward function 0
+ Source: 'src/betree.rs', lines 789:4-792:34 *)
Fixpoint betree_Node_lookup_first_message_for_key_back
(n : nat) (key : u64) (msgs : betree_List_t (u64 * betree_Message_t))
(ret : betree_List_t (u64 * betree_Message_t)) :
@@ -296,7 +318,8 @@ Fixpoint betree_Node_lookup_first_message_for_key_back
end
.
-(** [betree_main::betree::Node::{5}::apply_upserts]: forward function *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply_upserts]: forward function
+ Source: 'src/betree.rs', lines 819:4-819:90 *)
Fixpoint betree_Node_apply_upserts
(n : nat) (msgs : betree_List_t (u64 * betree_Message_t)) (prev : option u64)
(key : u64) (st : state) :
@@ -305,7 +328,7 @@ Fixpoint betree_Node_apply_upserts
match n with
| O => Fail_ OutOfFuel
| S n0 =>
- b <- betree_List_head_has_key betree_Message_t msgs key;
+ b <- betree_ListTupleU64T_head_has_key betree_Message_t msgs key;
if b
then (
msg <- betree_List_pop_front (u64 * betree_Message_t) msgs;
@@ -328,7 +351,8 @@ Fixpoint betree_Node_apply_upserts
end
.
-(** [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 *)
Fixpoint betree_Node_apply_upserts_back
(n : nat) (msgs : betree_List_t (u64 * betree_Message_t)) (prev : option u64)
(key : u64) (st : state) :
@@ -337,7 +361,7 @@ Fixpoint betree_Node_apply_upserts_back
match n with
| O => Fail_ OutOfFuel
| S n0 =>
- b <- betree_List_head_has_key betree_Message_t msgs key;
+ b <- betree_ListTupleU64T_head_has_key betree_Message_t msgs key;
if b
then (
msg <- betree_List_pop_front (u64 * betree_Message_t) msgs;
@@ -358,7 +382,8 @@ Fixpoint betree_Node_apply_upserts_back
end
.
-(** [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 *)
Fixpoint betree_Node_lookup_in_bindings
(n : nat) (key : u64) (bindings : betree_List_t (u64 * u64)) :
result (option u64)
@@ -380,7 +405,8 @@ Fixpoint betree_Node_lookup_in_bindings
end
.
-(** [betree_main::betree::Internal::{4}::lookup_in_children]: forward function *)
+(** [betree_main::betree::{betree_main::betree::Internal#4}::lookup_in_children]: forward function
+ Source: 'src/betree.rs', lines 395:4-395:63 *)
Fixpoint betree_Internal_lookup_in_children
(n : nat) (self : betree_Internal_t) (key : u64) (st : state) :
result (state * (option u64))
@@ -393,7 +419,8 @@ Fixpoint betree_Internal_lookup_in_children
else betree_Node_lookup n0 self.(betree_Internal_right) key st
end
-(** [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 *)
with betree_Internal_lookup_in_children_back
(n : nat) (self : betree_Internal_t) (key : u64) (st : state) :
result betree_Internal_t
@@ -412,7 +439,8 @@ with betree_Internal_lookup_in_children_back
self.(betree_Internal_pivot) self.(betree_Internal_left) n1))
end
-(** [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 *)
with betree_Node_lookup
(n : nat) (self : betree_Node_t) (key : u64) (st : state) :
result (state * (option u64))
@@ -483,7 +511,8 @@ with betree_Node_lookup
end
end
-(** [betree_main::betree::Node::{5}::lookup]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::lookup]: backward function 0
+ Source: 'src/betree.rs', lines 709:4-709:58 *)
with betree_Node_lookup_back
(n : nat) (self : betree_Node_t) (key : u64) (st : state) :
result betree_Node_t
@@ -552,8 +581,9 @@ with betree_Node_lookup_back
end
.
-(** [betree_main::betree::Node::{5}::filter_messages_for_key]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::filter_messages_for_key]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/betree.rs', lines 674:4-674:77 *)
Fixpoint betree_Node_filter_messages_for_key
(n : nat) (key : u64) (msgs : betree_List_t (u64 * betree_Message_t)) :
result (betree_List_t (u64 * betree_Message_t))
@@ -576,7 +606,8 @@ Fixpoint betree_Node_filter_messages_for_key
end
.
-(** [betree_main::betree::Node::{5}::lookup_first_message_after_key]: forward function *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::lookup_first_message_after_key]: forward function
+ Source: 'src/betree.rs', lines 689:4-692:34 *)
Fixpoint betree_Node_lookup_first_message_after_key
(n : nat) (key : u64) (msgs : betree_List_t (u64 * betree_Message_t)) :
result (betree_List_t (u64 * betree_Message_t))
@@ -595,7 +626,8 @@ Fixpoint betree_Node_lookup_first_message_after_key
end
.
-(** [betree_main::betree::Node::{5}::lookup_first_message_after_key]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::lookup_first_message_after_key]: backward function 0
+ Source: 'src/betree.rs', lines 689:4-692:34 *)
Fixpoint betree_Node_lookup_first_message_after_key_back
(n : nat) (key : u64) (msgs : betree_List_t (u64 * betree_Message_t))
(ret : betree_List_t (u64 * betree_Message_t)) :
@@ -618,15 +650,16 @@ Fixpoint betree_Node_lookup_first_message_after_key_back
end
.
-(** [betree_main::betree::Node::{5}::apply_to_internal]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply_to_internal]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/betree.rs', lines 521:4-521:89 *)
Definition betree_Node_apply_to_internal
(n : nat) (msgs : betree_List_t (u64 * betree_Message_t)) (key : u64)
(new_msg : betree_Message_t) :
result (betree_List_t (u64 * betree_Message_t))
:=
msgs0 <- betree_Node_lookup_first_message_for_key n key msgs;
- b <- betree_List_head_has_key betree_Message_t msgs0 key;
+ b <- betree_ListTupleU64T_head_has_key betree_Message_t msgs0 key;
if b
then
match new_msg with
@@ -676,8 +709,9 @@ Definition betree_Node_apply_to_internal
betree_Node_lookup_first_message_for_key_back n key msgs msgs1)
.
-(** [betree_main::betree::Node::{5}::apply_messages_to_internal]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply_messages_to_internal]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/betree.rs', lines 502:4-505:5 *)
Fixpoint betree_Node_apply_messages_to_internal
(n : nat) (msgs : betree_List_t (u64 * betree_Message_t))
(new_msgs : betree_List_t (u64 * betree_Message_t)) :
@@ -696,7 +730,8 @@ Fixpoint betree_Node_apply_messages_to_internal
end
.
-(** [betree_main::betree::Node::{5}::lookup_mut_in_bindings]: forward function *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::lookup_mut_in_bindings]: forward function
+ Source: 'src/betree.rs', lines 653:4-656:32 *)
Fixpoint betree_Node_lookup_mut_in_bindings
(n : nat) (key : u64) (bindings : betree_List_t (u64 * u64)) :
result (betree_List_t (u64 * u64))
@@ -715,7 +750,8 @@ Fixpoint betree_Node_lookup_mut_in_bindings
end
.
-(** [betree_main::betree::Node::{5}::lookup_mut_in_bindings]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::lookup_mut_in_bindings]: backward function 0
+ Source: 'src/betree.rs', lines 653:4-656:32 *)
Fixpoint betree_Node_lookup_mut_in_bindings_back
(n : nat) (key : u64) (bindings : betree_List_t (u64 * u64))
(ret : betree_List_t (u64 * u64)) :
@@ -737,15 +773,16 @@ Fixpoint betree_Node_lookup_mut_in_bindings_back
end
.
-(** [betree_main::betree::Node::{5}::apply_to_leaf]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply_to_leaf]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/betree.rs', lines 460:4-460:87 *)
Definition betree_Node_apply_to_leaf
(n : nat) (bindings : betree_List_t (u64 * u64)) (key : u64)
(new_msg : betree_Message_t) :
result (betree_List_t (u64 * u64))
:=
bindings0 <- betree_Node_lookup_mut_in_bindings n key bindings;
- b <- betree_List_head_has_key u64 bindings0 key;
+ b <- betree_ListTupleU64T_head_has_key u64 bindings0 key;
if b
then (
hd <- betree_List_pop_front (u64 * u64) bindings0;
@@ -778,8 +815,9 @@ Definition betree_Node_apply_to_leaf
end
.
-(** [betree_main::betree::Node::{5}::apply_messages_to_leaf]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply_messages_to_leaf]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/betree.rs', lines 444:4-447:5 *)
Fixpoint betree_Node_apply_messages_to_leaf
(n : nat) (bindings : betree_List_t (u64 * u64))
(new_msgs : betree_List_t (u64 * betree_Message_t)) :
@@ -798,7 +836,8 @@ Fixpoint betree_Node_apply_messages_to_leaf
end
.
-(** [betree_main::betree::Internal::{4}::flush]: forward function *)
+(** [betree_main::betree::{betree_main::betree::Internal#4}::flush]: forward function
+ Source: 'src/betree.rs', lines 410:4-415:26 *)
Fixpoint betree_Internal_flush
(n : nat) (self : betree_Internal_t) (params : betree_Params_t)
(node_id_cnt : betree_NodeIdCounter_t)
@@ -809,7 +848,7 @@ Fixpoint betree_Internal_flush
| O => Fail_ OutOfFuel
| S n0 =>
p <-
- betree_List_partition_at_pivot betree_Message_t n0 content
+ betree_ListTupleU64T_partition_at_pivot betree_Message_t n0 content
self.(betree_Internal_pivot);
let (msgs_left, msgs_right) := p in
len_left <- betree_List_len (u64 * betree_Message_t) n0 msgs_left;
@@ -846,7 +885,8 @@ Fixpoint betree_Internal_flush
Return (st0, msgs_left))
end
-(** [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 *)
with betree_Internal_flush_back
(n : nat) (self : betree_Internal_t) (params : betree_Params_t)
(node_id_cnt : betree_NodeIdCounter_t)
@@ -857,7 +897,7 @@ with betree_Internal_flush_back
| O => Fail_ OutOfFuel
| S n0 =>
p <-
- betree_List_partition_at_pivot betree_Message_t n0 content
+ betree_ListTupleU64T_partition_at_pivot betree_Message_t n0 content
self.(betree_Internal_pivot);
let (msgs_left, msgs_right) := p in
len_left <- betree_List_len (u64 * betree_Message_t) n0 msgs_left;
@@ -894,7 +934,8 @@ with betree_Internal_flush_back
node_id_cnt0))
end
-(** [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 *)
with betree_Node_apply_messages
(n : nat) (self : betree_Node_t) (params : betree_Params_t)
(node_id_cnt : betree_NodeIdCounter_t)
@@ -946,7 +987,8 @@ with betree_Node_apply_messages
end
end
-(** [betree_main::betree::Node::{5}::apply_messages]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply_messages]: backward function 0
+ Source: 'src/betree.rs', lines 588:4-593:5 *)
with betree_Node_apply_messages_back
(n : nat) (self : betree_Node_t) (params : betree_Params_t)
(node_id_cnt : betree_NodeIdCounter_t)
@@ -998,7 +1040,8 @@ with betree_Node_apply_messages_back
end
.
-(** [betree_main::betree::Node::{5}::apply]: forward function *)
+(** [betree_main::betree::{betree_main::betree::Node#5}::apply]: forward function
+ Source: 'src/betree.rs', lines 576:4-582:5 *)
Definition betree_Node_apply
(n : nat) (self : betree_Node_t) (params : betree_Params_t)
(node_id_cnt : betree_NodeIdCounter_t) (key : u64)
@@ -1016,7 +1059,8 @@ Definition betree_Node_apply
Return (st0, tt)
.
-(** [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 *)
Definition betree_Node_apply_back
(n : nat) (self : betree_Node_t) (params : betree_Params_t)
(node_id_cnt : betree_NodeIdCounter_t) (key : u64)
@@ -1028,7 +1072,8 @@ Definition betree_Node_apply_back
(key, new_msg) l) st
.
-(** [betree_main::betree::BeTree::{6}::new]: forward function *)
+(** [betree_main::betree::{betree_main::betree::BeTree#6}::new]: forward function
+ Source: 'src/betree.rs', lines 849:4-849:60 *)
Definition betree_BeTree_new
(min_flush_size : u64) (split_size : u64) (st : state) :
result (state * betree_BeTree_t)
@@ -1052,7 +1097,8 @@ Definition betree_BeTree_new
|})
.
-(** [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 *)
Definition betree_BeTree_apply
(n : nat) (self : betree_BeTree_t) (key : u64) (msg : betree_Message_t)
(st : state) :
@@ -1068,7 +1114,8 @@ Definition betree_BeTree_apply
Return (st0, tt)
.
-(** [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 *)
Definition betree_BeTree_apply_back
(n : nat) (self : betree_BeTree_t) (key : u64) (msg : betree_Message_t)
(st : state) :
@@ -1086,7 +1133,8 @@ Definition betree_BeTree_apply_back
|}
.
-(** [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 *)
Definition betree_BeTree_insert
(n : nat) (self : betree_BeTree_t) (key : u64) (value : u64) (st : state) :
result (state * unit)
@@ -1097,7 +1145,8 @@ Definition betree_BeTree_insert
Return (st0, tt)
.
-(** [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 *)
Definition betree_BeTree_insert_back
(n : nat) (self : betree_BeTree_t) (key : u64) (value : u64) (st : state) :
result betree_BeTree_t
@@ -1105,7 +1154,8 @@ Definition betree_BeTree_insert_back
betree_BeTree_apply_back n self key (Betree_Message_Insert value) st
.
-(** [betree_main::betree::BeTree::{6}::delete]: forward function *)
+(** [betree_main::betree::{betree_main::betree::BeTree#6}::delete]: forward function
+ Source: 'src/betree.rs', lines 880:4-880:38 *)
Definition betree_BeTree_delete
(n : nat) (self : betree_BeTree_t) (key : u64) (st : state) :
result (state * unit)
@@ -1116,7 +1166,8 @@ Definition betree_BeTree_delete
Return (st0, tt)
.
-(** [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 *)
Definition betree_BeTree_delete_back
(n : nat) (self : betree_BeTree_t) (key : u64) (st : state) :
result betree_BeTree_t
@@ -1124,7 +1175,8 @@ Definition betree_BeTree_delete_back
betree_BeTree_apply_back n self key Betree_Message_Delete st
.
-(** [betree_main::betree::BeTree::{6}::upsert]: forward function *)
+(** [betree_main::betree::{betree_main::betree::BeTree#6}::upsert]: forward function
+ Source: 'src/betree.rs', lines 886:4-886:59 *)
Definition betree_BeTree_upsert
(n : nat) (self : betree_BeTree_t) (key : u64)
(upd : betree_UpsertFunState_t) (st : state) :
@@ -1136,7 +1188,8 @@ Definition betree_BeTree_upsert
Return (st0, tt)
.
-(** [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 *)
Definition betree_BeTree_upsert_back
(n : nat) (self : betree_BeTree_t) (key : u64)
(upd : betree_UpsertFunState_t) (st : state) :
@@ -1145,7 +1198,8 @@ Definition betree_BeTree_upsert_back
betree_BeTree_apply_back n self key (Betree_Message_Upsert upd) st
.
-(** [betree_main::betree::BeTree::{6}::lookup]: forward function *)
+(** [betree_main::betree::{betree_main::betree::BeTree#6}::lookup]: forward function
+ Source: 'src/betree.rs', lines 895:4-895:62 *)
Definition betree_BeTree_lookup
(n : nat) (self : betree_BeTree_t) (key : u64) (st : state) :
result (state * (option u64))
@@ -1153,7 +1207,8 @@ Definition betree_BeTree_lookup
betree_Node_lookup n self.(betree_BeTree_root) key st
.
-(** [betree_main::betree::BeTree::{6}::lookup]: backward function 0 *)
+(** [betree_main::betree::{betree_main::betree::BeTree#6}::lookup]: backward function 0
+ Source: 'src/betree.rs', lines 895:4-895:62 *)
Definition betree_BeTree_lookup_back
(n : nat) (self : betree_BeTree_t) (key : u64) (st : state) :
result betree_BeTree_t
@@ -1167,7 +1222,8 @@ Definition betree_BeTree_lookup_back
|}
.
-(** [betree_main::main]: forward function *)
+(** [betree_main::main]: forward function
+ Source: 'src/betree_main.rs', lines 5:0-5:9 *)
Definition main : result unit :=
Return tt.
diff --git a/tests/coq/betree/BetreeMain_Opaque.v b/tests/coq/betree/BetreeMain_Opaque.v
index eade90de..a065c8a3 100644
--- a/tests/coq/betree/BetreeMain_Opaque.v
+++ b/tests/coq/betree/BetreeMain_Opaque.v
@@ -10,29 +10,34 @@ Require Export BetreeMain_Types.
Import BetreeMain_Types.
Module BetreeMain_Opaque.
-(** [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 *)
Axiom 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 *)
Axiom 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 *)
Axiom 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 *)
Axiom betree_utils_store_leaf_node
: u64 -> betree_List_t (u64 * u64) -> state -> result (state * unit)
.
-(** [core::option::Option::{0}::unwrap]: forward function *)
+(** [core::option::{core::option::Option<T>}::unwrap]: forward function
+ Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/core/src/option.rs', lines 932:4-932:34 *)
Axiom core_option_Option_unwrap :
forall(T : Type), option T -> state -> result (state * T)
.
diff --git a/tests/coq/betree/BetreeMain_Types.v b/tests/coq/betree/BetreeMain_Types.v
index 933a670c..b729d1c3 100644
--- a/tests/coq/betree/BetreeMain_Types.v
+++ b/tests/coq/betree/BetreeMain_Types.v
@@ -8,7 +8,8 @@ Import ListNotations.
Local Open Scope Primitives_scope.
Module BetreeMain_Types.
-(** [betree_main::betree::List] *)
+(** [betree_main::betree::List]
+ Source: 'src/betree.rs', lines 17:0-17:23 *)
Inductive betree_List_t (T : Type) :=
| Betree_List_Cons : T -> betree_List_t T -> betree_List_t T
| Betree_List_Nil : betree_List_t T
@@ -17,27 +18,31 @@ Inductive betree_List_t (T : Type) :=
Arguments Betree_List_Cons { _ }.
Arguments Betree_List_Nil { _ }.
-(** [betree_main::betree::UpsertFunState] *)
+(** [betree_main::betree::UpsertFunState]
+ Source: 'src/betree.rs', lines 63:0-63:23 *)
Inductive 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 *)
Inductive 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 *)
Record betree_Leaf_t :=
mkbetree_Leaf_t {
betree_Leaf_id : u64; betree_Leaf_size : u64;
}
.
-(** [betree_main::betree::Internal] *)
+(** [betree_main::betree::Internal]
+ Source: 'src/betree.rs', lines 156:0-156:15 *)
Inductive betree_Internal_t :=
| mkbetree_Internal_t :
u64 ->
@@ -46,7 +51,8 @@ Inductive betree_Internal_t :=
betree_Node_t ->
betree_Internal_t
-(** [betree_main::betree::Node] *)
+(** [betree_main::betree::Node]
+ Source: 'src/betree.rs', lines 179:0-179:9 *)
with betree_Node_t :=
| Betree_Node_Internal : betree_Internal_t -> betree_Node_t
| Betree_Node_Leaf : betree_Leaf_t -> betree_Node_t
@@ -81,21 +87,24 @@ Notation "x1 .(betree_Internal_right)" := (betree_Internal_right x1)
(at level 9)
.
-(** [betree_main::betree::Params] *)
+(** [betree_main::betree::Params]
+ Source: 'src/betree.rs', lines 187:0-187:13 *)
Record betree_Params_t :=
mkbetree_Params_t {
betree_Params_min_flush_size : u64; betree_Params_split_size : u64;
}
.
-(** [betree_main::betree::NodeIdCounter] *)
+(** [betree_main::betree::NodeIdCounter]
+ Source: 'src/betree.rs', lines 201:0-201:20 *)
Record betree_NodeIdCounter_t :=
mkbetree_NodeIdCounter_t {
betree_NodeIdCounter_next_node_id : u64;
}
.
-(** [betree_main::betree::BeTree] *)
+(** [betree_main::betree::BeTree]
+ Source: 'src/betree.rs', lines 218:0-218:17 *)
Record betree_BeTree_t :=
mkbetree_BeTree_t {
betree_BeTree_params : betree_Params_t;
diff --git a/tests/coq/betree/Primitives.v b/tests/coq/betree/Primitives.v
index 85e38f01..83f860b6 100644
--- a/tests/coq/betree/Primitives.v
+++ b/tests/coq/betree/Primitives.v
@@ -467,14 +467,14 @@ Definition alloc_boxed_Box_deref_mut (T : Type) (x : T) : result T := Return x.
Definition alloc_boxed_Box_deref_mut_back (T : Type) (_ : T) (x : T) : result T := Return x.
(* Trait instance *)
-Definition alloc_boxed_Box_coreOpsDerefInst (Self : Type) : core_ops_deref_Deref Self := {|
+Definition alloc_boxed_Box_coreopsDerefInst (Self : Type) : core_ops_deref_Deref Self := {|
core_ops_deref_Deref_target := Self;
core_ops_deref_Deref_deref := alloc_boxed_Box_deref Self;
|}.
(* Trait instance *)
-Definition alloc_boxed_Box_coreOpsDerefMutInst (Self : Type) : core_ops_deref_DerefMut Self := {|
- core_ops_deref_DerefMut_derefInst := alloc_boxed_Box_coreOpsDerefInst Self;
+Definition alloc_boxed_Box_coreopsDerefMutInst (Self : Type) : core_ops_deref_DerefMut Self := {|
+ core_ops_deref_DerefMut_derefInst := alloc_boxed_Box_coreopsDerefInst Self;
core_ops_deref_DerefMut_deref_mut := alloc_boxed_Box_deref_mut Self;
core_ops_deref_DerefMut_deref_mut_back := alloc_boxed_Box_deref_mut_back Self;
|}.
@@ -576,7 +576,7 @@ Definition alloc_vec_Vec_insert (T: Type) (v: alloc_vec_Vec T) (i: usize) (x: T)
else Fail_ Failure).
(* Helper *)
-Axiom alloc_vec_Vec_index_usize : forall {T : Type} (v : alloc_vec_Vec T) (i : usize) (x : T), result T.
+Axiom alloc_vec_Vec_index_usize : forall {T : Type} (v : alloc_vec_Vec T) (i : usize), result T.
(* Helper *)
Axiom alloc_vec_Vec_update_usize : forall {T : Type} (v : alloc_vec_Vec T) (i : usize) (x : T), result (alloc_vec_Vec T).
@@ -620,18 +620,18 @@ Definition core_slice_index_Slice_index
end.
(* [core::slice::index::Range:::get]: forward function *)
-Axiom core_slice_index_Range_get : forall (T : Type) (i : core_ops_range_Range usize) (s : slice T), result (option (slice T)).
+Axiom core_slice_index_RangeUsize_get : forall (T : Type) (i : core_ops_range_Range usize) (s : slice T), result (option (slice T)).
(* [core::slice::index::Range::get_mut]: forward function *)
-Axiom core_slice_index_Range_get_mut :
+Axiom core_slice_index_RangeUsize_get_mut :
forall (T : Type), core_ops_range_Range usize -> slice T -> result (option (slice T)).
(* [core::slice::index::Range::get_mut]: backward function 0 *)
-Axiom core_slice_index_Range_get_mut_back :
+Axiom core_slice_index_RangeUsize_get_mut_back :
forall (T : Type), core_ops_range_Range usize -> slice T -> option (slice T) -> result (slice T).
(* [core::slice::index::Range::get_unchecked]: forward function *)
-Definition core_slice_index_Range_get_unchecked
+Definition core_slice_index_RangeUsize_get_unchecked
(T : Type) :
core_ops_range_Range usize -> const_raw_ptr (slice T) -> result (const_raw_ptr (slice T)) :=
(* Don't know what the model should be - for now we always fail to make
@@ -639,7 +639,7 @@ Definition core_slice_index_Range_get_unchecked
fun _ _ => Fail_ Failure.
(* [core::slice::index::Range::get_unchecked_mut]: forward function *)
-Definition core_slice_index_Range_get_unchecked_mut
+Definition core_slice_index_RangeUsize_get_unchecked_mut
(T : Type) :
core_ops_range_Range usize -> mut_raw_ptr (slice T) -> result (mut_raw_ptr (slice T)) :=
(* Don't know what the model should be - for now we always fail to make
@@ -647,15 +647,15 @@ Definition core_slice_index_Range_get_unchecked_mut
fun _ _ => Fail_ Failure.
(* [core::slice::index::Range::index]: forward function *)
-Axiom core_slice_index_Range_index :
+Axiom core_slice_index_RangeUsize_index :
forall (T : Type), core_ops_range_Range usize -> slice T -> result (slice T).
(* [core::slice::index::Range::index_mut]: forward function *)
-Axiom core_slice_index_Range_index_mut :
+Axiom core_slice_index_RangeUsize_index_mut :
forall (T : Type), core_ops_range_Range usize -> slice T -> result (slice T).
(* [core::slice::index::Range::index_mut]: backward function 0 *)
-Axiom core_slice_index_Range_index_mut_back :
+Axiom core_slice_index_RangeUsize_index_mut_back :
forall (T : Type), core_ops_range_Range usize -> slice T -> slice T -> result (slice T).
(* [core::slice::index::[T]::index_mut]: forward function *)
@@ -683,44 +683,44 @@ Axiom core_array_Array_index_mut_back :
forall (T Idx : Type) (N : usize) (inst : core_ops_index_IndexMut (slice T) Idx)
(a : array T N) (i : Idx) (x : inst.(core_ops_index_IndexMut_indexInst).(core_ops_index_Index_Output)), result (array T N).
-(* Trait implementation: [core::slice::index::[T]] *)
-Definition core_slice_index_Slice_coreopsindexIndexInst (T Idx : Type)
- (inst : core_slice_index_SliceIndex Idx (slice T)) :
- core_ops_index_Index (slice T) Idx := {|
- core_ops_index_Index_Output := inst.(core_slice_index_SliceIndex_Output);
- core_ops_index_Index_index := core_slice_index_Slice_index T Idx inst;
-|}.
-
(* Trait implementation: [core::slice::index::private_slice_index::Range] *)
-Definition core_slice_index_private_slice_index_Range_coresliceindexprivate_slice_indexSealedInst
+Definition core_slice_index_private_slice_index_SealedRangeUsizeInst
: core_slice_index_private_slice_index_Sealed (core_ops_range_Range usize) := tt.
(* Trait implementation: [core::slice::index::Range] *)
-Definition core_slice_index_Range_coresliceindexSliceIndexInst (T : Type) :
+Definition core_slice_index_SliceIndexRangeUsizeSliceTInst (T : Type) :
core_slice_index_SliceIndex (core_ops_range_Range usize) (slice T) := {|
- core_slice_index_SliceIndex_sealedInst := core_slice_index_private_slice_index_Range_coresliceindexprivate_slice_indexSealedInst;
+ core_slice_index_SliceIndex_sealedInst := core_slice_index_private_slice_index_SealedRangeUsizeInst;
core_slice_index_SliceIndex_Output := slice T;
- core_slice_index_SliceIndex_get := core_slice_index_Range_get T;
- core_slice_index_SliceIndex_get_mut := core_slice_index_Range_get_mut T;
- core_slice_index_SliceIndex_get_mut_back := core_slice_index_Range_get_mut_back T;
- core_slice_index_SliceIndex_get_unchecked := core_slice_index_Range_get_unchecked T;
- core_slice_index_SliceIndex_get_unchecked_mut := core_slice_index_Range_get_unchecked_mut T;
- core_slice_index_SliceIndex_index := core_slice_index_Range_index T;
- core_slice_index_SliceIndex_index_mut := core_slice_index_Range_index_mut T;
- core_slice_index_SliceIndex_index_mut_back := core_slice_index_Range_index_mut_back T;
+ core_slice_index_SliceIndex_get := core_slice_index_RangeUsize_get T;
+ core_slice_index_SliceIndex_get_mut := core_slice_index_RangeUsize_get_mut T;
+ core_slice_index_SliceIndex_get_mut_back := core_slice_index_RangeUsize_get_mut_back T;
+ core_slice_index_SliceIndex_get_unchecked := core_slice_index_RangeUsize_get_unchecked T;
+ core_slice_index_SliceIndex_get_unchecked_mut := core_slice_index_RangeUsize_get_unchecked_mut T;
+ core_slice_index_SliceIndex_index := core_slice_index_RangeUsize_index T;
+ core_slice_index_SliceIndex_index_mut := core_slice_index_RangeUsize_index_mut T;
+ core_slice_index_SliceIndex_index_mut_back := core_slice_index_RangeUsize_index_mut_back T;
+|}.
+
+(* Trait implementation: [core::slice::index::[T]] *)
+Definition core_ops_index_IndexSliceTIInst (T Idx : Type)
+ (inst : core_slice_index_SliceIndex Idx (slice T)) :
+ core_ops_index_Index (slice T) Idx := {|
+ core_ops_index_Index_Output := inst.(core_slice_index_SliceIndex_Output);
+ core_ops_index_Index_index := core_slice_index_Slice_index T Idx inst;
|}.
(* Trait implementation: [core::slice::index::[T]] *)
-Definition core_slice_index_Slice_coreopsindexIndexMutInst (T Idx : Type)
+Definition core_ops_index_IndexMutSliceTIInst (T Idx : Type)
(inst : core_slice_index_SliceIndex Idx (slice T)) :
core_ops_index_IndexMut (slice T) Idx := {|
- core_ops_index_IndexMut_indexInst := core_slice_index_Slice_coreopsindexIndexInst T Idx inst;
+ core_ops_index_IndexMut_indexInst := core_ops_index_IndexSliceTIInst T Idx inst;
core_ops_index_IndexMut_index_mut := core_slice_index_Slice_index_mut T Idx inst;
core_ops_index_IndexMut_index_mut_back := core_slice_index_Slice_index_mut_back T Idx inst;
|}.
(* Trait implementation: [core::array::[T; N]] *)
-Definition core_array_Array_coreopsindexIndexInst (T Idx : Type) (N : usize)
+Definition core_ops_index_IndexArrayInst (T Idx : Type) (N : usize)
(inst : core_ops_index_Index (slice T) Idx) :
core_ops_index_Index (array T N) Idx := {|
core_ops_index_Index_Output := inst.(core_ops_index_Index_Output);
@@ -728,10 +728,10 @@ Definition core_array_Array_coreopsindexIndexInst (T Idx : Type) (N : usize)
|}.
(* Trait implementation: [core::array::[T; N]] *)
-Definition core_array_Array_coreopsindexIndexMutInst (T Idx : Type) (N : usize)
+Definition core_ops_index_IndexMutArrayInst (T Idx : Type) (N : usize)
(inst : core_ops_index_IndexMut (slice T) Idx) :
core_ops_index_IndexMut (array T N) Idx := {|
- core_ops_index_IndexMut_indexInst := core_array_Array_coreopsindexIndexInst T Idx N inst.(core_ops_index_IndexMut_indexInst);
+ core_ops_index_IndexMut_indexInst := core_ops_index_IndexArrayInst T Idx N inst.(core_ops_index_IndexMut_indexInst);
core_ops_index_IndexMut_index_mut := core_array_Array_index_mut T Idx N inst;
core_ops_index_IndexMut_index_mut_back := core_array_Array_index_mut_back T Idx N inst;
|}.
@@ -765,13 +765,13 @@ Axiom core_slice_index_usize_index_mut_back :
forall (T : Type), usize -> slice T -> T -> result (slice T).
(* Trait implementation: [core::slice::index::private_slice_index::usize] *)
-Definition core_slice_index_private_slice_index_usize_coresliceindexprivate_slice_indexSealedInst
+Definition core_slice_index_private_slice_index_SealedUsizeInst
: core_slice_index_private_slice_index_Sealed usize := tt.
(* Trait implementation: [core::slice::index::usize] *)
-Definition core_slice_index_usize_coresliceindexSliceIndexInst (T : Type) :
+Definition core_slice_index_SliceIndexUsizeSliceTInst (T : Type) :
core_slice_index_SliceIndex usize (slice T) := {|
- core_slice_index_SliceIndex_sealedInst := core_slice_index_private_slice_index_usize_coresliceindexprivate_slice_indexSealedInst;
+ core_slice_index_SliceIndex_sealedInst := core_slice_index_private_slice_index_SealedUsizeInst;
core_slice_index_SliceIndex_Output := T;
core_slice_index_SliceIndex_get := core_slice_index_usize_get T;
core_slice_index_SliceIndex_get_mut := core_slice_index_usize_get_mut T;
@@ -815,8 +815,16 @@ Definition alloc_vec_Vec_coreopsindexIndexMutInst (T Idx : Type)
(*** Theorems *)
+Axiom alloc_vec_Vec_index_eq : forall {a : Type} (v : alloc_vec_Vec a) (i : usize) (x : a),
+ alloc_vec_Vec_index a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i =
+ alloc_vec_Vec_index_usize v i.
+
+Axiom alloc_vec_Vec_index_mut_eq : forall {a : Type} (v : alloc_vec_Vec a) (i : usize) (x : a),
+ alloc_vec_Vec_index_mut a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i =
+ alloc_vec_Vec_index_usize v i.
+
Axiom alloc_vec_Vec_index_mut_back_eq : forall {a : Type} (v : alloc_vec_Vec a) (i : usize) (x : a),
- alloc_vec_Vec_index_mut_back a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i x =
+ alloc_vec_Vec_index_mut_back a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i x =
alloc_vec_Vec_update_usize v i x.
End Primitives.
diff --git a/tests/coq/hashmap/Hashmap_Funs.v b/tests/coq/hashmap/Hashmap_Funs.v
index 3ca52a9f..c08f7f7d 100644
--- a/tests/coq/hashmap/Hashmap_Funs.v
+++ b/tests/coq/hashmap/Hashmap_Funs.v
@@ -10,11 +10,13 @@ Require Export Hashmap_Types.
Import Hashmap_Types.
Module Hashmap_Funs.
-(** [hashmap::hash_key]: forward function *)
+(** [hashmap::hash_key]: forward function
+ Source: 'src/hashmap.rs', lines 27:0-27:32 *)
Definition hash_key (k : usize) : result usize :=
Return k.
-(** [hashmap::HashMap::{0}::allocate_slots]: loop 0: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::allocate_slots]: loop 0: forward function
+ Source: 'src/hashmap.rs', lines 50:4-56:5 *)
Fixpoint hashMap_allocate_slots_loop
(T : Type) (n : nat) (slots : alloc_vec_Vec (List_t T)) (n0 : usize) :
result (alloc_vec_Vec (List_t T))
@@ -31,7 +33,8 @@ Fixpoint hashMap_allocate_slots_loop
end
.
-(** [hashmap::HashMap::{0}::allocate_slots]: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::allocate_slots]: forward function
+ Source: 'src/hashmap.rs', lines 50:4-50:76 *)
Definition hashMap_allocate_slots
(T : Type) (n : nat) (slots : alloc_vec_Vec (List_t T)) (n0 : usize) :
result (alloc_vec_Vec (List_t T))
@@ -39,7 +42,8 @@ Definition hashMap_allocate_slots
hashMap_allocate_slots_loop T n slots n0
.
-(** [hashmap::HashMap::{0}::new_with_capacity]: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::new_with_capacity]: forward function
+ Source: 'src/hashmap.rs', lines 59:4-63:13 *)
Definition hashMap_new_with_capacity
(T : Type) (n : nat) (capacity : usize) (max_load_dividend : usize)
(max_load_divisor : usize) :
@@ -58,13 +62,15 @@ Definition hashMap_new_with_capacity
|}
.
-(** [hashmap::HashMap::{0}::new]: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::new]: forward function
+ Source: 'src/hashmap.rs', lines 75:4-75:24 *)
Definition hashMap_new (T : Type) (n : nat) : result (HashMap_t T) :=
hashMap_new_with_capacity T n 32%usize 4%usize 5%usize
.
-(** [hashmap::HashMap::{0}::clear]: loop 0: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap::{hashmap::HashMap<T>}::clear]: loop 0: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 80:4-88:5 *)
Fixpoint hashMap_clear_loop
(T : Type) (n : nat) (slots : alloc_vec_Vec (List_t T)) (i : usize) :
result (alloc_vec_Vec (List_t T))
@@ -78,15 +84,16 @@ Fixpoint hashMap_clear_loop
i1 <- usize_add i 1%usize;
slots0 <-
alloc_vec_Vec_index_mut_back (List_t T) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (List_t T))
- slots i List_Nil;
+ (core_slice_index_SliceIndexUsizeSliceTInst (List_t T)) slots i
+ List_Nil;
hashMap_clear_loop T n0 slots0 i1)
else Return slots
end
.
-(** [hashmap::HashMap::{0}::clear]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap::{hashmap::HashMap<T>}::clear]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 80:4-80:27 *)
Definition hashMap_clear
(T : Type) (n : nat) (self : HashMap_t T) : result (HashMap_t T) :=
v <- hashMap_clear_loop T n self.(hashMap_slots) 0%usize;
@@ -99,12 +106,14 @@ Definition hashMap_clear
|}
.
-(** [hashmap::HashMap::{0}::len]: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::len]: forward function
+ Source: 'src/hashmap.rs', lines 90:4-90:30 *)
Definition hashMap_len (T : Type) (self : HashMap_t T) : result usize :=
Return self.(hashMap_num_entries)
.
-(** [hashmap::HashMap::{0}::insert_in_list]: loop 0: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::insert_in_list]: loop 0: forward function
+ Source: 'src/hashmap.rs', lines 97:4-114:5 *)
Fixpoint hashMap_insert_in_list_loop
(T : Type) (n : nat) (key : usize) (value : T) (ls : List_t T) :
result bool
@@ -122,7 +131,8 @@ Fixpoint hashMap_insert_in_list_loop
end
.
-(** [hashmap::HashMap::{0}::insert_in_list]: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::insert_in_list]: forward function
+ Source: 'src/hashmap.rs', lines 97:4-97:71 *)
Definition hashMap_insert_in_list
(T : Type) (n : nat) (key : usize) (value : T) (ls : List_t T) :
result bool
@@ -130,7 +140,8 @@ Definition hashMap_insert_in_list
hashMap_insert_in_list_loop T n key value ls
.
-(** [hashmap::HashMap::{0}::insert_in_list]: loop 0: backward function 0 *)
+(** [hashmap::{hashmap::HashMap<T>}::insert_in_list]: loop 0: backward function 0
+ Source: 'src/hashmap.rs', lines 97:4-114:5 *)
Fixpoint hashMap_insert_in_list_loop_back
(T : Type) (n : nat) (key : usize) (value : T) (ls : List_t T) :
result (List_t T)
@@ -150,7 +161,8 @@ Fixpoint hashMap_insert_in_list_loop_back
end
.
-(** [hashmap::HashMap::{0}::insert_in_list]: backward function 0 *)
+(** [hashmap::{hashmap::HashMap<T>}::insert_in_list]: backward function 0
+ Source: 'src/hashmap.rs', lines 97:4-97:71 *)
Definition hashMap_insert_in_list_back
(T : Type) (n : nat) (key : usize) (value : T) (ls : List_t T) :
result (List_t T)
@@ -158,8 +170,9 @@ Definition hashMap_insert_in_list_back
hashMap_insert_in_list_loop_back T n key value ls
.
-(** [hashmap::HashMap::{0}::insert_no_resize]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap::{hashmap::HashMap<T>}::insert_no_resize]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 117:4-117:54 *)
Definition hashMap_insert_no_resize
(T : Type) (n : nat) (self : HashMap_t T) (key : usize) (value : T) :
result (HashMap_t T)
@@ -169,7 +182,7 @@ Definition hashMap_insert_no_resize
hash_mod <- usize_rem hash i;
l <-
alloc_vec_Vec_index_mut (List_t T) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (List_t T))
+ (core_slice_index_SliceIndexUsizeSliceTInst (List_t T))
self.(hashMap_slots) hash_mod;
inserted <- hashMap_insert_in_list T n key value l;
if inserted
@@ -178,7 +191,7 @@ Definition hashMap_insert_no_resize
l0 <- hashMap_insert_in_list_back T n key value l;
v <-
alloc_vec_Vec_index_mut_back (List_t T) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (List_t T))
+ (core_slice_index_SliceIndexUsizeSliceTInst (List_t T))
self.(hashMap_slots) hash_mod l0;
Return
{|
@@ -191,7 +204,7 @@ Definition hashMap_insert_no_resize
l0 <- hashMap_insert_in_list_back T n key value l;
v <-
alloc_vec_Vec_index_mut_back (List_t T) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (List_t T))
+ (core_slice_index_SliceIndexUsizeSliceTInst (List_t T))
self.(hashMap_slots) hash_mod l0;
Return
{|
@@ -202,8 +215,9 @@ Definition hashMap_insert_no_resize
|})
.
-(** [hashmap::HashMap::{0}::move_elements_from_list]: loop 0: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap::{hashmap::HashMap<T>}::move_elements_from_list]: loop 0: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 183:4-196:5 *)
Fixpoint hashMap_move_elements_from_list_loop
(T : Type) (n : nat) (ntable : HashMap_t T) (ls : List_t T) :
result (HashMap_t T)
@@ -220,8 +234,9 @@ Fixpoint hashMap_move_elements_from_list_loop
end
.
-(** [hashmap::HashMap::{0}::move_elements_from_list]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap::{hashmap::HashMap<T>}::move_elements_from_list]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 183:4-183:72 *)
Definition hashMap_move_elements_from_list
(T : Type) (n : nat) (ntable : HashMap_t T) (ls : List_t T) :
result (HashMap_t T)
@@ -229,8 +244,9 @@ Definition hashMap_move_elements_from_list
hashMap_move_elements_from_list_loop T n ntable ls
.
-(** [hashmap::HashMap::{0}::move_elements]: loop 0: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap::{hashmap::HashMap<T>}::move_elements]: loop 0: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 171:4-180:5 *)
Fixpoint hashMap_move_elements_loop
(T : Type) (n : nat) (ntable : HashMap_t T)
(slots : alloc_vec_Vec (List_t T)) (i : usize) :
@@ -244,23 +260,22 @@ Fixpoint hashMap_move_elements_loop
then (
l <-
alloc_vec_Vec_index_mut (List_t T) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (List_t T))
- slots i;
+ (core_slice_index_SliceIndexUsizeSliceTInst (List_t T)) slots i;
let ls := core_mem_replace (List_t T) l List_Nil in
ntable0 <- hashMap_move_elements_from_list T n0 ntable ls;
i1 <- usize_add i 1%usize;
let l0 := core_mem_replace_back (List_t T) l List_Nil in
slots0 <-
alloc_vec_Vec_index_mut_back (List_t T) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (List_t T))
- slots i l0;
+ (core_slice_index_SliceIndexUsizeSliceTInst (List_t T)) slots i l0;
hashMap_move_elements_loop T n0 ntable0 slots0 i1)
else Return (ntable, slots)
end
.
-(** [hashmap::HashMap::{0}::move_elements]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap::{hashmap::HashMap<T>}::move_elements]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 171:4-171:95 *)
Definition hashMap_move_elements
(T : Type) (n : nat) (ntable : HashMap_t T)
(slots : alloc_vec_Vec (List_t T)) (i : usize) :
@@ -269,8 +284,9 @@ Definition hashMap_move_elements
hashMap_move_elements_loop T n ntable slots i
.
-(** [hashmap::HashMap::{0}::try_resize]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap::{hashmap::HashMap<T>}::try_resize]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 140:4-140:28 *)
Definition hashMap_try_resize
(T : Type) (n : nat) (self : HashMap_t T) : result (HashMap_t T) :=
max_usize <- scalar_cast U32 Usize core_u32_max;
@@ -301,8 +317,9 @@ Definition hashMap_try_resize
|}
.
-(** [hashmap::HashMap::{0}::insert]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap::{hashmap::HashMap<T>}::insert]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 129:4-129:48 *)
Definition hashMap_insert
(T : Type) (n : nat) (self : HashMap_t T) (key : usize) (value : T) :
result (HashMap_t T)
@@ -314,7 +331,8 @@ Definition hashMap_insert
else Return self0
.
-(** [hashmap::HashMap::{0}::contains_key_in_list]: loop 0: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::contains_key_in_list]: loop 0: forward function
+ Source: 'src/hashmap.rs', lines 206:4-219:5 *)
Fixpoint hashMap_contains_key_in_list_loop
(T : Type) (n : nat) (key : usize) (ls : List_t T) : result bool :=
match n with
@@ -330,13 +348,15 @@ Fixpoint hashMap_contains_key_in_list_loop
end
.
-(** [hashmap::HashMap::{0}::contains_key_in_list]: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::contains_key_in_list]: forward function
+ Source: 'src/hashmap.rs', lines 206:4-206:68 *)
Definition hashMap_contains_key_in_list
(T : Type) (n : nat) (key : usize) (ls : List_t T) : result bool :=
hashMap_contains_key_in_list_loop T n key ls
.
-(** [hashmap::HashMap::{0}::contains_key]: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::contains_key]: forward function
+ Source: 'src/hashmap.rs', lines 199:4-199:49 *)
Definition hashMap_contains_key
(T : Type) (n : nat) (self : HashMap_t T) (key : usize) : result bool :=
hash <- hash_key key;
@@ -344,12 +364,13 @@ Definition hashMap_contains_key
hash_mod <- usize_rem hash i;
l <-
alloc_vec_Vec_index (List_t T) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (List_t T))
+ (core_slice_index_SliceIndexUsizeSliceTInst (List_t T))
self.(hashMap_slots) hash_mod;
hashMap_contains_key_in_list T n key l
.
-(** [hashmap::HashMap::{0}::get_in_list]: loop 0: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::get_in_list]: loop 0: forward function
+ Source: 'src/hashmap.rs', lines 224:4-237:5 *)
Fixpoint hashMap_get_in_list_loop
(T : Type) (n : nat) (key : usize) (ls : List_t T) : result T :=
match n with
@@ -365,13 +386,15 @@ Fixpoint hashMap_get_in_list_loop
end
.
-(** [hashmap::HashMap::{0}::get_in_list]: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::get_in_list]: forward function
+ Source: 'src/hashmap.rs', lines 224:4-224:70 *)
Definition hashMap_get_in_list
(T : Type) (n : nat) (key : usize) (ls : List_t T) : result T :=
hashMap_get_in_list_loop T n key ls
.
-(** [hashmap::HashMap::{0}::get]: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::get]: forward function
+ Source: 'src/hashmap.rs', lines 239:4-239:55 *)
Definition hashMap_get
(T : Type) (n : nat) (self : HashMap_t T) (key : usize) : result T :=
hash <- hash_key key;
@@ -379,12 +402,13 @@ Definition hashMap_get
hash_mod <- usize_rem hash i;
l <-
alloc_vec_Vec_index (List_t T) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (List_t T))
+ (core_slice_index_SliceIndexUsizeSliceTInst (List_t T))
self.(hashMap_slots) hash_mod;
hashMap_get_in_list T n key l
.
-(** [hashmap::HashMap::{0}::get_mut_in_list]: loop 0: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::get_mut_in_list]: loop 0: forward function
+ Source: 'src/hashmap.rs', lines 245:4-254:5 *)
Fixpoint hashMap_get_mut_in_list_loop
(T : Type) (n : nat) (ls : List_t T) (key : usize) : result T :=
match n with
@@ -400,13 +424,15 @@ Fixpoint hashMap_get_mut_in_list_loop
end
.
-(** [hashmap::HashMap::{0}::get_mut_in_list]: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::get_mut_in_list]: forward function
+ Source: 'src/hashmap.rs', lines 245:4-245:86 *)
Definition hashMap_get_mut_in_list
(T : Type) (n : nat) (ls : List_t T) (key : usize) : result T :=
hashMap_get_mut_in_list_loop T n ls key
.
-(** [hashmap::HashMap::{0}::get_mut_in_list]: loop 0: backward function 0 *)
+(** [hashmap::{hashmap::HashMap<T>}::get_mut_in_list]: loop 0: backward function 0
+ Source: 'src/hashmap.rs', lines 245:4-254:5 *)
Fixpoint hashMap_get_mut_in_list_loop_back
(T : Type) (n : nat) (ls : List_t T) (key : usize) (ret : T) :
result (List_t T)
@@ -426,7 +452,8 @@ Fixpoint hashMap_get_mut_in_list_loop_back
end
.
-(** [hashmap::HashMap::{0}::get_mut_in_list]: backward function 0 *)
+(** [hashmap::{hashmap::HashMap<T>}::get_mut_in_list]: backward function 0
+ Source: 'src/hashmap.rs', lines 245:4-245:86 *)
Definition hashMap_get_mut_in_list_back
(T : Type) (n : nat) (ls : List_t T) (key : usize) (ret : T) :
result (List_t T)
@@ -434,7 +461,8 @@ Definition hashMap_get_mut_in_list_back
hashMap_get_mut_in_list_loop_back T n ls key ret
.
-(** [hashmap::HashMap::{0}::get_mut]: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::get_mut]: forward function
+ Source: 'src/hashmap.rs', lines 257:4-257:67 *)
Definition hashMap_get_mut
(T : Type) (n : nat) (self : HashMap_t T) (key : usize) : result T :=
hash <- hash_key key;
@@ -442,12 +470,13 @@ Definition hashMap_get_mut
hash_mod <- usize_rem hash i;
l <-
alloc_vec_Vec_index_mut (List_t T) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (List_t T))
+ (core_slice_index_SliceIndexUsizeSliceTInst (List_t T))
self.(hashMap_slots) hash_mod;
hashMap_get_mut_in_list T n l key
.
-(** [hashmap::HashMap::{0}::get_mut]: backward function 0 *)
+(** [hashmap::{hashmap::HashMap<T>}::get_mut]: backward function 0
+ Source: 'src/hashmap.rs', lines 257:4-257:67 *)
Definition hashMap_get_mut_back
(T : Type) (n : nat) (self : HashMap_t T) (key : usize) (ret : T) :
result (HashMap_t T)
@@ -457,12 +486,12 @@ Definition hashMap_get_mut_back
hash_mod <- usize_rem hash i;
l <-
alloc_vec_Vec_index_mut (List_t T) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (List_t T))
+ (core_slice_index_SliceIndexUsizeSliceTInst (List_t T))
self.(hashMap_slots) hash_mod;
l0 <- hashMap_get_mut_in_list_back T n l key ret;
v <-
alloc_vec_Vec_index_mut_back (List_t T) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (List_t T))
+ (core_slice_index_SliceIndexUsizeSliceTInst (List_t T))
self.(hashMap_slots) hash_mod l0;
Return
{|
@@ -473,7 +502,8 @@ Definition hashMap_get_mut_back
|}
.
-(** [hashmap::HashMap::{0}::remove_from_list]: loop 0: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::remove_from_list]: loop 0: forward function
+ Source: 'src/hashmap.rs', lines 265:4-291:5 *)
Fixpoint hashMap_remove_from_list_loop
(T : Type) (n : nat) (key : usize) (ls : List_t T) : result (option T) :=
match n with
@@ -495,13 +525,15 @@ Fixpoint hashMap_remove_from_list_loop
end
.
-(** [hashmap::HashMap::{0}::remove_from_list]: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::remove_from_list]: forward function
+ Source: 'src/hashmap.rs', lines 265:4-265:69 *)
Definition hashMap_remove_from_list
(T : Type) (n : nat) (key : usize) (ls : List_t T) : result (option T) :=
hashMap_remove_from_list_loop T n key ls
.
-(** [hashmap::HashMap::{0}::remove_from_list]: loop 0: backward function 1 *)
+(** [hashmap::{hashmap::HashMap<T>}::remove_from_list]: loop 0: backward function 1
+ Source: 'src/hashmap.rs', lines 265:4-291:5 *)
Fixpoint hashMap_remove_from_list_loop_back
(T : Type) (n : nat) (key : usize) (ls : List_t T) : result (List_t T) :=
match n with
@@ -525,13 +557,15 @@ Fixpoint hashMap_remove_from_list_loop_back
end
.
-(** [hashmap::HashMap::{0}::remove_from_list]: backward function 1 *)
+(** [hashmap::{hashmap::HashMap<T>}::remove_from_list]: backward function 1
+ Source: 'src/hashmap.rs', lines 265:4-265:69 *)
Definition hashMap_remove_from_list_back
(T : Type) (n : nat) (key : usize) (ls : List_t T) : result (List_t T) :=
hashMap_remove_from_list_loop_back T n key ls
.
-(** [hashmap::HashMap::{0}::remove]: forward function *)
+(** [hashmap::{hashmap::HashMap<T>}::remove]: forward function
+ Source: 'src/hashmap.rs', lines 294:4-294:52 *)
Definition hashMap_remove
(T : Type) (n : nat) (self : HashMap_t T) (key : usize) :
result (option T)
@@ -541,7 +575,7 @@ Definition hashMap_remove
hash_mod <- usize_rem hash i;
l <-
alloc_vec_Vec_index_mut (List_t T) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (List_t T))
+ (core_slice_index_SliceIndexUsizeSliceTInst (List_t T))
self.(hashMap_slots) hash_mod;
x <- hashMap_remove_from_list T n key l;
match x with
@@ -551,7 +585,8 @@ Definition hashMap_remove
end
.
-(** [hashmap::HashMap::{0}::remove]: backward function 0 *)
+(** [hashmap::{hashmap::HashMap<T>}::remove]: backward function 0
+ Source: 'src/hashmap.rs', lines 294:4-294:52 *)
Definition hashMap_remove_back
(T : Type) (n : nat) (self : HashMap_t T) (key : usize) :
result (HashMap_t T)
@@ -561,7 +596,7 @@ Definition hashMap_remove_back
hash_mod <- usize_rem hash i;
l <-
alloc_vec_Vec_index_mut (List_t T) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (List_t T))
+ (core_slice_index_SliceIndexUsizeSliceTInst (List_t T))
self.(hashMap_slots) hash_mod;
x <- hashMap_remove_from_list T n key l;
match x with
@@ -569,7 +604,7 @@ Definition hashMap_remove_back
l0 <- hashMap_remove_from_list_back T n key l;
v <-
alloc_vec_Vec_index_mut_back (List_t T) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (List_t T))
+ (core_slice_index_SliceIndexUsizeSliceTInst (List_t T))
self.(hashMap_slots) hash_mod l0;
Return
{|
@@ -583,7 +618,7 @@ Definition hashMap_remove_back
l0 <- hashMap_remove_from_list_back T n key l;
v <-
alloc_vec_Vec_index_mut_back (List_t T) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (List_t T))
+ (core_slice_index_SliceIndexUsizeSliceTInst (List_t T))
self.(hashMap_slots) hash_mod l0;
Return
{|
@@ -595,7 +630,8 @@ Definition hashMap_remove_back
end
.
-(** [hashmap::test1]: forward function *)
+(** [hashmap::test1]: forward function
+ Source: 'src/hashmap.rs', lines 315:0-315:10 *)
Definition test1 (n : nat) : result unit :=
hm <- hashMap_new u64 n;
hm0 <- hashMap_insert u64 n hm 0%usize 42%u64;
diff --git a/tests/coq/hashmap/Hashmap_Types.v b/tests/coq/hashmap/Hashmap_Types.v
index 8529803d..bfb5ae4b 100644
--- a/tests/coq/hashmap/Hashmap_Types.v
+++ b/tests/coq/hashmap/Hashmap_Types.v
@@ -8,7 +8,8 @@ Import ListNotations.
Local Open Scope Primitives_scope.
Module Hashmap_Types.
-(** [hashmap::List] *)
+(** [hashmap::List]
+ Source: 'src/hashmap.rs', lines 19:0-19:16 *)
Inductive List_t (T : Type) :=
| List_Cons : usize -> T -> List_t T -> List_t T
| List_Nil : List_t T
@@ -17,7 +18,8 @@ Inductive List_t (T : Type) :=
Arguments List_Cons { _ }.
Arguments List_Nil { _ }.
-(** [hashmap::HashMap] *)
+(** [hashmap::HashMap]
+ Source: 'src/hashmap.rs', lines 35:0-35:21 *)
Record HashMap_t (T : Type) :=
mkHashMap_t {
hashMap_num_entries : usize;
diff --git a/tests/coq/hashmap/Primitives.v b/tests/coq/hashmap/Primitives.v
index 85e38f01..83f860b6 100644
--- a/tests/coq/hashmap/Primitives.v
+++ b/tests/coq/hashmap/Primitives.v
@@ -467,14 +467,14 @@ Definition alloc_boxed_Box_deref_mut (T : Type) (x : T) : result T := Return x.
Definition alloc_boxed_Box_deref_mut_back (T : Type) (_ : T) (x : T) : result T := Return x.
(* Trait instance *)
-Definition alloc_boxed_Box_coreOpsDerefInst (Self : Type) : core_ops_deref_Deref Self := {|
+Definition alloc_boxed_Box_coreopsDerefInst (Self : Type) : core_ops_deref_Deref Self := {|
core_ops_deref_Deref_target := Self;
core_ops_deref_Deref_deref := alloc_boxed_Box_deref Self;
|}.
(* Trait instance *)
-Definition alloc_boxed_Box_coreOpsDerefMutInst (Self : Type) : core_ops_deref_DerefMut Self := {|
- core_ops_deref_DerefMut_derefInst := alloc_boxed_Box_coreOpsDerefInst Self;
+Definition alloc_boxed_Box_coreopsDerefMutInst (Self : Type) : core_ops_deref_DerefMut Self := {|
+ core_ops_deref_DerefMut_derefInst := alloc_boxed_Box_coreopsDerefInst Self;
core_ops_deref_DerefMut_deref_mut := alloc_boxed_Box_deref_mut Self;
core_ops_deref_DerefMut_deref_mut_back := alloc_boxed_Box_deref_mut_back Self;
|}.
@@ -576,7 +576,7 @@ Definition alloc_vec_Vec_insert (T: Type) (v: alloc_vec_Vec T) (i: usize) (x: T)
else Fail_ Failure).
(* Helper *)
-Axiom alloc_vec_Vec_index_usize : forall {T : Type} (v : alloc_vec_Vec T) (i : usize) (x : T), result T.
+Axiom alloc_vec_Vec_index_usize : forall {T : Type} (v : alloc_vec_Vec T) (i : usize), result T.
(* Helper *)
Axiom alloc_vec_Vec_update_usize : forall {T : Type} (v : alloc_vec_Vec T) (i : usize) (x : T), result (alloc_vec_Vec T).
@@ -620,18 +620,18 @@ Definition core_slice_index_Slice_index
end.
(* [core::slice::index::Range:::get]: forward function *)
-Axiom core_slice_index_Range_get : forall (T : Type) (i : core_ops_range_Range usize) (s : slice T), result (option (slice T)).
+Axiom core_slice_index_RangeUsize_get : forall (T : Type) (i : core_ops_range_Range usize) (s : slice T), result (option (slice T)).
(* [core::slice::index::Range::get_mut]: forward function *)
-Axiom core_slice_index_Range_get_mut :
+Axiom core_slice_index_RangeUsize_get_mut :
forall (T : Type), core_ops_range_Range usize -> slice T -> result (option (slice T)).
(* [core::slice::index::Range::get_mut]: backward function 0 *)
-Axiom core_slice_index_Range_get_mut_back :
+Axiom core_slice_index_RangeUsize_get_mut_back :
forall (T : Type), core_ops_range_Range usize -> slice T -> option (slice T) -> result (slice T).
(* [core::slice::index::Range::get_unchecked]: forward function *)
-Definition core_slice_index_Range_get_unchecked
+Definition core_slice_index_RangeUsize_get_unchecked
(T : Type) :
core_ops_range_Range usize -> const_raw_ptr (slice T) -> result (const_raw_ptr (slice T)) :=
(* Don't know what the model should be - for now we always fail to make
@@ -639,7 +639,7 @@ Definition core_slice_index_Range_get_unchecked
fun _ _ => Fail_ Failure.
(* [core::slice::index::Range::get_unchecked_mut]: forward function *)
-Definition core_slice_index_Range_get_unchecked_mut
+Definition core_slice_index_RangeUsize_get_unchecked_mut
(T : Type) :
core_ops_range_Range usize -> mut_raw_ptr (slice T) -> result (mut_raw_ptr (slice T)) :=
(* Don't know what the model should be - for now we always fail to make
@@ -647,15 +647,15 @@ Definition core_slice_index_Range_get_unchecked_mut
fun _ _ => Fail_ Failure.
(* [core::slice::index::Range::index]: forward function *)
-Axiom core_slice_index_Range_index :
+Axiom core_slice_index_RangeUsize_index :
forall (T : Type), core_ops_range_Range usize -> slice T -> result (slice T).
(* [core::slice::index::Range::index_mut]: forward function *)
-Axiom core_slice_index_Range_index_mut :
+Axiom core_slice_index_RangeUsize_index_mut :
forall (T : Type), core_ops_range_Range usize -> slice T -> result (slice T).
(* [core::slice::index::Range::index_mut]: backward function 0 *)
-Axiom core_slice_index_Range_index_mut_back :
+Axiom core_slice_index_RangeUsize_index_mut_back :
forall (T : Type), core_ops_range_Range usize -> slice T -> slice T -> result (slice T).
(* [core::slice::index::[T]::index_mut]: forward function *)
@@ -683,44 +683,44 @@ Axiom core_array_Array_index_mut_back :
forall (T Idx : Type) (N : usize) (inst : core_ops_index_IndexMut (slice T) Idx)
(a : array T N) (i : Idx) (x : inst.(core_ops_index_IndexMut_indexInst).(core_ops_index_Index_Output)), result (array T N).
-(* Trait implementation: [core::slice::index::[T]] *)
-Definition core_slice_index_Slice_coreopsindexIndexInst (T Idx : Type)
- (inst : core_slice_index_SliceIndex Idx (slice T)) :
- core_ops_index_Index (slice T) Idx := {|
- core_ops_index_Index_Output := inst.(core_slice_index_SliceIndex_Output);
- core_ops_index_Index_index := core_slice_index_Slice_index T Idx inst;
-|}.
-
(* Trait implementation: [core::slice::index::private_slice_index::Range] *)
-Definition core_slice_index_private_slice_index_Range_coresliceindexprivate_slice_indexSealedInst
+Definition core_slice_index_private_slice_index_SealedRangeUsizeInst
: core_slice_index_private_slice_index_Sealed (core_ops_range_Range usize) := tt.
(* Trait implementation: [core::slice::index::Range] *)
-Definition core_slice_index_Range_coresliceindexSliceIndexInst (T : Type) :
+Definition core_slice_index_SliceIndexRangeUsizeSliceTInst (T : Type) :
core_slice_index_SliceIndex (core_ops_range_Range usize) (slice T) := {|
- core_slice_index_SliceIndex_sealedInst := core_slice_index_private_slice_index_Range_coresliceindexprivate_slice_indexSealedInst;
+ core_slice_index_SliceIndex_sealedInst := core_slice_index_private_slice_index_SealedRangeUsizeInst;
core_slice_index_SliceIndex_Output := slice T;
- core_slice_index_SliceIndex_get := core_slice_index_Range_get T;
- core_slice_index_SliceIndex_get_mut := core_slice_index_Range_get_mut T;
- core_slice_index_SliceIndex_get_mut_back := core_slice_index_Range_get_mut_back T;
- core_slice_index_SliceIndex_get_unchecked := core_slice_index_Range_get_unchecked T;
- core_slice_index_SliceIndex_get_unchecked_mut := core_slice_index_Range_get_unchecked_mut T;
- core_slice_index_SliceIndex_index := core_slice_index_Range_index T;
- core_slice_index_SliceIndex_index_mut := core_slice_index_Range_index_mut T;
- core_slice_index_SliceIndex_index_mut_back := core_slice_index_Range_index_mut_back T;
+ core_slice_index_SliceIndex_get := core_slice_index_RangeUsize_get T;
+ core_slice_index_SliceIndex_get_mut := core_slice_index_RangeUsize_get_mut T;
+ core_slice_index_SliceIndex_get_mut_back := core_slice_index_RangeUsize_get_mut_back T;
+ core_slice_index_SliceIndex_get_unchecked := core_slice_index_RangeUsize_get_unchecked T;
+ core_slice_index_SliceIndex_get_unchecked_mut := core_slice_index_RangeUsize_get_unchecked_mut T;
+ core_slice_index_SliceIndex_index := core_slice_index_RangeUsize_index T;
+ core_slice_index_SliceIndex_index_mut := core_slice_index_RangeUsize_index_mut T;
+ core_slice_index_SliceIndex_index_mut_back := core_slice_index_RangeUsize_index_mut_back T;
+|}.
+
+(* Trait implementation: [core::slice::index::[T]] *)
+Definition core_ops_index_IndexSliceTIInst (T Idx : Type)
+ (inst : core_slice_index_SliceIndex Idx (slice T)) :
+ core_ops_index_Index (slice T) Idx := {|
+ core_ops_index_Index_Output := inst.(core_slice_index_SliceIndex_Output);
+ core_ops_index_Index_index := core_slice_index_Slice_index T Idx inst;
|}.
(* Trait implementation: [core::slice::index::[T]] *)
-Definition core_slice_index_Slice_coreopsindexIndexMutInst (T Idx : Type)
+Definition core_ops_index_IndexMutSliceTIInst (T Idx : Type)
(inst : core_slice_index_SliceIndex Idx (slice T)) :
core_ops_index_IndexMut (slice T) Idx := {|
- core_ops_index_IndexMut_indexInst := core_slice_index_Slice_coreopsindexIndexInst T Idx inst;
+ core_ops_index_IndexMut_indexInst := core_ops_index_IndexSliceTIInst T Idx inst;
core_ops_index_IndexMut_index_mut := core_slice_index_Slice_index_mut T Idx inst;
core_ops_index_IndexMut_index_mut_back := core_slice_index_Slice_index_mut_back T Idx inst;
|}.
(* Trait implementation: [core::array::[T; N]] *)
-Definition core_array_Array_coreopsindexIndexInst (T Idx : Type) (N : usize)
+Definition core_ops_index_IndexArrayInst (T Idx : Type) (N : usize)
(inst : core_ops_index_Index (slice T) Idx) :
core_ops_index_Index (array T N) Idx := {|
core_ops_index_Index_Output := inst.(core_ops_index_Index_Output);
@@ -728,10 +728,10 @@ Definition core_array_Array_coreopsindexIndexInst (T Idx : Type) (N : usize)
|}.
(* Trait implementation: [core::array::[T; N]] *)
-Definition core_array_Array_coreopsindexIndexMutInst (T Idx : Type) (N : usize)
+Definition core_ops_index_IndexMutArrayInst (T Idx : Type) (N : usize)
(inst : core_ops_index_IndexMut (slice T) Idx) :
core_ops_index_IndexMut (array T N) Idx := {|
- core_ops_index_IndexMut_indexInst := core_array_Array_coreopsindexIndexInst T Idx N inst.(core_ops_index_IndexMut_indexInst);
+ core_ops_index_IndexMut_indexInst := core_ops_index_IndexArrayInst T Idx N inst.(core_ops_index_IndexMut_indexInst);
core_ops_index_IndexMut_index_mut := core_array_Array_index_mut T Idx N inst;
core_ops_index_IndexMut_index_mut_back := core_array_Array_index_mut_back T Idx N inst;
|}.
@@ -765,13 +765,13 @@ Axiom core_slice_index_usize_index_mut_back :
forall (T : Type), usize -> slice T -> T -> result (slice T).
(* Trait implementation: [core::slice::index::private_slice_index::usize] *)
-Definition core_slice_index_private_slice_index_usize_coresliceindexprivate_slice_indexSealedInst
+Definition core_slice_index_private_slice_index_SealedUsizeInst
: core_slice_index_private_slice_index_Sealed usize := tt.
(* Trait implementation: [core::slice::index::usize] *)
-Definition core_slice_index_usize_coresliceindexSliceIndexInst (T : Type) :
+Definition core_slice_index_SliceIndexUsizeSliceTInst (T : Type) :
core_slice_index_SliceIndex usize (slice T) := {|
- core_slice_index_SliceIndex_sealedInst := core_slice_index_private_slice_index_usize_coresliceindexprivate_slice_indexSealedInst;
+ core_slice_index_SliceIndex_sealedInst := core_slice_index_private_slice_index_SealedUsizeInst;
core_slice_index_SliceIndex_Output := T;
core_slice_index_SliceIndex_get := core_slice_index_usize_get T;
core_slice_index_SliceIndex_get_mut := core_slice_index_usize_get_mut T;
@@ -815,8 +815,16 @@ Definition alloc_vec_Vec_coreopsindexIndexMutInst (T Idx : Type)
(*** Theorems *)
+Axiom alloc_vec_Vec_index_eq : forall {a : Type} (v : alloc_vec_Vec a) (i : usize) (x : a),
+ alloc_vec_Vec_index a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i =
+ alloc_vec_Vec_index_usize v i.
+
+Axiom alloc_vec_Vec_index_mut_eq : forall {a : Type} (v : alloc_vec_Vec a) (i : usize) (x : a),
+ alloc_vec_Vec_index_mut a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i =
+ alloc_vec_Vec_index_usize v i.
+
Axiom alloc_vec_Vec_index_mut_back_eq : forall {a : Type} (v : alloc_vec_Vec a) (i : usize) (x : a),
- alloc_vec_Vec_index_mut_back a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i x =
+ alloc_vec_Vec_index_mut_back a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i x =
alloc_vec_Vec_update_usize v i x.
End Primitives.
diff --git a/tests/coq/hashmap_on_disk/HashmapMain_Funs.v b/tests/coq/hashmap_on_disk/HashmapMain_Funs.v
index eac78186..46d3ee29 100644
--- a/tests/coq/hashmap_on_disk/HashmapMain_Funs.v
+++ b/tests/coq/hashmap_on_disk/HashmapMain_Funs.v
@@ -12,11 +12,13 @@ Require Export HashmapMain_Opaque.
Import HashmapMain_Opaque.
Module HashmapMain_Funs.
-(** [hashmap_main::hashmap::hash_key]: forward function *)
+(** [hashmap_main::hashmap::hash_key]: forward function
+ Source: 'src/hashmap.rs', lines 27:0-27:32 *)
Definition hashmap_hash_key (k : usize) : result usize :=
Return k.
-(** [hashmap_main::hashmap::HashMap::{0}::allocate_slots]: loop 0: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::allocate_slots]: loop 0: forward function
+ Source: 'src/hashmap.rs', lines 50:4-56:5 *)
Fixpoint hashmap_HashMap_allocate_slots_loop
(T : Type) (n : nat) (slots : alloc_vec_Vec (hashmap_List_t T)) (n0 : usize)
:
@@ -34,7 +36,8 @@ Fixpoint hashmap_HashMap_allocate_slots_loop
end
.
-(** [hashmap_main::hashmap::HashMap::{0}::allocate_slots]: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::allocate_slots]: forward function
+ Source: 'src/hashmap.rs', lines 50:4-50:76 *)
Definition hashmap_HashMap_allocate_slots
(T : Type) (n : nat) (slots : alloc_vec_Vec (hashmap_List_t T)) (n0 : usize)
:
@@ -43,7 +46,8 @@ Definition hashmap_HashMap_allocate_slots
hashmap_HashMap_allocate_slots_loop T n slots n0
.
-(** [hashmap_main::hashmap::HashMap::{0}::new_with_capacity]: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::new_with_capacity]: forward function
+ Source: 'src/hashmap.rs', lines 59:4-63:13 *)
Definition hashmap_HashMap_new_with_capacity
(T : Type) (n : nat) (capacity : usize) (max_load_dividend : usize)
(max_load_divisor : usize) :
@@ -62,14 +66,16 @@ Definition hashmap_HashMap_new_with_capacity
|}
.
-(** [hashmap_main::hashmap::HashMap::{0}::new]: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::new]: forward function
+ Source: 'src/hashmap.rs', lines 75:4-75:24 *)
Definition hashmap_HashMap_new
(T : Type) (n : nat) : result (hashmap_HashMap_t T) :=
hashmap_HashMap_new_with_capacity T n 32%usize 4%usize 5%usize
.
-(** [hashmap_main::hashmap::HashMap::{0}::clear]: loop 0: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::clear]: loop 0: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 80:4-88:5 *)
Fixpoint hashmap_HashMap_clear_loop
(T : Type) (n : nat) (slots : alloc_vec_Vec (hashmap_List_t T)) (i : usize) :
result (alloc_vec_Vec (hashmap_List_t T))
@@ -83,15 +89,16 @@ Fixpoint hashmap_HashMap_clear_loop
i1 <- usize_add i 1%usize;
slots0 <-
alloc_vec_Vec_index_mut_back (hashmap_List_t T) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (hashmap_List_t
- T)) slots i Hashmap_List_Nil;
+ (core_slice_index_SliceIndexUsizeSliceTInst (hashmap_List_t T)) slots
+ i Hashmap_List_Nil;
hashmap_HashMap_clear_loop T n0 slots0 i1)
else Return slots
end
.
-(** [hashmap_main::hashmap::HashMap::{0}::clear]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::clear]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 80:4-80:27 *)
Definition hashmap_HashMap_clear
(T : Type) (n : nat) (self : hashmap_HashMap_t T) :
result (hashmap_HashMap_t T)
@@ -106,13 +113,15 @@ Definition hashmap_HashMap_clear
|}
.
-(** [hashmap_main::hashmap::HashMap::{0}::len]: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::len]: forward function
+ Source: 'src/hashmap.rs', lines 90:4-90:30 *)
Definition hashmap_HashMap_len
(T : Type) (self : hashmap_HashMap_t T) : result usize :=
Return self.(hashmap_HashMap_num_entries)
.
-(** [hashmap_main::hashmap::HashMap::{0}::insert_in_list]: loop 0: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::insert_in_list]: loop 0: forward function
+ Source: 'src/hashmap.rs', lines 97:4-114:5 *)
Fixpoint hashmap_HashMap_insert_in_list_loop
(T : Type) (n : nat) (key : usize) (value : T) (ls : hashmap_List_t T) :
result bool
@@ -130,7 +139,8 @@ Fixpoint hashmap_HashMap_insert_in_list_loop
end
.
-(** [hashmap_main::hashmap::HashMap::{0}::insert_in_list]: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::insert_in_list]: forward function
+ Source: 'src/hashmap.rs', lines 97:4-97:71 *)
Definition hashmap_HashMap_insert_in_list
(T : Type) (n : nat) (key : usize) (value : T) (ls : hashmap_List_t T) :
result bool
@@ -138,7 +148,8 @@ Definition hashmap_HashMap_insert_in_list
hashmap_HashMap_insert_in_list_loop T n key value ls
.
-(** [hashmap_main::hashmap::HashMap::{0}::insert_in_list]: loop 0: backward function 0 *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::insert_in_list]: loop 0: backward function 0
+ Source: 'src/hashmap.rs', lines 97:4-114:5 *)
Fixpoint hashmap_HashMap_insert_in_list_loop_back
(T : Type) (n : nat) (key : usize) (value : T) (ls : hashmap_List_t T) :
result (hashmap_List_t T)
@@ -159,7 +170,8 @@ Fixpoint hashmap_HashMap_insert_in_list_loop_back
end
.
-(** [hashmap_main::hashmap::HashMap::{0}::insert_in_list]: backward function 0 *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::insert_in_list]: backward function 0
+ Source: 'src/hashmap.rs', lines 97:4-97:71 *)
Definition hashmap_HashMap_insert_in_list_back
(T : Type) (n : nat) (key : usize) (value : T) (ls : hashmap_List_t T) :
result (hashmap_List_t T)
@@ -167,8 +179,9 @@ Definition hashmap_HashMap_insert_in_list_back
hashmap_HashMap_insert_in_list_loop_back T n key value ls
.
-(** [hashmap_main::hashmap::HashMap::{0}::insert_no_resize]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::insert_no_resize]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 117:4-117:54 *)
Definition hashmap_HashMap_insert_no_resize
(T : Type) (n : nat) (self : hashmap_HashMap_t T) (key : usize) (value : T) :
result (hashmap_HashMap_t T)
@@ -178,7 +191,7 @@ Definition hashmap_HashMap_insert_no_resize
hash_mod <- usize_rem hash i;
l <-
alloc_vec_Vec_index_mut (hashmap_List_t T) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (hashmap_List_t T))
+ (core_slice_index_SliceIndexUsizeSliceTInst (hashmap_List_t T))
self.(hashmap_HashMap_slots) hash_mod;
inserted <- hashmap_HashMap_insert_in_list T n key value l;
if inserted
@@ -187,8 +200,8 @@ Definition hashmap_HashMap_insert_no_resize
l0 <- hashmap_HashMap_insert_in_list_back T n key value l;
v <-
alloc_vec_Vec_index_mut_back (hashmap_List_t T) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (hashmap_List_t
- T)) self.(hashmap_HashMap_slots) hash_mod l0;
+ (core_slice_index_SliceIndexUsizeSliceTInst (hashmap_List_t T))
+ self.(hashmap_HashMap_slots) hash_mod l0;
Return
{|
hashmap_HashMap_num_entries := i0;
@@ -201,8 +214,8 @@ Definition hashmap_HashMap_insert_no_resize
l0 <- hashmap_HashMap_insert_in_list_back T n key value l;
v <-
alloc_vec_Vec_index_mut_back (hashmap_List_t T) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (hashmap_List_t
- T)) self.(hashmap_HashMap_slots) hash_mod l0;
+ (core_slice_index_SliceIndexUsizeSliceTInst (hashmap_List_t T))
+ self.(hashmap_HashMap_slots) hash_mod l0;
Return
{|
hashmap_HashMap_num_entries := self.(hashmap_HashMap_num_entries);
@@ -213,8 +226,9 @@ Definition hashmap_HashMap_insert_no_resize
|})
.
-(** [hashmap_main::hashmap::HashMap::{0}::move_elements_from_list]: loop 0: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::move_elements_from_list]: loop 0: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 183:4-196:5 *)
Fixpoint hashmap_HashMap_move_elements_from_list_loop
(T : Type) (n : nat) (ntable : hashmap_HashMap_t T) (ls : hashmap_List_t T) :
result (hashmap_HashMap_t T)
@@ -231,8 +245,9 @@ Fixpoint hashmap_HashMap_move_elements_from_list_loop
end
.
-(** [hashmap_main::hashmap::HashMap::{0}::move_elements_from_list]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::move_elements_from_list]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 183:4-183:72 *)
Definition hashmap_HashMap_move_elements_from_list
(T : Type) (n : nat) (ntable : hashmap_HashMap_t T) (ls : hashmap_List_t T) :
result (hashmap_HashMap_t T)
@@ -240,8 +255,9 @@ Definition hashmap_HashMap_move_elements_from_list
hashmap_HashMap_move_elements_from_list_loop T n ntable ls
.
-(** [hashmap_main::hashmap::HashMap::{0}::move_elements]: loop 0: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::move_elements]: loop 0: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 171:4-180:5 *)
Fixpoint hashmap_HashMap_move_elements_loop
(T : Type) (n : nat) (ntable : hashmap_HashMap_t T)
(slots : alloc_vec_Vec (hashmap_List_t T)) (i : usize) :
@@ -255,23 +271,24 @@ Fixpoint hashmap_HashMap_move_elements_loop
then (
l <-
alloc_vec_Vec_index_mut (hashmap_List_t T) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (hashmap_List_t
- T)) slots i;
+ (core_slice_index_SliceIndexUsizeSliceTInst (hashmap_List_t T)) slots
+ i;
let ls := core_mem_replace (hashmap_List_t T) l Hashmap_List_Nil in
ntable0 <- hashmap_HashMap_move_elements_from_list T n0 ntable ls;
i1 <- usize_add i 1%usize;
let l0 := core_mem_replace_back (hashmap_List_t T) l Hashmap_List_Nil in
slots0 <-
alloc_vec_Vec_index_mut_back (hashmap_List_t T) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (hashmap_List_t
- T)) slots i l0;
+ (core_slice_index_SliceIndexUsizeSliceTInst (hashmap_List_t T)) slots
+ i l0;
hashmap_HashMap_move_elements_loop T n0 ntable0 slots0 i1)
else Return (ntable, slots)
end
.
-(** [hashmap_main::hashmap::HashMap::{0}::move_elements]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::move_elements]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 171:4-171:95 *)
Definition hashmap_HashMap_move_elements
(T : Type) (n : nat) (ntable : hashmap_HashMap_t T)
(slots : alloc_vec_Vec (hashmap_List_t T)) (i : usize) :
@@ -280,8 +297,9 @@ Definition hashmap_HashMap_move_elements
hashmap_HashMap_move_elements_loop T n ntable slots i
.
-(** [hashmap_main::hashmap::HashMap::{0}::try_resize]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::try_resize]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 140:4-140:28 *)
Definition hashmap_HashMap_try_resize
(T : Type) (n : nat) (self : hashmap_HashMap_t T) :
result (hashmap_HashMap_t T)
@@ -317,8 +335,9 @@ Definition hashmap_HashMap_try_resize
|}
.
-(** [hashmap_main::hashmap::HashMap::{0}::insert]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::insert]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/hashmap.rs', lines 129:4-129:48 *)
Definition hashmap_HashMap_insert
(T : Type) (n : nat) (self : hashmap_HashMap_t T) (key : usize) (value : T) :
result (hashmap_HashMap_t T)
@@ -330,7 +349,8 @@ Definition hashmap_HashMap_insert
else Return self0
.
-(** [hashmap_main::hashmap::HashMap::{0}::contains_key_in_list]: loop 0: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::contains_key_in_list]: loop 0: forward function
+ Source: 'src/hashmap.rs', lines 206:4-219:5 *)
Fixpoint hashmap_HashMap_contains_key_in_list_loop
(T : Type) (n : nat) (key : usize) (ls : hashmap_List_t T) : result bool :=
match n with
@@ -346,13 +366,15 @@ Fixpoint hashmap_HashMap_contains_key_in_list_loop
end
.
-(** [hashmap_main::hashmap::HashMap::{0}::contains_key_in_list]: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::contains_key_in_list]: forward function
+ Source: 'src/hashmap.rs', lines 206:4-206:68 *)
Definition hashmap_HashMap_contains_key_in_list
(T : Type) (n : nat) (key : usize) (ls : hashmap_List_t T) : result bool :=
hashmap_HashMap_contains_key_in_list_loop T n key ls
.
-(** [hashmap_main::hashmap::HashMap::{0}::contains_key]: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::contains_key]: forward function
+ Source: 'src/hashmap.rs', lines 199:4-199:49 *)
Definition hashmap_HashMap_contains_key
(T : Type) (n : nat) (self : hashmap_HashMap_t T) (key : usize) :
result bool
@@ -362,12 +384,13 @@ Definition hashmap_HashMap_contains_key
hash_mod <- usize_rem hash i;
l <-
alloc_vec_Vec_index (hashmap_List_t T) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (hashmap_List_t T))
+ (core_slice_index_SliceIndexUsizeSliceTInst (hashmap_List_t T))
self.(hashmap_HashMap_slots) hash_mod;
hashmap_HashMap_contains_key_in_list T n key l
.
-(** [hashmap_main::hashmap::HashMap::{0}::get_in_list]: loop 0: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::get_in_list]: loop 0: forward function
+ Source: 'src/hashmap.rs', lines 224:4-237:5 *)
Fixpoint hashmap_HashMap_get_in_list_loop
(T : Type) (n : nat) (key : usize) (ls : hashmap_List_t T) : result T :=
match n with
@@ -383,13 +406,15 @@ Fixpoint hashmap_HashMap_get_in_list_loop
end
.
-(** [hashmap_main::hashmap::HashMap::{0}::get_in_list]: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::get_in_list]: forward function
+ Source: 'src/hashmap.rs', lines 224:4-224:70 *)
Definition hashmap_HashMap_get_in_list
(T : Type) (n : nat) (key : usize) (ls : hashmap_List_t T) : result T :=
hashmap_HashMap_get_in_list_loop T n key ls
.
-(** [hashmap_main::hashmap::HashMap::{0}::get]: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::get]: forward function
+ Source: 'src/hashmap.rs', lines 239:4-239:55 *)
Definition hashmap_HashMap_get
(T : Type) (n : nat) (self : hashmap_HashMap_t T) (key : usize) : result T :=
hash <- hashmap_hash_key key;
@@ -397,12 +422,13 @@ Definition hashmap_HashMap_get
hash_mod <- usize_rem hash i;
l <-
alloc_vec_Vec_index (hashmap_List_t T) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (hashmap_List_t T))
+ (core_slice_index_SliceIndexUsizeSliceTInst (hashmap_List_t T))
self.(hashmap_HashMap_slots) hash_mod;
hashmap_HashMap_get_in_list T n key l
.
-(** [hashmap_main::hashmap::HashMap::{0}::get_mut_in_list]: loop 0: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::get_mut_in_list]: loop 0: forward function
+ Source: 'src/hashmap.rs', lines 245:4-254:5 *)
Fixpoint hashmap_HashMap_get_mut_in_list_loop
(T : Type) (n : nat) (ls : hashmap_List_t T) (key : usize) : result T :=
match n with
@@ -418,13 +444,15 @@ Fixpoint hashmap_HashMap_get_mut_in_list_loop
end
.
-(** [hashmap_main::hashmap::HashMap::{0}::get_mut_in_list]: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::get_mut_in_list]: forward function
+ Source: 'src/hashmap.rs', lines 245:4-245:86 *)
Definition hashmap_HashMap_get_mut_in_list
(T : Type) (n : nat) (ls : hashmap_List_t T) (key : usize) : result T :=
hashmap_HashMap_get_mut_in_list_loop T n ls key
.
-(** [hashmap_main::hashmap::HashMap::{0}::get_mut_in_list]: loop 0: backward function 0 *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::get_mut_in_list]: loop 0: backward function 0
+ Source: 'src/hashmap.rs', lines 245:4-254:5 *)
Fixpoint hashmap_HashMap_get_mut_in_list_loop_back
(T : Type) (n : nat) (ls : hashmap_List_t T) (key : usize) (ret : T) :
result (hashmap_List_t T)
@@ -444,7 +472,8 @@ Fixpoint hashmap_HashMap_get_mut_in_list_loop_back
end
.
-(** [hashmap_main::hashmap::HashMap::{0}::get_mut_in_list]: backward function 0 *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::get_mut_in_list]: backward function 0
+ Source: 'src/hashmap.rs', lines 245:4-245:86 *)
Definition hashmap_HashMap_get_mut_in_list_back
(T : Type) (n : nat) (ls : hashmap_List_t T) (key : usize) (ret : T) :
result (hashmap_List_t T)
@@ -452,7 +481,8 @@ Definition hashmap_HashMap_get_mut_in_list_back
hashmap_HashMap_get_mut_in_list_loop_back T n ls key ret
.
-(** [hashmap_main::hashmap::HashMap::{0}::get_mut]: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::get_mut]: forward function
+ Source: 'src/hashmap.rs', lines 257:4-257:67 *)
Definition hashmap_HashMap_get_mut
(T : Type) (n : nat) (self : hashmap_HashMap_t T) (key : usize) : result T :=
hash <- hashmap_hash_key key;
@@ -460,12 +490,13 @@ Definition hashmap_HashMap_get_mut
hash_mod <- usize_rem hash i;
l <-
alloc_vec_Vec_index_mut (hashmap_List_t T) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (hashmap_List_t T))
+ (core_slice_index_SliceIndexUsizeSliceTInst (hashmap_List_t T))
self.(hashmap_HashMap_slots) hash_mod;
hashmap_HashMap_get_mut_in_list T n l key
.
-(** [hashmap_main::hashmap::HashMap::{0}::get_mut]: backward function 0 *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::get_mut]: backward function 0
+ Source: 'src/hashmap.rs', lines 257:4-257:67 *)
Definition hashmap_HashMap_get_mut_back
(T : Type) (n : nat) (self : hashmap_HashMap_t T) (key : usize) (ret : T) :
result (hashmap_HashMap_t T)
@@ -475,12 +506,12 @@ Definition hashmap_HashMap_get_mut_back
hash_mod <- usize_rem hash i;
l <-
alloc_vec_Vec_index_mut (hashmap_List_t T) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (hashmap_List_t T))
+ (core_slice_index_SliceIndexUsizeSliceTInst (hashmap_List_t T))
self.(hashmap_HashMap_slots) hash_mod;
l0 <- hashmap_HashMap_get_mut_in_list_back T n l key ret;
v <-
alloc_vec_Vec_index_mut_back (hashmap_List_t T) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (hashmap_List_t T))
+ (core_slice_index_SliceIndexUsizeSliceTInst (hashmap_List_t T))
self.(hashmap_HashMap_slots) hash_mod l0;
Return
{|
@@ -491,7 +522,8 @@ Definition hashmap_HashMap_get_mut_back
|}
.
-(** [hashmap_main::hashmap::HashMap::{0}::remove_from_list]: loop 0: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::remove_from_list]: loop 0: forward function
+ Source: 'src/hashmap.rs', lines 265:4-291:5 *)
Fixpoint hashmap_HashMap_remove_from_list_loop
(T : Type) (n : nat) (key : usize) (ls : hashmap_List_t T) :
result (option T)
@@ -516,7 +548,8 @@ Fixpoint hashmap_HashMap_remove_from_list_loop
end
.
-(** [hashmap_main::hashmap::HashMap::{0}::remove_from_list]: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::remove_from_list]: forward function
+ Source: 'src/hashmap.rs', lines 265:4-265:69 *)
Definition hashmap_HashMap_remove_from_list
(T : Type) (n : nat) (key : usize) (ls : hashmap_List_t T) :
result (option T)
@@ -524,7 +557,8 @@ Definition hashmap_HashMap_remove_from_list
hashmap_HashMap_remove_from_list_loop T n key ls
.
-(** [hashmap_main::hashmap::HashMap::{0}::remove_from_list]: loop 0: backward function 1 *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::remove_from_list]: loop 0: backward function 1
+ Source: 'src/hashmap.rs', lines 265:4-291:5 *)
Fixpoint hashmap_HashMap_remove_from_list_loop_back
(T : Type) (n : nat) (key : usize) (ls : hashmap_List_t T) :
result (hashmap_List_t T)
@@ -551,7 +585,8 @@ Fixpoint hashmap_HashMap_remove_from_list_loop_back
end
.
-(** [hashmap_main::hashmap::HashMap::{0}::remove_from_list]: backward function 1 *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::remove_from_list]: backward function 1
+ Source: 'src/hashmap.rs', lines 265:4-265:69 *)
Definition hashmap_HashMap_remove_from_list_back
(T : Type) (n : nat) (key : usize) (ls : hashmap_List_t T) :
result (hashmap_List_t T)
@@ -559,7 +594,8 @@ Definition hashmap_HashMap_remove_from_list_back
hashmap_HashMap_remove_from_list_loop_back T n key ls
.
-(** [hashmap_main::hashmap::HashMap::{0}::remove]: forward function *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::remove]: forward function
+ Source: 'src/hashmap.rs', lines 294:4-294:52 *)
Definition hashmap_HashMap_remove
(T : Type) (n : nat) (self : hashmap_HashMap_t T) (key : usize) :
result (option T)
@@ -569,7 +605,7 @@ Definition hashmap_HashMap_remove
hash_mod <- usize_rem hash i;
l <-
alloc_vec_Vec_index_mut (hashmap_List_t T) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (hashmap_List_t T))
+ (core_slice_index_SliceIndexUsizeSliceTInst (hashmap_List_t T))
self.(hashmap_HashMap_slots) hash_mod;
x <- hashmap_HashMap_remove_from_list T n key l;
match x with
@@ -579,7 +615,8 @@ Definition hashmap_HashMap_remove
end
.
-(** [hashmap_main::hashmap::HashMap::{0}::remove]: backward function 0 *)
+(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::remove]: backward function 0
+ Source: 'src/hashmap.rs', lines 294:4-294:52 *)
Definition hashmap_HashMap_remove_back
(T : Type) (n : nat) (self : hashmap_HashMap_t T) (key : usize) :
result (hashmap_HashMap_t T)
@@ -589,7 +626,7 @@ Definition hashmap_HashMap_remove_back
hash_mod <- usize_rem hash i;
l <-
alloc_vec_Vec_index_mut (hashmap_List_t T) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (hashmap_List_t T))
+ (core_slice_index_SliceIndexUsizeSliceTInst (hashmap_List_t T))
self.(hashmap_HashMap_slots) hash_mod;
x <- hashmap_HashMap_remove_from_list T n key l;
match x with
@@ -597,8 +634,8 @@ Definition hashmap_HashMap_remove_back
l0 <- hashmap_HashMap_remove_from_list_back T n key l;
v <-
alloc_vec_Vec_index_mut_back (hashmap_List_t T) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (hashmap_List_t
- T)) self.(hashmap_HashMap_slots) hash_mod l0;
+ (core_slice_index_SliceIndexUsizeSliceTInst (hashmap_List_t T))
+ self.(hashmap_HashMap_slots) hash_mod l0;
Return
{|
hashmap_HashMap_num_entries := self.(hashmap_HashMap_num_entries);
@@ -612,8 +649,8 @@ Definition hashmap_HashMap_remove_back
l0 <- hashmap_HashMap_remove_from_list_back T n key l;
v <-
alloc_vec_Vec_index_mut_back (hashmap_List_t T) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (hashmap_List_t
- T)) self.(hashmap_HashMap_slots) hash_mod l0;
+ (core_slice_index_SliceIndexUsizeSliceTInst (hashmap_List_t T))
+ self.(hashmap_HashMap_slots) hash_mod l0;
Return
{|
hashmap_HashMap_num_entries := i0;
@@ -625,7 +662,8 @@ Definition hashmap_HashMap_remove_back
end
.
-(** [hashmap_main::hashmap::test1]: forward function *)
+(** [hashmap_main::hashmap::test1]: forward function
+ Source: 'src/hashmap.rs', lines 315:0-315:10 *)
Definition hashmap_test1 (n : nat) : result unit :=
hm <- hashmap_HashMap_new u64 n;
hm0 <- hashmap_HashMap_insert u64 n hm 0%usize 42%u64;
@@ -662,7 +700,8 @@ Definition hashmap_test1 (n : nat) : result unit :=
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 *)
Definition insert_on_disk
(n : nat) (key : usize) (value : u64) (st : state) : result (state * unit) :=
p <- hashmap_utils_deserialize st;
@@ -673,7 +712,8 @@ Definition insert_on_disk
Return (st1, tt)
.
-(** [hashmap_main::main]: forward function *)
+(** [hashmap_main::main]: forward function
+ Source: 'src/hashmap_main.rs', lines 16:0-16:13 *)
Definition main : result unit :=
Return tt.
diff --git a/tests/coq/hashmap_on_disk/HashmapMain_Opaque.v b/tests/coq/hashmap_on_disk/HashmapMain_Opaque.v
index 5e376239..a0e9003d 100644
--- a/tests/coq/hashmap_on_disk/HashmapMain_Opaque.v
+++ b/tests/coq/hashmap_on_disk/HashmapMain_Opaque.v
@@ -10,12 +10,14 @@ Require Export HashmapMain_Types.
Import HashmapMain_Types.
Module HashmapMain_Opaque.
-(** [hashmap_main::hashmap_utils::deserialize]: forward function *)
+(** [hashmap_main::hashmap_utils::deserialize]: forward function
+ Source: 'src/hashmap_utils.rs', lines 10:0-10:43 *)
Axiom 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 *)
Axiom hashmap_utils_serialize
: hashmap_HashMap_t u64 -> state -> result (state * unit)
.
diff --git a/tests/coq/hashmap_on_disk/HashmapMain_Types.v b/tests/coq/hashmap_on_disk/HashmapMain_Types.v
index 95e5f35b..039b7e72 100644
--- a/tests/coq/hashmap_on_disk/HashmapMain_Types.v
+++ b/tests/coq/hashmap_on_disk/HashmapMain_Types.v
@@ -8,7 +8,8 @@ Import ListNotations.
Local Open Scope Primitives_scope.
Module HashmapMain_Types.
-(** [hashmap_main::hashmap::List] *)
+(** [hashmap_main::hashmap::List]
+ Source: 'src/hashmap.rs', lines 19:0-19:16 *)
Inductive hashmap_List_t (T : Type) :=
| Hashmap_List_Cons : usize -> T -> hashmap_List_t T -> hashmap_List_t T
| Hashmap_List_Nil : hashmap_List_t T
@@ -17,7 +18,8 @@ Inductive hashmap_List_t (T : Type) :=
Arguments Hashmap_List_Cons { _ }.
Arguments Hashmap_List_Nil { _ }.
-(** [hashmap_main::hashmap::HashMap] *)
+(** [hashmap_main::hashmap::HashMap]
+ Source: 'src/hashmap.rs', lines 35:0-35:21 *)
Record hashmap_HashMap_t (T : Type) :=
mkhashmap_HashMap_t {
hashmap_HashMap_num_entries : usize;
diff --git a/tests/coq/hashmap_on_disk/Primitives.v b/tests/coq/hashmap_on_disk/Primitives.v
index 85e38f01..83f860b6 100644
--- a/tests/coq/hashmap_on_disk/Primitives.v
+++ b/tests/coq/hashmap_on_disk/Primitives.v
@@ -467,14 +467,14 @@ Definition alloc_boxed_Box_deref_mut (T : Type) (x : T) : result T := Return x.
Definition alloc_boxed_Box_deref_mut_back (T : Type) (_ : T) (x : T) : result T := Return x.
(* Trait instance *)
-Definition alloc_boxed_Box_coreOpsDerefInst (Self : Type) : core_ops_deref_Deref Self := {|
+Definition alloc_boxed_Box_coreopsDerefInst (Self : Type) : core_ops_deref_Deref Self := {|
core_ops_deref_Deref_target := Self;
core_ops_deref_Deref_deref := alloc_boxed_Box_deref Self;
|}.
(* Trait instance *)
-Definition alloc_boxed_Box_coreOpsDerefMutInst (Self : Type) : core_ops_deref_DerefMut Self := {|
- core_ops_deref_DerefMut_derefInst := alloc_boxed_Box_coreOpsDerefInst Self;
+Definition alloc_boxed_Box_coreopsDerefMutInst (Self : Type) : core_ops_deref_DerefMut Self := {|
+ core_ops_deref_DerefMut_derefInst := alloc_boxed_Box_coreopsDerefInst Self;
core_ops_deref_DerefMut_deref_mut := alloc_boxed_Box_deref_mut Self;
core_ops_deref_DerefMut_deref_mut_back := alloc_boxed_Box_deref_mut_back Self;
|}.
@@ -576,7 +576,7 @@ Definition alloc_vec_Vec_insert (T: Type) (v: alloc_vec_Vec T) (i: usize) (x: T)
else Fail_ Failure).
(* Helper *)
-Axiom alloc_vec_Vec_index_usize : forall {T : Type} (v : alloc_vec_Vec T) (i : usize) (x : T), result T.
+Axiom alloc_vec_Vec_index_usize : forall {T : Type} (v : alloc_vec_Vec T) (i : usize), result T.
(* Helper *)
Axiom alloc_vec_Vec_update_usize : forall {T : Type} (v : alloc_vec_Vec T) (i : usize) (x : T), result (alloc_vec_Vec T).
@@ -620,18 +620,18 @@ Definition core_slice_index_Slice_index
end.
(* [core::slice::index::Range:::get]: forward function *)
-Axiom core_slice_index_Range_get : forall (T : Type) (i : core_ops_range_Range usize) (s : slice T), result (option (slice T)).
+Axiom core_slice_index_RangeUsize_get : forall (T : Type) (i : core_ops_range_Range usize) (s : slice T), result (option (slice T)).
(* [core::slice::index::Range::get_mut]: forward function *)
-Axiom core_slice_index_Range_get_mut :
+Axiom core_slice_index_RangeUsize_get_mut :
forall (T : Type), core_ops_range_Range usize -> slice T -> result (option (slice T)).
(* [core::slice::index::Range::get_mut]: backward function 0 *)
-Axiom core_slice_index_Range_get_mut_back :
+Axiom core_slice_index_RangeUsize_get_mut_back :
forall (T : Type), core_ops_range_Range usize -> slice T -> option (slice T) -> result (slice T).
(* [core::slice::index::Range::get_unchecked]: forward function *)
-Definition core_slice_index_Range_get_unchecked
+Definition core_slice_index_RangeUsize_get_unchecked
(T : Type) :
core_ops_range_Range usize -> const_raw_ptr (slice T) -> result (const_raw_ptr (slice T)) :=
(* Don't know what the model should be - for now we always fail to make
@@ -639,7 +639,7 @@ Definition core_slice_index_Range_get_unchecked
fun _ _ => Fail_ Failure.
(* [core::slice::index::Range::get_unchecked_mut]: forward function *)
-Definition core_slice_index_Range_get_unchecked_mut
+Definition core_slice_index_RangeUsize_get_unchecked_mut
(T : Type) :
core_ops_range_Range usize -> mut_raw_ptr (slice T) -> result (mut_raw_ptr (slice T)) :=
(* Don't know what the model should be - for now we always fail to make
@@ -647,15 +647,15 @@ Definition core_slice_index_Range_get_unchecked_mut
fun _ _ => Fail_ Failure.
(* [core::slice::index::Range::index]: forward function *)
-Axiom core_slice_index_Range_index :
+Axiom core_slice_index_RangeUsize_index :
forall (T : Type), core_ops_range_Range usize -> slice T -> result (slice T).
(* [core::slice::index::Range::index_mut]: forward function *)
-Axiom core_slice_index_Range_index_mut :
+Axiom core_slice_index_RangeUsize_index_mut :
forall (T : Type), core_ops_range_Range usize -> slice T -> result (slice T).
(* [core::slice::index::Range::index_mut]: backward function 0 *)
-Axiom core_slice_index_Range_index_mut_back :
+Axiom core_slice_index_RangeUsize_index_mut_back :
forall (T : Type), core_ops_range_Range usize -> slice T -> slice T -> result (slice T).
(* [core::slice::index::[T]::index_mut]: forward function *)
@@ -683,44 +683,44 @@ Axiom core_array_Array_index_mut_back :
forall (T Idx : Type) (N : usize) (inst : core_ops_index_IndexMut (slice T) Idx)
(a : array T N) (i : Idx) (x : inst.(core_ops_index_IndexMut_indexInst).(core_ops_index_Index_Output)), result (array T N).
-(* Trait implementation: [core::slice::index::[T]] *)
-Definition core_slice_index_Slice_coreopsindexIndexInst (T Idx : Type)
- (inst : core_slice_index_SliceIndex Idx (slice T)) :
- core_ops_index_Index (slice T) Idx := {|
- core_ops_index_Index_Output := inst.(core_slice_index_SliceIndex_Output);
- core_ops_index_Index_index := core_slice_index_Slice_index T Idx inst;
-|}.
-
(* Trait implementation: [core::slice::index::private_slice_index::Range] *)
-Definition core_slice_index_private_slice_index_Range_coresliceindexprivate_slice_indexSealedInst
+Definition core_slice_index_private_slice_index_SealedRangeUsizeInst
: core_slice_index_private_slice_index_Sealed (core_ops_range_Range usize) := tt.
(* Trait implementation: [core::slice::index::Range] *)
-Definition core_slice_index_Range_coresliceindexSliceIndexInst (T : Type) :
+Definition core_slice_index_SliceIndexRangeUsizeSliceTInst (T : Type) :
core_slice_index_SliceIndex (core_ops_range_Range usize) (slice T) := {|
- core_slice_index_SliceIndex_sealedInst := core_slice_index_private_slice_index_Range_coresliceindexprivate_slice_indexSealedInst;
+ core_slice_index_SliceIndex_sealedInst := core_slice_index_private_slice_index_SealedRangeUsizeInst;
core_slice_index_SliceIndex_Output := slice T;
- core_slice_index_SliceIndex_get := core_slice_index_Range_get T;
- core_slice_index_SliceIndex_get_mut := core_slice_index_Range_get_mut T;
- core_slice_index_SliceIndex_get_mut_back := core_slice_index_Range_get_mut_back T;
- core_slice_index_SliceIndex_get_unchecked := core_slice_index_Range_get_unchecked T;
- core_slice_index_SliceIndex_get_unchecked_mut := core_slice_index_Range_get_unchecked_mut T;
- core_slice_index_SliceIndex_index := core_slice_index_Range_index T;
- core_slice_index_SliceIndex_index_mut := core_slice_index_Range_index_mut T;
- core_slice_index_SliceIndex_index_mut_back := core_slice_index_Range_index_mut_back T;
+ core_slice_index_SliceIndex_get := core_slice_index_RangeUsize_get T;
+ core_slice_index_SliceIndex_get_mut := core_slice_index_RangeUsize_get_mut T;
+ core_slice_index_SliceIndex_get_mut_back := core_slice_index_RangeUsize_get_mut_back T;
+ core_slice_index_SliceIndex_get_unchecked := core_slice_index_RangeUsize_get_unchecked T;
+ core_slice_index_SliceIndex_get_unchecked_mut := core_slice_index_RangeUsize_get_unchecked_mut T;
+ core_slice_index_SliceIndex_index := core_slice_index_RangeUsize_index T;
+ core_slice_index_SliceIndex_index_mut := core_slice_index_RangeUsize_index_mut T;
+ core_slice_index_SliceIndex_index_mut_back := core_slice_index_RangeUsize_index_mut_back T;
+|}.
+
+(* Trait implementation: [core::slice::index::[T]] *)
+Definition core_ops_index_IndexSliceTIInst (T Idx : Type)
+ (inst : core_slice_index_SliceIndex Idx (slice T)) :
+ core_ops_index_Index (slice T) Idx := {|
+ core_ops_index_Index_Output := inst.(core_slice_index_SliceIndex_Output);
+ core_ops_index_Index_index := core_slice_index_Slice_index T Idx inst;
|}.
(* Trait implementation: [core::slice::index::[T]] *)
-Definition core_slice_index_Slice_coreopsindexIndexMutInst (T Idx : Type)
+Definition core_ops_index_IndexMutSliceTIInst (T Idx : Type)
(inst : core_slice_index_SliceIndex Idx (slice T)) :
core_ops_index_IndexMut (slice T) Idx := {|
- core_ops_index_IndexMut_indexInst := core_slice_index_Slice_coreopsindexIndexInst T Idx inst;
+ core_ops_index_IndexMut_indexInst := core_ops_index_IndexSliceTIInst T Idx inst;
core_ops_index_IndexMut_index_mut := core_slice_index_Slice_index_mut T Idx inst;
core_ops_index_IndexMut_index_mut_back := core_slice_index_Slice_index_mut_back T Idx inst;
|}.
(* Trait implementation: [core::array::[T; N]] *)
-Definition core_array_Array_coreopsindexIndexInst (T Idx : Type) (N : usize)
+Definition core_ops_index_IndexArrayInst (T Idx : Type) (N : usize)
(inst : core_ops_index_Index (slice T) Idx) :
core_ops_index_Index (array T N) Idx := {|
core_ops_index_Index_Output := inst.(core_ops_index_Index_Output);
@@ -728,10 +728,10 @@ Definition core_array_Array_coreopsindexIndexInst (T Idx : Type) (N : usize)
|}.
(* Trait implementation: [core::array::[T; N]] *)
-Definition core_array_Array_coreopsindexIndexMutInst (T Idx : Type) (N : usize)
+Definition core_ops_index_IndexMutArrayInst (T Idx : Type) (N : usize)
(inst : core_ops_index_IndexMut (slice T) Idx) :
core_ops_index_IndexMut (array T N) Idx := {|
- core_ops_index_IndexMut_indexInst := core_array_Array_coreopsindexIndexInst T Idx N inst.(core_ops_index_IndexMut_indexInst);
+ core_ops_index_IndexMut_indexInst := core_ops_index_IndexArrayInst T Idx N inst.(core_ops_index_IndexMut_indexInst);
core_ops_index_IndexMut_index_mut := core_array_Array_index_mut T Idx N inst;
core_ops_index_IndexMut_index_mut_back := core_array_Array_index_mut_back T Idx N inst;
|}.
@@ -765,13 +765,13 @@ Axiom core_slice_index_usize_index_mut_back :
forall (T : Type), usize -> slice T -> T -> result (slice T).
(* Trait implementation: [core::slice::index::private_slice_index::usize] *)
-Definition core_slice_index_private_slice_index_usize_coresliceindexprivate_slice_indexSealedInst
+Definition core_slice_index_private_slice_index_SealedUsizeInst
: core_slice_index_private_slice_index_Sealed usize := tt.
(* Trait implementation: [core::slice::index::usize] *)
-Definition core_slice_index_usize_coresliceindexSliceIndexInst (T : Type) :
+Definition core_slice_index_SliceIndexUsizeSliceTInst (T : Type) :
core_slice_index_SliceIndex usize (slice T) := {|
- core_slice_index_SliceIndex_sealedInst := core_slice_index_private_slice_index_usize_coresliceindexprivate_slice_indexSealedInst;
+ core_slice_index_SliceIndex_sealedInst := core_slice_index_private_slice_index_SealedUsizeInst;
core_slice_index_SliceIndex_Output := T;
core_slice_index_SliceIndex_get := core_slice_index_usize_get T;
core_slice_index_SliceIndex_get_mut := core_slice_index_usize_get_mut T;
@@ -815,8 +815,16 @@ Definition alloc_vec_Vec_coreopsindexIndexMutInst (T Idx : Type)
(*** Theorems *)
+Axiom alloc_vec_Vec_index_eq : forall {a : Type} (v : alloc_vec_Vec a) (i : usize) (x : a),
+ alloc_vec_Vec_index a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i =
+ alloc_vec_Vec_index_usize v i.
+
+Axiom alloc_vec_Vec_index_mut_eq : forall {a : Type} (v : alloc_vec_Vec a) (i : usize) (x : a),
+ alloc_vec_Vec_index_mut a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i =
+ alloc_vec_Vec_index_usize v i.
+
Axiom alloc_vec_Vec_index_mut_back_eq : forall {a : Type} (v : alloc_vec_Vec a) (i : usize) (x : a),
- alloc_vec_Vec_index_mut_back a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i x =
+ alloc_vec_Vec_index_mut_back a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i x =
alloc_vec_Vec_update_usize v i x.
End Primitives.
diff --git a/tests/coq/misc/Constants.v b/tests/coq/misc/Constants.v
index 03653f69..20edb2b1 100644
--- a/tests/coq/misc/Constants.v
+++ b/tests/coq/misc/Constants.v
@@ -8,124 +8,152 @@ Import ListNotations.
Local Open Scope Primitives_scope.
Module Constants.
-(** [constants::X0] *)
+(** [constants::X0]
+ Source: 'src/constants.rs', lines 5:0-5:17 *)
Definition x0_body : result u32 := Return 0%u32.
Definition x0_c : u32 := x0_body%global.
-(** [constants::X1] *)
+(** [constants::X1]
+ Source: 'src/constants.rs', lines 7:0-7:17 *)
Definition x1_body : result u32 := Return core_u32_max.
Definition x1_c : u32 := x1_body%global.
-(** [constants::X2] *)
+(** [constants::X2]
+ Source: 'src/constants.rs', lines 10:0-10:17 *)
Definition x2_body : result u32 := Return 3%u32.
Definition x2_c : u32 := x2_body%global.
-(** [constants::incr]: forward function *)
+(** [constants::incr]: forward function
+ Source: 'src/constants.rs', lines 17:0-17:32 *)
Definition incr (n : u32) : result u32 :=
u32_add n 1%u32.
-(** [constants::X3] *)
+(** [constants::X3]
+ Source: 'src/constants.rs', lines 15:0-15:17 *)
Definition x3_body : result u32 := incr 32%u32.
Definition x3_c : u32 := x3_body%global.
-(** [constants::mk_pair0]: forward function *)
+(** [constants::mk_pair0]: forward function
+ Source: 'src/constants.rs', lines 23:0-23:51 *)
Definition 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 *)
Record Pair_t (T1 T2 : Type) := mkPair_t { pair_x : T1; pair_y : T2; }.
Arguments mkPair_t { _ _ }.
Arguments pair_x { _ _ }.
Arguments pair_y { _ _ }.
-(** [constants::mk_pair1]: forward function *)
+(** [constants::mk_pair1]: forward function
+ Source: 'src/constants.rs', lines 27:0-27:55 *)
Definition mk_pair1 (x : u32) (y : u32) : result (Pair_t u32 u32) :=
Return {| pair_x := x; pair_y := y |}
.
-(** [constants::P0] *)
+(** [constants::P0]
+ Source: 'src/constants.rs', lines 31:0-31:24 *)
Definition p0_body : result (u32 * u32) := mk_pair0 0%u32 1%u32.
Definition p0_c : (u32 * u32) := p0_body%global.
-(** [constants::P1] *)
+(** [constants::P1]
+ Source: 'src/constants.rs', lines 32:0-32:28 *)
Definition p1_body : result (Pair_t u32 u32) := mk_pair1 0%u32 1%u32.
Definition p1_c : Pair_t u32 u32 := p1_body%global.
-(** [constants::P2] *)
+(** [constants::P2]
+ Source: 'src/constants.rs', lines 33:0-33:24 *)
Definition p2_body : result (u32 * u32) := Return (0%u32, 1%u32).
Definition p2_c : (u32 * u32) := p2_body%global.
-(** [constants::P3] *)
+(** [constants::P3]
+ Source: 'src/constants.rs', lines 34:0-34:28 *)
Definition p3_body : result (Pair_t u32 u32) :=
Return {| pair_x := 0%u32; pair_y := 1%u32 |}
.
Definition p3_c : Pair_t u32 u32 := p3_body%global.
-(** [constants::Wrap] *)
+(** [constants::Wrap]
+ Source: 'src/constants.rs', lines 49:0-49:18 *)
Record Wrap_t (T : Type) := mkWrap_t { wrap_value : T; }.
Arguments mkWrap_t { _ }.
Arguments wrap_value { _ }.
-(** [constants::Wrap::{0}::new]: forward function *)
+(** [constants::{constants::Wrap<T>}::new]: forward function
+ Source: 'src/constants.rs', lines 54:4-54:41 *)
Definition wrap_new (T : Type) (value : T) : result (Wrap_t T) :=
Return {| wrap_value := value |}
.
-(** [constants::Y] *)
+(** [constants::Y]
+ Source: 'src/constants.rs', lines 41:0-41:22 *)
Definition y_body : result (Wrap_t i32) := wrap_new i32 2%i32.
Definition y_c : Wrap_t i32 := y_body%global.
-(** [constants::unwrap_y]: forward function *)
+(** [constants::unwrap_y]: forward function
+ Source: 'src/constants.rs', lines 43:0-43:30 *)
Definition unwrap_y : result i32 :=
Return y_c.(wrap_value).
-(** [constants::YVAL] *)
+(** [constants::YVAL]
+ Source: 'src/constants.rs', lines 47:0-47:19 *)
Definition yval_body : result i32 := unwrap_y.
Definition yval_c : i32 := yval_body%global.
-(** [constants::get_z1::Z1] *)
+(** [constants::get_z1::Z1]
+ Source: 'src/constants.rs', lines 62:4-62:17 *)
Definition get_z1_z1_body : result i32 := Return 3%i32.
Definition get_z1_z1_c : i32 := get_z1_z1_body%global.
-(** [constants::get_z1]: forward function *)
+(** [constants::get_z1]: forward function
+ Source: 'src/constants.rs', lines 61:0-61:28 *)
Definition 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 *)
Definition add (a : i32) (b : i32) : result i32 :=
i32_add a b.
-(** [constants::Q1] *)
+(** [constants::Q1]
+ Source: 'src/constants.rs', lines 74:0-74:17 *)
Definition q1_body : result i32 := Return 5%i32.
Definition q1_c : i32 := q1_body%global.
-(** [constants::Q2] *)
+(** [constants::Q2]
+ Source: 'src/constants.rs', lines 75:0-75:17 *)
Definition q2_body : result i32 := Return q1_c.
Definition q2_c : i32 := q2_body%global.
-(** [constants::Q3] *)
+(** [constants::Q3]
+ Source: 'src/constants.rs', lines 76:0-76:17 *)
Definition q3_body : result i32 := add q2_c 3%i32.
Definition q3_c : i32 := q3_body%global.
-(** [constants::get_z2]: forward function *)
+(** [constants::get_z2]: forward function
+ Source: 'src/constants.rs', lines 70:0-70:28 *)
Definition get_z2 : result i32 :=
i <- get_z1; i0 <- add i q3_c; add q1_c i0.
-(** [constants::S1] *)
+(** [constants::S1]
+ Source: 'src/constants.rs', lines 80:0-80:18 *)
Definition s1_body : result u32 := Return 6%u32.
Definition s1_c : u32 := s1_body%global.
-(** [constants::S2] *)
+(** [constants::S2]
+ Source: 'src/constants.rs', lines 81:0-81:18 *)
Definition s2_body : result u32 := incr s1_c.
Definition s2_c : u32 := s2_body%global.
-(** [constants::S3] *)
+(** [constants::S3]
+ Source: 'src/constants.rs', lines 82:0-82:29 *)
Definition s3_body : result (Pair_t u32 u32) := Return p3_c.
Definition s3_c : Pair_t u32 u32 := s3_body%global.
-(** [constants::S4] *)
+(** [constants::S4]
+ Source: 'src/constants.rs', lines 83:0-83:29 *)
Definition s4_body : result (Pair_t u32 u32) := mk_pair1 7%u32 8%u32.
Definition s4_c : Pair_t u32 u32 := s4_body%global.
diff --git a/tests/coq/misc/External_Funs.v b/tests/coq/misc/External_Funs.v
index 018ce13c..0a14c7d1 100644
--- a/tests/coq/misc/External_Funs.v
+++ b/tests/coq/misc/External_Funs.v
@@ -12,7 +12,8 @@ Require Export External_Opaque.
Import External_Opaque.
Module External_Funs.
-(** [external::swap]: forward function *)
+(** [external::swap]: forward function
+ Source: 'src/external.rs', lines 6:0-6:46 *)
Definition swap
(T : Type) (x : T) (y : T) (st : state) : result (state * unit) :=
p <- core_mem_swap T x y st;
@@ -24,7 +25,8 @@ Definition swap
Return (st2, tt)
.
-(** [external::swap]: backward function 0 *)
+(** [external::swap]: backward function 0
+ Source: 'src/external.rs', lines 6:0-6:46 *)
Definition swap_back
(T : Type) (x : T) (y : T) (st : state) (st0 : state) :
result (state * (T * T))
@@ -38,7 +40,8 @@ Definition swap_back
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 *)
Definition test_new_non_zero_u32
(x : u32) (st : state) : result (state * core_num_nonzero_NonZeroU32_t) :=
p <- core_num_nonzero_NonZeroU32_new x st;
@@ -46,7 +49,8 @@ Definition test_new_non_zero_u32
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 *)
Definition test_vec : result unit :=
let v := alloc_vec_Vec_new u32 in
_ <- alloc_vec_Vec_push u32 v 0%u32;
@@ -56,7 +60,8 @@ Definition test_vec : result unit :=
(** Unit test for [external::test_vec] *)
Check (test_vec )%return.
-(** [external::custom_swap]: forward function *)
+(** [external::custom_swap]: forward function
+ Source: 'src/external.rs', lines 24:0-24:66 *)
Definition custom_swap
(T : Type) (x : T) (y : T) (st : state) : result (state * T) :=
p <- core_mem_swap T x y st;
@@ -68,7 +73,8 @@ Definition custom_swap
Return (st2, x0)
.
-(** [external::custom_swap]: backward function 0 *)
+(** [external::custom_swap]: backward function 0
+ Source: 'src/external.rs', lines 24:0-24:66 *)
Definition custom_swap_back
(T : Type) (x : T) (y : T) (st : state) (ret : T) (st0 : state) :
result (state * (T * T))
@@ -82,13 +88,15 @@ Definition custom_swap_back
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 *)
Definition test_custom_swap
(x : u32) (y : u32) (st : state) : result (state * unit) :=
p <- custom_swap u32 x y st; let (st0, _) := p in Return (st0, tt)
.
-(** [external::test_custom_swap]: backward function 0 *)
+(** [external::test_custom_swap]: backward function 0
+ Source: 'src/external.rs', lines 29:0-29:59 *)
Definition test_custom_swap_back
(x : u32) (y : u32) (st : state) (st0 : state) :
result (state * (u32 * u32))
@@ -96,7 +104,8 @@ Definition test_custom_swap_back
custom_swap_back u32 x y st 1%u32 st0
.
-(** [external::test_swap_non_zero]: forward function *)
+(** [external::test_swap_non_zero]: forward function
+ Source: 'src/external.rs', lines 35:0-35:44 *)
Definition test_swap_non_zero (x : u32) (st : state) : result (state * u32) :=
p <- swap u32 x 0%u32 st;
let (st0, _) := p in
diff --git a/tests/coq/misc/External_Opaque.v b/tests/coq/misc/External_Opaque.v
index 80be37e7..b482431f 100644
--- a/tests/coq/misc/External_Opaque.v
+++ b/tests/coq/misc/External_Opaque.v
@@ -10,27 +10,32 @@ Require Export External_Types.
Import External_Types.
Module External_Opaque.
-(** [core::mem::swap]: forward function *)
+(** [core::mem::swap]: forward function
+ Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/core/src/mem/mod.rs', lines 726:0-726:42 *)
Axiom core_mem_swap :
forall(T : Type), 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 *)
Axiom core_mem_swap_back0 :
forall(T : Type), 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 *)
Axiom core_mem_swap_back1 :
forall(T : Type), T -> T -> state -> state -> result (state * T)
.
-(** [core::num::nonzero::NonZeroU32::{14}::new]: forward function *)
+(** [core::num::nonzero::{core::num::nonzero::NonZeroU32#14}::new]: forward function
+ Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/core/src/num/nonzero.rs', lines 79:16-79:57 *)
Axiom core_num_nonzero_NonZeroU32_new
: u32 -> state -> result (state * (option core_num_nonzero_NonZeroU32_t))
.
-(** [core::option::Option::{0}::unwrap]: forward function *)
+(** [core::option::{core::option::Option<T>}::unwrap]: forward function
+ Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/core/src/option.rs', lines 932:4-932:34 *)
Axiom core_option_Option_unwrap :
forall(T : Type), option T -> state -> result (state * T)
.
diff --git a/tests/coq/misc/External_Types.v b/tests/coq/misc/External_Types.v
index 9e49ca41..c638670c 100644
--- a/tests/coq/misc/External_Types.v
+++ b/tests/coq/misc/External_Types.v
@@ -8,7 +8,8 @@ Import ListNotations.
Local Open Scope Primitives_scope.
Module External_Types.
-(** [core::num::nonzero::NonZeroU32] *)
+(** [core::num::nonzero::NonZeroU32]
+ Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/core/src/num/nonzero.rs', lines 50:12-50:33 *)
Axiom core_num_nonzero_NonZeroU32_t : Type.
(** The state type used in the state-error monad *)
diff --git a/tests/coq/misc/Loops.v b/tests/coq/misc/Loops.v
index 1c0eab17..4929ddd0 100644
--- a/tests/coq/misc/Loops.v
+++ b/tests/coq/misc/Loops.v
@@ -8,7 +8,8 @@ Import ListNotations.
Local Open Scope Primitives_scope.
Module Loops.
-(** [loops::sum]: loop 0: forward function *)
+(** [loops::sum]: loop 0: forward function
+ Source: 'src/loops.rs', lines 4:0-14:1 *)
Fixpoint sum_loop (n : nat) (max : u32) (i : u32) (s : u32) : result u32 :=
match n with
| O => Fail_ OutOfFuel
@@ -19,12 +20,14 @@ Fixpoint sum_loop (n : nat) (max : u32) (i : u32) (s : u32) : result u32 :=
end
.
-(** [loops::sum]: forward function *)
+(** [loops::sum]: forward function
+ Source: 'src/loops.rs', lines 4:0-4:27 *)
Definition sum (n : nat) (max : u32) : result u32 :=
sum_loop n max 0%u32 0%u32
.
-(** [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 *)
Fixpoint sum_with_mut_borrows_loop
(n : nat) (max : u32) (mi : u32) (ms : u32) : result u32 :=
match n with
@@ -39,12 +42,14 @@ Fixpoint sum_with_mut_borrows_loop
end
.
-(** [loops::sum_with_mut_borrows]: forward function *)
+(** [loops::sum_with_mut_borrows]: forward function
+ Source: 'src/loops.rs', lines 19:0-19:44 *)
Definition sum_with_mut_borrows (n : nat) (max : u32) : result u32 :=
sum_with_mut_borrows_loop n max 0%u32 0%u32
.
-(** [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 *)
Fixpoint sum_with_shared_borrows_loop
(n : nat) (max : u32) (i : u32) (s : u32) : result u32 :=
match n with
@@ -59,13 +64,15 @@ Fixpoint sum_with_shared_borrows_loop
end
.
-(** [loops::sum_with_shared_borrows]: forward function *)
+(** [loops::sum_with_shared_borrows]: forward function
+ Source: 'src/loops.rs', lines 34:0-34:47 *)
Definition sum_with_shared_borrows (n : nat) (max : u32) : result u32 :=
sum_with_shared_borrows_loop n max 0%u32 0%u32
.
(** [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 *)
Fixpoint clear_loop
(n : nat) (v : alloc_vec_Vec u32) (i : usize) : result (alloc_vec_Vec u32) :=
match n with
@@ -77,20 +84,22 @@ Fixpoint clear_loop
i1 <- usize_add i 1%usize;
v0 <-
alloc_vec_Vec_index_mut_back u32 usize
- (core_slice_index_usize_coresliceindexSliceIndexInst u32) v i 0%u32;
+ (core_slice_index_SliceIndexUsizeSliceTInst u32) v i 0%u32;
clear_loop n0 v0 i1)
else Return v
end
.
(** [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 *)
Definition clear
(n : nat) (v : alloc_vec_Vec u32) : result (alloc_vec_Vec u32) :=
clear_loop n v 0%usize
.
-(** [loops::List] *)
+(** [loops::List]
+ Source: 'src/loops.rs', lines 60:0-60:16 *)
Inductive List_t (T : Type) :=
| List_Cons : T -> List_t T -> List_t T
| List_Nil : List_t T
@@ -99,7 +108,8 @@ Inductive List_t (T : Type) :=
Arguments List_Cons { _ }.
Arguments List_Nil { _ }.
-(** [loops::list_mem]: loop 0: forward function *)
+(** [loops::list_mem]: loop 0: forward function
+ Source: 'src/loops.rs', lines 66:0-75:1 *)
Fixpoint list_mem_loop (n : nat) (x : u32) (ls : List_t u32) : result bool :=
match n with
| O => Fail_ OutOfFuel
@@ -111,12 +121,14 @@ Fixpoint list_mem_loop (n : nat) (x : u32) (ls : List_t u32) : result bool :=
end
.
-(** [loops::list_mem]: forward function *)
+(** [loops::list_mem]: forward function
+ Source: 'src/loops.rs', lines 66:0-66:52 *)
Definition list_mem (n : nat) (x : u32) (ls : List_t u32) : result bool :=
list_mem_loop n 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 *)
Fixpoint list_nth_mut_loop_loop
(T : Type) (n : nat) (ls : List_t T) (i : u32) : result T :=
match n with
@@ -132,13 +144,15 @@ Fixpoint list_nth_mut_loop_loop
end
.
-(** [loops::list_nth_mut_loop]: forward function *)
+(** [loops::list_nth_mut_loop]: forward function
+ Source: 'src/loops.rs', lines 78:0-78:71 *)
Definition list_nth_mut_loop
(T : Type) (n : nat) (ls : List_t T) (i : u32) : result T :=
list_nth_mut_loop_loop T n 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 *)
Fixpoint list_nth_mut_loop_loop_back
(T : Type) (n : nat) (ls : List_t T) (i : u32) (ret : T) :
result (List_t T)
@@ -159,7 +173,8 @@ Fixpoint list_nth_mut_loop_loop_back
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 *)
Definition list_nth_mut_loop_back
(T : Type) (n : nat) (ls : List_t T) (i : u32) (ret : T) :
result (List_t T)
@@ -167,7 +182,8 @@ Definition list_nth_mut_loop_back
list_nth_mut_loop_loop_back T n 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 *)
Fixpoint list_nth_shared_loop_loop
(T : Type) (n : nat) (ls : List_t T) (i : u32) : result T :=
match n with
@@ -183,13 +199,15 @@ Fixpoint list_nth_shared_loop_loop
end
.
-(** [loops::list_nth_shared_loop]: forward function *)
+(** [loops::list_nth_shared_loop]: forward function
+ Source: 'src/loops.rs', lines 91:0-91:66 *)
Definition list_nth_shared_loop
(T : Type) (n : nat) (ls : List_t T) (i : u32) : result T :=
list_nth_shared_loop_loop T n 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 *)
Fixpoint get_elem_mut_loop
(n : nat) (x : usize) (ls : List_t usize) : result usize :=
match n with
@@ -202,19 +220,20 @@ Fixpoint get_elem_mut_loop
end
.
-(** [loops::get_elem_mut]: forward function *)
+(** [loops::get_elem_mut]: forward function
+ Source: 'src/loops.rs', lines 103:0-103:73 *)
Definition get_elem_mut
(n : nat) (slots : alloc_vec_Vec (List_t usize)) (x : usize) :
result usize
:=
l <-
alloc_vec_Vec_index_mut (List_t usize) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (List_t usize))
- slots 0%usize;
+ (core_slice_index_SliceIndexUsizeSliceTInst (List_t usize)) slots 0%usize;
get_elem_mut_loop n 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 *)
Fixpoint get_elem_mut_loop_back
(n : nat) (x : usize) (ls : List_t usize) (ret : usize) :
result (List_t usize)
@@ -233,22 +252,23 @@ Fixpoint get_elem_mut_loop_back
end
.
-(** [loops::get_elem_mut]: backward function 0 *)
+(** [loops::get_elem_mut]: backward function 0
+ Source: 'src/loops.rs', lines 103:0-103:73 *)
Definition get_elem_mut_back
(n : nat) (slots : alloc_vec_Vec (List_t usize)) (x : usize) (ret : usize) :
result (alloc_vec_Vec (List_t usize))
:=
l <-
alloc_vec_Vec_index_mut (List_t usize) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (List_t usize))
- slots 0%usize;
+ (core_slice_index_SliceIndexUsizeSliceTInst (List_t usize)) slots 0%usize;
l0 <- get_elem_mut_loop_back n x l ret;
alloc_vec_Vec_index_mut_back (List_t usize) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (List_t usize)) slots
- 0%usize l0
+ (core_slice_index_SliceIndexUsizeSliceTInst (List_t usize)) slots 0%usize
+ 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 *)
Fixpoint get_elem_shared_loop
(n : nat) (x : usize) (ls : List_t usize) : result usize :=
match n with
@@ -262,34 +282,38 @@ Fixpoint get_elem_shared_loop
end
.
-(** [loops::get_elem_shared]: forward function *)
+(** [loops::get_elem_shared]: forward function
+ Source: 'src/loops.rs', lines 119:0-119:68 *)
Definition get_elem_shared
(n : nat) (slots : alloc_vec_Vec (List_t usize)) (x : usize) :
result usize
:=
l <-
alloc_vec_Vec_index (List_t usize) usize
- (core_slice_index_usize_coresliceindexSliceIndexInst (List_t usize))
- slots 0%usize;
+ (core_slice_index_SliceIndexUsizeSliceTInst (List_t usize)) slots 0%usize;
get_elem_shared_loop n x l
.
-(** [loops::id_mut]: forward function *)
+(** [loops::id_mut]: forward function
+ Source: 'src/loops.rs', lines 135:0-135:50 *)
Definition id_mut (T : Type) (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 *)
Definition id_mut_back
(T : Type) (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 *)
Definition id_shared (T : Type) (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 *)
Fixpoint list_nth_mut_loop_with_id_loop
(T : Type) (n : nat) (i : u32) (ls : List_t T) : result T :=
match n with
@@ -305,13 +329,15 @@ Fixpoint list_nth_mut_loop_with_id_loop
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 *)
Definition list_nth_mut_loop_with_id
(T : Type) (n : nat) (ls : List_t T) (i : u32) : result T :=
ls0 <- id_mut T ls; list_nth_mut_loop_with_id_loop T n 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 *)
Fixpoint list_nth_mut_loop_with_id_loop_back
(T : Type) (n : nat) (i : u32) (ls : List_t T) (ret : T) :
result (List_t T)
@@ -332,7 +358,8 @@ Fixpoint list_nth_mut_loop_with_id_loop_back
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 *)
Definition list_nth_mut_loop_with_id_back
(T : Type) (n : nat) (ls : List_t T) (i : u32) (ret : T) :
result (List_t T)
@@ -342,7 +369,8 @@ Definition list_nth_mut_loop_with_id_back
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 *)
Fixpoint list_nth_shared_loop_with_id_loop
(T : Type) (n : nat) (i : u32) (ls : List_t T) : result T :=
match n with
@@ -359,13 +387,15 @@ Fixpoint list_nth_shared_loop_with_id_loop
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 *)
Definition list_nth_shared_loop_with_id
(T : Type) (n : nat) (ls : List_t T) (i : u32) : result T :=
ls0 <- id_shared T ls; list_nth_shared_loop_with_id_loop T n 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 *)
Fixpoint list_nth_mut_loop_pair_loop
(T : Type) (n : nat) (ls0 : List_t T) (ls1 : List_t T) (i : u32) :
result (T * T)
@@ -388,7 +418,8 @@ Fixpoint list_nth_mut_loop_pair_loop
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 *)
Definition list_nth_mut_loop_pair
(T : Type) (n : nat) (ls0 : List_t T) (ls1 : List_t T) (i : u32) :
result (T * T)
@@ -396,7 +427,8 @@ Definition list_nth_mut_loop_pair
list_nth_mut_loop_pair_loop T n 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 *)
Fixpoint list_nth_mut_loop_pair_loop_back'a
(T : Type) (n : nat) (ls0 : List_t T) (ls1 : List_t T) (i : u32) (ret : T) :
result (List_t T)
@@ -421,7 +453,8 @@ Fixpoint list_nth_mut_loop_pair_loop_back'a
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 *)
Definition list_nth_mut_loop_pair_back'a
(T : Type) (n : nat) (ls0 : List_t T) (ls1 : List_t T) (i : u32) (ret : T) :
result (List_t T)
@@ -429,7 +462,8 @@ Definition list_nth_mut_loop_pair_back'a
list_nth_mut_loop_pair_loop_back'a T n 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 *)
Fixpoint list_nth_mut_loop_pair_loop_back'b
(T : Type) (n : nat) (ls0 : List_t T) (ls1 : List_t T) (i : u32) (ret : T) :
result (List_t T)
@@ -454,7 +488,8 @@ Fixpoint list_nth_mut_loop_pair_loop_back'b
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 *)
Definition list_nth_mut_loop_pair_back'b
(T : Type) (n : nat) (ls0 : List_t T) (ls1 : List_t T) (i : u32) (ret : T) :
result (List_t T)
@@ -462,7 +497,8 @@ Definition list_nth_mut_loop_pair_back'b
list_nth_mut_loop_pair_loop_back'b T n 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 *)
Fixpoint list_nth_shared_loop_pair_loop
(T : Type) (n : nat) (ls0 : List_t T) (ls1 : List_t T) (i : u32) :
result (T * T)
@@ -485,7 +521,8 @@ Fixpoint list_nth_shared_loop_pair_loop
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 *)
Definition list_nth_shared_loop_pair
(T : Type) (n : nat) (ls0 : List_t T) (ls1 : List_t T) (i : u32) :
result (T * T)
@@ -493,7 +530,8 @@ Definition list_nth_shared_loop_pair
list_nth_shared_loop_pair_loop T n 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 *)
Fixpoint list_nth_mut_loop_pair_merge_loop
(T : Type) (n : nat) (ls0 : List_t T) (ls1 : List_t T) (i : u32) :
result (T * T)
@@ -517,7 +555,8 @@ Fixpoint list_nth_mut_loop_pair_merge_loop
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 *)
Definition list_nth_mut_loop_pair_merge
(T : Type) (n : nat) (ls0 : List_t T) (ls1 : List_t T) (i : u32) :
result (T * T)
@@ -525,7 +564,8 @@ Definition list_nth_mut_loop_pair_merge
list_nth_mut_loop_pair_merge_loop T n 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 *)
Fixpoint list_nth_mut_loop_pair_merge_loop_back
(T : Type) (n : nat) (ls0 : List_t T) (ls1 : List_t T) (i : u32)
(ret : (T * T)) :
@@ -552,7 +592,8 @@ Fixpoint list_nth_mut_loop_pair_merge_loop_back
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 *)
Definition list_nth_mut_loop_pair_merge_back
(T : Type) (n : nat) (ls0 : List_t T) (ls1 : List_t T) (i : u32)
(ret : (T * T)) :
@@ -561,7 +602,8 @@ Definition list_nth_mut_loop_pair_merge_back
list_nth_mut_loop_pair_merge_loop_back T n 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 *)
Fixpoint list_nth_shared_loop_pair_merge_loop
(T : Type) (n : nat) (ls0 : List_t T) (ls1 : List_t T) (i : u32) :
result (T * T)
@@ -585,7 +627,8 @@ Fixpoint list_nth_shared_loop_pair_merge_loop
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 *)
Definition list_nth_shared_loop_pair_merge
(T : Type) (n : nat) (ls0 : List_t T) (ls1 : List_t T) (i : u32) :
result (T * T)
@@ -593,7 +636,8 @@ Definition list_nth_shared_loop_pair_merge
list_nth_shared_loop_pair_merge_loop T n 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 *)
Fixpoint list_nth_mut_shared_loop_pair_loop
(T : Type) (n : nat) (ls0 : List_t T) (ls1 : List_t T) (i : u32) :
result (T * T)
@@ -617,7 +661,8 @@ Fixpoint list_nth_mut_shared_loop_pair_loop
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 *)
Definition list_nth_mut_shared_loop_pair
(T : Type) (n : nat) (ls0 : List_t T) (ls1 : List_t T) (i : u32) :
result (T * T)
@@ -625,7 +670,8 @@ Definition list_nth_mut_shared_loop_pair
list_nth_mut_shared_loop_pair_loop T n 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 *)
Fixpoint list_nth_mut_shared_loop_pair_loop_back
(T : Type) (n : nat) (ls0 : List_t T) (ls1 : List_t T) (i : u32) (ret : T) :
result (List_t T)
@@ -650,7 +696,8 @@ Fixpoint list_nth_mut_shared_loop_pair_loop_back
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 *)
Definition list_nth_mut_shared_loop_pair_back
(T : Type) (n : nat) (ls0 : List_t T) (ls1 : List_t T) (i : u32) (ret : T) :
result (List_t T)
@@ -658,7 +705,8 @@ Definition list_nth_mut_shared_loop_pair_back
list_nth_mut_shared_loop_pair_loop_back T n 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 *)
Fixpoint list_nth_mut_shared_loop_pair_merge_loop
(T : Type) (n : nat) (ls0 : List_t T) (ls1 : List_t T) (i : u32) :
result (T * T)
@@ -682,7 +730,8 @@ Fixpoint list_nth_mut_shared_loop_pair_merge_loop
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 *)
Definition list_nth_mut_shared_loop_pair_merge
(T : Type) (n : nat) (ls0 : List_t T) (ls1 : List_t T) (i : u32) :
result (T * T)
@@ -690,7 +739,8 @@ Definition list_nth_mut_shared_loop_pair_merge
list_nth_mut_shared_loop_pair_merge_loop T n 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 *)
Fixpoint list_nth_mut_shared_loop_pair_merge_loop_back
(T : Type) (n : nat) (ls0 : List_t T) (ls1 : List_t T) (i : u32) (ret : T) :
result (List_t T)
@@ -716,7 +766,8 @@ Fixpoint list_nth_mut_shared_loop_pair_merge_loop_back
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 *)
Definition list_nth_mut_shared_loop_pair_merge_back
(T : Type) (n : nat) (ls0 : List_t T) (ls1 : List_t T) (i : u32) (ret : T) :
result (List_t T)
@@ -724,7 +775,8 @@ Definition list_nth_mut_shared_loop_pair_merge_back
list_nth_mut_shared_loop_pair_merge_loop_back T n 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 *)
Fixpoint list_nth_shared_mut_loop_pair_loop
(T : Type) (n : nat) (ls0 : List_t T) (ls1 : List_t T) (i : u32) :
result (T * T)
@@ -748,7 +800,8 @@ Fixpoint list_nth_shared_mut_loop_pair_loop
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 *)
Definition list_nth_shared_mut_loop_pair
(T : Type) (n : nat) (ls0 : List_t T) (ls1 : List_t T) (i : u32) :
result (T * T)
@@ -756,7 +809,8 @@ Definition list_nth_shared_mut_loop_pair
list_nth_shared_mut_loop_pair_loop T n 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 *)
Fixpoint list_nth_shared_mut_loop_pair_loop_back
(T : Type) (n : nat) (ls0 : List_t T) (ls1 : List_t T) (i : u32) (ret : T) :
result (List_t T)
@@ -781,7 +835,8 @@ Fixpoint list_nth_shared_mut_loop_pair_loop_back
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 *)
Definition list_nth_shared_mut_loop_pair_back
(T : Type) (n : nat) (ls0 : List_t T) (ls1 : List_t T) (i : u32) (ret : T) :
result (List_t T)
@@ -789,7 +844,8 @@ Definition list_nth_shared_mut_loop_pair_back
list_nth_shared_mut_loop_pair_loop_back T n 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 *)
Fixpoint list_nth_shared_mut_loop_pair_merge_loop
(T : Type) (n : nat) (ls0 : List_t T) (ls1 : List_t T) (i : u32) :
result (T * T)
@@ -813,7 +869,8 @@ Fixpoint list_nth_shared_mut_loop_pair_merge_loop
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 *)
Definition list_nth_shared_mut_loop_pair_merge
(T : Type) (n : nat) (ls0 : List_t T) (ls1 : List_t T) (i : u32) :
result (T * T)
@@ -821,7 +878,8 @@ Definition list_nth_shared_mut_loop_pair_merge
list_nth_shared_mut_loop_pair_merge_loop T n 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 *)
Fixpoint list_nth_shared_mut_loop_pair_merge_loop_back
(T : Type) (n : nat) (ls0 : List_t T) (ls1 : List_t T) (i : u32) (ret : T) :
result (List_t T)
@@ -847,7 +905,8 @@ Fixpoint list_nth_shared_mut_loop_pair_merge_loop_back
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 *)
Definition list_nth_shared_mut_loop_pair_merge_back
(T : Type) (n : nat) (ls0 : List_t T) (ls1 : List_t T) (i : u32) (ret : T) :
result (List_t T)
diff --git a/tests/coq/misc/NoNestedBorrows.v b/tests/coq/misc/NoNestedBorrows.v
index c7af496f..b044d24f 100644
--- a/tests/coq/misc/NoNestedBorrows.v
+++ b/tests/coq/misc/NoNestedBorrows.v
@@ -8,14 +8,16 @@ Import ListNotations.
Local Open Scope Primitives_scope.
Module NoNestedBorrows.
-(** [no_nested_borrows::Pair] *)
+(** [no_nested_borrows::Pair]
+ Source: 'src/no_nested_borrows.rs', lines 4:0-4:23 *)
Record Pair_t (T1 T2 : Type) := mkPair_t { pair_x : T1; pair_y : T2; }.
Arguments mkPair_t { _ _ }.
Arguments pair_x { _ _ }.
Arguments pair_y { _ _ }.
-(** [no_nested_borrows::List] *)
+(** [no_nested_borrows::List]
+ Source: 'src/no_nested_borrows.rs', lines 9:0-9:16 *)
Inductive List_t (T : Type) :=
| List_Cons : T -> List_t T -> List_t T
| List_Nil : List_t T
@@ -24,21 +26,26 @@ Inductive List_t (T : Type) :=
Arguments List_Cons { _ }.
Arguments List_Nil { _ }.
-(** [no_nested_borrows::One] *)
+(** [no_nested_borrows::One]
+ Source: 'src/no_nested_borrows.rs', lines 20:0-20:16 *)
Inductive One_t (T1 : Type) := | One_One : T1 -> One_t T1.
Arguments One_One { _ }.
-(** [no_nested_borrows::EmptyEnum] *)
+(** [no_nested_borrows::EmptyEnum]
+ Source: 'src/no_nested_borrows.rs', lines 26:0-26:18 *)
Inductive 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 *)
Inductive 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 *)
Record EmptyStruct_t := mkEmptyStruct_t { }.
-(** [no_nested_borrows::Sum] *)
+(** [no_nested_borrows::Sum]
+ Source: 'src/no_nested_borrows.rs', lines 41:0-41:20 *)
Inductive Sum_t (T1 T2 : Type) :=
| Sum_Left : T1 -> Sum_t T1 T2
| Sum_Right : T2 -> Sum_t T1 T2
@@ -47,59 +54,72 @@ Inductive Sum_t (T1 T2 : Type) :=
Arguments Sum_Left { _ _ }.
Arguments Sum_Right { _ _ }.
-(** [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 *)
Definition 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 *)
Definition 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 *)
Definition 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 *)
Definition 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 *)
Definition div_test1 (x : u32) : result u32 :=
u32_div x 2%u32.
-(** [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 *)
Definition 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 *)
Definition 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 *)
Definition const0_body : result usize := usize_add 1%usize 1%usize.
Definition const0_c : usize := const0_body%global.
-(** [no_nested_borrows::CONST1] *)
+(** [no_nested_borrows::CONST1]
+ Source: 'src/no_nested_borrows.rs', lines 92:0-92:23 *)
Definition const1_body : result usize := usize_mul 2%usize 2%usize.
Definition const1_c : usize := const1_body%global.
-(** [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 *)
Definition 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 *)
Definition test2 : result unit :=
_ <- u32_add 23%u32 44%u32; Return tt.
(** Unit test for [no_nested_borrows::test2] *)
Check (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 *)
Definition get_max (x : u32) (y : u32) : result u32 :=
if x s>= 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 *)
Definition test3 : result unit :=
x <- get_max 4%u32 3%u32;
y <- get_max 10%u32 11%u32;
@@ -110,7 +130,8 @@ Definition test3 : result unit :=
(** Unit test for [no_nested_borrows::test3] *)
Check (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 *)
Definition test_neg1 : result unit :=
y <- i32_neg 3%i32; if negb (y s= (-3)%i32) then Fail_ Failure else Return tt
.
@@ -118,7 +139,8 @@ Definition test_neg1 : result unit :=
(** Unit test for [no_nested_borrows::test_neg1] *)
Check (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 *)
Definition refs_test1 : result unit :=
if negb (1%i32 s= 1%i32) then Fail_ Failure else Return tt
.
@@ -126,7 +148,8 @@ Definition refs_test1 : result unit :=
(** Unit test for [no_nested_borrows::refs_test1] *)
Check (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 *)
Definition refs_test2 : result unit :=
if negb (2%i32 s= 2%i32)
then Fail_ Failure
@@ -142,38 +165,45 @@ Definition refs_test2 : result unit :=
(** Unit test for [no_nested_borrows::refs_test2] *)
Check (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 *)
Definition test_list1 : result unit :=
Return tt.
(** Unit test for [no_nested_borrows::test_list1] *)
Check (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 *)
Definition test_box1 : result unit :=
- let b := 1%i32 in
- let x := b in
+ let b := 0%i32 in
+ b0 <- alloc_boxed_Box_deref_mut_back i32 b 1%i32;
+ x <- alloc_boxed_Box_deref i32 b0;
if negb (x s= 1%i32) then Fail_ Failure else Return tt
.
(** Unit test for [no_nested_borrows::test_box1] *)
Check (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 *)
Definition 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 *)
Definition test_unreachable (b : bool) : result unit :=
if b then Fail_ Failure else Return tt
.
-(** [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 *)
Definition test_panic (b : bool) : result unit :=
if b then Fail_ Failure else Return tt
.
-(** [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 *)
Definition test_copy_int : result unit :=
y <- copy_int 0%i32; if negb (0%i32 s= y) then Fail_ Failure else Return tt
.
@@ -181,12 +211,14 @@ Definition test_copy_int : result unit :=
(** Unit test for [no_nested_borrows::test_copy_int] *)
Check (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 *)
Definition is_cons (T : Type) (l : List_t T) : result bool :=
match l with | List_Cons t 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 *)
Definition test_is_cons : result unit :=
let l := List_Nil in
b <- is_cons i32 (List_Cons 0%i32 l);
@@ -196,7 +228,8 @@ Definition test_is_cons : result unit :=
(** Unit test for [no_nested_borrows::test_is_cons] *)
Check (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 *)
Definition split_list (T : Type) (l : List_t T) : result (T * (List_t T)) :=
match l with
| List_Cons hd tl => Return (hd, tl)
@@ -204,7 +237,8 @@ Definition split_list (T : Type) (l : List_t T) : result (T * (List_t T)) :=
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 *)
Definition test_split_list : result unit :=
let l := List_Nil in
p <- split_list i32 (List_Cons 0%i32 l);
@@ -215,18 +249,21 @@ Definition test_split_list : result unit :=
(** Unit test for [no_nested_borrows::test_split_list] *)
Check (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 *)
Definition choose (T : Type) (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 *)
Definition choose_back
(T : Type) (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 *)
Definition choose_test : result unit :=
z <- choose i32 true 0%i32 0%i32;
z0 <- i32_add z 1%i32;
@@ -243,16 +280,19 @@ Definition choose_test : result unit :=
(** Unit test for [no_nested_borrows::choose_test] *)
Check (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 *)
Definition test_char : result char :=
Return (char_of_byte Coq.Init.Byte.x61).
-(** [no_nested_borrows::Tree] *)
+(** [no_nested_borrows::Tree]
+ Source: 'src/no_nested_borrows.rs', lines 256:0-256:16 *)
Inductive Tree_t (T : Type) :=
| 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 *)
with NodeElem_t (T : Type) :=
| NodeElem_Cons : Tree_t T -> NodeElem_t T -> NodeElem_t T
| NodeElem_Nil : NodeElem_t T
@@ -264,7 +304,8 @@ Arguments Tree_Node { _ }.
Arguments NodeElem_Cons { _ }.
Arguments NodeElem_Nil { _ }.
-(** [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 *)
Fixpoint list_length (T : Type) (l : List_t T) : result u32 :=
match l with
| List_Cons t l1 => i <- list_length T l1; u32_add 1%u32 i
@@ -272,7 +313,8 @@ Fixpoint list_length (T : Type) (l : List_t T) : result u32 :=
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 *)
Fixpoint list_nth_shared (T : Type) (l : List_t T) (i : u32) : result T :=
match l with
| List_Cons x tl =>
@@ -283,7 +325,8 @@ Fixpoint list_nth_shared (T : Type) (l : List_t T) (i : u32) : result T :=
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 *)
Fixpoint list_nth_mut (T : Type) (l : List_t T) (i : u32) : result T :=
match l with
| List_Cons x tl =>
@@ -294,7 +337,8 @@ Fixpoint list_nth_mut (T : Type) (l : List_t T) (i : u32) : result T :=
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 *)
Fixpoint list_nth_mut_back
(T : Type) (l : List_t T) (i : u32) (ret : T) : result (List_t T) :=
match l with
@@ -309,7 +353,8 @@ Fixpoint list_nth_mut_back
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 *)
Fixpoint list_rev_aux
(T : Type) (li : List_t T) (lo : List_t T) : result (List_t T) :=
match li with
@@ -319,13 +364,15 @@ Fixpoint list_rev_aux
.
(** [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 *)
Definition list_rev (T : Type) (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 *)
Definition test_list_functions : result unit :=
let l := List_Nil in
let l0 := List_Cons 2%i32 l in
@@ -362,63 +409,74 @@ Definition test_list_functions : result unit :=
(** Unit test for [no_nested_borrows::test_list_functions] *)
Check (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 *)
Definition id_mut_pair1 (T1 T2 : Type) (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 *)
Definition id_mut_pair1_back
(T1 T2 : Type) (x : T1) (y : T2) (ret : (T1 * T2)) : result (T1 * T2) :=
let (t, t0) := ret in Return (t, t0)
.
-(** [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 *)
Definition id_mut_pair2 (T1 T2 : Type) (p : (T1 * T2)) : result (T1 * T2) :=
let (t, t0) := p in Return (t, t0)
.
-(** [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 *)
Definition id_mut_pair2_back
(T1 T2 : Type) (p : (T1 * T2)) (ret : (T1 * T2)) : result (T1 * T2) :=
let (t, t0) := ret in Return (t, t0)
.
-(** [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 *)
Definition id_mut_pair3 (T1 T2 : Type) (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 *)
Definition id_mut_pair3_back'a
(T1 T2 : Type) (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 *)
Definition id_mut_pair3_back'b
(T1 T2 : Type) (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 *)
Definition id_mut_pair4 (T1 T2 : Type) (p : (T1 * T2)) : result (T1 * T2) :=
let (t, t0) := p in Return (t, t0)
.
-(** [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 *)
Definition id_mut_pair4_back'a
(T1 T2 : Type) (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 *)
Definition id_mut_pair4_back'b
(T1 T2 : Type) (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 *)
Record StructWithTuple_t (T1 T2 : Type) :=
mkStructWithTuple_t {
structWithTuple_p : (T1 * T2);
@@ -428,22 +486,26 @@ mkStructWithTuple_t {
Arguments mkStructWithTuple_t { _ _ }.
Arguments structWithTuple_p { _ _ }.
-(** [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 *)
Definition new_tuple1 : result (StructWithTuple_t u32 u32) :=
Return {| structWithTuple_p := (1%u32, 2%u32) |}
.
-(** [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 *)
Definition new_tuple2 : result (StructWithTuple_t i16 i16) :=
Return {| structWithTuple_p := (1%i16, 2%i16) |}
.
-(** [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 *)
Definition new_tuple3 : result (StructWithTuple_t u64 i64) :=
Return {| structWithTuple_p := (1%u64, 2%i64) |}
.
-(** [no_nested_borrows::StructWithPair] *)
+(** [no_nested_borrows::StructWithPair]
+ Source: 'src/no_nested_borrows.rs', lines 407:0-407:33 *)
Record StructWithPair_t (T1 T2 : Type) :=
mkStructWithPair_t {
structWithPair_p : Pair_t T1 T2;
@@ -453,12 +515,14 @@ mkStructWithPair_t {
Arguments mkStructWithPair_t { _ _ }.
Arguments structWithPair_p { _ _ }.
-(** [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 *)
Definition new_pair1 : result (StructWithPair_t u32 u32) :=
Return {| structWithPair_p := {| pair_x := 1%u32; pair_y := 2%u32 |} |}
.
-(** [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 *)
Definition test_constants : result unit :=
swt <- new_tuple1;
let (i, _) := swt.(structWithTuple_p) in
@@ -484,7 +548,8 @@ Definition test_constants : result unit :=
(** Unit test for [no_nested_borrows::test_constants] *)
Check (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 *)
Definition test_weird_borrows1 : result unit :=
Return tt.
@@ -492,27 +557,32 @@ Definition test_weird_borrows1 : result unit :=
Check (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 *)
Definition test_mem_replace (px : u32) : result u32 :=
let y := core_mem_replace u32 px 1%u32 in
if negb (y s= 0%u32) then Fail_ Failure else Return 2%u32
.
-(** [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 *)
Definition test_shared_borrow_bool1 (b : bool) : result u32 :=
if b then Return 0%u32 else Return 1%u32
.
-(** [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 *)
Definition test_shared_borrow_bool2 : result u32 :=
Return 0%u32.
-(** [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 *)
Definition test_shared_borrow_enum1 (l : List_t u32) : result u32 :=
match l with | List_Cons i l0 => Return 1%u32 | List_Nil => Return 0%u32 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 *)
Definition test_shared_borrow_enum2 : result u32 :=
Return 0%u32.
diff --git a/tests/coq/misc/Paper.v b/tests/coq/misc/Paper.v
index d3852e6b..4a49096f 100644
--- a/tests/coq/misc/Paper.v
+++ b/tests/coq/misc/Paper.v
@@ -9,11 +9,13 @@ Local Open Scope Primitives_scope.
Module Paper.
(** [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 *)
Definition ref_incr (x : i32) : result i32 :=
i32_add x 1%i32.
-(** [paper::test_incr]: forward function *)
+(** [paper::test_incr]: forward function
+ Source: 'src/paper.rs', lines 8:0-8:18 *)
Definition test_incr : result unit :=
x <- ref_incr 0%i32; if negb (x s= 1%i32) then Fail_ Failure else Return tt
.
@@ -21,18 +23,21 @@ Definition test_incr : result unit :=
(** Unit test for [paper::test_incr] *)
Check (test_incr )%return.
-(** [paper::choose]: forward function *)
+(** [paper::choose]: forward function
+ Source: 'src/paper.rs', lines 15:0-15:70 *)
Definition choose (T : Type) (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 *)
Definition choose_back
(T : Type) (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 *)
Definition test_choose : result unit :=
z <- choose i32 true 0%i32 0%i32;
z0 <- i32_add z 1%i32;
@@ -49,7 +54,8 @@ Definition test_choose : result unit :=
(** Unit test for [paper::test_choose] *)
Check (test_choose )%return.
-(** [paper::List] *)
+(** [paper::List]
+ Source: 'src/paper.rs', lines 35:0-35:16 *)
Inductive List_t (T : Type) :=
| List_Cons : T -> List_t T -> List_t T
| List_Nil : List_t T
@@ -58,7 +64,8 @@ Inductive List_t (T : Type) :=
Arguments List_Cons { _ }.
Arguments List_Nil { _ }.
-(** [paper::list_nth_mut]: forward function *)
+(** [paper::list_nth_mut]: forward function
+ Source: 'src/paper.rs', lines 42:0-42:67 *)
Fixpoint list_nth_mut (T : Type) (l : List_t T) (i : u32) : result T :=
match l with
| List_Cons x tl =>
@@ -69,7 +76,8 @@ Fixpoint list_nth_mut (T : Type) (l : List_t T) (i : u32) : result T :=
end
.
-(** [paper::list_nth_mut]: backward function 0 *)
+(** [paper::list_nth_mut]: backward function 0
+ Source: 'src/paper.rs', lines 42:0-42:67 *)
Fixpoint list_nth_mut_back
(T : Type) (l : List_t T) (i : u32) (ret : T) : result (List_t T) :=
match l with
@@ -84,7 +92,8 @@ Fixpoint list_nth_mut_back
end
.
-(** [paper::sum]: forward function *)
+(** [paper::sum]: forward function
+ Source: 'src/paper.rs', lines 57:0-57:32 *)
Fixpoint sum (l : List_t i32) : result i32 :=
match l with
| List_Cons x tl => i <- sum tl; i32_add x i
@@ -92,7 +101,8 @@ Fixpoint sum (l : List_t i32) : result i32 :=
end
.
-(** [paper::test_nth]: forward function *)
+(** [paper::test_nth]: forward function
+ Source: 'src/paper.rs', lines 68:0-68:17 *)
Definition test_nth : result unit :=
let l := List_Nil in
let l0 := List_Cons 3%i32 l in
@@ -107,7 +117,8 @@ Definition test_nth : result unit :=
(** Unit test for [paper::test_nth] *)
Check (test_nth )%return.
-(** [paper::call_choose]: forward function *)
+(** [paper::call_choose]: forward function
+ Source: 'src/paper.rs', lines 76:0-76:44 *)
Definition call_choose (p : (u32 * u32)) : result u32 :=
let (px, py) := p in
pz <- choose u32 true px py;
diff --git a/tests/coq/misc/PoloniusList.v b/tests/coq/misc/PoloniusList.v
index 4848444f..a0820e40 100644
--- a/tests/coq/misc/PoloniusList.v
+++ b/tests/coq/misc/PoloniusList.v
@@ -8,7 +8,8 @@ Import ListNotations.
Local Open Scope Primitives_scope.
Module PoloniusList.
-(** [polonius_list::List] *)
+(** [polonius_list::List]
+ Source: 'src/polonius_list.rs', lines 3:0-3:16 *)
Inductive List_t (T : Type) :=
| List_Cons : T -> List_t T -> List_t T
| List_Nil : List_t T
@@ -17,7 +18,8 @@ Inductive List_t (T : Type) :=
Arguments List_Cons { _ }.
Arguments List_Nil { _ }.
-(** [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 *)
Fixpoint get_list_at_x (ls : List_t u32) (x : u32) : result (List_t u32) :=
match ls with
| List_Cons hd tl =>
@@ -26,7 +28,8 @@ Fixpoint get_list_at_x (ls : List_t u32) (x : u32) : result (List_t u32) :=
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 *)
Fixpoint get_list_at_x_back
(ls : List_t u32) (x : u32) (ret : List_t u32) : result (List_t u32) :=
match ls with
diff --git a/tests/coq/misc/Primitives.v b/tests/coq/misc/Primitives.v
index 85e38f01..83f860b6 100644
--- a/tests/coq/misc/Primitives.v
+++ b/tests/coq/misc/Primitives.v
@@ -467,14 +467,14 @@ Definition alloc_boxed_Box_deref_mut (T : Type) (x : T) : result T := Return x.
Definition alloc_boxed_Box_deref_mut_back (T : Type) (_ : T) (x : T) : result T := Return x.
(* Trait instance *)
-Definition alloc_boxed_Box_coreOpsDerefInst (Self : Type) : core_ops_deref_Deref Self := {|
+Definition alloc_boxed_Box_coreopsDerefInst (Self : Type) : core_ops_deref_Deref Self := {|
core_ops_deref_Deref_target := Self;
core_ops_deref_Deref_deref := alloc_boxed_Box_deref Self;
|}.
(* Trait instance *)
-Definition alloc_boxed_Box_coreOpsDerefMutInst (Self : Type) : core_ops_deref_DerefMut Self := {|
- core_ops_deref_DerefMut_derefInst := alloc_boxed_Box_coreOpsDerefInst Self;
+Definition alloc_boxed_Box_coreopsDerefMutInst (Self : Type) : core_ops_deref_DerefMut Self := {|
+ core_ops_deref_DerefMut_derefInst := alloc_boxed_Box_coreopsDerefInst Self;
core_ops_deref_DerefMut_deref_mut := alloc_boxed_Box_deref_mut Self;
core_ops_deref_DerefMut_deref_mut_back := alloc_boxed_Box_deref_mut_back Self;
|}.
@@ -576,7 +576,7 @@ Definition alloc_vec_Vec_insert (T: Type) (v: alloc_vec_Vec T) (i: usize) (x: T)
else Fail_ Failure).
(* Helper *)
-Axiom alloc_vec_Vec_index_usize : forall {T : Type} (v : alloc_vec_Vec T) (i : usize) (x : T), result T.
+Axiom alloc_vec_Vec_index_usize : forall {T : Type} (v : alloc_vec_Vec T) (i : usize), result T.
(* Helper *)
Axiom alloc_vec_Vec_update_usize : forall {T : Type} (v : alloc_vec_Vec T) (i : usize) (x : T), result (alloc_vec_Vec T).
@@ -620,18 +620,18 @@ Definition core_slice_index_Slice_index
end.
(* [core::slice::index::Range:::get]: forward function *)
-Axiom core_slice_index_Range_get : forall (T : Type) (i : core_ops_range_Range usize) (s : slice T), result (option (slice T)).
+Axiom core_slice_index_RangeUsize_get : forall (T : Type) (i : core_ops_range_Range usize) (s : slice T), result (option (slice T)).
(* [core::slice::index::Range::get_mut]: forward function *)
-Axiom core_slice_index_Range_get_mut :
+Axiom core_slice_index_RangeUsize_get_mut :
forall (T : Type), core_ops_range_Range usize -> slice T -> result (option (slice T)).
(* [core::slice::index::Range::get_mut]: backward function 0 *)
-Axiom core_slice_index_Range_get_mut_back :
+Axiom core_slice_index_RangeUsize_get_mut_back :
forall (T : Type), core_ops_range_Range usize -> slice T -> option (slice T) -> result (slice T).
(* [core::slice::index::Range::get_unchecked]: forward function *)
-Definition core_slice_index_Range_get_unchecked
+Definition core_slice_index_RangeUsize_get_unchecked
(T : Type) :
core_ops_range_Range usize -> const_raw_ptr (slice T) -> result (const_raw_ptr (slice T)) :=
(* Don't know what the model should be - for now we always fail to make
@@ -639,7 +639,7 @@ Definition core_slice_index_Range_get_unchecked
fun _ _ => Fail_ Failure.
(* [core::slice::index::Range::get_unchecked_mut]: forward function *)
-Definition core_slice_index_Range_get_unchecked_mut
+Definition core_slice_index_RangeUsize_get_unchecked_mut
(T : Type) :
core_ops_range_Range usize -> mut_raw_ptr (slice T) -> result (mut_raw_ptr (slice T)) :=
(* Don't know what the model should be - for now we always fail to make
@@ -647,15 +647,15 @@ Definition core_slice_index_Range_get_unchecked_mut
fun _ _ => Fail_ Failure.
(* [core::slice::index::Range::index]: forward function *)
-Axiom core_slice_index_Range_index :
+Axiom core_slice_index_RangeUsize_index :
forall (T : Type), core_ops_range_Range usize -> slice T -> result (slice T).
(* [core::slice::index::Range::index_mut]: forward function *)
-Axiom core_slice_index_Range_index_mut :
+Axiom core_slice_index_RangeUsize_index_mut :
forall (T : Type), core_ops_range_Range usize -> slice T -> result (slice T).
(* [core::slice::index::Range::index_mut]: backward function 0 *)
-Axiom core_slice_index_Range_index_mut_back :
+Axiom core_slice_index_RangeUsize_index_mut_back :
forall (T : Type), core_ops_range_Range usize -> slice T -> slice T -> result (slice T).
(* [core::slice::index::[T]::index_mut]: forward function *)
@@ -683,44 +683,44 @@ Axiom core_array_Array_index_mut_back :
forall (T Idx : Type) (N : usize) (inst : core_ops_index_IndexMut (slice T) Idx)
(a : array T N) (i : Idx) (x : inst.(core_ops_index_IndexMut_indexInst).(core_ops_index_Index_Output)), result (array T N).
-(* Trait implementation: [core::slice::index::[T]] *)
-Definition core_slice_index_Slice_coreopsindexIndexInst (T Idx : Type)
- (inst : core_slice_index_SliceIndex Idx (slice T)) :
- core_ops_index_Index (slice T) Idx := {|
- core_ops_index_Index_Output := inst.(core_slice_index_SliceIndex_Output);
- core_ops_index_Index_index := core_slice_index_Slice_index T Idx inst;
-|}.
-
(* Trait implementation: [core::slice::index::private_slice_index::Range] *)
-Definition core_slice_index_private_slice_index_Range_coresliceindexprivate_slice_indexSealedInst
+Definition core_slice_index_private_slice_index_SealedRangeUsizeInst
: core_slice_index_private_slice_index_Sealed (core_ops_range_Range usize) := tt.
(* Trait implementation: [core::slice::index::Range] *)
-Definition core_slice_index_Range_coresliceindexSliceIndexInst (T : Type) :
+Definition core_slice_index_SliceIndexRangeUsizeSliceTInst (T : Type) :
core_slice_index_SliceIndex (core_ops_range_Range usize) (slice T) := {|
- core_slice_index_SliceIndex_sealedInst := core_slice_index_private_slice_index_Range_coresliceindexprivate_slice_indexSealedInst;
+ core_slice_index_SliceIndex_sealedInst := core_slice_index_private_slice_index_SealedRangeUsizeInst;
core_slice_index_SliceIndex_Output := slice T;
- core_slice_index_SliceIndex_get := core_slice_index_Range_get T;
- core_slice_index_SliceIndex_get_mut := core_slice_index_Range_get_mut T;
- core_slice_index_SliceIndex_get_mut_back := core_slice_index_Range_get_mut_back T;
- core_slice_index_SliceIndex_get_unchecked := core_slice_index_Range_get_unchecked T;
- core_slice_index_SliceIndex_get_unchecked_mut := core_slice_index_Range_get_unchecked_mut T;
- core_slice_index_SliceIndex_index := core_slice_index_Range_index T;
- core_slice_index_SliceIndex_index_mut := core_slice_index_Range_index_mut T;
- core_slice_index_SliceIndex_index_mut_back := core_slice_index_Range_index_mut_back T;
+ core_slice_index_SliceIndex_get := core_slice_index_RangeUsize_get T;
+ core_slice_index_SliceIndex_get_mut := core_slice_index_RangeUsize_get_mut T;
+ core_slice_index_SliceIndex_get_mut_back := core_slice_index_RangeUsize_get_mut_back T;
+ core_slice_index_SliceIndex_get_unchecked := core_slice_index_RangeUsize_get_unchecked T;
+ core_slice_index_SliceIndex_get_unchecked_mut := core_slice_index_RangeUsize_get_unchecked_mut T;
+ core_slice_index_SliceIndex_index := core_slice_index_RangeUsize_index T;
+ core_slice_index_SliceIndex_index_mut := core_slice_index_RangeUsize_index_mut T;
+ core_slice_index_SliceIndex_index_mut_back := core_slice_index_RangeUsize_index_mut_back T;
+|}.
+
+(* Trait implementation: [core::slice::index::[T]] *)
+Definition core_ops_index_IndexSliceTIInst (T Idx : Type)
+ (inst : core_slice_index_SliceIndex Idx (slice T)) :
+ core_ops_index_Index (slice T) Idx := {|
+ core_ops_index_Index_Output := inst.(core_slice_index_SliceIndex_Output);
+ core_ops_index_Index_index := core_slice_index_Slice_index T Idx inst;
|}.
(* Trait implementation: [core::slice::index::[T]] *)
-Definition core_slice_index_Slice_coreopsindexIndexMutInst (T Idx : Type)
+Definition core_ops_index_IndexMutSliceTIInst (T Idx : Type)
(inst : core_slice_index_SliceIndex Idx (slice T)) :
core_ops_index_IndexMut (slice T) Idx := {|
- core_ops_index_IndexMut_indexInst := core_slice_index_Slice_coreopsindexIndexInst T Idx inst;
+ core_ops_index_IndexMut_indexInst := core_ops_index_IndexSliceTIInst T Idx inst;
core_ops_index_IndexMut_index_mut := core_slice_index_Slice_index_mut T Idx inst;
core_ops_index_IndexMut_index_mut_back := core_slice_index_Slice_index_mut_back T Idx inst;
|}.
(* Trait implementation: [core::array::[T; N]] *)
-Definition core_array_Array_coreopsindexIndexInst (T Idx : Type) (N : usize)
+Definition core_ops_index_IndexArrayInst (T Idx : Type) (N : usize)
(inst : core_ops_index_Index (slice T) Idx) :
core_ops_index_Index (array T N) Idx := {|
core_ops_index_Index_Output := inst.(core_ops_index_Index_Output);
@@ -728,10 +728,10 @@ Definition core_array_Array_coreopsindexIndexInst (T Idx : Type) (N : usize)
|}.
(* Trait implementation: [core::array::[T; N]] *)
-Definition core_array_Array_coreopsindexIndexMutInst (T Idx : Type) (N : usize)
+Definition core_ops_index_IndexMutArrayInst (T Idx : Type) (N : usize)
(inst : core_ops_index_IndexMut (slice T) Idx) :
core_ops_index_IndexMut (array T N) Idx := {|
- core_ops_index_IndexMut_indexInst := core_array_Array_coreopsindexIndexInst T Idx N inst.(core_ops_index_IndexMut_indexInst);
+ core_ops_index_IndexMut_indexInst := core_ops_index_IndexArrayInst T Idx N inst.(core_ops_index_IndexMut_indexInst);
core_ops_index_IndexMut_index_mut := core_array_Array_index_mut T Idx N inst;
core_ops_index_IndexMut_index_mut_back := core_array_Array_index_mut_back T Idx N inst;
|}.
@@ -765,13 +765,13 @@ Axiom core_slice_index_usize_index_mut_back :
forall (T : Type), usize -> slice T -> T -> result (slice T).
(* Trait implementation: [core::slice::index::private_slice_index::usize] *)
-Definition core_slice_index_private_slice_index_usize_coresliceindexprivate_slice_indexSealedInst
+Definition core_slice_index_private_slice_index_SealedUsizeInst
: core_slice_index_private_slice_index_Sealed usize := tt.
(* Trait implementation: [core::slice::index::usize] *)
-Definition core_slice_index_usize_coresliceindexSliceIndexInst (T : Type) :
+Definition core_slice_index_SliceIndexUsizeSliceTInst (T : Type) :
core_slice_index_SliceIndex usize (slice T) := {|
- core_slice_index_SliceIndex_sealedInst := core_slice_index_private_slice_index_usize_coresliceindexprivate_slice_indexSealedInst;
+ core_slice_index_SliceIndex_sealedInst := core_slice_index_private_slice_index_SealedUsizeInst;
core_slice_index_SliceIndex_Output := T;
core_slice_index_SliceIndex_get := core_slice_index_usize_get T;
core_slice_index_SliceIndex_get_mut := core_slice_index_usize_get_mut T;
@@ -815,8 +815,16 @@ Definition alloc_vec_Vec_coreopsindexIndexMutInst (T Idx : Type)
(*** Theorems *)
+Axiom alloc_vec_Vec_index_eq : forall {a : Type} (v : alloc_vec_Vec a) (i : usize) (x : a),
+ alloc_vec_Vec_index a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i =
+ alloc_vec_Vec_index_usize v i.
+
+Axiom alloc_vec_Vec_index_mut_eq : forall {a : Type} (v : alloc_vec_Vec a) (i : usize) (x : a),
+ alloc_vec_Vec_index_mut a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i =
+ alloc_vec_Vec_index_usize v i.
+
Axiom alloc_vec_Vec_index_mut_back_eq : forall {a : Type} (v : alloc_vec_Vec a) (i : usize) (x : a),
- alloc_vec_Vec_index_mut_back a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i x =
+ alloc_vec_Vec_index_mut_back a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i x =
alloc_vec_Vec_update_usize v i x.
End Primitives.
diff --git a/tests/coq/traits/Primitives.v b/tests/coq/traits/Primitives.v
index 85e38f01..83f860b6 100644
--- a/tests/coq/traits/Primitives.v
+++ b/tests/coq/traits/Primitives.v
@@ -467,14 +467,14 @@ Definition alloc_boxed_Box_deref_mut (T : Type) (x : T) : result T := Return x.
Definition alloc_boxed_Box_deref_mut_back (T : Type) (_ : T) (x : T) : result T := Return x.
(* Trait instance *)
-Definition alloc_boxed_Box_coreOpsDerefInst (Self : Type) : core_ops_deref_Deref Self := {|
+Definition alloc_boxed_Box_coreopsDerefInst (Self : Type) : core_ops_deref_Deref Self := {|
core_ops_deref_Deref_target := Self;
core_ops_deref_Deref_deref := alloc_boxed_Box_deref Self;
|}.
(* Trait instance *)
-Definition alloc_boxed_Box_coreOpsDerefMutInst (Self : Type) : core_ops_deref_DerefMut Self := {|
- core_ops_deref_DerefMut_derefInst := alloc_boxed_Box_coreOpsDerefInst Self;
+Definition alloc_boxed_Box_coreopsDerefMutInst (Self : Type) : core_ops_deref_DerefMut Self := {|
+ core_ops_deref_DerefMut_derefInst := alloc_boxed_Box_coreopsDerefInst Self;
core_ops_deref_DerefMut_deref_mut := alloc_boxed_Box_deref_mut Self;
core_ops_deref_DerefMut_deref_mut_back := alloc_boxed_Box_deref_mut_back Self;
|}.
@@ -576,7 +576,7 @@ Definition alloc_vec_Vec_insert (T: Type) (v: alloc_vec_Vec T) (i: usize) (x: T)
else Fail_ Failure).
(* Helper *)
-Axiom alloc_vec_Vec_index_usize : forall {T : Type} (v : alloc_vec_Vec T) (i : usize) (x : T), result T.
+Axiom alloc_vec_Vec_index_usize : forall {T : Type} (v : alloc_vec_Vec T) (i : usize), result T.
(* Helper *)
Axiom alloc_vec_Vec_update_usize : forall {T : Type} (v : alloc_vec_Vec T) (i : usize) (x : T), result (alloc_vec_Vec T).
@@ -620,18 +620,18 @@ Definition core_slice_index_Slice_index
end.
(* [core::slice::index::Range:::get]: forward function *)
-Axiom core_slice_index_Range_get : forall (T : Type) (i : core_ops_range_Range usize) (s : slice T), result (option (slice T)).
+Axiom core_slice_index_RangeUsize_get : forall (T : Type) (i : core_ops_range_Range usize) (s : slice T), result (option (slice T)).
(* [core::slice::index::Range::get_mut]: forward function *)
-Axiom core_slice_index_Range_get_mut :
+Axiom core_slice_index_RangeUsize_get_mut :
forall (T : Type), core_ops_range_Range usize -> slice T -> result (option (slice T)).
(* [core::slice::index::Range::get_mut]: backward function 0 *)
-Axiom core_slice_index_Range_get_mut_back :
+Axiom core_slice_index_RangeUsize_get_mut_back :
forall (T : Type), core_ops_range_Range usize -> slice T -> option (slice T) -> result (slice T).
(* [core::slice::index::Range::get_unchecked]: forward function *)
-Definition core_slice_index_Range_get_unchecked
+Definition core_slice_index_RangeUsize_get_unchecked
(T : Type) :
core_ops_range_Range usize -> const_raw_ptr (slice T) -> result (const_raw_ptr (slice T)) :=
(* Don't know what the model should be - for now we always fail to make
@@ -639,7 +639,7 @@ Definition core_slice_index_Range_get_unchecked
fun _ _ => Fail_ Failure.
(* [core::slice::index::Range::get_unchecked_mut]: forward function *)
-Definition core_slice_index_Range_get_unchecked_mut
+Definition core_slice_index_RangeUsize_get_unchecked_mut
(T : Type) :
core_ops_range_Range usize -> mut_raw_ptr (slice T) -> result (mut_raw_ptr (slice T)) :=
(* Don't know what the model should be - for now we always fail to make
@@ -647,15 +647,15 @@ Definition core_slice_index_Range_get_unchecked_mut
fun _ _ => Fail_ Failure.
(* [core::slice::index::Range::index]: forward function *)
-Axiom core_slice_index_Range_index :
+Axiom core_slice_index_RangeUsize_index :
forall (T : Type), core_ops_range_Range usize -> slice T -> result (slice T).
(* [core::slice::index::Range::index_mut]: forward function *)
-Axiom core_slice_index_Range_index_mut :
+Axiom core_slice_index_RangeUsize_index_mut :
forall (T : Type), core_ops_range_Range usize -> slice T -> result (slice T).
(* [core::slice::index::Range::index_mut]: backward function 0 *)
-Axiom core_slice_index_Range_index_mut_back :
+Axiom core_slice_index_RangeUsize_index_mut_back :
forall (T : Type), core_ops_range_Range usize -> slice T -> slice T -> result (slice T).
(* [core::slice::index::[T]::index_mut]: forward function *)
@@ -683,44 +683,44 @@ Axiom core_array_Array_index_mut_back :
forall (T Idx : Type) (N : usize) (inst : core_ops_index_IndexMut (slice T) Idx)
(a : array T N) (i : Idx) (x : inst.(core_ops_index_IndexMut_indexInst).(core_ops_index_Index_Output)), result (array T N).
-(* Trait implementation: [core::slice::index::[T]] *)
-Definition core_slice_index_Slice_coreopsindexIndexInst (T Idx : Type)
- (inst : core_slice_index_SliceIndex Idx (slice T)) :
- core_ops_index_Index (slice T) Idx := {|
- core_ops_index_Index_Output := inst.(core_slice_index_SliceIndex_Output);
- core_ops_index_Index_index := core_slice_index_Slice_index T Idx inst;
-|}.
-
(* Trait implementation: [core::slice::index::private_slice_index::Range] *)
-Definition core_slice_index_private_slice_index_Range_coresliceindexprivate_slice_indexSealedInst
+Definition core_slice_index_private_slice_index_SealedRangeUsizeInst
: core_slice_index_private_slice_index_Sealed (core_ops_range_Range usize) := tt.
(* Trait implementation: [core::slice::index::Range] *)
-Definition core_slice_index_Range_coresliceindexSliceIndexInst (T : Type) :
+Definition core_slice_index_SliceIndexRangeUsizeSliceTInst (T : Type) :
core_slice_index_SliceIndex (core_ops_range_Range usize) (slice T) := {|
- core_slice_index_SliceIndex_sealedInst := core_slice_index_private_slice_index_Range_coresliceindexprivate_slice_indexSealedInst;
+ core_slice_index_SliceIndex_sealedInst := core_slice_index_private_slice_index_SealedRangeUsizeInst;
core_slice_index_SliceIndex_Output := slice T;
- core_slice_index_SliceIndex_get := core_slice_index_Range_get T;
- core_slice_index_SliceIndex_get_mut := core_slice_index_Range_get_mut T;
- core_slice_index_SliceIndex_get_mut_back := core_slice_index_Range_get_mut_back T;
- core_slice_index_SliceIndex_get_unchecked := core_slice_index_Range_get_unchecked T;
- core_slice_index_SliceIndex_get_unchecked_mut := core_slice_index_Range_get_unchecked_mut T;
- core_slice_index_SliceIndex_index := core_slice_index_Range_index T;
- core_slice_index_SliceIndex_index_mut := core_slice_index_Range_index_mut T;
- core_slice_index_SliceIndex_index_mut_back := core_slice_index_Range_index_mut_back T;
+ core_slice_index_SliceIndex_get := core_slice_index_RangeUsize_get T;
+ core_slice_index_SliceIndex_get_mut := core_slice_index_RangeUsize_get_mut T;
+ core_slice_index_SliceIndex_get_mut_back := core_slice_index_RangeUsize_get_mut_back T;
+ core_slice_index_SliceIndex_get_unchecked := core_slice_index_RangeUsize_get_unchecked T;
+ core_slice_index_SliceIndex_get_unchecked_mut := core_slice_index_RangeUsize_get_unchecked_mut T;
+ core_slice_index_SliceIndex_index := core_slice_index_RangeUsize_index T;
+ core_slice_index_SliceIndex_index_mut := core_slice_index_RangeUsize_index_mut T;
+ core_slice_index_SliceIndex_index_mut_back := core_slice_index_RangeUsize_index_mut_back T;
+|}.
+
+(* Trait implementation: [core::slice::index::[T]] *)
+Definition core_ops_index_IndexSliceTIInst (T Idx : Type)
+ (inst : core_slice_index_SliceIndex Idx (slice T)) :
+ core_ops_index_Index (slice T) Idx := {|
+ core_ops_index_Index_Output := inst.(core_slice_index_SliceIndex_Output);
+ core_ops_index_Index_index := core_slice_index_Slice_index T Idx inst;
|}.
(* Trait implementation: [core::slice::index::[T]] *)
-Definition core_slice_index_Slice_coreopsindexIndexMutInst (T Idx : Type)
+Definition core_ops_index_IndexMutSliceTIInst (T Idx : Type)
(inst : core_slice_index_SliceIndex Idx (slice T)) :
core_ops_index_IndexMut (slice T) Idx := {|
- core_ops_index_IndexMut_indexInst := core_slice_index_Slice_coreopsindexIndexInst T Idx inst;
+ core_ops_index_IndexMut_indexInst := core_ops_index_IndexSliceTIInst T Idx inst;
core_ops_index_IndexMut_index_mut := core_slice_index_Slice_index_mut T Idx inst;
core_ops_index_IndexMut_index_mut_back := core_slice_index_Slice_index_mut_back T Idx inst;
|}.
(* Trait implementation: [core::array::[T; N]] *)
-Definition core_array_Array_coreopsindexIndexInst (T Idx : Type) (N : usize)
+Definition core_ops_index_IndexArrayInst (T Idx : Type) (N : usize)
(inst : core_ops_index_Index (slice T) Idx) :
core_ops_index_Index (array T N) Idx := {|
core_ops_index_Index_Output := inst.(core_ops_index_Index_Output);
@@ -728,10 +728,10 @@ Definition core_array_Array_coreopsindexIndexInst (T Idx : Type) (N : usize)
|}.
(* Trait implementation: [core::array::[T; N]] *)
-Definition core_array_Array_coreopsindexIndexMutInst (T Idx : Type) (N : usize)
+Definition core_ops_index_IndexMutArrayInst (T Idx : Type) (N : usize)
(inst : core_ops_index_IndexMut (slice T) Idx) :
core_ops_index_IndexMut (array T N) Idx := {|
- core_ops_index_IndexMut_indexInst := core_array_Array_coreopsindexIndexInst T Idx N inst.(core_ops_index_IndexMut_indexInst);
+ core_ops_index_IndexMut_indexInst := core_ops_index_IndexArrayInst T Idx N inst.(core_ops_index_IndexMut_indexInst);
core_ops_index_IndexMut_index_mut := core_array_Array_index_mut T Idx N inst;
core_ops_index_IndexMut_index_mut_back := core_array_Array_index_mut_back T Idx N inst;
|}.
@@ -765,13 +765,13 @@ Axiom core_slice_index_usize_index_mut_back :
forall (T : Type), usize -> slice T -> T -> result (slice T).
(* Trait implementation: [core::slice::index::private_slice_index::usize] *)
-Definition core_slice_index_private_slice_index_usize_coresliceindexprivate_slice_indexSealedInst
+Definition core_slice_index_private_slice_index_SealedUsizeInst
: core_slice_index_private_slice_index_Sealed usize := tt.
(* Trait implementation: [core::slice::index::usize] *)
-Definition core_slice_index_usize_coresliceindexSliceIndexInst (T : Type) :
+Definition core_slice_index_SliceIndexUsizeSliceTInst (T : Type) :
core_slice_index_SliceIndex usize (slice T) := {|
- core_slice_index_SliceIndex_sealedInst := core_slice_index_private_slice_index_usize_coresliceindexprivate_slice_indexSealedInst;
+ core_slice_index_SliceIndex_sealedInst := core_slice_index_private_slice_index_SealedUsizeInst;
core_slice_index_SliceIndex_Output := T;
core_slice_index_SliceIndex_get := core_slice_index_usize_get T;
core_slice_index_SliceIndex_get_mut := core_slice_index_usize_get_mut T;
@@ -815,8 +815,16 @@ Definition alloc_vec_Vec_coreopsindexIndexMutInst (T Idx : Type)
(*** Theorems *)
+Axiom alloc_vec_Vec_index_eq : forall {a : Type} (v : alloc_vec_Vec a) (i : usize) (x : a),
+ alloc_vec_Vec_index a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i =
+ alloc_vec_Vec_index_usize v i.
+
+Axiom alloc_vec_Vec_index_mut_eq : forall {a : Type} (v : alloc_vec_Vec a) (i : usize) (x : a),
+ alloc_vec_Vec_index_mut a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i =
+ alloc_vec_Vec_index_usize v i.
+
Axiom alloc_vec_Vec_index_mut_back_eq : forall {a : Type} (v : alloc_vec_Vec a) (i : usize) (x : a),
- alloc_vec_Vec_index_mut_back a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i x =
+ alloc_vec_Vec_index_mut_back a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i x =
alloc_vec_Vec_update_usize v i x.
End Primitives.
diff --git a/tests/coq/traits/Traits.v b/tests/coq/traits/Traits.v
index e104fb66..0952a1df 100644
--- a/tests/coq/traits/Traits.v
+++ b/tests/coq/traits/Traits.v
@@ -8,7 +8,8 @@ Import ListNotations.
Local Open Scope Primitives_scope.
Module Traits.
-(** Trait declaration: [traits::BoolTrait] *)
+(** Trait declaration: [traits::BoolTrait]
+ Source: 'src/traits.rs', lines 1:0-1:19 *)
Record BoolTrait_t (Self : Type) := mkBoolTrait_t {
BoolTrait_t_get_bool : Self -> result bool;
}.
@@ -16,50 +17,62 @@ Record BoolTrait_t (Self : Type) := mkBoolTrait_t {
Arguments mkBoolTrait_t { _ }.
Arguments BoolTrait_t_get_bool { _ }.
-(** [traits::Bool::{0}::get_bool]: forward function *)
+(** [traits::{bool}::get_bool]: forward function
+ Source: 'src/traits.rs', lines 12:4-12:30 *)
Definition bool_get_bool (self : bool) : result bool :=
Return self.
-(** Trait implementation: [traits::Bool::{0}] *)
-Definition Bool_BoolTraitInst : BoolTrait_t bool := {|
+(** Trait implementation: [traits::{bool}]
+ Source: 'src/traits.rs', lines 11:0-11:23 *)
+Definition traits_BoolTraitBoolInst : BoolTrait_t bool := {|
BoolTrait_t_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 *)
Definition boolTrait_ret_true
{Self : Type} (self_clause : BoolTrait_t Self) (self : 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 *)
Definition test_bool_trait_bool (x : bool) : result bool :=
b <- bool_get_bool x;
- if b then boolTrait_ret_true Bool_BoolTraitInst x else Return false
+ if b then boolTrait_ret_true traits_BoolTraitBoolInst x else Return false
.
-(** [traits::Option::{1}::get_bool]: forward function *)
+(** [traits::{core::option::Option<T>#1}::get_bool]: forward function
+ Source: 'src/traits.rs', lines 23:4-23:30 *)
Definition option_get_bool (T : Type) (self : option T) : result bool :=
match self with | None => Return false | Some t => Return true end
.
-(** Trait implementation: [traits::Option::{1}] *)
-Definition Option_BoolTraitInst (T : Type) : BoolTrait_t (option T) := {|
+(** Trait implementation: [traits::{core::option::Option<T>#1}]
+ Source: 'src/traits.rs', lines 22:0-22:31 *)
+Definition traits_BoolTraitcoreoptionOptionTInst (T : Type) : BoolTrait_t
+ (option T) := {|
BoolTrait_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 *)
Definition test_bool_trait_option (T : Type) (x : option T) : result bool :=
b <- option_get_bool T x;
- if b then boolTrait_ret_true (Option_BoolTraitInst T) x else Return false
+ 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 *)
Definition test_bool_trait
- (T : Type) (inst : BoolTrait_t T) (x : T) : result bool :=
- inst.(BoolTrait_t_get_bool) x
+ (T : Type) (boolTraitTInst : BoolTrait_t T) (x : T) : result bool :=
+ boolTraitTInst.(BoolTrait_t_get_bool) x
.
-(** Trait declaration: [traits::ToU64] *)
+(** Trait declaration: [traits::ToU64]
+ Source: 'src/traits.rs', lines 39:0-39:15 *)
Record ToU64_t (Self : Type) := mkToU64_t {
ToU64_t_to_u64 : Self -> result u64;
}.
@@ -67,71 +80,88 @@ Record ToU64_t (Self : Type) := mkToU64_t {
Arguments mkToU64_t { _ }.
Arguments ToU64_t_to_u64 { _ }.
-(** [traits::u64::{2}::to_u64]: forward function *)
+(** [traits::{u64#2}::to_u64]: forward function
+ Source: 'src/traits.rs', lines 44:4-44:26 *)
Definition u64_to_u64 (self : u64) : result u64 :=
Return self.
-(** Trait implementation: [traits::u64::{2}] *)
-Definition u64_ToU64Inst : ToU64_t u64 := {| ToU64_t_to_u64 := u64_to_u64; |}.
+(** Trait implementation: [traits::{u64#2}]
+ Source: 'src/traits.rs', lines 43:0-43:18 *)
+Definition traits_ToU64U64Inst : ToU64_t u64 := {|
+ ToU64_t_to_u64 := u64_to_u64;
+|}.
-(** [traits::Tuple2::{3}::to_u64]: forward function *)
-Definition tuple2_to_u64
- (A : Type) (inst : ToU64_t A) (self : (A * A)) : result u64 :=
+(** [traits::{(A, A)#3}::to_u64]: forward function
+ Source: 'src/traits.rs', lines 50:4-50:26 *)
+Definition pair_to_u64
+ (A : Type) (toU64AInst : ToU64_t A) (self : (A * A)) : result u64 :=
let (t, t0) := self in
- i <- inst.(ToU64_t_to_u64) t;
- i0 <- inst.(ToU64_t_to_u64) t0;
+ i <- toU64AInst.(ToU64_t_to_u64) t;
+ i0 <- toU64AInst.(ToU64_t_to_u64) t0;
u64_add i i0
.
-(** Trait implementation: [traits::Tuple2::{3}] *)
-Definition Tuple2_ToU64Inst (A : Type) (inst : ToU64_t A) : ToU64_t (A * A)
- := {|
- ToU64_t_to_u64 := tuple2_to_u64 A inst;
+(** Trait implementation: [traits::{(A, A)#3}]
+ Source: 'src/traits.rs', lines 49:0-49:31 *)
+Definition traits_ToU64TupleAAInst (A : Type) (toU64AInst : ToU64_t A) :
+ ToU64_t (A * A) := {|
+ ToU64_t_to_u64 := pair_to_u64 A toU64AInst;
|}.
-(** [traits::f]: forward function *)
-Definition f (T : Type) (inst : ToU64_t T) (x : (T * T)) : result u64 :=
- tuple2_to_u64 T inst x
+(** [traits::f]: forward function
+ Source: 'src/traits.rs', lines 55:0-55:36 *)
+Definition f (T : Type) (toU64TInst : ToU64_t T) (x : (T * T)) : result u64 :=
+ pair_to_u64 T toU64TInst x
.
-(** [traits::g]: forward function *)
-Definition g (T : Type) (inst : ToU64_t (T * T)) (x : (T * T)) : result u64 :=
- inst.(ToU64_t_to_u64) x
+(** [traits::g]: forward function
+ Source: 'src/traits.rs', lines 59:0-61:18 *)
+Definition g
+ (T : Type) (toU64TupleTTInst : ToU64_t (T * T)) (x : (T * T)) : result u64 :=
+ toU64TupleTTInst.(ToU64_t_to_u64) x
.
-(** [traits::h0]: forward function *)
+(** [traits::h0]: forward function
+ Source: 'src/traits.rs', lines 66:0-66:24 *)
Definition h0 (x : u64) : result u64 :=
u64_to_u64 x.
-(** [traits::Wrapper] *)
+(** [traits::Wrapper]
+ Source: 'src/traits.rs', lines 70:0-70:21 *)
Record Wrapper_t (T : Type) := mkWrapper_t { wrapper_x : T; }.
Arguments mkWrapper_t { _ }.
Arguments wrapper_x { _ }.
-(** [traits::Wrapper::{4}::to_u64]: forward function *)
+(** [traits::{traits::Wrapper<T>#4}::to_u64]: forward function
+ Source: 'src/traits.rs', lines 75:4-75:26 *)
Definition wrapper_to_u64
- (T : Type) (inst : ToU64_t T) (self : Wrapper_t T) : result u64 :=
- inst.(ToU64_t_to_u64) self.(wrapper_x)
+ (T : Type) (toU64TInst : ToU64_t T) (self : Wrapper_t T) : result u64 :=
+ toU64TInst.(ToU64_t_to_u64) self.(wrapper_x)
.
-(** Trait implementation: [traits::Wrapper::{4}] *)
-Definition Wrapper_ToU64Inst (T : Type) (inst : ToU64_t T) : ToU64_t (Wrapper_t
- T) := {|
- ToU64_t_to_u64 := wrapper_to_u64 T inst;
+(** Trait implementation: [traits::{traits::Wrapper<T>#4}]
+ Source: 'src/traits.rs', lines 74:0-74:35 *)
+Definition traits_ToU64traitsWrapperTInst (T : Type) (toU64TInst : ToU64_t T) :
+ ToU64_t (Wrapper_t T) := {|
+ ToU64_t_to_u64 := wrapper_to_u64 T toU64TInst;
|}.
-(** [traits::h1]: forward function *)
+(** [traits::h1]: forward function
+ Source: 'src/traits.rs', lines 80:0-80:33 *)
Definition h1 (x : Wrapper_t u64) : result u64 :=
- wrapper_to_u64 u64 u64_ToU64Inst x
+ wrapper_to_u64 u64 traits_ToU64U64Inst x
.
-(** [traits::h2]: forward function *)
-Definition h2 (T : Type) (inst : ToU64_t T) (x : Wrapper_t T) : result u64 :=
- wrapper_to_u64 T inst x
+(** [traits::h2]: forward function
+ Source: 'src/traits.rs', lines 84:0-84:41 *)
+Definition h2
+ (T : Type) (toU64TInst : ToU64_t T) (x : Wrapper_t T) : result u64 :=
+ wrapper_to_u64 T toU64TInst x
.
-(** Trait declaration: [traits::ToType] *)
+(** Trait declaration: [traits::ToType]
+ Source: 'src/traits.rs', lines 88:0-88:19 *)
Record ToType_t (Self T : Type) := mkToType_t {
ToType_t_to_type : Self -> result T;
}.
@@ -139,64 +169,75 @@ Record ToType_t (Self T : Type) := mkToType_t {
Arguments mkToType_t { _ _ }.
Arguments ToType_t_to_type { _ _ }.
-(** [traits::u64::{5}::to_type]: forward function *)
+(** [traits::{u64#5}::to_type]: forward function
+ Source: 'src/traits.rs', lines 93:4-93:28 *)
Definition u64_to_type (self : u64) : result bool :=
Return (self s> 0%u64).
-(** Trait implementation: [traits::u64::{5}] *)
-Definition u64_ToTypeInst : ToType_t u64 bool := {|
+(** Trait implementation: [traits::{u64#5}]
+ Source: 'src/traits.rs', lines 92:0-92:25 *)
+Definition traits_ToTypeU64BoolInst : ToType_t u64 bool := {|
ToType_t_to_type := u64_to_type;
|}.
-(** Trait declaration: [traits::OfType] *)
+(** Trait declaration: [traits::OfType]
+ Source: 'src/traits.rs', lines 98:0-98:16 *)
Record OfType_t (Self : Type) := mkOfType_t {
- OfType_t_of_type : forall (T : Type) (inst : ToType_t T Self), T -> result
- Self;
+ OfType_t_of_type : forall (T : Type) (toTypeTSelfInst : ToType_t T Self), T
+ -> result Self;
}.
Arguments mkOfType_t { _ }.
Arguments OfType_t_of_type { _ }.
-(** [traits::h3]: forward function *)
+(** [traits::h3]: forward function
+ Source: 'src/traits.rs', lines 104:0-104:50 *)
Definition h3
- (T1 T2 : Type) (inst : OfType_t T1) (inst0 : ToType_t T2 T1) (y : T2) :
+ (T1 T2 : Type) (ofTypeT1Inst : OfType_t T1) (toTypeT2T1Inst : ToType_t T2 T1)
+ (y : T2) :
result T1
:=
- inst.(OfType_t_of_type) T2 inst0 y
+ ofTypeT1Inst.(OfType_t_of_type) T2 toTypeT2T1Inst y
.
-(** Trait declaration: [traits::OfTypeBis] *)
+(** Trait declaration: [traits::OfTypeBis]
+ Source: 'src/traits.rs', lines 109:0-109:36 *)
Record OfTypeBis_t (Self T : Type) := mkOfTypeBis_t {
- OfTypeBis_tOfTypeBis_t_parent_clause_0 : ToType_t T Self;
+ OfTypeBis_tOfTypeBis_t_ToTypeTSelfInst : ToType_t T Self;
OfTypeBis_t_of_type : T -> result Self;
}.
Arguments mkOfTypeBis_t { _ _ }.
-Arguments OfTypeBis_tOfTypeBis_t_parent_clause_0 { _ _ }.
+Arguments OfTypeBis_tOfTypeBis_t_ToTypeTSelfInst { _ _ }.
Arguments OfTypeBis_t_of_type { _ _ }.
-(** [traits::h4]: forward function *)
+(** [traits::h4]: forward function
+ Source: 'src/traits.rs', lines 118:0-118:57 *)
Definition h4
- (T1 T2 : Type) (inst : OfTypeBis_t T1 T2) (inst0 : ToType_t T2 T1) (y : T2) :
+ (T1 T2 : Type) (ofTypeBisT1T2Inst : OfTypeBis_t T1 T2) (toTypeT2T1Inst :
+ ToType_t T2 T1) (y : T2) :
result T1
:=
- inst.(OfTypeBis_t_of_type) y
+ ofTypeBisT1T2Inst.(OfTypeBis_t_of_type) y
.
-(** [traits::TestType] *)
+(** [traits::TestType]
+ Source: 'src/traits.rs', lines 122:0-122:22 *)
Record TestType_t (T : Type) := mkTestType_t { testType_0 : T; }.
Arguments mkTestType_t { _ }.
Arguments testType_0 { _ }.
-(** [traits::TestType::{6}::test::TestType1] *)
+(** [traits::{traits::TestType<T>#6}::test::TestType1]
+ Source: 'src/traits.rs', lines 127:8-127:24 *)
Record TestType_test_TestType1_t :=
mkTestType_test_TestType1_t {
testType_test_TestType1_0 : u64;
}
.
-(** Trait declaration: [traits::TestType::{6}::test::TestTrait] *)
+(** Trait declaration: [traits::{traits::TestType<T>#6}::test::TestTrait]
+ Source: 'src/traits.rs', lines 128:8-128:23 *)
Record TestType_test_TestTrait_t (Self : Type) := mkTestType_test_TestTrait_t {
TestType_test_TestTrait_t_test : Self -> result bool;
}.
@@ -204,47 +245,59 @@ Record TestType_test_TestTrait_t (Self : Type) := mkTestType_test_TestTrait_t {
Arguments mkTestType_test_TestTrait_t { _ }.
Arguments TestType_test_TestTrait_t_test { _ }.
-(** [traits::TestType::{6}::test::TestType1::{0}::test]: forward function *)
+(** [traits::{traits::TestType<T>#6}::test::{traits::{traits::TestType<T>#6}::test::TestType1}::test]: forward function
+ Source: 'src/traits.rs', lines 139:12-139:34 *)
Definition testType_test_TestType1_test
(self : TestType_test_TestType1_t) : result bool :=
Return (self.(testType_test_TestType1_0) s> 1%u64)
.
-(** Trait implementation: [traits::TestType::{6}::test::TestType1::{0}] *)
-Definition TestType_test_TestType1_TestType_test_TestTraitInst :
- TestType_test_TestTrait_t TestType_test_TestType1_t := {|
+(** Trait implementation: [traits::{traits::TestType<T>#6}::test::{traits::{traits::TestType<T>#6}::test::TestType1}]
+ Source: 'src/traits.rs', lines 138:8-138:36 *)
+Definition traits_TestType_test_TestTraittraitstraitsTestTypeTtestTestType1Inst
+ : TestType_test_TestTrait_t TestType_test_TestType1_t := {|
TestType_test_TestTrait_t_test := testType_test_TestType1_test;
|}.
-(** [traits::TestType::{6}::test]: forward function *)
+(** [traits::{traits::TestType<T>#6}::test]: forward function
+ Source: 'src/traits.rs', lines 126:4-126:36 *)
Definition testType_test
- (T : Type) (inst : ToU64_t T) (self : TestType_t T) (x : T) : result bool :=
- x0 <- inst.(ToU64_t_to_u64) x;
+ (T : Type) (toU64TInst : ToU64_t T) (self : TestType_t T) (x : T) :
+ result bool
+ :=
+ x0 <- toU64TInst.(ToU64_t_to_u64) x;
if x0 s> 0%u64
then testType_test_TestType1_test {| testType_test_TestType1_0 := 0%u64 |}
else Return false
.
-(** [traits::BoolWrapper] *)
+(** [traits::BoolWrapper]
+ Source: 'src/traits.rs', lines 150:0-150:22 *)
Record BoolWrapper_t := mkBoolWrapper_t { boolWrapper_0 : bool; }.
-(** [traits::BoolWrapper::{7}::to_type]: forward function *)
+(** [traits::{traits::BoolWrapper#7}::to_type]: forward function
+ Source: 'src/traits.rs', lines 156:4-156:25 *)
Definition boolWrapper_to_type
- (T : Type) (inst : ToType_t bool T) (self : BoolWrapper_t) : result T :=
- inst.(ToType_t_to_type) self.(boolWrapper_0)
+ (T : Type) (toTypeBoolTInst : ToType_t bool T) (self : BoolWrapper_t) :
+ result T
+ :=
+ toTypeBoolTInst.(ToType_t_to_type) self.(boolWrapper_0)
.
-(** Trait implementation: [traits::BoolWrapper::{7}] *)
-Definition BoolWrapper_ToTypeInst (T : Type) (inst : ToType_t bool T) :
- ToType_t BoolWrapper_t T := {|
- ToType_t_to_type := boolWrapper_to_type T inst;
+(** Trait implementation: [traits::{traits::BoolWrapper#7}]
+ Source: 'src/traits.rs', lines 152:0-152:33 *)
+Definition traits_ToTypetraitsBoolWrapperTInst (T : Type) (toTypeBoolTInst :
+ ToType_t bool T) : ToType_t BoolWrapper_t T := {|
+ ToType_t_to_type := boolWrapper_to_type T toTypeBoolTInst;
|}.
-(** [traits::WithConstTy::LEN2] *)
+(** [traits::WithConstTy::LEN2]
+ Source: 'src/traits.rs', lines 164:4-164:21 *)
Definition with_const_ty_len2_body : result usize := Return 32%usize.
Definition with_const_ty_len2_c : usize := with_const_ty_len2_body%global.
-(** Trait declaration: [traits::WithConstTy] *)
+(** Trait declaration: [traits::WithConstTy]
+ Source: 'src/traits.rs', lines 161:0-161:39 *)
Record WithConstTy_t (Self : Type) (LEN : usize) := mkWithConstTy_t {
WithConstTy_tWithConstTy_t_LEN1 : usize;
WithConstTy_tWithConstTy_t_LEN2 : usize;
@@ -263,63 +316,78 @@ Arguments WithConstTy_tWithConstTy_t_W { _ _ }.
Arguments WithConstTy_tWithConstTy_t_W_clause_0 { _ _ }.
Arguments WithConstTy_t_f { _ _ }.
-(** [traits::Bool::{8}::LEN1] *)
+(** [traits::{bool#8}::LEN1]
+ Source: 'src/traits.rs', lines 175:4-175:21 *)
Definition bool_len1_body : result usize := Return 12%usize.
Definition bool_len1_c : usize := bool_len1_body%global.
-(** [traits::Bool::{8}::f]: merged forward/backward function
- (there is a single backward function, and the forward function returns ()) *)
+(** [traits::{bool#8}::f]: merged forward/backward function
+ (there is a single backward function, and the forward function returns ())
+ Source: 'src/traits.rs', lines 180:4-180:39 *)
Definition bool_f (i : u64) (a : array u8 32%usize) : result u64 :=
Return i.
-(** Trait implementation: [traits::Bool::{8}] *)
-Definition Bool_WithConstTyInst : WithConstTy_t bool 32%usize := {|
+(** Trait implementation: [traits::{bool#8}]
+ Source: 'src/traits.rs', lines 174:0-174:29 *)
+Definition traits_WithConstTyBool32Inst : WithConstTy_t bool 32%usize := {|
WithConstTy_tWithConstTy_t_LEN1 := bool_len1_c;
WithConstTy_tWithConstTy_t_LEN2 := with_const_ty_len2_c;
WithConstTy_tWithConstTy_t_V := u8;
WithConstTy_tWithConstTy_t_W := u64;
- WithConstTy_tWithConstTy_t_W_clause_0 := u64_ToU64Inst;
+ WithConstTy_tWithConstTy_t_W_clause_0 := traits_ToU64U64Inst;
WithConstTy_t_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 *)
Definition use_with_const_ty1
- (H : Type) (LEN : usize) (inst : WithConstTy_t H LEN) : result usize :=
- let i := inst.(WithConstTy_tWithConstTy_t_LEN1) in Return i
+ (H : Type) (LEN : usize) (withConstTyHLENInst : WithConstTy_t H LEN) :
+ result usize
+ :=
+ let i := withConstTyHLENInst.(WithConstTy_tWithConstTy_t_LEN1) 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 *)
Definition use_with_const_ty2
- (H : Type) (LEN : usize) (inst : WithConstTy_t H LEN)
- (w : inst.(WithConstTy_tWithConstTy_t_W)) :
+ (H : Type) (LEN : usize) (withConstTyHLENInst : WithConstTy_t H LEN)
+ (w : withConstTyHLENInst.(WithConstTy_tWithConstTy_t_W)) :
result unit
:=
Return tt
.
-(** [traits::use_with_const_ty3]: forward function *)
+(** [traits::use_with_const_ty3]: forward function
+ Source: 'src/traits.rs', lines 189:0-189:80 *)
Definition use_with_const_ty3
- (H : Type) (LEN : usize) (inst : WithConstTy_t H LEN)
- (x : inst.(WithConstTy_tWithConstTy_t_W)) :
+ (H : Type) (LEN : usize) (withConstTyHLENInst : WithConstTy_t H LEN)
+ (x : withConstTyHLENInst.(WithConstTy_tWithConstTy_t_W)) :
result u64
:=
- inst.(WithConstTy_tWithConstTy_t_W_clause_0).(ToU64_t_to_u64) x
+ withConstTyHLENInst.(WithConstTy_tWithConstTy_t_W_clause_0).(ToU64_t_to_u64)
+ x
.
-(** [traits::test_where1]: forward function *)
+(** [traits::test_where1]: forward function
+ Source: 'src/traits.rs', lines 193:0-193:40 *)
Definition test_where1 (T : Type) (_x : T) : result unit :=
Return tt.
-(** [traits::test_where2]: forward function *)
+(** [traits::test_where2]: forward function
+ Source: 'src/traits.rs', lines 194:0-194:57 *)
Definition test_where2
- (T : Type) (inst : WithConstTy_t T 32%usize) (_x : u32) : result unit :=
+ (T : Type) (withConstTyT32Inst : WithConstTy_t T 32%usize) (_x : u32) :
+ result unit
+ :=
Return tt
.
-(** [alloc::string::String] *)
+(** [alloc::string::String]
+ Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/alloc/src/string.rs', lines 365:0-365:17 *)
Axiom alloc_string_String_t : Type.
-(** Trait declaration: [traits::ParentTrait0] *)
+(** Trait declaration: [traits::ParentTrait0]
+ Source: 'src/traits.rs', lines 200:0-200:22 *)
Record ParentTrait0_t (Self : Type) := mkParentTrait0_t {
ParentTrait0_tParentTrait0_t_W : Type;
ParentTrait0_t_get_name : Self -> result alloc_string_String_t;
@@ -331,61 +399,77 @@ Arguments ParentTrait0_tParentTrait0_t_W { _ }.
Arguments ParentTrait0_t_get_name { _ }.
Arguments ParentTrait0_t_get_w { _ }.
-(** Trait declaration: [traits::ParentTrait1] *)
+(** Trait declaration: [traits::ParentTrait1]
+ Source: 'src/traits.rs', lines 205:0-205:22 *)
Record ParentTrait1_t (Self : Type) := mkParentTrait1_t{}.
Arguments mkParentTrait1_t { _ }.
-(** Trait declaration: [traits::ChildTrait] *)
+(** Trait declaration: [traits::ChildTrait]
+ Source: 'src/traits.rs', lines 206:0-206:49 *)
Record ChildTrait_t (Self : Type) := mkChildTrait_t {
- ChildTrait_tChildTrait_t_parent_clause_0 : ParentTrait0_t Self;
- ChildTrait_tChildTrait_t_parent_clause_1 : ParentTrait1_t Self;
+ ChildTrait_tChildTrait_t_ParentTrait0SelfInst : ParentTrait0_t Self;
+ ChildTrait_tChildTrait_t_ParentTrait1SelfInst : ParentTrait1_t Self;
}.
Arguments mkChildTrait_t { _ }.
-Arguments ChildTrait_tChildTrait_t_parent_clause_0 { _ }.
-Arguments ChildTrait_tChildTrait_t_parent_clause_1 { _ }.
+Arguments ChildTrait_tChildTrait_t_ParentTrait0SelfInst { _ }.
+Arguments ChildTrait_tChildTrait_t_ParentTrait1SelfInst { _ }.
-(** [traits::test_child_trait1]: forward function *)
+(** [traits::test_child_trait1]: forward function
+ Source: 'src/traits.rs', lines 209:0-209:56 *)
Definition test_child_trait1
- (T : Type) (inst : ChildTrait_t T) (x : T) : result alloc_string_String_t :=
- inst.(ChildTrait_tChildTrait_t_parent_clause_0).(ParentTrait0_t_get_name) x
+ (T : Type) (childTraitTInst : ChildTrait_t T) (x : T) :
+ result alloc_string_String_t
+ :=
+ childTraitTInst.(ChildTrait_tChildTrait_t_ParentTrait0SelfInst).(ParentTrait0_t_get_name)
+ x
.
-(** [traits::test_child_trait2]: forward function *)
+(** [traits::test_child_trait2]: forward function
+ Source: 'src/traits.rs', lines 213:0-213:54 *)
Definition test_child_trait2
- (T : Type) (inst : ChildTrait_t T) (x : T) :
+ (T : Type) (childTraitTInst : ChildTrait_t T) (x : T) :
result
- inst.(ChildTrait_tChildTrait_t_parent_clause_0).(ParentTrait0_tParentTrait0_t_W)
+ childTraitTInst.(ChildTrait_tChildTrait_t_ParentTrait0SelfInst).(ParentTrait0_tParentTrait0_t_W)
:=
- inst.(ChildTrait_tChildTrait_t_parent_clause_0).(ParentTrait0_t_get_w) x
+ childTraitTInst.(ChildTrait_tChildTrait_t_ParentTrait0SelfInst).(ParentTrait0_t_get_w)
+ x
.
-(** [traits::order1]: forward function *)
+(** [traits::order1]: forward function
+ Source: 'src/traits.rs', lines 219:0-219:59 *)
Definition order1
- (T U : Type) (inst : ParentTrait0_t T) (inst0 : ParentTrait0_t U) :
+ (T U : Type) (parentTrait0TInst : ParentTrait0_t T) (parentTrait0UInst :
+ ParentTrait0_t U) :
result unit
:=
Return tt
.
-(** Trait declaration: [traits::ChildTrait1] *)
+(** Trait declaration: [traits::ChildTrait1]
+ Source: 'src/traits.rs', lines 222:0-222:35 *)
Record ChildTrait1_t (Self : Type) := mkChildTrait1_t {
- ChildTrait1_tChildTrait1_t_parent_clause_0 : ParentTrait1_t Self;
+ ChildTrait1_tChildTrait1_t_ParentTrait1SelfInst : ParentTrait1_t Self;
}.
Arguments mkChildTrait1_t { _ }.
-Arguments ChildTrait1_tChildTrait1_t_parent_clause_0 { _ }.
-
-(** Trait implementation: [traits::usize::{9}] *)
-Definition usize_ParentTrait1Inst : ParentTrait1_t usize := mkParentTrait1_t.
-
-(** Trait implementation: [traits::usize::{10}] *)
-Definition usize_ChildTrait1Inst : ChildTrait1_t usize := {|
- ChildTrait1_tChildTrait1_t_parent_clause_0 := usize_ParentTrait1Inst;
+Arguments ChildTrait1_tChildTrait1_t_ParentTrait1SelfInst { _ }.
+
+(** Trait implementation: [traits::{usize#9}]
+ Source: 'src/traits.rs', lines 224:0-224:27 *)
+Definition traits_ParentTrait1UsizeInst : ParentTrait1_t usize
+ := mkParentTrait1_t.
+
+(** Trait implementation: [traits::{usize#10}]
+ Source: 'src/traits.rs', lines 225:0-225:26 *)
+Definition traits_ChildTrait1UsizeInst : ChildTrait1_t usize := {|
+ ChildTrait1_tChildTrait1_t_ParentTrait1SelfInst :=
+ traits_ParentTrait1UsizeInst;
|}.
-(** Trait declaration: [traits::Iterator] *)
+(** Trait declaration: [traits::Iterator]
+ Source: 'src/traits.rs', lines 229:0-229:18 *)
Record Iterator_t (Self : Type) := mkIterator_t {
Iterator_tIterator_t_Item : Type;
}.
@@ -393,7 +477,8 @@ Record Iterator_t (Self : Type) := mkIterator_t {
Arguments mkIterator_t { _ }.
Arguments Iterator_tIterator_t_Item { _ }.
-(** Trait declaration: [traits::IntoIterator] *)
+(** Trait declaration: [traits::IntoIterator]
+ Source: 'src/traits.rs', lines 233:0-233:22 *)
Record IntoIterator_t (Self : Type) := mkIntoIterator_t {
IntoIterator_tIntoIterator_t_Item : Type;
IntoIterator_tIntoIterator_t_IntoIter : Type;
@@ -409,22 +494,26 @@ Arguments IntoIterator_tIntoIterator_t_IntoIter { _ }.
Arguments IntoIterator_tIntoIterator_t_IntoIter_clause_0 { _ }.
Arguments IntoIterator_t_into_iter { _ }.
-(** Trait declaration: [traits::FromResidual] *)
+(** Trait declaration: [traits::FromResidual]
+ Source: 'src/traits.rs', lines 250:0-250:21 *)
Record FromResidual_t (Self T : Type) := mkFromResidual_t{}.
Arguments mkFromResidual_t { _ _ }.
-(** Trait declaration: [traits::Try] *)
+(** Trait declaration: [traits::Try]
+ Source: 'src/traits.rs', lines 246:0-246:48 *)
Record Try_t (Self : Type) := mkTry_t {
Try_tTry_t_Residual : Type;
- Try_tTry_t_parent_clause_0 : FromResidual_t Self Try_tTry_t_Residual;
+ Try_tTry_t_FromResidualSelftraitsTrySelfResidualInst : FromResidual_t Self
+ Try_tTry_t_Residual;
}.
Arguments mkTry_t { _ }.
Arguments Try_tTry_t_Residual { _ }.
-Arguments Try_tTry_t_parent_clause_0 { _ }.
+Arguments Try_tTry_t_FromResidualSelftraitsTrySelfResidualInst { _ }.
-(** Trait declaration: [traits::WithTarget] *)
+(** Trait declaration: [traits::WithTarget]
+ Source: 'src/traits.rs', lines 252:0-252:20 *)
Record WithTarget_t (Self : Type) := mkWithTarget_t {
WithTarget_tWithTarget_t_Target : Type;
}.
@@ -432,7 +521,8 @@ Record WithTarget_t (Self : Type) := mkWithTarget_t {
Arguments mkWithTarget_t { _ }.
Arguments WithTarget_tWithTarget_t_Target { _ }.
-(** Trait declaration: [traits::ParentTrait2] *)
+(** Trait declaration: [traits::ParentTrait2]
+ Source: 'src/traits.rs', lines 256:0-256:22 *)
Record ParentTrait2_t (Self : Type) := mkParentTrait2_t {
ParentTrait2_tParentTrait2_t_U : Type;
ParentTrait2_tParentTrait2_t_U_clause_0 : WithTarget_t
@@ -443,45 +533,48 @@ Arguments mkParentTrait2_t { _ }.
Arguments ParentTrait2_tParentTrait2_t_U { _ }.
Arguments ParentTrait2_tParentTrait2_t_U_clause_0 { _ }.
-(** Trait declaration: [traits::ChildTrait2] *)
+(** Trait declaration: [traits::ChildTrait2]
+ Source: 'src/traits.rs', lines 260:0-260:35 *)
Record ChildTrait2_t (Self : Type) := mkChildTrait2_t {
- ChildTrait2_tChildTrait2_t_parent_clause_0 : ParentTrait2_t Self;
+ ChildTrait2_tChildTrait2_t_ParentTrait2SelfInst : ParentTrait2_t Self;
ChildTrait2_t_convert :
- (ChildTrait2_tChildTrait2_t_parent_clause_0).(ParentTrait2_tParentTrait2_t_U)
+ (ChildTrait2_tChildTrait2_t_ParentTrait2SelfInst).(ParentTrait2_tParentTrait2_t_U)
-> result
- (ChildTrait2_tChildTrait2_t_parent_clause_0).(ParentTrait2_tParentTrait2_t_U_clause_0).(WithTarget_tWithTarget_t_Target);
+ (ChildTrait2_tChildTrait2_t_ParentTrait2SelfInst).(ParentTrait2_tParentTrait2_t_U_clause_0).(WithTarget_tWithTarget_t_Target);
}.
Arguments mkChildTrait2_t { _ }.
-Arguments ChildTrait2_tChildTrait2_t_parent_clause_0 { _ }.
+Arguments ChildTrait2_tChildTrait2_t_ParentTrait2SelfInst { _ }.
Arguments ChildTrait2_t_convert { _ }.
-(** Trait implementation: [traits::u32::{11}] *)
-Definition u32_WithTargetInst : WithTarget_t u32 := {|
+(** Trait implementation: [traits::{u32#11}]
+ Source: 'src/traits.rs', lines 264:0-264:23 *)
+Definition traits_WithTargetU32Inst : WithTarget_t u32 := {|
WithTarget_tWithTarget_t_Target := u32;
|}.
-(** Trait implementation: [traits::u32::{12}] *)
-Definition u32_ParentTrait2Inst : ParentTrait2_t u32 := {|
+(** Trait implementation: [traits::{u32#12}]
+ Source: 'src/traits.rs', lines 268:0-268:25 *)
+Definition traits_ParentTrait2U32Inst : ParentTrait2_t u32 := {|
ParentTrait2_tParentTrait2_t_U := u32;
- ParentTrait2_tParentTrait2_t_U_clause_0 := u32_WithTargetInst;
+ ParentTrait2_tParentTrait2_t_U_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 *)
Definition u32_convert (x : u32) : result u32 :=
Return x.
-(** Trait implementation: [traits::u32::{13}] *)
-Definition u32_ChildTrait2Inst : ChildTrait2_t u32 := {|
- ChildTrait2_tChildTrait2_t_parent_clause_0 := u32_ParentTrait2Inst;
+(** Trait implementation: [traits::{u32#13}]
+ Source: 'src/traits.rs', lines 272:0-272:24 *)
+Definition traits_ChildTrait2U32Inst : ChildTrait2_t u32 := {|
+ ChildTrait2_tChildTrait2_t_ParentTrait2SelfInst :=
+ traits_ParentTrait2U32Inst;
ChildTrait2_t_convert := u32_convert;
|}.
-(** [traits::incr_u32]: forward function *)
-Definition incr_u32 (x : u32) : result u32 :=
- u32_add x 1%u32.
-
-(** Trait declaration: [traits::CFnOnce] *)
+(** Trait declaration: [traits::CFnOnce]
+ Source: 'src/traits.rs', lines 286:0-286:23 *)
Record CFnOnce_t (Self Args : Type) := mkCFnOnce_t {
CFnOnce_tCFnOnce_t_Output : Type;
CFnOnce_t_call_once : Self -> Args -> result CFnOnce_tCFnOnce_t_Output;
@@ -491,30 +584,37 @@ Arguments mkCFnOnce_t { _ _ }.
Arguments CFnOnce_tCFnOnce_t_Output { _ _ }.
Arguments CFnOnce_t_call_once { _ _ }.
-(** Trait declaration: [traits::CFnMut] *)
+(** Trait declaration: [traits::CFnMut]
+ Source: 'src/traits.rs', lines 292:0-292:37 *)
Record CFnMut_t (Self Args : Type) := mkCFnMut_t {
- CFnMut_tCFnMut_t_parent_clause_0 : CFnOnce_t Self Args;
+ CFnMut_tCFnMut_t_CFnOnceSelfArgsInst : CFnOnce_t Self Args;
CFnMut_t_call_mut : Self -> Args -> result
- (CFnMut_tCFnMut_t_parent_clause_0).(CFnOnce_tCFnOnce_t_Output);
+ (CFnMut_tCFnMut_t_CFnOnceSelfArgsInst).(CFnOnce_tCFnOnce_t_Output);
CFnMut_t_call_mut_back : Self -> Args ->
- (CFnMut_tCFnMut_t_parent_clause_0).(CFnOnce_tCFnOnce_t_Output) -> result
- Self;
+ (CFnMut_tCFnMut_t_CFnOnceSelfArgsInst).(CFnOnce_tCFnOnce_t_Output) ->
+ result Self;
}.
Arguments mkCFnMut_t { _ _ }.
-Arguments CFnMut_tCFnMut_t_parent_clause_0 { _ _ }.
+Arguments CFnMut_tCFnMut_t_CFnOnceSelfArgsInst { _ _ }.
Arguments CFnMut_t_call_mut { _ _ }.
Arguments CFnMut_t_call_mut_back { _ _ }.
-(** Trait declaration: [traits::CFn] *)
+(** Trait declaration: [traits::CFn]
+ Source: 'src/traits.rs', lines 296:0-296:33 *)
Record CFn_t (Self Args : Type) := mkCFn_t {
- CFn_tCFn_t_parent_clause_0 : CFnMut_t Self Args;
+ CFn_tCFn_t_CFnMutSelfArgsInst : CFnMut_t Self Args;
CFn_t_call_mut : Self -> Args -> result
- (CFn_tCFn_t_parent_clause_0).(CFnMut_tCFnMut_t_parent_clause_0).(CFnOnce_tCFnOnce_t_Output);
+ (CFn_tCFn_t_CFnMutSelfArgsInst).(CFnMut_tCFnMut_t_CFnOnceSelfArgsInst).(CFnOnce_tCFnOnce_t_Output);
}.
Arguments mkCFn_t { _ _ }.
-Arguments CFn_tCFn_t_parent_clause_0 { _ _ }.
+Arguments CFn_tCFn_t_CFnMutSelfArgsInst { _ _ }.
Arguments CFn_t_call_mut { _ _ }.
+(** [traits::incr_u32]: forward function
+ Source: 'src/traits.rs', lines 300:0-300:30 *)
+Definition incr_u32 (x : u32) : result u32 :=
+ u32_add x 1%u32.
+
End Traits .