diff options
Diffstat (limited to 'tests/betree')
-rw-r--r-- | tests/betree/BetreeMain.Clauses.Template.fst | 4 | ||||
-rw-r--r-- | tests/betree/BetreeMain.Funs.fst | 7 | ||||
-rw-r--r-- | tests/betree/BetreeMain.Types.fsti | 4 |
3 files changed, 11 insertions, 4 deletions
diff --git a/tests/betree/BetreeMain.Clauses.Template.fst b/tests/betree/BetreeMain.Clauses.Template.fst index 5a9776ab..c2412775 100644 --- a/tests/betree/BetreeMain.Clauses.Template.fst +++ b/tests/betree/BetreeMain.Clauses.Template.fst @@ -6,6 +6,10 @@ open BetreeMain.Types #set-options "--z3rlimit 50 --fuel 1 --ifuel 1" +(** [core::num::u64::{9}::MAX] *) +let core_num_u64_max_body : result u64 = Return 18446744073709551615 +let core_num_u64_max_c : u64 = eval_global core_num_u64_max_body + (** [betree_main::betree::List::{1}::len]: decreases clause *) unfold let betree_list_len_decreases (t : Type0) (self : betree_list_t t) : nat = diff --git a/tests/betree/BetreeMain.Funs.fst b/tests/betree/BetreeMain.Funs.fst index 4761b6a3..e80e96a6 100644 --- a/tests/betree/BetreeMain.Funs.fst +++ b/tests/betree/BetreeMain.Funs.fst @@ -96,17 +96,16 @@ let betree_upsert_update_fwd | Some prev0 -> begin match st with | BetreeUpsertFunStateAdd v -> - let i = core_num_u64_max_c in - begin match u64_sub i prev0 with + begin match u64_sub core_num_u64_max_c prev0 with | Fail -> Fail | Return margin -> if margin >= v then begin match u64_add prev0 v with | Fail -> Fail - | Return i0 -> Return i0 + | Return i -> Return i end - else let i0 = core_num_u64_max_c in Return i0 + else Return core_num_u64_max_c end | BetreeUpsertFunStateSub v -> if prev0 >= v diff --git a/tests/betree/BetreeMain.Types.fsti b/tests/betree/BetreeMain.Types.fsti index aad9cb43..f0ca1d9e 100644 --- a/tests/betree/BetreeMain.Types.fsti +++ b/tests/betree/BetreeMain.Types.fsti @@ -55,6 +55,10 @@ type betree_be_tree_t = betree_be_tree_root : betree_node_t; } +(** [core::num::u64::{9}::MAX] *) +let core_num_u64_max_body : result u64 = Return 18446744073709551615 +let core_num_u64_max_c : u64 = eval_global core_num_u64_max_body + (** The state type used in the state-error monad *) val state : Type0 |