vault backup: 2023-10-23 19:58:40
This commit is contained in:
parent
82e9d5f048
commit
64958b9fd5
1 changed files with 7 additions and 1 deletions
|
@ -41,7 +41,7 @@ pred Invs {
|
||||||
|
|
||||||
//for all nodes sequentially linked, they must have the same hash
|
//for all nodes sequentially linked, they must have the same hash
|
||||||
all x, y: Node | (x.prox = y) implies x.key.hash = y.key.hash
|
all x, y: Node | (x.prox = y) implies x.key.hash = y.key.hash
|
||||||
|
//ALTERNATIVELY
|
||||||
//no node links to nodes associated with a different hash
|
//no node links to nodes associated with a different hash
|
||||||
all x, y: Node | x.key.hash != y.key.hash implies (x.prox != y and y.prox != x)
|
all x, y: Node | x.key.hash != y.key.hash implies (x.prox != y and y.prox != x)
|
||||||
|
|
||||||
|
@ -54,9 +54,15 @@ pred Invs {
|
||||||
//the prox node of another node may be empty
|
//the prox node of another node may be empty
|
||||||
all x: Node, y : Node | x.prox = y or not x.prox = y
|
all x: Node, y : Node | x.prox = y or not x.prox = y
|
||||||
|
|
||||||
|
//all x : Node | x.prox.key != x.key
|
||||||
|
|
||||||
|
|
||||||
//WORNG STUFF
|
//WORNG STUFF
|
||||||
//buckets may only have one head exclusive to it
|
//buckets may only have one head exclusive to it
|
||||||
all x, y : Bucket| all z : Node | x.head = z implies y.head != z
|
all x, y : Bucket| all z : Node | x.head = z implies y.head != z
|
||||||
|
|
||||||
|
//all buckets have a unique hash
|
||||||
|
all x, y: Bucket | (x.head != none and y.head != none) implies x.head.key.hash != y.head.key.hash
|
||||||
}
|
}
|
||||||
|
|
||||||
```
|
```
|
Loading…
Reference in a new issue