summaryrefslogtreecommitdiff
path: root/tests/fstar
diff options
context:
space:
mode:
authorSon Ho2024-04-04 15:48:25 +0200
committerSon Ho2024-04-04 15:48:25 +0200
commita882e28134dc6c44e7a2b5b82eb42041e9a1f342 (patch)
tree98a00a150d03b8088df62550a6d8ab0f23c0e779 /tests/fstar
parent1f3ce79023d902d0145da38e878d991a6ba29236 (diff)
parent7f7387c5519da00133ad557450695e6d6838f93c (diff)
Merge remote-tracking branch 'origin/main' into escherichia/error_catching
Diffstat (limited to 'tests/fstar')
-rw-r--r--tests/fstar/betree/BetreeMain.Funs.fst12
-rw-r--r--tests/fstar/betree/BetreeMain.FunsExternal.fsti3
-rw-r--r--tests/fstar/betree_back_stateful/BetreeMain.Funs.fst12
-rw-r--r--tests/fstar/betree_back_stateful/BetreeMain.FunsExternal.fsti3
-rw-r--r--tests/fstar/demo/Demo.fst26
-rw-r--r--tests/fstar/hashmap/Hashmap.Funs.fst29
-rw-r--r--tests/fstar/hashmap_on_disk/HashmapMain.Funs.fst29
-rw-r--r--tests/fstar/misc/External.Funs.fst4
-rw-r--r--tests/fstar/misc/External.FunsExternal.fsti9
-rw-r--r--tests/fstar/misc/External.TypesExternal.fsti3
-rw-r--r--tests/fstar/misc/Loops.Funs.fst83
-rw-r--r--tests/fstar/misc/NoNestedBorrows.fst11
-rw-r--r--tests/fstar/misc/Paper.fst11
-rw-r--r--tests/fstar/misc/PoloniusList.fst4
-rw-r--r--tests/fstar/traits/Traits.fst3
15 files changed, 121 insertions, 121 deletions
diff --git a/tests/fstar/betree/BetreeMain.Funs.fst b/tests/fstar/betree/BetreeMain.Funs.fst
index 2469f98c..129e6f7e 100644
--- a/tests/fstar/betree/BetreeMain.Funs.fst
+++ b/tests/fstar/betree/BetreeMain.Funs.fst
@@ -195,11 +195,11 @@ let rec betree_Node_lookup_first_message_for_key
else
let* (l, lookup_first_message_for_key_back) =
betree_Node_lookup_first_message_for_key key next_msgs in
- let back_'a =
+ let back =
fun ret ->
let* next_msgs1 = lookup_first_message_for_key_back ret in
Return (Betree_List_Cons (i, m) next_msgs1) in
- Return (l, back_'a)
+ Return (l, back)
| Betree_List_Nil -> Return (Betree_List_Nil, Return)
end
@@ -352,11 +352,11 @@ let rec betree_Node_lookup_first_message_after_key
then
let* (l, lookup_first_message_after_key_back) =
betree_Node_lookup_first_message_after_key key next_msgs in
- let back_'a =
+ let back =
fun ret ->
let* next_msgs1 = lookup_first_message_after_key_back ret in
Return (Betree_List_Cons (k, m) next_msgs1) in
- Return (l, back_'a)
+ Return (l, back)
else Return (Betree_List_Cons (k, m) next_msgs, Return)
| Betree_List_Nil -> Return (Betree_List_Nil, Return)
end
@@ -453,11 +453,11 @@ let rec betree_Node_lookup_mut_in_bindings
else
let* (l, lookup_mut_in_bindings_back) =
betree_Node_lookup_mut_in_bindings key tl in
- let back_'a =
+ let back =
fun ret ->
let* tl1 = lookup_mut_in_bindings_back ret in
Return (Betree_List_Cons (i, i1) tl1) in
- Return (l, back_'a)
+ Return (l, back)
| Betree_List_Nil -> Return (Betree_List_Nil, Return)
end
diff --git a/tests/fstar/betree/BetreeMain.FunsExternal.fsti b/tests/fstar/betree/BetreeMain.FunsExternal.fsti
index de9b96fd..3aad9390 100644
--- a/tests/fstar/betree/BetreeMain.FunsExternal.fsti
+++ b/tests/fstar/betree/BetreeMain.FunsExternal.fsti
@@ -29,7 +29,8 @@ val betree_utils_store_leaf_node
: u64 -> betree_List_t (u64 & u64) -> state -> result (state & unit)
(** [core::option::{core::option::Option<T>}::unwrap]:
- Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/core/src/option.rs', lines 932:4-932:34 *)
+ Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/core/src/option.rs', lines 932:4-932:34
+ Name pattern: core::option::{core::option::Option<@T>}::unwrap *)
val core_option_Option_unwrap
(t : Type0) : option t -> state -> result (state & t)
diff --git a/tests/fstar/betree_back_stateful/BetreeMain.Funs.fst b/tests/fstar/betree_back_stateful/BetreeMain.Funs.fst
index 2469f98c..129e6f7e 100644
--- a/tests/fstar/betree_back_stateful/BetreeMain.Funs.fst
+++ b/tests/fstar/betree_back_stateful/BetreeMain.Funs.fst
@@ -195,11 +195,11 @@ let rec betree_Node_lookup_first_message_for_key
else
let* (l, lookup_first_message_for_key_back) =
betree_Node_lookup_first_message_for_key key next_msgs in
- let back_'a =
+ let back =
fun ret ->
let* next_msgs1 = lookup_first_message_for_key_back ret in
Return (Betree_List_Cons (i, m) next_msgs1) in
- Return (l, back_'a)
+ Return (l, back)
| Betree_List_Nil -> Return (Betree_List_Nil, Return)
end
@@ -352,11 +352,11 @@ let rec betree_Node_lookup_first_message_after_key
then
let* (l, lookup_first_message_after_key_back) =
betree_Node_lookup_first_message_after_key key next_msgs in
- let back_'a =
+ let back =
fun ret ->
let* next_msgs1 = lookup_first_message_after_key_back ret in
Return (Betree_List_Cons (k, m) next_msgs1) in
- Return (l, back_'a)
+ Return (l, back)
else Return (Betree_List_Cons (k, m) next_msgs, Return)
| Betree_List_Nil -> Return (Betree_List_Nil, Return)
end
@@ -453,11 +453,11 @@ let rec betree_Node_lookup_mut_in_bindings
else
let* (l, lookup_mut_in_bindings_back) =
betree_Node_lookup_mut_in_bindings key tl in
- let back_'a =
+ let back =
fun ret ->
let* tl1 = lookup_mut_in_bindings_back ret in
Return (Betree_List_Cons (i, i1) tl1) in
- Return (l, back_'a)
+ Return (l, back)
| Betree_List_Nil -> Return (Betree_List_Nil, Return)
end
diff --git a/tests/fstar/betree_back_stateful/BetreeMain.FunsExternal.fsti b/tests/fstar/betree_back_stateful/BetreeMain.FunsExternal.fsti
index de9b96fd..3aad9390 100644
--- a/tests/fstar/betree_back_stateful/BetreeMain.FunsExternal.fsti
+++ b/tests/fstar/betree_back_stateful/BetreeMain.FunsExternal.fsti
@@ -29,7 +29,8 @@ val betree_utils_store_leaf_node
: u64 -> betree_List_t (u64 & u64) -> state -> result (state & unit)
(** [core::option::{core::option::Option<T>}::unwrap]:
- Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/core/src/option.rs', lines 932:4-932:34 *)
+ Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/core/src/option.rs', lines 932:4-932:34
+ Name pattern: core::option::{core::option::Option<@T>}::unwrap *)
val core_option_Option_unwrap
(t : Type0) : option t -> state -> result (state & t)
diff --git a/tests/fstar/demo/Demo.fst b/tests/fstar/demo/Demo.fst
index d93bc847..9c59ab9b 100644
--- a/tests/fstar/demo/Demo.fst
+++ b/tests/fstar/demo/Demo.fst
@@ -10,8 +10,8 @@ open Primitives
let choose
(t : Type0) (b : bool) (x : t) (y : t) : result (t & (t -> result (t & t))) =
if b
- then let back_'a = fun ret -> Return (ret, y) in Return (x, back_'a)
- else let back_'a = fun ret -> Return (x, ret) in Return (y, back_'a)
+ then let back = fun ret -> Return (ret, y) in Return (x, back)
+ else let back = fun ret -> Return (x, ret) in Return (y, back)
(** [demo::mul2_add1]:
Source: 'src/demo.rs', lines 13:0-13:31 *)
@@ -66,15 +66,14 @@ let rec list_nth_mut
| CList_CCons x tl ->
if i = 0
then
- let back_'a = fun ret -> Return (CList_CCons ret tl) in
- Return (x, back_'a)
+ let back = fun ret -> Return (CList_CCons ret tl) in Return (x, back)
else
let* i1 = u32_sub i 1 in
let* (x1, list_nth_mut_back) = list_nth_mut t n1 tl i1 in
- let back_'a =
+ let back =
fun ret ->
let* tl1 = list_nth_mut_back ret in Return (CList_CCons x tl1) in
- Return (x1, back_'a)
+ Return (x1, back)
| CList_CNil -> Fail Failure
end
@@ -92,14 +91,13 @@ let rec list_nth_mut1_loop
| CList_CCons x tl ->
if i = 0
then
- let back_'a = fun ret -> Return (CList_CCons ret tl) in
- Return (x, back_'a)
+ let back = fun ret -> Return (CList_CCons ret tl) in Return (x, back)
else
let* i1 = u32_sub i 1 in
- let* (x1, back_'a) = list_nth_mut1_loop t n1 tl i1 in
- let back_'a1 =
- fun ret -> let* tl1 = back_'a ret in Return (CList_CCons x tl1) in
- Return (x1, back_'a1)
+ let* (x1, back) = list_nth_mut1_loop t n1 tl i1 in
+ let back1 =
+ fun ret -> let* tl1 = back ret in Return (CList_CCons x tl1) in
+ Return (x1, back1)
| CList_CNil -> Fail Failure
end
@@ -135,10 +133,10 @@ let rec list_tail
begin match l with
| CList_CCons x tl ->
let* (c, list_tail_back) = list_tail t n1 tl in
- let back_'a =
+ let back =
fun ret -> let* tl1 = list_tail_back ret in Return (CList_CCons x tl1)
in
- Return (c, back_'a)
+ Return (c, back)
| CList_CNil -> Return (CList_CNil, Return)
end
diff --git a/tests/fstar/hashmap/Hashmap.Funs.fst b/tests/fstar/hashmap/Hashmap.Funs.fst
index fba711f1..d897933a 100644
--- a/tests/fstar/hashmap/Hashmap.Funs.fst
+++ b/tests/fstar/hashmap/Hashmap.Funs.fst
@@ -79,8 +79,8 @@ let rec hashMap_clear_loop
(** [hashmap::{hashmap::HashMap<T>}::clear]:
Source: 'src/hashmap.rs', lines 80:4-80:27 *)
let hashMap_clear (t : Type0) (self : hashMap_t t) : result (hashMap_t t) =
- let* back = hashMap_clear_loop t self.slots 0 in
- Return { self with num_entries = 0; slots = back }
+ let* hm = hashMap_clear_loop t self.slots 0 in
+ Return { self with num_entries = 0; slots = hm }
(** [hashmap::{hashmap::HashMap<T>}::len]:
Source: 'src/hashmap.rs', lines 90:4-90:30 *)
@@ -99,8 +99,8 @@ let rec hashMap_insert_in_list_loop
if ckey = key
then Return (false, List_Cons ckey value tl)
else
- let* (b, back) = hashMap_insert_in_list_loop t key value tl in
- Return (b, List_Cons ckey cvalue back)
+ let* (b, tl1) = hashMap_insert_in_list_loop t key value tl in
+ Return (b, List_Cons ckey cvalue tl1)
| List_Nil -> Return (true, List_Cons key value List_Nil)
end
@@ -287,14 +287,13 @@ let rec hashMap_get_mut_in_list_loop
| List_Cons ckey cvalue tl ->
if ckey = key
then
- let back_'a = fun ret -> Return (List_Cons ckey ret tl) in
- Return (cvalue, back_'a)
+ let back = fun ret -> Return (List_Cons ckey ret tl) in
+ Return (cvalue, back)
else
- let* (x, back_'a) = hashMap_get_mut_in_list_loop t tl key in
- let back_'a1 =
- fun ret -> let* tl1 = back_'a ret in Return (List_Cons ckey cvalue tl1)
- in
- Return (x, back_'a1)
+ let* (x, back) = hashMap_get_mut_in_list_loop t tl key in
+ let back1 =
+ fun ret -> let* tl1 = back ret in Return (List_Cons ckey cvalue tl1) in
+ Return (x, back1)
| List_Nil -> Fail Failure
end
@@ -320,12 +319,12 @@ let hashMap_get_mut
(core_slice_index_SliceIndexUsizeSliceTInst (list_t t)) self.slots
hash_mod in
let* (x, get_mut_in_list_back) = hashMap_get_mut_in_list t l key in
- let back_'a =
+ let back =
fun ret ->
let* l1 = get_mut_in_list_back ret in
let* v = index_mut_back l1 in
Return { self with slots = v } in
- Return (x, back_'a)
+ Return (x, back)
(** [hashmap::{hashmap::HashMap<T>}::remove_from_list]: loop 0:
Source: 'src/hashmap.rs', lines 265:4-291:5 *)
@@ -345,8 +344,8 @@ let rec hashMap_remove_from_list_loop
| List_Nil -> Fail Failure
end
else
- let* (o, back) = hashMap_remove_from_list_loop t key tl in
- Return (o, List_Cons ckey x back)
+ let* (o, tl1) = hashMap_remove_from_list_loop t key tl in
+ Return (o, List_Cons ckey x tl1)
| List_Nil -> Return (None, List_Nil)
end
diff --git a/tests/fstar/hashmap_on_disk/HashmapMain.Funs.fst b/tests/fstar/hashmap_on_disk/HashmapMain.Funs.fst
index 97f4151f..e0005c81 100644
--- a/tests/fstar/hashmap_on_disk/HashmapMain.Funs.fst
+++ b/tests/fstar/hashmap_on_disk/HashmapMain.Funs.fst
@@ -84,8 +84,8 @@ let rec hashmap_HashMap_clear_loop
Source: 'src/hashmap.rs', lines 80:4-80:27 *)
let hashmap_HashMap_clear
(t : Type0) (self : hashmap_HashMap_t t) : result (hashmap_HashMap_t t) =
- let* back = hashmap_HashMap_clear_loop t self.slots 0 in
- Return { self with num_entries = 0; slots = back }
+ let* hm = hashmap_HashMap_clear_loop t self.slots 0 in
+ Return { self with num_entries = 0; slots = hm }
(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::len]:
Source: 'src/hashmap.rs', lines 90:4-90:30 *)
@@ -105,8 +105,8 @@ let rec hashmap_HashMap_insert_in_list_loop
if ckey = key
then Return (false, Hashmap_List_Cons ckey value tl)
else
- let* (b, back) = hashmap_HashMap_insert_in_list_loop t key value tl in
- Return (b, Hashmap_List_Cons ckey cvalue back)
+ let* (b, tl1) = hashmap_HashMap_insert_in_list_loop t key value tl in
+ Return (b, Hashmap_List_Cons ckey cvalue tl1)
| Hashmap_List_Nil ->
Return (true, Hashmap_List_Cons key value Hashmap_List_Nil)
end
@@ -305,15 +305,14 @@ let rec hashmap_HashMap_get_mut_in_list_loop
| Hashmap_List_Cons ckey cvalue tl ->
if ckey = key
then
- let back_'a = fun ret -> Return (Hashmap_List_Cons ckey ret tl) in
- Return (cvalue, back_'a)
+ let back = fun ret -> Return (Hashmap_List_Cons ckey ret tl) in
+ Return (cvalue, back)
else
- let* (x, back_'a) = hashmap_HashMap_get_mut_in_list_loop t tl key in
- let back_'a1 =
+ let* (x, back) = hashmap_HashMap_get_mut_in_list_loop t tl key in
+ let back1 =
fun ret ->
- let* tl1 = back_'a ret in Return (Hashmap_List_Cons ckey cvalue tl1)
- in
- Return (x, back_'a1)
+ let* tl1 = back ret in Return (Hashmap_List_Cons ckey cvalue tl1) in
+ Return (x, back1)
| Hashmap_List_Nil -> Fail Failure
end
@@ -339,12 +338,12 @@ let hashmap_HashMap_get_mut
(core_slice_index_SliceIndexUsizeSliceTInst (hashmap_List_t t))
self.slots hash_mod in
let* (x, get_mut_in_list_back) = hashmap_HashMap_get_mut_in_list t l key in
- let back_'a =
+ let back =
fun ret ->
let* l1 = get_mut_in_list_back ret in
let* v = index_mut_back l1 in
Return { self with slots = v } in
- Return (x, back_'a)
+ Return (x, back)
(** [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::remove_from_list]: loop 0:
Source: 'src/hashmap.rs', lines 265:4-291:5 *)
@@ -365,8 +364,8 @@ let rec hashmap_HashMap_remove_from_list_loop
| Hashmap_List_Nil -> Fail Failure
end
else
- let* (o, back) = hashmap_HashMap_remove_from_list_loop t key tl in
- Return (o, Hashmap_List_Cons ckey x back)
+ let* (o, tl1) = hashmap_HashMap_remove_from_list_loop t key tl in
+ Return (o, Hashmap_List_Cons ckey x tl1)
| Hashmap_List_Nil -> Return (None, Hashmap_List_Nil)
end
diff --git a/tests/fstar/misc/External.Funs.fst b/tests/fstar/misc/External.Funs.fst
index 3ba20022..78960404 100644
--- a/tests/fstar/misc/External.Funs.fst
+++ b/tests/fstar/misc/External.Funs.fst
@@ -34,8 +34,8 @@ let custom_swap
result (state & (t & (t -> state -> result (state & (t & t)))))
=
let* (st1, (x1, y1)) = core_mem_swap t x y st in
- let back_'a = fun ret st2 -> Return (st2, (ret, y1)) in
- Return (st1, (x1, back_'a))
+ let back = fun ret st2 -> Return (st2, (ret, y1)) in
+ Return (st1, (x1, back))
(** [external::test_custom_swap]:
Source: 'src/external.rs', lines 29:0-29:59 *)
diff --git a/tests/fstar/misc/External.FunsExternal.fsti b/tests/fstar/misc/External.FunsExternal.fsti
index a412aea9..4c1c58b7 100644
--- a/tests/fstar/misc/External.FunsExternal.fsti
+++ b/tests/fstar/misc/External.FunsExternal.fsti
@@ -7,16 +7,19 @@ include External.Types
#set-options "--z3rlimit 50 --fuel 1 --ifuel 1"
(** [core::mem::swap]:
- Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/core/src/mem/mod.rs', lines 726:0-726:42 *)
+ Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/core/src/mem/mod.rs', lines 726:0-726:42
+ Name pattern: core::mem::swap *)
val core_mem_swap (t : Type0) : t -> t -> state -> result (state & (t & t))
(** [core::num::nonzero::{core::num::nonzero::NonZeroU32#14}::new]:
- Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/core/src/num/nonzero.rs', lines 79:16-79:57 *)
+ Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/core/src/num/nonzero.rs', lines 79:16-79:57
+ Name pattern: core::num::nonzero::{core::num::nonzero::NonZeroU32}::new *)
val core_num_nonzero_NonZeroU32_new
: u32 -> state -> result (state & (option core_num_nonzero_NonZeroU32_t))
(** [core::option::{core::option::Option<T>}::unwrap]:
- Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/core/src/option.rs', lines 932:4-932:34 *)
+ Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/core/src/option.rs', lines 932:4-932:34
+ Name pattern: core::option::{core::option::Option<@T>}::unwrap *)
val core_option_Option_unwrap
(t : Type0) : option t -> state -> result (state & t)
diff --git a/tests/fstar/misc/External.TypesExternal.fsti b/tests/fstar/misc/External.TypesExternal.fsti
index 4bfbe0c5..45174c7e 100644
--- a/tests/fstar/misc/External.TypesExternal.fsti
+++ b/tests/fstar/misc/External.TypesExternal.fsti
@@ -6,7 +6,8 @@ open Primitives
#set-options "--z3rlimit 50 --fuel 1 --ifuel 1"
(** [core::num::nonzero::NonZeroU32]
- Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/core/src/num/nonzero.rs', lines 50:12-50:33 *)
+ Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/core/src/num/nonzero.rs', lines 50:12-50:33
+ Name pattern: core::num::nonzero::NonZeroU32 *)
val core_num_nonzero_NonZeroU32_t : Type0
(** The state type used in the state-error monad *)
diff --git a/tests/fstar/misc/Loops.Funs.fst b/tests/fstar/misc/Loops.Funs.fst
index 7c099da2..93683deb 100644
--- a/tests/fstar/misc/Loops.Funs.fst
+++ b/tests/fstar/misc/Loops.Funs.fst
@@ -289,18 +289,17 @@ let rec list_nth_mut_loop_pair_loop
| List_Cons x1 tl1 ->
if i = 0
then
- let back_'a = fun ret -> Return (List_Cons ret tl0) in
- let back_'b = fun ret -> Return (List_Cons ret tl1) in
- Return ((x0, x1), back_'a, back_'b)
+ let back'a = fun ret -> Return (List_Cons ret tl0) in
+ let back'b = fun ret -> Return (List_Cons ret tl1) in
+ Return ((x0, x1), back'a, back'b)
else
let* i1 = u32_sub i 1 in
- let* (p, back_'a, back_'b) = list_nth_mut_loop_pair_loop t tl0 tl1 i1
- in
- let back_'a1 =
- fun ret -> let* tl01 = back_'a ret in Return (List_Cons x0 tl01) in
- let back_'b1 =
- fun ret -> let* tl11 = back_'b ret in Return (List_Cons x1 tl11) in
- Return (p, back_'a1, back_'b1)
+ let* (p, back'a, back'b) = list_nth_mut_loop_pair_loop t tl0 tl1 i1 in
+ let back'a1 =
+ fun ret -> let* tl01 = back'a ret in Return (List_Cons x0 tl01) in
+ let back'b1 =
+ fun ret -> let* tl11 = back'b ret in Return (List_Cons x1 tl11) in
+ Return (p, back'a1, back'b1)
| List_Nil -> Fail Failure
end
| List_Nil -> Fail Failure
@@ -352,18 +351,18 @@ let rec list_nth_mut_loop_pair_merge_loop
| List_Cons x1 tl1 ->
if i = 0
then
- let back_'a =
+ let back =
fun ret ->
let (x, x2) = ret in Return (List_Cons x tl0, List_Cons x2 tl1) in
- Return ((x0, x1), back_'a)
+ Return ((x0, x1), back)
else
let* i1 = u32_sub i 1 in
- let* (p, back_'a) = list_nth_mut_loop_pair_merge_loop t tl0 tl1 i1 in
- let back_'a1 =
+ let* (p, back) = list_nth_mut_loop_pair_merge_loop t tl0 tl1 i1 in
+ let back1 =
fun ret ->
- let* (tl01, tl11) = back_'a ret in
+ let* (tl01, tl11) = back ret in
Return (List_Cons x0 tl01, List_Cons x1 tl11) in
- Return (p, back_'a1)
+ Return (p, back1)
| List_Nil -> Fail Failure
end
| List_Nil -> Fail Failure
@@ -417,14 +416,14 @@ let rec list_nth_mut_shared_loop_pair_loop
| List_Cons x1 tl1 ->
if i = 0
then
- let back_'a = fun ret -> Return (List_Cons ret tl0) in
- Return ((x0, x1), back_'a)
+ let back = fun ret -> Return (List_Cons ret tl0) in
+ Return ((x0, x1), back)
else
let* i1 = u32_sub i 1 in
- let* (p, back_'a) = list_nth_mut_shared_loop_pair_loop t tl0 tl1 i1 in
- let back_'a1 =
- fun ret -> let* tl01 = back_'a ret in Return (List_Cons x0 tl01) in
- Return (p, back_'a1)
+ let* (p, back) = list_nth_mut_shared_loop_pair_loop t tl0 tl1 i1 in
+ let back1 =
+ fun ret -> let* tl01 = back ret in Return (List_Cons x0 tl01) in
+ Return (p, back1)
| List_Nil -> Fail Failure
end
| List_Nil -> Fail Failure
@@ -451,15 +450,15 @@ let rec list_nth_mut_shared_loop_pair_merge_loop
| List_Cons x1 tl1 ->
if i = 0
then
- let back_'a = fun ret -> Return (List_Cons ret tl0) in
- Return ((x0, x1), back_'a)
+ let back = fun ret -> Return (List_Cons ret tl0) in
+ Return ((x0, x1), back)
else
let* i1 = u32_sub i 1 in
- let* (p, back_'a) =
- list_nth_mut_shared_loop_pair_merge_loop t tl0 tl1 i1 in
- let back_'a1 =
- fun ret -> let* tl01 = back_'a ret in Return (List_Cons x0 tl01) in
- Return (p, back_'a1)
+ let* (p, back) = list_nth_mut_shared_loop_pair_merge_loop t tl0 tl1 i1
+ in
+ let back1 =
+ fun ret -> let* tl01 = back ret in Return (List_Cons x0 tl01) in
+ Return (p, back1)
| List_Nil -> Fail Failure
end
| List_Nil -> Fail Failure
@@ -486,14 +485,14 @@ let rec list_nth_shared_mut_loop_pair_loop
| List_Cons x1 tl1 ->
if i = 0
then
- let back_'b = fun ret -> Return (List_Cons ret tl1) in
- Return ((x0, x1), back_'b)
+ let back = fun ret -> Return (List_Cons ret tl1) in
+ Return ((x0, x1), back)
else
let* i1 = u32_sub i 1 in
- let* (p, back_'b) = list_nth_shared_mut_loop_pair_loop t tl0 tl1 i1 in
- let back_'b1 =
- fun ret -> let* tl11 = back_'b ret in Return (List_Cons x1 tl11) in
- Return (p, back_'b1)
+ let* (p, back) = list_nth_shared_mut_loop_pair_loop t tl0 tl1 i1 in
+ let back1 =
+ fun ret -> let* tl11 = back ret in Return (List_Cons x1 tl11) in
+ Return (p, back1)
| List_Nil -> Fail Failure
end
| List_Nil -> Fail Failure
@@ -520,15 +519,15 @@ let rec list_nth_shared_mut_loop_pair_merge_loop
| List_Cons x1 tl1 ->
if i = 0
then
- let back_'a = fun ret -> Return (List_Cons ret tl1) in
- Return ((x0, x1), back_'a)
+ let back = fun ret -> Return (List_Cons ret tl1) in
+ Return ((x0, x1), back)
else
let* i1 = u32_sub i 1 in
- let* (p, back_'a) =
- list_nth_shared_mut_loop_pair_merge_loop t tl0 tl1 i1 in
- let back_'a1 =
- fun ret -> let* tl11 = back_'a ret in Return (List_Cons x1 tl11) in
- Return (p, back_'a1)
+ let* (p, back) = list_nth_shared_mut_loop_pair_merge_loop t tl0 tl1 i1
+ in
+ let back1 =
+ fun ret -> let* tl11 = back ret in Return (List_Cons x1 tl11) in
+ Return (p, back1)
| List_Nil -> Fail Failure
end
| List_Nil -> Fail Failure
diff --git a/tests/fstar/misc/NoNestedBorrows.fst b/tests/fstar/misc/NoNestedBorrows.fst
index db63eb0d..1a93beaa 100644
--- a/tests/fstar/misc/NoNestedBorrows.fst
+++ b/tests/fstar/misc/NoNestedBorrows.fst
@@ -291,8 +291,8 @@ let _ = assert_norm (test_split_list = Return ())
let choose
(t : Type0) (b : bool) (x : t) (y : t) : result (t & (t -> result (t & t))) =
if b
- then let back_'a = fun ret -> Return (ret, y) in Return (x, back_'a)
- else let back_'a = fun ret -> Return (x, ret) in Return (y, back_'a)
+ then let back = fun ret -> Return (ret, y) in Return (x, back)
+ else let back = fun ret -> Return (x, ret) in Return (y, back)
(** [no_nested_borrows::choose_test]:
Source: 'src/no_nested_borrows.rs', lines 282:0-282:20 *)
@@ -355,15 +355,14 @@ let rec list_nth_mut
begin match l with
| List_Cons x tl ->
if i = 0
- then
- let back_'a = fun ret -> Return (List_Cons ret tl) in Return (x, back_'a)
+ then let back = fun ret -> Return (List_Cons ret tl) in Return (x, back)
else
let* i1 = u32_sub i 1 in
let* (x1, list_nth_mut_back) = list_nth_mut t tl i1 in
- let back_'a =
+ let back =
fun ret -> let* tl1 = list_nth_mut_back ret in Return (List_Cons x tl1)
in
- Return (x1, back_'a)
+ Return (x1, back)
| List_Nil -> Fail Failure
end
diff --git a/tests/fstar/misc/Paper.fst b/tests/fstar/misc/Paper.fst
index ddc5e7a8..c2f47ad1 100644
--- a/tests/fstar/misc/Paper.fst
+++ b/tests/fstar/misc/Paper.fst
@@ -23,8 +23,8 @@ let _ = assert_norm (test_incr = Return ())
let choose
(t : Type0) (b : bool) (x : t) (y : t) : result (t & (t -> result (t & t))) =
if b
- then let back_'a = fun ret -> Return (ret, y) in Return (x, back_'a)
- else let back_'a = fun ret -> Return (x, ret) in Return (y, back_'a)
+ then let back = fun ret -> Return (ret, y) in Return (x, back)
+ else let back = fun ret -> Return (x, ret) in Return (y, back)
(** [paper::test_choose]:
Source: 'src/paper.rs', lines 23:0-23:20 *)
@@ -57,15 +57,14 @@ let rec list_nth_mut
begin match l with
| List_Cons x tl ->
if i = 0
- then
- let back_'a = fun ret -> Return (List_Cons ret tl) in Return (x, back_'a)
+ then let back = fun ret -> Return (List_Cons ret tl) in Return (x, back)
else
let* i1 = u32_sub i 1 in
let* (x1, list_nth_mut_back) = list_nth_mut t tl i1 in
- let back_'a =
+ let back =
fun ret -> let* tl1 = list_nth_mut_back ret in Return (List_Cons x tl1)
in
- Return (x1, back_'a)
+ Return (x1, back)
| List_Nil -> Fail Failure
end
diff --git a/tests/fstar/misc/PoloniusList.fst b/tests/fstar/misc/PoloniusList.fst
index b477802b..4203247e 100644
--- a/tests/fstar/misc/PoloniusList.fst
+++ b/tests/fstar/misc/PoloniusList.fst
@@ -23,10 +23,10 @@ let rec get_list_at_x
then Return (List_Cons hd tl, Return)
else
let* (l, get_list_at_x_back) = get_list_at_x tl x in
- let back_'a =
+ let back =
fun ret ->
let* tl1 = get_list_at_x_back ret in Return (List_Cons hd tl1) in
- Return (l, back_'a)
+ Return (l, back)
| List_Nil -> Return (List_Nil, Return)
end
diff --git a/tests/fstar/traits/Traits.fst b/tests/fstar/traits/Traits.fst
index fba564a5..199d49bf 100644
--- a/tests/fstar/traits/Traits.fst
+++ b/tests/fstar/traits/Traits.fst
@@ -503,7 +503,8 @@ let use_wrapper_len (t : Type0) (traitInst : trait_t t) : result usize =
type foo_t (t u : Type0) = { x : t; y : u; }
(** [core::result::Result]
- Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/core/src/result.rs', lines 502:0-502:21 *)
+ Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/core/src/result.rs', lines 502:0-502:21
+ Name pattern: core::result::Result *)
type core_result_Result_t (t e : Type0) =
| Core_result_Result_Ok : t -> core_result_Result_t t e
| Core_result_Result_Err : e -> core_result_Result_t t e