一种用于低估最坏资源使用情况的程序逻辑
A Program Logic for Under-approximating Worst-case Resource Usage
AI总结:
本文提出了一种程序逻辑,用于低估最坏资源使用情况,通过扩展错误逻辑并引入定量前向和后向低估三元组,实现了对资源消耗的定量推理,并通过案例研究验证了其有效性。
摘要:
理解并预测最坏的资源使用情况对于软件质量至关重要;然而,现有方法要么用可能松散的上限进行过度估算,要么在没有渐近保证的情况下进行低估。本文提出了一种程序逻辑,用于低估最坏的资源使用情况,将错误逻辑(IL)适应到对资源消耗进行定量推理。我们提出了定量前向和后向低估(QFUA和QBUA)三元组,这些三元组扩展了IL,以识别导致高资源使用路径的执行路径。我们还介绍了一种QBUA的变体,支持对高水位标记的推理。我们的逻辑在简单的IMP-like语言中被证明是正确且完整的,并且所有元理论结果都在Rocq中被机械化和验证。我们为我们的逻辑的三种变体实现了原型检查器,并通过几个示例和四个案例研究展示了其用途。
英文摘要:
Understanding and predicting the worst-case resource usage is crucial for software quality; however, existing methods either over-approximate with potentially loose bounds or under-approximate without asymptotic guarantees. This paper presents a program logic to under-approximate worst-case resource usage, adapting incorrectness logic (IL) to reason quantitatively about resource consumption. We propose quantitative forward and backward under-approximate (QFUA and QBUA) triples, which generalize IL to identify execution paths leading to high resource usage. We also introduce a variant of QBUA that supports reasoning about high-water marks. Our logic is proven sound and complete with respect to a simple IMP-like language, and all meta-theoretical results are mechanized and verified in Rocq. We implement a prototype checker for all three variants of our logic and demonstrate its utility through a few examples and four case studies.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。