summaryrefslogtreecommitdiff
path: root/tests/coq/hashmap
diff options
context:
space:
mode:
authorGuillaume Boisseau2024-05-24 14:37:29 +0200
committerGitHub2024-05-24 14:37:29 +0200
commit3c8ea6df20f92be9c341bbfb748f65d6c598fead (patch)
tree63429c0be3daff353dbc6d667618e4028490cc79 /tests/coq/hashmap
parentc6c9e351546a723e62cc21579b2359dba3bfb56f (diff)
parent41f78066da5cc10af6312ab1bef71e45ff460688 (diff)
Merge pull request #197 from AeneasVerif/test-harness3
Diffstat (limited to 'tests/coq/hashmap')
-rw-r--r--tests/coq/hashmap/Hashmap_Funs.v60
-rw-r--r--tests/coq/hashmap/Hashmap_Types.v4
2 files changed, 32 insertions, 32 deletions
diff --git a/tests/coq/hashmap/Hashmap_Funs.v b/tests/coq/hashmap/Hashmap_Funs.v
index ebb7897d..1f2b2b22 100644
--- a/tests/coq/hashmap/Hashmap_Funs.v
+++ b/tests/coq/hashmap/Hashmap_Funs.v
@@ -11,12 +11,12 @@ Include Hashmap_Types.
Module Hashmap_Funs.
(** [hashmap::hash_key]:
- Source: 'src/hashmap.rs', lines 27:0-27:32 *)
+ Source: 'tests/src/hashmap.rs', lines 27:0-27:32 *)
Definition hash_key (k : usize) : result usize :=
Ok k.
(** [hashmap::{hashmap::HashMap<T>}::allocate_slots]: loop 0:
- Source: 'src/hashmap.rs', lines 50:4-56:5 *)
+ Source: 'tests/src/hashmap.rs', lines 50:4-56:5 *)
Fixpoint hashMap_allocate_slots_loop
(T : Type) (n : nat) (slots : alloc_vec_Vec (List_t T)) (n1 : usize) :
result (alloc_vec_Vec (List_t T))
@@ -34,7 +34,7 @@ Fixpoint hashMap_allocate_slots_loop
.
(** [hashmap::{hashmap::HashMap<T>}::allocate_slots]:
- Source: 'src/hashmap.rs', lines 50:4-50:76 *)
+ Source: 'tests/src/hashmap.rs', lines 50:4-50:76 *)
Definition hashMap_allocate_slots
(T : Type) (n : nat) (slots : alloc_vec_Vec (List_t T)) (n1 : usize) :
result (alloc_vec_Vec (List_t T))
@@ -43,7 +43,7 @@ Definition hashMap_allocate_slots
.
(** [hashmap::{hashmap::HashMap<T>}::new_with_capacity]:
- Source: 'src/hashmap.rs', lines 59:4-63:13 *)
+ Source: 'tests/src/hashmap.rs', lines 59:4-63:13 *)
Definition hashMap_new_with_capacity
(T : Type) (n : nat) (capacity : usize) (max_load_dividend : usize)
(max_load_divisor : usize) :
@@ -62,13 +62,13 @@ Definition hashMap_new_with_capacity
.
(** [hashmap::{hashmap::HashMap<T>}::new]:
- Source: 'src/hashmap.rs', lines 75:4-75:24 *)
+ Source: 'tests/src/hashmap.rs', lines 75:4-75:24 *)
Definition hashMap_new (T : Type) (n : nat) : result (HashMap_t T) :=
hashMap_new_with_capacity T n 32%usize 4%usize 5%usize
.
(** [hashmap::{hashmap::HashMap<T>}::clear]: loop 0:
- Source: 'src/hashmap.rs', lines 80:4-88:5 *)
+ Source: 'tests/src/hashmap.rs', lines 80:4-88:5 *)
Fixpoint hashMap_clear_loop
(T : Type) (n : nat) (slots : alloc_vec_Vec (List_t T)) (i : usize) :
result (alloc_vec_Vec (List_t T))
@@ -91,7 +91,7 @@ Fixpoint hashMap_clear_loop
.
(** [hashmap::{hashmap::HashMap<T>}::clear]:
- Source: 'src/hashmap.rs', lines 80:4-80:27 *)
+ Source: 'tests/src/hashmap.rs', lines 80:4-80:27 *)
Definition hashMap_clear
(T : Type) (n : nat) (self : HashMap_t T) : result (HashMap_t T) :=
hm <- hashMap_clear_loop T n self.(hashMap_slots) 0%usize;
@@ -105,13 +105,13 @@ Definition hashMap_clear
.
(** [hashmap::{hashmap::HashMap<T>}::len]:
- Source: 'src/hashmap.rs', lines 90:4-90:30 *)
+ Source: 'tests/src/hashmap.rs', lines 90:4-90:30 *)
Definition hashMap_len (T : Type) (self : HashMap_t T) : result usize :=
Ok self.(hashMap_num_entries)
.
(** [hashmap::{hashmap::HashMap<T>}::insert_in_list]: loop 0:
- Source: 'src/hashmap.rs', lines 97:4-114:5 *)
+ Source: 'tests/src/hashmap.rs', lines 97:4-114:5 *)
Fixpoint hashMap_insert_in_list_loop
(T : Type) (n : nat) (key : usize) (value : T) (ls : List_t T) :
result (bool * (List_t T))
@@ -133,7 +133,7 @@ Fixpoint hashMap_insert_in_list_loop
.
(** [hashmap::{hashmap::HashMap<T>}::insert_in_list]:
- Source: 'src/hashmap.rs', lines 97:4-97:71 *)
+ Source: 'tests/src/hashmap.rs', lines 97:4-97:71 *)
Definition hashMap_insert_in_list
(T : Type) (n : nat) (key : usize) (value : T) (ls : List_t T) :
result (bool * (List_t T))
@@ -142,7 +142,7 @@ Definition hashMap_insert_in_list
.
(** [hashmap::{hashmap::HashMap<T>}::insert_no_resize]:
- Source: 'src/hashmap.rs', lines 117:4-117:54 *)
+ Source: 'tests/src/hashmap.rs', lines 117:4-117:54 *)
Definition hashMap_insert_no_resize
(T : Type) (n : nat) (self : HashMap_t T) (key : usize) (value : T) :
result (HashMap_t T)
@@ -180,7 +180,7 @@ Definition hashMap_insert_no_resize
.
(** [hashmap::{hashmap::HashMap<T>}::move_elements_from_list]: loop 0:
- Source: 'src/hashmap.rs', lines 183:4-196:5 *)
+ Source: 'tests/src/hashmap.rs', lines 183:4-196:5 *)
Fixpoint hashMap_move_elements_from_list_loop
(T : Type) (n : nat) (ntable : HashMap_t T) (ls : List_t T) :
result (HashMap_t T)
@@ -198,7 +198,7 @@ Fixpoint hashMap_move_elements_from_list_loop
.
(** [hashmap::{hashmap::HashMap<T>}::move_elements_from_list]:
- Source: 'src/hashmap.rs', lines 183:4-183:72 *)
+ Source: 'tests/src/hashmap.rs', lines 183:4-183:72 *)
Definition hashMap_move_elements_from_list
(T : Type) (n : nat) (ntable : HashMap_t T) (ls : List_t T) :
result (HashMap_t T)
@@ -207,7 +207,7 @@ Definition hashMap_move_elements_from_list
.
(** [hashmap::{hashmap::HashMap<T>}::move_elements]: loop 0:
- Source: 'src/hashmap.rs', lines 171:4-180:5 *)
+ Source: 'tests/src/hashmap.rs', lines 171:4-180:5 *)
Fixpoint hashMap_move_elements_loop
(T : Type) (n : nat) (ntable : HashMap_t T)
(slots : alloc_vec_Vec (List_t T)) (i : usize) :
@@ -233,7 +233,7 @@ Fixpoint hashMap_move_elements_loop
.
(** [hashmap::{hashmap::HashMap<T>}::move_elements]:
- Source: 'src/hashmap.rs', lines 171:4-171:95 *)
+ Source: 'tests/src/hashmap.rs', lines 171:4-171:95 *)
Definition hashMap_move_elements
(T : Type) (n : nat) (ntable : HashMap_t T)
(slots : alloc_vec_Vec (List_t T)) (i : usize) :
@@ -243,7 +243,7 @@ Definition hashMap_move_elements
.
(** [hashmap::{hashmap::HashMap<T>}::try_resize]:
- Source: 'src/hashmap.rs', lines 140:4-140:28 *)
+ Source: 'tests/src/hashmap.rs', lines 140:4-140:28 *)
Definition hashMap_try_resize
(T : Type) (n : nat) (self : HashMap_t T) : result (HashMap_t T) :=
max_usize <- scalar_cast U32 Usize core_u32_max;
@@ -275,7 +275,7 @@ Definition hashMap_try_resize
.
(** [hashmap::{hashmap::HashMap<T>}::insert]:
- Source: 'src/hashmap.rs', lines 129:4-129:48 *)
+ Source: 'tests/src/hashmap.rs', lines 129:4-129:48 *)
Definition hashMap_insert
(T : Type) (n : nat) (self : HashMap_t T) (key : usize) (value : T) :
result (HashMap_t T)
@@ -288,7 +288,7 @@ Definition hashMap_insert
.
(** [hashmap::{hashmap::HashMap<T>}::contains_key_in_list]: loop 0:
- Source: 'src/hashmap.rs', lines 206:4-219:5 *)
+ Source: 'tests/src/hashmap.rs', lines 206:4-219:5 *)
Fixpoint hashMap_contains_key_in_list_loop
(T : Type) (n : nat) (key : usize) (ls : List_t T) : result bool :=
match n with
@@ -305,14 +305,14 @@ Fixpoint hashMap_contains_key_in_list_loop
.
(** [hashmap::{hashmap::HashMap<T>}::contains_key_in_list]:
- Source: 'src/hashmap.rs', lines 206:4-206:68 *)
+ Source: 'tests/src/hashmap.rs', lines 206:4-206:68 *)
Definition hashMap_contains_key_in_list
(T : Type) (n : nat) (key : usize) (ls : List_t T) : result bool :=
hashMap_contains_key_in_list_loop T n key ls
.
(** [hashmap::{hashmap::HashMap<T>}::contains_key]:
- Source: 'src/hashmap.rs', lines 199:4-199:49 *)
+ Source: 'tests/src/hashmap.rs', lines 199:4-199:49 *)
Definition hashMap_contains_key
(T : Type) (n : nat) (self : HashMap_t T) (key : usize) : result bool :=
hash <- hash_key key;
@@ -326,7 +326,7 @@ Definition hashMap_contains_key
.
(** [hashmap::{hashmap::HashMap<T>}::get_in_list]: loop 0:
- Source: 'src/hashmap.rs', lines 224:4-237:5 *)
+ Source: 'tests/src/hashmap.rs', lines 224:4-237:5 *)
Fixpoint hashMap_get_in_list_loop
(T : Type) (n : nat) (key : usize) (ls : List_t T) : result T :=
match n with
@@ -341,14 +341,14 @@ Fixpoint hashMap_get_in_list_loop
.
(** [hashmap::{hashmap::HashMap<T>}::get_in_list]:
- Source: 'src/hashmap.rs', lines 224:4-224:70 *)
+ Source: 'tests/src/hashmap.rs', lines 224:4-224:70 *)
Definition hashMap_get_in_list
(T : Type) (n : nat) (key : usize) (ls : List_t T) : result T :=
hashMap_get_in_list_loop T n key ls
.
(** [hashmap::{hashmap::HashMap<T>}::get]:
- Source: 'src/hashmap.rs', lines 239:4-239:55 *)
+ Source: 'tests/src/hashmap.rs', lines 239:4-239:55 *)
Definition hashMap_get
(T : Type) (n : nat) (self : HashMap_t T) (key : usize) : result T :=
hash <- hash_key key;
@@ -362,7 +362,7 @@ Definition hashMap_get
.
(** [hashmap::{hashmap::HashMap<T>}::get_mut_in_list]: loop 0:
- Source: 'src/hashmap.rs', lines 245:4-254:5 *)
+ Source: 'tests/src/hashmap.rs', lines 245:4-254:5 *)
Fixpoint hashMap_get_mut_in_list_loop
(T : Type) (n : nat) (ls : List_t T) (key : usize) :
result (T * (T -> result (List_t T)))
@@ -388,7 +388,7 @@ Fixpoint hashMap_get_mut_in_list_loop
.
(** [hashmap::{hashmap::HashMap<T>}::get_mut_in_list]:
- Source: 'src/hashmap.rs', lines 245:4-245:86 *)
+ Source: 'tests/src/hashmap.rs', lines 245:4-245:86 *)
Definition hashMap_get_mut_in_list
(T : Type) (n : nat) (ls : List_t T) (key : usize) :
result (T * (T -> result (List_t T)))
@@ -397,7 +397,7 @@ Definition hashMap_get_mut_in_list
.
(** [hashmap::{hashmap::HashMap<T>}::get_mut]:
- Source: 'src/hashmap.rs', lines 257:4-257:67 *)
+ Source: 'tests/src/hashmap.rs', lines 257:4-257:67 *)
Definition hashMap_get_mut
(T : Type) (n : nat) (self : HashMap_t T) (key : usize) :
result (T * (T -> result (HashMap_t T)))
@@ -427,7 +427,7 @@ Definition hashMap_get_mut
.
(** [hashmap::{hashmap::HashMap<T>}::remove_from_list]: loop 0:
- Source: 'src/hashmap.rs', lines 265:4-291:5 *)
+ Source: 'tests/src/hashmap.rs', lines 265:4-291:5 *)
Fixpoint hashMap_remove_from_list_loop
(T : Type) (n : nat) (key : usize) (ls : List_t T) :
result ((option T) * (List_t T))
@@ -455,7 +455,7 @@ Fixpoint hashMap_remove_from_list_loop
.
(** [hashmap::{hashmap::HashMap<T>}::remove_from_list]:
- Source: 'src/hashmap.rs', lines 265:4-265:69 *)
+ Source: 'tests/src/hashmap.rs', lines 265:4-265:69 *)
Definition hashMap_remove_from_list
(T : Type) (n : nat) (key : usize) (ls : List_t T) :
result ((option T) * (List_t T))
@@ -464,7 +464,7 @@ Definition hashMap_remove_from_list
.
(** [hashmap::{hashmap::HashMap<T>}::remove]:
- Source: 'src/hashmap.rs', lines 294:4-294:52 *)
+ Source: 'tests/src/hashmap.rs', lines 294:4-294:52 *)
Definition hashMap_remove
(T : Type) (n : nat) (self : HashMap_t T) (key : usize) :
result ((option T) * (HashMap_t T))
@@ -503,7 +503,7 @@ Definition hashMap_remove
.
(** [hashmap::test1]:
- Source: 'src/hashmap.rs', lines 315:0-315:10 *)
+ Source: 'tests/src/hashmap.rs', lines 315:0-315:10 *)
Definition test1 (n : nat) : result unit :=
hm <- hashMap_new u64 n;
hm1 <- hashMap_insert u64 n hm 0%usize 42%u64;
diff --git a/tests/coq/hashmap/Hashmap_Types.v b/tests/coq/hashmap/Hashmap_Types.v
index 80a43593..2a9f7ddb 100644
--- a/tests/coq/hashmap/Hashmap_Types.v
+++ b/tests/coq/hashmap/Hashmap_Types.v
@@ -9,7 +9,7 @@ Local Open Scope Primitives_scope.
Module Hashmap_Types.
(** [hashmap::List]
- Source: 'src/hashmap.rs', lines 19:0-19:16 *)
+ Source: 'tests/src/hashmap.rs', lines 19:0-19:16 *)
Inductive List_t (T : Type) :=
| List_Cons : usize -> T -> List_t T -> List_t T
| List_Nil : List_t T
@@ -19,7 +19,7 @@ Arguments List_Cons { _ }.
Arguments List_Nil { _ }.
(** [hashmap::HashMap]
- Source: 'src/hashmap.rs', lines 35:0-35:21 *)
+ Source: 'tests/src/hashmap.rs', lines 35:0-35:21 *)
Record HashMap_t (T : Type) :=
mkHashMap_t {
hashMap_num_entries : usize;