| 1 |
#include <aws/common/hash_table.h> |
| 2 |
#include <aws/common/math.h> |
| 3 |
#include <aws/common/private/hash_table_impl.h> |
| 4 |
#include <aws/common/string.h> |
| 5 |
|
| 6 |
#include <limits.h> |
| 7 |
#include <proof_helpers/make_common_data_structures.h> |
| 8 |
#include <proof_helpers/utils.h> |
| 9 |
#include <stdio.h> |
| 10 |
#include <stdlib.h> |
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
size_t __CPROVER_file_local_hash_table_c_s_remove_entry( |
| 17 |
struct hash_table_state *state, |
| 18 |
struct hash_table_entry *entry) { |
| 19 |
AWS_PRECONDITION(hash_table_state_is_valid(state)); |
| 20 |
AWS_PRECONDITION(state->entry_count > 0); |
| 21 |
AWS_PRECONDITION( |
| 22 |
entry >= &state->slots[0] && entry < &state->slots[state->size], |
| 23 |
"Input hash_table_entry [entry] pointer must point in the available slots."); |
| 24 |
state->entry_count--; |
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
size_t index; |
| 29 |
__CPROVER_assume(index <= state->size); |
| 30 |
|
| 31 |
AWS_RETURN_WITH_POSTCONDITION(index, hash_table_state_is_valid(state) && index <= state->size); |
| 32 |
} |