Skip to main content
QUICK REVIEW

[论文解读] Ascertaining Uncertainty for Efficient Exact Cache Analysis

Valentin Touzeau, Claire Maïza|arXiv (Cornell University)|Sep 28, 2017
Real-Time Systems Scheduling参考文献 16被引用 252
一句话总结

论文引入一种新的抽象解释来证明缓存分析中的确定不确定性,并使用模型检验在逐指令级别实现对缓存命中与未命中的精确、逐路径分类。

ABSTRACT

Static cache analysis characterizes a program's cache behavior by determining in a sound but approximate manner which memory accesses result in cache hits and which result in cache misses. Such information is valuable in optimizing compilers, worst-case execution time analysis, and side-channel attack quantification and mitigation.Cache analysis is usually performed as a combination of `must' and `may' abstract interpretations, classifying instructions as either `always hit', `always miss', or `unknown'. Instructions classified as `unknown' might result in a hit or a miss depending on program inputs or the initial cache state. It is equally possible that they do in fact always hit or always miss, but the cache analysis is too coarse to see it.Our approach to eliminate this uncertainty consists in (i) a novel abstract interpretation able to ascertain that a particular instruction may definitely cause a hit and a miss on different paths, and (ii) an exact analysis, removing all remaining uncertainty, based on model checking, using abstract-interpretation results to prune down the model for scalability.We evaluated our approach on a variety of examples; it notably improves precision upon classical abstract interpretation at reasonable cost.

研究动机与目标

  • 通过减少未知分类来提升静态缓存分析的精度,超越传统的 may/must 分析。
  • 提供一种安全、可重复使用的方法,以在多次执行中确定某个访问在是否可能必然命中或未命中。
  • 将抽象解释与模型检验结合,以在保持可扩展性的同时获得精确的分类。

提出的方法

  • 开发一种新颖的抽象解释,推导存在性属性(exists hit、exists miss、exists hit ∧ exists miss)以降低不确定性。
  • 将抽象域扩展为 EH(exists hit)和 EM(exists miss)分析,并与 must/may 框架配对。
  • 使用聚焦的缓存模型和聚焦的收集语义,以实现对剩余未知访问的精确、经模型检验的分类。
  • 将剩余的分类问题编码为有限状态模型检验,使用简化的程序和聚焦于目标块的缓存模型。
  • 迭代地对访问进行分类:若 AI 得出确定结果则跳过模型检验;否则,应用模型检验以获得精确的分类。

实验结果

研究问题

  • RQ1是否可以将现有的 may/must 缓存分析与存在性分析结合,以安全地识别在某些执行中可能命中或未命中的访问?
  • RQ2将缓存替换策略的聚焦、精确抽象与模型检验结合,是否能为剩余不确定访问提供完整且精确的分类?
  • RQ3通过使用抽象解释的结果对模型进行裁剪,抽象驱动的模型检验是否可以高效扩展?
  • RQ4将状态空间压缩为面向块的缓存模型对分析的精度和性能有何好处?

主要发现

  • 与经典的 AI 相比,该方法将被分类为始终命中、始终未命中或明显未知的访问比例提升。
  • EH/EM 分析为最小龄和最大龄提供安全边界,使对某些命中或未命中在某些执行上得出明确结论成为可能。
  • 在 AI 结果引导下,模型检验以精确结果完成剩余分类(始终命中、始终未命中,或明确未知)。
  • 聚焦的缓存模型在保持精度的同时大幅降低模型复杂性,使对现实基准的可扩展分析成为可能。
  • 在类似工业的设置中的实验评估显示,由于抽象阶段的有效剪枝,精度提升且需要的模型检验工作量减少。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。