IsaBIL:一个在Isabelle/HOL中验证二进制(不)正确性的框架(扩展版)
IsaBIL: A Framework for Verifying (In)correctness of Binaries in Isabelle/HOL (Extended Version)
AI总结:
IsaBIL是一个基于BAP的Isabelle/HOL二进制分析框架,集成霍尔逻辑与不正确性逻辑,支持多语言多架构验证,并通过大步骤规则和证明策略实现高效自动化验证。
摘要:
本文介绍了IsaBIL,一个基于广泛使用的二进制分析平台(BAP)的Isabelle/HOL二进制分析框架。具体而言,在IsaBIL中,我们形式化了BAP的中间语言BIL,并将其与霍尔逻辑(用于证明正确性)以及不正确性逻辑(用于证明不正确性)集成。IsaBIL继承了BAP的全部灵活性,使我们能够验证多种语言(C、C++、Rust)、工具链(LLVM、Ghidra)和目标架构(x86、RISC-V)的二进制,并且当二进制源代码不可用时也可使用。为了使验证易于处理,我们开发了许多大步骤规则,这些规则在不同抽象级别上结合BIL现有的小步骤规则以支持重用。我们为RISC-V指令(我们的主要目标架构)开发了高级推理规则,以进一步优化验证。此外,我们开发了Isabelle证明策略,利用RISC-V的C二进制中的常见模式自动处理大量证明目标(通常数百个)。IsaBIL包含一个基于Isabelle/ML的BIL程序解析器,允许从BAP输出自动生成相关的Isabelle/HOL程序区域。总之,IsaBIL为程序二进制提供了一个高度灵活的证明环境。作为示例,我们证明了联合打击战斗机编码标准和MITRE数据库中的关键示例的正确性。
英文摘要:
This paper presents IsaBIL, a binary analysis framework in Isabelle/HOL that is based on the widely used Binary Analysis Platform (BAP). Specifically, in IsaBIL, we formalise BAP's intermediate language, called BIL and integrate it with Hoare logic (to enable proofs of correctness) as well as incorrectness logic (to enable proofs of incorrectness). IsaBIL inherits the full flexibility of BAP, allowing us to verify binaries for a wide range of languages (C, C++, Rust), toolchains (LLVM, Ghidra) and target architectures (x86, RISC-V), and can also be used when the source code for a binary is unavailable. To make verification tractable, we develop a number of big-step rules that combine BIL's existing small-step rules at different levels of abstraction to support reuse. We develop high-level reasoning rules for RISC-V instructions (our main target architecture) to further optimise verification. Additionally, we develop Isabelle proof tactics that exploit common patterns in C binaries for RISC-V to discharge large numbers of proof goals (often in the 100s) automatically. IsaBIL includes an Isabelle/ML based parser for BIL programs, allowing one to automatically generate the associated Isabelle/HOL program locale from a BAP output. Taken together, IsaBIL provides a highly flexible proof environment for program binaries. As examples, we prove correctness of key examples from the Joint Strike Fighter coding standards and the MITRE database.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。