High-performance cache policies and supporting data structures.
Spec maturity: stubreferencetla(comma-separated if multiple)Executable oracle:
tests/abstract_models/exact/<policy>.rsuntil an independentreference/model exists.
<One-sentence policy definition. This spec is independent of implementation internals; implementations must refine it.>
| Variable | Type | Meaning |
|---|---|---|
Invariants: (structural properties at rest)
capacity = C (given)| Observable | Definition |
|---|---|
resident |
Keys currently in cache |
peek_victim |
Next eviction candidate, or none if empty |
recency_rank(k) |
0 = MRU (LRU-family only); undefined if absent |
hit |
MustHit / MustMiss / MayHitOrMiss per op |
evicted_on_insert |
Key removed by eviction triggered by this Insert, if any |
Insert(k)Get(k) / GetMut(k)Peek(k)Touch(k)Remove(k)EvictOneOp mappingSee _includes/harness-op-mapping.md for the standard table. Adjust side effects per policy above.
If present: formal/<policy>/<Policy>.tla + tlc.md. See tla-guide.md and formal/README.md.
<Impl> must refine this spec