summaryrefslogtreecommitdiff
path: root/tests/fstar/misc/Loops.Clauses.fst
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/fstar/misc/Loops.Clauses.fst20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/fstar/misc/Loops.Clauses.fst b/tests/fstar/misc/Loops.Clauses.fst
index 9cf5db1f..e673d4ff 100644
--- a/tests/fstar/misc/Loops.Clauses.fst
+++ b/tests/fstar/misc/Loops.Clauses.fst
@@ -19,6 +19,14 @@ unfold
let sum_with_shared_borrows_decreases (max : u32) (i : u32) (s : u32) : nat =
if max >= i then max - i else 0
+(** [loops::clear]: decreases clause *)
+unfold let clear_decreases (v : vec u32) (i : usize) : nat =
+ if i <= List.Tot.length v then List.Tot.length v - i else 0
+
+(** [loops::list_mem]: decreases clause *)
+unfold let list_mem_decreases (i : u32) (ls : list_t u32) : list_t u32 =
+ ls
+
(** [loops::list_nth_mut_loop]: decreases clause *)
unfold
let list_nth_mut_loop_decreases (t : Type0) (ls : list_t t) (i : u32) : nat =
@@ -29,6 +37,18 @@ unfold
let list_nth_shared_loop_decreases (t : Type0) (ls : list_t t) (i : u32) : list_t t =
ls
+(** [loops::list_nth_mut_loop_with_id]: decreases clause *)
+unfold
+let list_nth_mut_loop_with_id_decreases (t : Type0) (i : u32) (ls : list_t t) :
+ list_t t =
+ ls
+
+(** [loops::list_nth_shared_loop_with_id]: decreases clause *)
+unfold
+let list_nth_shared_loop_with_id_decreases (t : Type0) (l : list_t t)
+ (i : u32) (ls : list_t t) : list_t t =
+ ls
+
(** [loops::list_nth_mut_loop_pair]: decreases clause *)
unfold
let list_nth_mut_loop_pair_decreases (t : Type0) (l : list_t t) (l0 : list_t t)