arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2401.16797cs.PLcs.SE
收藏

利用大语言模型增强编译器转换的翻译验证

Enhancing Translation Validation of Compiler Transformations with Large Language Models

Yanzhao Wang, Fei Xie

AI总结:

本研究提出融合大语言模型的编译器转换翻译验证框架,以Alive2为基础工具,借助微调LLM预判转换可靠性并结合模糊测试找反例,解决传统形式化工具在LLVM转换等复杂场景的验证局限。

摘要:

本文提出了一个将大语言模型(LLMs)整合到翻译验证中的框架,针对形式化验证工具难以胜任的LLVM编译器转换场景。我们的框架首先利用现有形式化验证工具开展翻译验证,本研究以LLVM编译器验证领域的知名工具Alive2为例。当形式化验证工具无法确认某一转换的可靠性时,框架采用经过微调的LLMs进行预测。对于LLMs判定为因返回值或内存不一致而可能不可靠的转换,框架会应用模糊测试以寻找反例。若转换因其他原因不可靠、本身可靠,或未找到反例,框架将直接报告这些结果,不再进行额外模糊测试。该方法在深度学习加速器设计等传统形式化验证工具难以应对的复杂应用中已展现出有效性。

英文摘要:

This paper presents a framework that integrates Large Language Models (LLMs) into translation validation, targeting LLVM compiler transformations where formal verification tools fall short. Our framework first utilizes existing formal verification tools for translation validation. In this work, we use Alive2, a well-known tool in LLVM compiler verification, as an example. When formal verification tools are unable to confirm a transformation's soundness, our framework employs fine-tuned LLMs for prediction. It then applies fuzzing to transformations predicted as potentially unsound by the LLMs due to return values or memory inconsistencies, aiming to find counterexamples. In cases where transformations are unsound for other reasons or sound, or if no counterexamples emerge, the framework directly reports these outcomes without further fuzzing. This methodology has shown effectiveness in complex application such as deep-learning accelerator designs, where traditional formal verification tools struggle.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑