From 036756d6bddbcf9bc936489779ed36c7e4d22d14 Mon Sep 17 00:00:00 2001 From: Son Ho Date: Thu, 25 Apr 2024 16:28:30 +0200 Subject: Regenerate and fix the tests --- tests/fstar/betree/BetreeMain.Clauses.fst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/fstar/betree/BetreeMain.Clauses.fst') diff --git a/tests/fstar/betree/BetreeMain.Clauses.fst b/tests/fstar/betree/BetreeMain.Clauses.fst index ed5c5069..b95d4c7e 100644 --- a/tests/fstar/betree/BetreeMain.Clauses.fst +++ b/tests/fstar/betree/BetreeMain.Clauses.fst @@ -134,7 +134,7 @@ let betree_Node_lookup_first_message_for_key_decreases (key : u64) unfold let betree_Node_apply_upserts_decreases (msgs : betree_List_t (u64 & betree_Message_t)) (prev : option u64) - (key : u64) (st : state) : betree_List_t (u64 & betree_Message_t) = + (key : u64) : betree_List_t (u64 & betree_Message_t) = msgs (** [betree_main::betree::Internal::{4}::lookup_in_children]: decreases clause *) -- cgit v1.2.3 From dbabb0124814c38f11f839f8a67146011107133d Mon Sep 17 00:00:00 2001 From: Son Ho Date: Fri, 26 Apr 2024 10:28:32 +0200 Subject: Update a decreases clause --- tests/fstar/betree/BetreeMain.Clauses.fst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tests/fstar/betree/BetreeMain.Clauses.fst') diff --git a/tests/fstar/betree/BetreeMain.Clauses.fst b/tests/fstar/betree/BetreeMain.Clauses.fst index b95d4c7e..fcef89ed 100644 --- a/tests/fstar/betree/BetreeMain.Clauses.fst +++ b/tests/fstar/betree/BetreeMain.Clauses.fst @@ -130,12 +130,18 @@ let betree_Node_lookup_first_message_for_key_decreases (key : u64) (msgs : betree_List_t (u64 & betree_Message_t)) : betree_List_t (u64 & betree_Message_t) = msgs + +let rec list_length (#a : Type0) (ls : betree_List_t a) : nat = + match ls with + | Betree_List_Cons _ ls -> 1 + list_length ls + | Betree_List_Nil -> 0 + (** [betree_main::betree::Node::{5}::apply_upserts]: decreases clause *) unfold let betree_Node_apply_upserts_decreases (msgs : betree_List_t (u64 & betree_Message_t)) (prev : option u64) (key : u64) : betree_List_t (u64 & betree_Message_t) = - msgs + list_length msgs (** [betree_main::betree::Internal::{4}::lookup_in_children]: decreases clause *) unfold -- cgit v1.2.3 From 192b0e492c07a8bc5900ba6ebe6eae36a7120a28 Mon Sep 17 00:00:00 2001 From: Son Ho Date: Fri, 26 Apr 2024 10:33:52 +0200 Subject: Update the F* clauses for the betree --- tests/fstar/betree/BetreeMain.Clauses.fst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tests/fstar/betree/BetreeMain.Clauses.fst') diff --git a/tests/fstar/betree/BetreeMain.Clauses.fst b/tests/fstar/betree/BetreeMain.Clauses.fst index fcef89ed..8f62d66d 100644 --- a/tests/fstar/betree/BetreeMain.Clauses.fst +++ b/tests/fstar/betree/BetreeMain.Clauses.fst @@ -130,7 +130,6 @@ let betree_Node_lookup_first_message_for_key_decreases (key : u64) (msgs : betree_List_t (u64 & betree_Message_t)) : betree_List_t (u64 & betree_Message_t) = msgs - let rec list_length (#a : Type0) (ls : betree_List_t a) : nat = match ls with | Betree_List_Cons _ ls -> 1 + list_length ls @@ -140,7 +139,7 @@ let rec list_length (#a : Type0) (ls : betree_List_t a) : nat = unfold let betree_Node_apply_upserts_decreases (msgs : betree_List_t (u64 & betree_Message_t)) (prev : option u64) - (key : u64) : betree_List_t (u64 & betree_Message_t) = + (key : u64) : nat = list_length msgs (** [betree_main::betree::Internal::{4}::lookup_in_children]: decreases clause *) -- cgit v1.2.3 From fe8d14cd8b7ba907d5248d574619e93e6d1d253a Mon Sep 17 00:00:00 2001 From: Son Ho Date: Fri, 26 Apr 2024 10:44:23 +0200 Subject: Update the decreases clauses for the betree --- tests/fstar/betree/BetreeMain.Clauses.fst | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'tests/fstar/betree/BetreeMain.Clauses.fst') diff --git a/tests/fstar/betree/BetreeMain.Clauses.fst b/tests/fstar/betree/BetreeMain.Clauses.fst index 8f62d66d..b95d4c7e 100644 --- a/tests/fstar/betree/BetreeMain.Clauses.fst +++ b/tests/fstar/betree/BetreeMain.Clauses.fst @@ -130,17 +130,12 @@ let betree_Node_lookup_first_message_for_key_decreases (key : u64) (msgs : betree_List_t (u64 & betree_Message_t)) : betree_List_t (u64 & betree_Message_t) = msgs -let rec list_length (#a : Type0) (ls : betree_List_t a) : nat = - match ls with - | Betree_List_Cons _ ls -> 1 + list_length ls - | Betree_List_Nil -> 0 - (** [betree_main::betree::Node::{5}::apply_upserts]: decreases clause *) unfold let betree_Node_apply_upserts_decreases (msgs : betree_List_t (u64 & betree_Message_t)) (prev : option u64) - (key : u64) : nat = - list_length msgs + (key : u64) : betree_List_t (u64 & betree_Message_t) = + msgs (** [betree_main::betree::Internal::{4}::lookup_in_children]: decreases clause *) unfold -- cgit v1.2.3