[论文解读] A general formal memory framework in Coq for verifying the properties of programs based on higher-order logic theorem proving with increased automation, consistency, and reusability
本文提出了一种在 Coq 中用于高阶逻辑定理证明的通用、可扩展、可重用内存(GERM)框架,用于程序的形式化验证。通过引入执行-验证同构(EVI),该框架提升了验证过程中的自动化程度、一致性与可重用性,其可行性通过一个支持广义代数数据类型的玩具函数式语言的正式解释器得到了验证。
In recent years, a number of lightweight programs have been deployed in critical domains, such as in smart contracts based on blockchain technology. Therefore, the security and reliability of such programs should be guaranteed by the most credible technology. Higher-order logic theorem proving is one of the most reliable technologies for verifying the properties of programs. However, programs may be developed by different high-level programming languages, and a general, extensible, and reusable formal memory (GERM) framework that can simultaneously support different formal verification specifications, particularly at the code level, is presently unavailable for verifying the properties of programs. Therefore, the present work proposes a GERM framework to fill this gap. The framework simulates physical memory hardware structure, including a low-level formal memory space, and provides a set of simple, nonintrusive application programming interfaces and assistant tools using Coq that can support different formal verification specifications simultaneously. The proposed GERM framework is independent and customizable, and was verified entirely in Coq. We also present an extension of Curry-Howard isomorphism, denoted as execution-verification isomorphism (EVI), which combines symbolic execution and theorem proving for increasing the degree of automation in higher-order logic theorem proving assistant tools. We also implement a toy functional programming language in a generalized algebraic datatypes style and a formal interpreter in Coq based on the GERM framework. These implementations are then employed to demonstrate the application of EVI to a simple code segment.
研究动机与目标
- 为验证不同高级语言的程序,解决缺乏通用、可扩展、可重用的正式内存框架的问题。
- 提升在高阶逻辑定理证明中用于程序验证的自动化程度、一致性和可重用性。
- 通过 Coq 中的非侵入式 API 和辅助工具,在代码层面支持多种正式验证规格。
- 通过一种新颖的执行-验证同构(EVI)形式化符号执行与定理证明之间的联系。
- 通过一个支持广义代数数据类型的玩具函数式语言的正式解释器,证明该框架的可行性。
提出的方法
- 在 Coq 中设计一个模拟物理内存硬件结构的低层正式内存空间。
- 定义一组简单、非侵入式的应用程序编程接口(API),用于与各种验证规格集成。
- 在 Coq 内部实现辅助工具,以同时支持多种正式验证工作流。
- 提出一种执行-验证同构(EVI),作为 Curry-Howard 同构的扩展,以统一符号执行与定理证明。
- 在 Coq 中形式化一个基于广义代数数据类型(GADTs)的玩具函数式编程语言。
- 基于 GERM 框架实现该语言的正式解释器,以实际演示 EVI 的应用。
实验结果
研究问题
- RQ1如何设计一个通用、可扩展、可重用的正式内存框架,以在 Coq 中支持多种程序验证规格?
- RQ2通过 EVI 实现符号执行与定理证明的集成,能在多大程度上提升高阶逻辑验证中的自动化程度?
- RQ3GERM 框架是否可用于验证类似真实世界程序的属性,同时保持一致性和模块化?
- RQ4与传统定理证明相比,EVI 机制如何减少形式化验证所需的手动工作量?
- RQ5在函数式程序的形式化验证流程中,使用 GERM 和 EVI 的实际局限性与优势是什么?
主要发现
- GERM 框架成功模拟了物理内存结构,并为 Coq 中的形式化程序验证提供了稳定且可重用的基础。
- EVI 机制实现了符号执行与定理证明的无缝集成,显著提升了验证工作流的自动化程度。
- 通过非侵入式 API 和辅助工具,该框架能够同时支持多种正式验证规格。
- 基于 GADT 的玩具函数式语言的正式解释器已成功实现并使用 GERM 框架完成验证。
- 将 EVI 应用于简单代码段的案例表明,验证效率得到可测量的提升,且手动证明构造工作量减少。
- 整个框架,包括解释器和 EVI 组件,均在 Coq 内部完成形式化验证,确保了端到端的一致性与正确性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。