paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Hetrify: Efficient Verification of Heterogeneous Programs on RISC-V

Hetrify:RISC-V 上异构程序的高效验证
ICSE 2025 IEEE/ACM 47th International Conference on Software Engineering (ICSE)2025匹配度 3/10 · 论文属于程序验证/形式化方法,关注异构程序在 RISC-V 上的二进制到可验证 C 的语义等价转换,与程序分析和形式化验证有邻接关系;但未涉及 LLM/Agent、ML/Agentic 程序静态分析、浮点程序分析或贝叶斯程序分析,也未体现 AI 与 PL 的交叉。引用 2 inbox
Yiwei Li, Liangze Yin, Wei Dong, Jiaxin Liu, Yanfeng Hu, Shanshan Li
crossref: 2026-09-12

AI 速览

一句话:提出 Hetrify,将异构程序或不可验证片段编译为二进制并语义等价转换为可验证 C 代码,在 RISC-V 上实现高效验证。

当代软件常包含闭源库、嵌入式汇编片段和多语言模块等异构组件,给程序验证带来显著挑战,目前缺乏成熟可用的方法。本文提出一种通用验证方法:先将整个程序或其中不可验证的片段编译为二进制,并在保证语义等价的前提下把这些二进制转换为可验证的 C 代码,随后利用现有 C 验证工具完成验证。该方法理论上适用于任何可编译为二进制代码的异构程序,不受具体编程语言限制。作者基于 RISC-V 架构实现了工具 Hetrify,并给出严格数学证明,确保转换所得 C 程序与原程序之间操作语义等价。评估在 130 个程序上进行,包括 100 个汇编程序和 30 个缺少关键函数源码的大型异构程序,结果表明该方法有效。

问题
异构程序由闭源库、嵌入式汇编和多语言模块等组成,现有方法难以有效验证,尤其当关键片段缺少源码时。
方法
将整个程序或不可验证片段编译为二进制,在保持语义等价的前提下转换为可验证 C 代码,再交由现有 C 验证工具验证,并基于 RISC-V 实现工具 Hetrify。
评估
在 130 个程序上开展验证实验,包括 100 个汇编程序和 30 个缺少关键函数源码的大型异构程序,展示方法的有效性。
原文摘要(Abstract)

The heterogeneous nature of contemporary software, comprising components like closed-source libraries, embedded assembly snippets, and modules written in multiple programming languages, leads to significant verification challenges. Currently, there are no mature and available methods to effectively address such problems. To bridge this gap, we propose a verification approach capable of effectively verifying heterogeneous programs. This approach is universally applicable. It theoretically supports the verification of any heterogeneous program that can be compiled into binary code, without being constrained by any specific programming language. The approach begins by compiling the entire program or its unverifiable segments into binary format. Under guarantees of semantic equivalence, these binaries are converted into verifiable C code, which can then be verified using existing C verification tools. Based on the RISC-V architecture, we developed the Hetrify tool to implement this verification approach. The tool is supported by rigorous mathematical proofs to ensure operational semantic equivalence between the converted C programs and their original counterparts. To validate our approach, we conducted verification experiments on 130 programs, including 100 assembly programs and 30 large heterogeneous programs with missing critical function source code, demonstrating the effectiveness of our approach.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot8857,
  title = {Hetrify: Efficient Verification of Heterogeneous Programs on RISC-V},
  author = {Yiwei Li and Liangze Yin and Wei Dong and Jiaxin Liu and Yanfeng Hu and Shanshan Li},
  booktitle = {ICSE},
  year = {2025},
  doi = {10.1109/icse55347.2025.00081}
}