paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Fast and exact analysis for LRU caches

LRU 缓存的快速精确分析
POPL 3(POPL)2019匹配度 2/10 · 论文属于抽象解释与程序分析,但研究对象是LRU缓存命中/缺失分析,未涉及LLM/Agent、ML系统、浮点程序分析或贝叶斯程序分析,与用户当前追踪的核心交叉方向交集有限。引用 31 inbox
Valentin Touzeau, Claire Maïza, David Monniaux, Jan Reineke
crossref: 2026-09-10

AI 速览

一句话:提出基于抽象解释的 LRU 缓存精确分析,兼顾高效与精确,并证明该分析问题一般 NP 完全。

针对最坏执行时间分析与安全场景,需要静态判定内存访问在 LRU 缓存上是否命中。传统基于区间抽象的抽象解释方法速度快但精度不足;已有精确分析需调用模型检测,代价高昂。本文提出一种基于抽象解释的 LRU 缓存分析方法,在保持与模型检测相同的精确分类能力的同时,接近传统方法的效率,实验中获得数个数量级的加速。作为次要贡献,作者证明一般的 LRU 缓存分析问题是 NP 完全的。

问题
如何在 LRU 缓存上对内存访问进行静态且精确的命中/未命中分类,同时兼顾分析效率,以服务于最坏执行时间分析与安全。
方法
提出一种基于抽象解释的分析方法,实现对 LRU 缓存访问的精确分类,并分析该问题的计算复杂度。
评估
与基于模型检测的精确分析相比获得数个数量级的加速,同时效率接近传统抽象解释方法;并证明 LRU 缓存分析问题一般 NP 完全。
原文摘要(Abstract)

For applications in worst-case execution time analysis and in security, it is desirable to statically classify memory accesses into those that result in cache hits, and those that result in cache misses. Among cache replacement policies, the least recently used (LRU) policy has been studied the most and is considered to be the most predictable. The state-of-the-art in LRU cache analysis presents a tradeoff between precision and analysis efficiency: The classical approach to analyzing programs running on LRU caches, an abstract interpretation based on a range abstraction, is very fast but can be imprecise. An exact analysis was recently presented, but, as a last resort, it calls a model checker, which is expensive. In this paper, we develop an analysis based on abstract interpretation that comes close to the efficiency of the classical approach, while achieving exact classification of all memory accesses as the model-checking approach. Compared with the model-checking approach we observe speedups of several orders of magnitude. As a secondary contribution we show that LRU cache analysis problems are in general NP-complete.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot651,
  title = {Fast and exact analysis for LRU caches},
  author = {Valentin Touzeau and Claire Maïza and David Monniaux and Jan Reineke},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {3},
  number = {POPL},
  year = {2019},
  doi = {10.1145/3290367}
}