summaryrefslogtreecommitdiff
path: root/tests/fstar/hashmap_on_disk/HashmapMain.Properties.fst
diff options
context:
space:
mode:
authorSon Ho2024-04-11 20:31:16 +0200
committerSon Ho2024-04-11 20:31:16 +0200
commitb6421bc01df278f625a8c95b4ea36ad2e4355718 (patch)
tree6246ef2b038560e3deae41e4fa700f14390cd14f /tests/fstar/hashmap_on_disk/HashmapMain.Properties.fst
parent44065f447dc3a2f4b1441b97b9687d1c1b85afbf (diff)
parent2f8aa9b47acb5c98aed91c29b04f71099452e781 (diff)
Merge branch 'son/clean' into checked-ops
Diffstat (limited to 'tests/fstar/hashmap_on_disk/HashmapMain.Properties.fst')
-rw-r--r--tests/fstar/hashmap_on_disk/HashmapMain.Properties.fst8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/fstar/hashmap_on_disk/HashmapMain.Properties.fst b/tests/fstar/hashmap_on_disk/HashmapMain.Properties.fst
index 358df29e..beb3dc2c 100644
--- a/tests/fstar/hashmap_on_disk/HashmapMain.Properties.fst
+++ b/tests/fstar/hashmap_on_disk/HashmapMain.Properties.fst
@@ -20,7 +20,7 @@ assume
val serialize_lem (hm : hashmap_HashMap_t u64) (st : state) : Lemma (
match hashmap_utils_serialize hm st with
| Fail _ -> True
- | Return (st', ()) -> state_v st' == hm)
+ | Ok (st', ()) -> state_v st' == hm)
[SMTPat (hashmap_utils_serialize hm st)]
/// [deserialize] gives us the hash map stored on disk, without updating it
@@ -28,7 +28,7 @@ assume
val deserialize_lem (st : state) : Lemma (
match hashmap_utils_deserialize st with
| Fail _ -> True
- | Return (st', hm) -> hm == state_v st /\ st' == st)
+ | Ok (st', hm) -> hm == state_v st /\ st' == st)
[SMTPat (hashmap_utils_deserialize st)]
(*** Lemmas *)
@@ -39,10 +39,10 @@ val deserialize_lem (st : state) : Lemma (
val insert_on_disk_lem (key : usize) (value : u64) (st : state) : Lemma (
match insert_on_disk key value st with
| Fail _ -> True
- | Return (st', ()) ->
+ | Ok (st', ()) ->
let hm = state_v st in
match hashmap_HashMap_insert u64 hm key value with
| Fail _ -> False
- | Return hm' -> hm' == state_v st')
+ | Ok hm' -> hm' == state_v st')
let insert_on_disk_lem key value st = ()