diff options
author | Son HO | 2023-12-05 16:47:51 +0100 |
---|---|---|
committer | GitHub | 2023-12-05 16:47:51 +0100 |
commit | 4795e5f823bc89504855d8eb946b111d9314f4d5 (patch) | |
tree | 4c35c707e74c14ad7a554147cff20b2e17c28659 /tests/fstar/betree_back_stateful | |
parent | 789ba1473acd287814a0d659b5f5a0e480e4e9d7 (diff) | |
parent | a212ab42927e0f9ffa3ed0dfa0140b231e725008 (diff) |
Merge pull request #48 from AeneasVerif/son_closures
Prepare support for function pointers and closures
Diffstat (limited to '')
-rw-r--r-- | tests/fstar/betree_back_stateful/BetreeMain.Clauses.Template.fst | 14 | ||||
-rw-r--r-- | tests/fstar/betree_back_stateful/BetreeMain.Funs.fst | 32 |
2 files changed, 23 insertions, 23 deletions
diff --git a/tests/fstar/betree_back_stateful/BetreeMain.Clauses.Template.fst b/tests/fstar/betree_back_stateful/BetreeMain.Clauses.Template.fst index 4ae29302..537705c5 100644 --- a/tests/fstar/betree_back_stateful/BetreeMain.Clauses.Template.fst +++ b/tests/fstar/betree_back_stateful/BetreeMain.Clauses.Template.fst @@ -33,6 +33,13 @@ let betree_Node_lookup_first_message_for_key_decreases (key : u64) (msgs : betree_List_t (u64 & betree_Message_t)) : nat = admit () +(** [betree_main::betree::{betree_main::betree::Node#5}::lookup_in_bindings]: decreases clause + Source: 'src/betree.rs', lines 636:4-636:80 *) +unfold +let betree_Node_lookup_in_bindings_decreases (key : u64) + (bindings : betree_List_t (u64 & u64)) : nat = + admit () + (** [betree_main::betree::{betree_main::betree::Node#5}::apply_upserts]: decreases clause Source: 'src/betree.rs', lines 819:4-819:90 *) unfold @@ -41,13 +48,6 @@ let betree_Node_apply_upserts_decreases (key : u64) (st : state) : nat = admit () -(** [betree_main::betree::{betree_main::betree::Node#5}::lookup_in_bindings]: decreases clause - Source: 'src/betree.rs', lines 636:4-636:80 *) -unfold -let betree_Node_lookup_in_bindings_decreases (key : u64) - (bindings : betree_List_t (u64 & u64)) : nat = - admit () - (** [betree_main::betree::{betree_main::betree::Internal#4}::lookup_in_children]: decreases clause Source: 'src/betree.rs', lines 395:4-395:63 *) unfold diff --git a/tests/fstar/betree_back_stateful/BetreeMain.Funs.fst b/tests/fstar/betree_back_stateful/BetreeMain.Funs.fst index b912a316..6c3c2161 100644 --- a/tests/fstar/betree_back_stateful/BetreeMain.Funs.fst +++ b/tests/fstar/betree_back_stateful/BetreeMain.Funs.fst @@ -295,6 +295,22 @@ let rec betree_Node_lookup_first_message_for_key_back | Betree_List_Nil -> Return ret end +(** [betree_main::betree::{betree_main::betree::Node#5}::lookup_in_bindings]: forward function + Source: 'src/betree.rs', lines 636:4-636:80 *) +let rec betree_Node_lookup_in_bindings + (key : u64) (bindings : betree_List_t (u64 & u64)) : + Tot (result (option u64)) + (decreases (betree_Node_lookup_in_bindings_decreases key bindings)) + = + begin match bindings with + | Betree_List_Cons hd tl -> + let (i, i0) = hd in + if i = key + then Return (Some i0) + else if i > key then Return None else betree_Node_lookup_in_bindings key tl + | Betree_List_Nil -> Return None + end + (** [betree_main::betree::{betree_main::betree::Node#5}::apply_upserts]: forward function Source: 'src/betree.rs', lines 819:4-819:90 *) let rec betree_Node_apply_upserts @@ -351,22 +367,6 @@ let rec betree_Node_apply_upserts_back Betree_Message_Insert v) in Return (st0, msgs0) -(** [betree_main::betree::{betree_main::betree::Node#5}::lookup_in_bindings]: forward function - Source: 'src/betree.rs', lines 636:4-636:80 *) -let rec betree_Node_lookup_in_bindings - (key : u64) (bindings : betree_List_t (u64 & u64)) : - Tot (result (option u64)) - (decreases (betree_Node_lookup_in_bindings_decreases key bindings)) - = - begin match bindings with - | Betree_List_Cons hd tl -> - let (i, i0) = hd in - if i = key - then Return (Some i0) - else if i > key then Return None else betree_Node_lookup_in_bindings key tl - | Betree_List_Nil -> Return None - end - (** [betree_main::betree::{betree_main::betree::Internal#4}::lookup_in_children]: forward function Source: 'src/betree.rs', lines 395:4-395:63 *) let rec betree_Internal_lookup_in_children |