diff options
author | Son Ho | 2023-08-04 22:33:05 +0200 |
---|---|---|
committer | Son Ho | 2023-08-04 22:33:05 +0200 |
commit | 60db3c210aeaf66a4fe312544c6e5d4662681de7 (patch) | |
tree | 7ecc73ed9a8406db05f3723511a6772c48e4d96f /tests/fstar/array/Array.Clauses.fst | |
parent | 5e38184af1b99a307271f738329cd96cb364fc1d (diff) |
Generate the array test files for Coq and F*
Diffstat (limited to '')
-rw-r--r-- | tests/fstar/array/Array.Clauses.fst | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/fstar/array/Array.Clauses.fst b/tests/fstar/array/Array.Clauses.fst new file mode 100644 index 00000000..68cbf216 --- /dev/null +++ b/tests/fstar/array/Array.Clauses.fst @@ -0,0 +1,19 @@ +(** [array]: decreases clauses *) +module Array.Clauses +open Primitives +open Array.Types +open FStar.List.Tot + +#set-options "--z3rlimit 50 --fuel 1 --ifuel 1" + +(** [array::sum]: decreases clause *) +unfold +let sum_loop_decreases (s : slice u32) (sum : u32) (i : usize) : nat = + if i < length s then length s - i else 0 + +(** [array::sum2]: decreases clause *) +unfold +let sum2_loop_decreases (s : slice u32) (s2 : slice u32) (sum : u32) + (i : usize) : nat = + if i < length s then length s - i else 0 + |