diff options
Diffstat (limited to 'tests/lean/hashmap_on_disk/HashmapMain/Clauses')
-rw-r--r-- | tests/lean/hashmap_on_disk/HashmapMain/Clauses/Clauses.lean | 44 | ||||
-rw-r--r-- | tests/lean/hashmap_on_disk/HashmapMain/Clauses/Template.lean | 16 |
2 files changed, 29 insertions, 31 deletions
diff --git a/tests/lean/hashmap_on_disk/HashmapMain/Clauses/Clauses.lean b/tests/lean/hashmap_on_disk/HashmapMain/Clauses/Clauses.lean index 1b69eb2f..a4dc996a 100644 --- a/tests/lean/hashmap_on_disk/HashmapMain/Clauses/Clauses.lean +++ b/tests/lean/hashmap_on_disk/HashmapMain/Clauses/Clauses.lean @@ -1,39 +1,37 @@ --- [hashmap_main]: the decreases clauses import Base.Primitives import HashmapMain.Types /- [hashmap_main::hashmap::HashMap::{0}::allocate_slots]: termination measure -/ @[simp] def hashmap_hash_map_allocate_slots_loop_terminates (T : Type) - (slots : Vec (hashmap_list_t T)) (n : USize) := + (slots : Vec (hashmap_list_t T)) (n : Usize) := (slots, n) +/- [hashmap_main::hashmap::HashMap::{0}::allocate_slots]: decreases_by tactic -/ syntax "hashmap_hash_map_allocate_slots_loop_decreases" term+ : tactic - macro_rules | `(tactic| hashmap_hash_map_allocate_slots_loop_decreases $slots $n) => `(tactic| sorry) -/- [hashmap_main::hashmap::HashMap::{0}::clear_slots]: termination measure -/ +/- [hashmap_main::hashmap::HashMap::{0}::clear]: termination measure -/ @[simp] -def hashmap_hash_map_clear_slots_loop_terminates (T : Type) - (slots : Vec (hashmap_list_t T)) (i : USize) := +def hashmap_hash_map_clear_loop_terminates (T : Type) + (slots : Vec (hashmap_list_t T)) (i : Usize) := (slots, i) -syntax "hashmap_hash_map_clear_slots_loop_decreases" term+ : tactic - +/- [hashmap_main::hashmap::HashMap::{0}::clear]: decreases_by tactic -/ +syntax "hashmap_hash_map_clear_loop_decreases" term+ : tactic macro_rules -| `(tactic| hashmap_hash_map_clear_slots_loop_decreases $slots $i) => - `(tactic| sorry) +| `(tactic| hashmap_hash_map_clear_loop_decreases $slots $i) =>`(tactic| sorry) /- [hashmap_main::hashmap::HashMap::{0}::insert_in_list]: termination measure -/ @[simp] -def hashmap_hash_map_insert_in_list_loop_terminates (T : Type) (key : USize) +def hashmap_hash_map_insert_in_list_loop_terminates (T : Type) (key : Usize) (value : T) (ls : hashmap_list_t T) := (key, value, ls) +/- [hashmap_main::hashmap::HashMap::{0}::insert_in_list]: decreases_by tactic -/ syntax "hashmap_hash_map_insert_in_list_loop_decreases" term+ : tactic - macro_rules | `(tactic| hashmap_hash_map_insert_in_list_loop_decreases $key $value $ls) => `(tactic| sorry) @@ -44,8 +42,8 @@ def hashmap_hash_map_move_elements_from_list_loop_terminates (T : Type) (ntable : hashmap_hash_map_t T) (ls : hashmap_list_t T) := (ntable, ls) +/- [hashmap_main::hashmap::HashMap::{0}::move_elements_from_list]: decreases_by tactic -/ syntax "hashmap_hash_map_move_elements_from_list_loop_decreases" term+ : tactic - macro_rules | `(tactic| hashmap_hash_map_move_elements_from_list_loop_decreases $ntable $ls) =>`(tactic| sorry) @@ -53,12 +51,12 @@ $ls) =>`(tactic| sorry) /- [hashmap_main::hashmap::HashMap::{0}::move_elements]: termination measure -/ @[simp] def hashmap_hash_map_move_elements_loop_terminates (T : Type) - (ntable : hashmap_hash_map_t T) (slots : Vec (hashmap_list_t T)) (i : USize) + (ntable : hashmap_hash_map_t T) (slots : Vec (hashmap_list_t T)) (i : Usize) := (ntable, slots, i) +/- [hashmap_main::hashmap::HashMap::{0}::move_elements]: decreases_by tactic -/ syntax "hashmap_hash_map_move_elements_loop_decreases" term+ : tactic - macro_rules | `(tactic| hashmap_hash_map_move_elements_loop_decreases $ntable $slots $i) => `(tactic| sorry) @@ -66,46 +64,46 @@ macro_rules /- [hashmap_main::hashmap::HashMap::{0}::contains_key_in_list]: termination measure -/ @[simp] def hashmap_hash_map_contains_key_in_list_loop_terminates (T : Type) - (key : USize) (ls : hashmap_list_t T) := + (key : Usize) (ls : hashmap_list_t T) := (key, ls) +/- [hashmap_main::hashmap::HashMap::{0}::contains_key_in_list]: decreases_by tactic -/ syntax "hashmap_hash_map_contains_key_in_list_loop_decreases" term+ : tactic - macro_rules | `(tactic| hashmap_hash_map_contains_key_in_list_loop_decreases $key $ls) => `(tactic| sorry) /- [hashmap_main::hashmap::HashMap::{0}::get_in_list]: termination measure -/ @[simp] -def hashmap_hash_map_get_in_list_loop_terminates (T : Type) (key : USize) +def hashmap_hash_map_get_in_list_loop_terminates (T : Type) (key : Usize) (ls : hashmap_list_t T) := (key, ls) +/- [hashmap_main::hashmap::HashMap::{0}::get_in_list]: decreases_by tactic -/ syntax "hashmap_hash_map_get_in_list_loop_decreases" term+ : tactic - macro_rules | `(tactic| hashmap_hash_map_get_in_list_loop_decreases $key $ls) =>`(tactic| sorry) /- [hashmap_main::hashmap::HashMap::{0}::get_mut_in_list]: termination measure -/ @[simp] def hashmap_hash_map_get_mut_in_list_loop_terminates (T : Type) - (ls : hashmap_list_t T) (key : USize) := + (ls : hashmap_list_t T) (key : Usize) := (ls, key) +/- [hashmap_main::hashmap::HashMap::{0}::get_mut_in_list]: decreases_by tactic -/ syntax "hashmap_hash_map_get_mut_in_list_loop_decreases" term+ : tactic - macro_rules | `(tactic| hashmap_hash_map_get_mut_in_list_loop_decreases $ls $key) => `(tactic| sorry) /- [hashmap_main::hashmap::HashMap::{0}::remove_from_list]: termination measure -/ @[simp] -def hashmap_hash_map_remove_from_list_loop_terminates (T : Type) (key : USize) +def hashmap_hash_map_remove_from_list_loop_terminates (T : Type) (key : Usize) (ls : hashmap_list_t T) := (key, ls) +/- [hashmap_main::hashmap::HashMap::{0}::remove_from_list]: decreases_by tactic -/ syntax "hashmap_hash_map_remove_from_list_loop_decreases" term+ : tactic - macro_rules | `(tactic| hashmap_hash_map_remove_from_list_loop_decreases $key $ls) => `(tactic| sorry) diff --git a/tests/lean/hashmap_on_disk/HashmapMain/Clauses/Template.lean b/tests/lean/hashmap_on_disk/HashmapMain/Clauses/Template.lean index 753c92ac..33802597 100644 --- a/tests/lean/hashmap_on_disk/HashmapMain/Clauses/Template.lean +++ b/tests/lean/hashmap_on_disk/HashmapMain/Clauses/Template.lean @@ -6,7 +6,7 @@ import HashmapMain.Types /- [hashmap_main::hashmap::HashMap::{0}::allocate_slots]: termination measure -/ @[simp] def hashmap_hash_map_allocate_slots_loop_terminates (T : Type) - (slots : Vec (hashmap_list_t T)) (n : USize) := + (slots : Vec (hashmap_list_t T)) (n : Usize) := (slots, n) /- [hashmap_main::hashmap::HashMap::{0}::allocate_slots]: decreases_by tactic -/ @@ -18,7 +18,7 @@ macro_rules /- [hashmap_main::hashmap::HashMap::{0}::clear]: termination measure -/ @[simp] def hashmap_hash_map_clear_loop_terminates (T : Type) - (slots : Vec (hashmap_list_t T)) (i : USize) := + (slots : Vec (hashmap_list_t T)) (i : Usize) := (slots, i) /- [hashmap_main::hashmap::HashMap::{0}::clear]: decreases_by tactic -/ @@ -28,7 +28,7 @@ macro_rules /- [hashmap_main::hashmap::HashMap::{0}::insert_in_list]: termination measure -/ @[simp] -def hashmap_hash_map_insert_in_list_loop_terminates (T : Type) (key : USize) +def hashmap_hash_map_insert_in_list_loop_terminates (T : Type) (key : Usize) (value : T) (ls : hashmap_list_t T) := (key, value, ls) @@ -53,7 +53,7 @@ $ls) =>`(tactic| sorry) /- [hashmap_main::hashmap::HashMap::{0}::move_elements]: termination measure -/ @[simp] def hashmap_hash_map_move_elements_loop_terminates (T : Type) - (ntable : hashmap_hash_map_t T) (slots : Vec (hashmap_list_t T)) (i : USize) + (ntable : hashmap_hash_map_t T) (slots : Vec (hashmap_list_t T)) (i : Usize) := (ntable, slots, i) @@ -66,7 +66,7 @@ macro_rules /- [hashmap_main::hashmap::HashMap::{0}::contains_key_in_list]: termination measure -/ @[simp] def hashmap_hash_map_contains_key_in_list_loop_terminates (T : Type) - (key : USize) (ls : hashmap_list_t T) := + (key : Usize) (ls : hashmap_list_t T) := (key, ls) /- [hashmap_main::hashmap::HashMap::{0}::contains_key_in_list]: decreases_by tactic -/ @@ -77,7 +77,7 @@ macro_rules /- [hashmap_main::hashmap::HashMap::{0}::get_in_list]: termination measure -/ @[simp] -def hashmap_hash_map_get_in_list_loop_terminates (T : Type) (key : USize) +def hashmap_hash_map_get_in_list_loop_terminates (T : Type) (key : Usize) (ls : hashmap_list_t T) := (key, ls) @@ -89,7 +89,7 @@ macro_rules /- [hashmap_main::hashmap::HashMap::{0}::get_mut_in_list]: termination measure -/ @[simp] def hashmap_hash_map_get_mut_in_list_loop_terminates (T : Type) - (ls : hashmap_list_t T) (key : USize) := + (ls : hashmap_list_t T) (key : Usize) := (ls, key) /- [hashmap_main::hashmap::HashMap::{0}::get_mut_in_list]: decreases_by tactic -/ @@ -100,7 +100,7 @@ macro_rules /- [hashmap_main::hashmap::HashMap::{0}::remove_from_list]: termination measure -/ @[simp] -def hashmap_hash_map_remove_from_list_loop_terminates (T : Type) (key : USize) +def hashmap_hash_map_remove_from_list_loop_terminates (T : Type) (key : Usize) (ls : hashmap_list_t T) := (key, ls) |