一句话:提出资源感知的程序分析技术,通过在定点计算中在线粗化抽象,在满足内存约束的同时保持高精度。
静态程序分析在定点计算中往往消耗大量内存,可能超出可用物理资源。本文提出一种资源感知的程序分析技术:分析能够感知内存等物理资源约束,跟踪自身资源使用情况,并在定点计算过程中动态调整行为。具体而言,分析通过粗化程序抽象(通常可减少内存与时间开销)来降低资源消耗,且这种粗化会在一个所谓“控制器”的指导下多次进行;控制器持续介入定点计算,决定应粗化到何种程度。作者进一步给出一种从基准程序自动学习优良控制器的算法。该技术被应用于 C 程序的静态分析,通过控制流敏感度来满足峰值内存消耗约束。在 18 个真实程序上的实验表明,该算法能够学到良好的控制器,所得分析既满足资源约束,又能有效利用可用内存。
We present a new technique for developing a resource-aware program analysis. Such an analysis is aware of constraints on available physical resources, such as memory size, tracks its resource use, and adjusts its behaviors during fixpoint computation in order to meet the constraint and achieve high precision. Our resource-aware analysis adjusts behaviors by coarsening program abstraction, which usually makes the analysis consume less memory and time until completion. It does so multiple times during the analysis, under the direction of what we call a controller. The controller constantly intervenes in the fixpoint computation of the analysis and decides how much the analysis should coarsen the abstraction. We present an algorithm for learning a good controller automatically from benchmark programs. We applied our technique to a static analysis for C programs, where we control the degree of flow-sensitivity to meet a constraint on peak memory consumption. The experimental results with 18 real-world programs show that our algorithm can learn a good controller and the analysis with this controller meets the constraint and utilizes available memory effectively.