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.
翻译:本文报告了使用J Moore 的代码行人进行初步实验以解释编成低级虚拟机(LLVM)中间形式的程序的初步实验。以前,我们报告了从LLVM到ACL2理论验证者所接受的通用激光器应用子集的翻译,制作了可执行的ACL2正式模型,使我们既能证明关于翻译模型的理论,又能通过测试来验证这些模型。该翻译提供了纯分解逻辑方法的许多好处,但却有不核实的缺点。CCL2 7.0的代码行人可用性为重新审视这一想法提供了机会,并使用一种更可靠的解析逻辑工具。因此,我们使用代码行人法方法为LLVM教学集的一个子组创建了口译员,并使用代码行人法来分析编成LLVM格式的一些简单基于阵列的C程序。我们讨论了以代码行人法为基础的方法与以往方法相比的优点和局限性,并为未来的代码行人发展提供了一些难题。