In our current work a library of formally verified software components is to be created, and assembled, using the Low-Level Virtual Machine (LLVM) intermediate form, into subsystems whose top-level assurance relies on the assurance of the individual components. We have thus undertaken a project to build a translator from LLVM to the applicative subset of Common Lisp accepted by the ACL2 theorem prover. Our translator produces executable ACL2 formal models, allowing us to both prove theorems about the translated models as well as validate those models by testing. The resulting models can be translated and certified without user intervention, even for code with loops, thanks to the use of the def::ung macro which allows us to defer the question of termination. Initial measurements of concrete execution for translated LLVM functions indicate that performance is nearly 2.4 million LLVM instructions per second on a typical laptop computer. In this paper we overview the translation process and illustrate the translator's capabilities by way of a concrete example, including both a functional correctness theorem as well as a validation test for that example.
翻译:在我们目前的工作中,将建立一个由正式核查的软件组件库,并使用低级虚拟机(LLVM)中间形式,将其组装成次系统,其顶级保证依赖于各个部件的保证。因此,我们开展了一个项目,从LLVM到CCL2理论验证者所接受的通用Lisp的辅助子集,从LLLVM到通用Lisp的辅助子集的翻译。我们的翻译制作了可执行的ACL2正式模型,使我们既可以证明关于翻译模型的理论,也可以通过测试来验证这些模型。所产生的模型可以在没有用户干预的情况下进行翻译和认证,即使是在有循环的代码的情况下,也可以进行翻译和认证,因为使用 def:ung gencolors(允许我们推迟终止问题)。对翻译LLLVM函数的具体执行的初步测量显示,在典型的膝上电脑上每秒近240万LVM指令。在本文中,我们通过一个具体的例子来概述翻译过程和说明翻译的能力,包括功能正确性标语以及验证试验。