vault backup: 2023-11-06 23:08:39

This commit is contained in:
Alice 2023-11-06 23:08:39 +00:00
parent e3ea54af6c
commit 07b138fe37
3 changed files with 17 additions and 11 deletions

View file

@ -37,11 +37,20 @@ sig Hash {}
// respective commands to check how many
// points you have.
pred insert[n : Node] {
some k: Hash
//if hash empty -> node to head of bucket
//else
//if hash empty -> node to head of bucket
n.key.hash not in Hash implies
(
lone b:Bucket | b.head = node implies b.head' = n
)
//if hash empty -> bucket of desired hash, add to next
n.key.hash in Hash implies
(
lone b: Bucket | b.head.key.hash = n.key.hash | b.head.*prox =
)
}
```