This paper presents a proof system for reasoning about execution time bounds for a core imperative programming language. Proof systems are defined for three different scenarios: approximations of the worst-case execution time, exact time reasoning, and less pessimistic execution time estimation using amortized analysis. We define a Hoare logic for the three cases and prove its soundness with respect to an annotated cost-aware operational semantics. Finally, we define a verification conditions (VC) generator that generates the goals needed to prove program correctness, cost, and termination. Those goals are then sent to the Easycrypt toolset for validation. The practicality of the proof system is demonstrated with an implementation in OCaml of the different modules needed to apply it to example programs. Our case studies are motivated by real-time and cryptographic software.
翻译:本文件为核心必备编程语言执行时间界限的推理提供了一个证明系统。 证据系统是为三种不同情景定义的: 最坏执行时间的近似值、 准确的时间推理, 以及使用摊销分析来比较不悲观的执行时间估计。 我们为这三个案例定义了Hoare逻辑, 并证明它对于附加注释的具有成本意识的操作语义的正确性。 最后, 我们定义了一个核查条件( VC) 生成器, 产生证明程序正确性、 成本和终止所需的目标。 这些目标随后被发送到 Entercrypt 工具箱进行验证。 验证系统的实用性表现在OCaml 中实施用于示范程序的不同模块。 我们的案例研究是由实时和加密软件驱动的。