arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2512.06442cs.PL
收藏

Nice to Meet You: 合成实用MLIR抽象转换器

Nice to Meet You: Synthesizing Practical MLIR Abstract Transformers

University of California San Diego(加利福尼亚大学圣地亚哥分校);University of Utah(犹他大学)

Xuanyu Peng, Dominic Kennedy, Yuyou Fan, Ben Greenman, John Regehr, Loris D'Antoni

AI总结:

NiceToMeetYou通过批量自动化合成准确且高效的MLIR抽象转换器,提升编译器的精度和可靠性。

摘要:

在编译过程中,静态分析起着基础性作用:它们发现代码执行中始终为真的事实,然后这些事实被用来证明优化和诊断。每个静态分析都基于一组抽象转换器,这些转换器为构成程序的具体指令提供抽象语义。实现既准确又高效的抽象转换器具有挑战性,事实上,LLVM和GCC都因不准确的抽象转换器而遭受了错误编译。此外,尽管已经发展了20多年,LLVM在中间表示(IR)中仍然缺少数百个指令的抽象转换器。我们开发了NiceToMeetYou,一个用于合成抽象转换器的程序合成框架,旨在针对当前生产编译器广泛使用的非关系整数抽象域。它利用一种简单但新颖的技术将合成问题分解为部分:我们的每个转换器是多个更简单的、准确的转换器的meet,这些转换器被合成,使得每个新部分填补最终转换器的精度缺口。我们的设计重点是批量自动化:不需要草图。转换器通过降低到之前创建的MLIR SMT方言进行验证。我们合成的每个转换器都可证明是准确的,其中一些(17%)比LLVM提供的更精确。

英文摘要:

Static analyses play a fundamental role during compilation: they discover facts that are true in all executions of the code being compiled, and then these facts are used to justify optimizations and diagnostics. Each static analysis is based on a collection of abstract transformers that provide abstract semantics for the concrete instructions that make up a program. It can be challenging to implement abstract transformers that are sound, precise, and efficient, and in fact both LLVM and GCC have suffered from miscompilations caused by unsound abstract transformers. Moreover, even after more than 20 years of development, LLVM lacks abstract transformers for hundreds of instructions in its intermediate representation (IR). We developed NiceToMeetYou, a program synthesis framework for abstract transformers that are aimed at the kinds of non-relational integer abstract domains that are heavily used by today's production compilers. It exploits a simple but novel technique for breaking the synthesis problem into parts: each of our transformers is the meet of a collection of simpler, sound transformers that are synthesized such that each new piece fills a gap in the precision of the final transformer. Our design point is bulk automation: no sketches are required. Transformers are verified by lowering to a previously created SMT dialect of MLIR. Each of our synthesized transformers is provably sound and some (17 percent) are more precise than those provided by LLVM.

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

↑