基于Codewalker的LLVM代码推理
Reasoning About LLVM Code Using Codewalker
摘要:
本文报告了使用J Moore的Codewalker对编译为低级虚拟机(LLVM)中间形式的程序进行推理的初步实验。之前,我们报道了一个从LLVM到被ACL2定理证明器接受的Common Lisp的应用子集的翻译器,产生可执行的ACL2形式模型,并允许我们证明关于翻译模型的定理,以及通过测试验证这些模型。该翻译器提供了纯反编译到逻辑方法的许多好处,但有未经验证的缺点。从ACL2 7.0开始,Codewalker的可用性提供了一个重新审视这一想法的机会,并采用了一个更值得信赖的反编译逻辑工具。因此,我们采用Codewalker方法为LLVM指令集的一个子集创建解释器,并使用Codewalker分析了一些编译为LLVM形式的基于数组的简单C程序。我们讨论了基于Codewalker的方法与以前的方法相比的优点和局限性,并为未来的Codewalker开发提供了一些挑战性的问题。
英文摘要:
This paper reports on initial experiments using J Moore's Codewalker to reason about programs compiled to the Low-Level Virtual Machine (LLVM) intermediate form. Previously, we reported on a translator from LLVM to the applicative subset of Common Lisp accepted by the ACL2 theorem prover, producing executable ACL2 formal models, and allowing us to both prove theorems about the translated models as well as validate those models by testing. That translator provided many of the benefits of a pure decompilation into logic approach, but had the disadvantage of not being verified. The availability of Codewalker as of ACL2 7.0 has provided an opportunity to revisit this idea, and employ a more trustworthy decompilation into logic tool. Thus, we have employed the Codewalker method to create an interpreter for a subset of the LLVM instruction set, and have used Codewalker to analyze some simple array-based C programs compiled to LLVM form. We discuss advantages and limitations of the Codewalker-based method compared to the previous method, and provide some challenge problems for future Codewalker development.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。