High-performance cache policies and supporting data structures.
Spec maturity: stub
Executable oracle: invariant checks on
ArcCore; no fullPolicyModelyet.
Adaptive Replacement Cache: dynamically balances recency (T1) and frequency (T2) lists. Victim selection is adaptive — not uniquely determined from residency alone.
ARC maintains T1, T2, B1, B2 ghost lists and adaptation parameter p. Exact victim depends on list lengths and p.
| Check | When |
|---|---|
len <= capacity |
After every Op |
debug_validate_invariants() |
After every Op |
Op adapter behaviorOp |
Effect |
|---|---|
Insert(k) |
insert(k, v) |
Get(k) |
get(k) |
Peek(k) |
peek(k) |
Remove(k) |
remove(k) |
GetMut / Touch / EvictOne |
No-op in adapter |
OracleExpectation::Legal); not asserted in v1.PolicyModel dual-run when legal-victim oracle is defined.policy_semantics/arc_tests.rstests/abstract_models/bounded/arc.rs