arXivDaily arXiv每日学术速递 周一至周五更新
北美退伍军人节(Veterans Day),12 日无更新
arXiv 1709.04421cs.PL
收藏

活性驱动的随机程序生成

Liveness-Driven Random Program Generation

Gergö Barany

摘要:

随机生成的程序在测试编译器和程序分析工具中很受欢迎,通过随机测试发现了真实C编译器中的数百个错误。然而,现有的随机程序生成器可能会生成大量的死代码(其结果永远不会被使用的计算)。这使得相对较少的代码可以执行目标编译器的更复杂的优化。为了解决这个缺点,我们引入了活性驱动的随机程序生成。在这种方法中,随机程序是自底向上构造的,由同步结构数据流分析指导,以确保生成器永远不会生成死代码。该算法被实现为一个插件的框架框架。我们评估它相比,Csmith,标准的随机C程序生成器。我们的工具生成的程序可以编译成具有更复杂指令组合的更多机器码。

英文摘要:

Randomly generated programs are popular for testing compilers and program analysis tools, with hundreds of bugs in real-world C compilers found by random testing. However, existing random program generators may generate large amounts of dead code (computations whose result is never used). This leaves relatively little code to exercise a target compiler's more complex optimizations. To address this shortcoming, we introduce liveness-driven random program generation. In this approach the random program is constructed bottom-up, guided by a simultaneous structural data-flow analysis to ensure that the generator never generates dead code. The algorithm is implemented as a plugin for the Frama-C framework. We evaluate it in comparison to Csmith, the standard random C program generator. Our tool generates programs that compile to more machine code with a more complex instruction mix.

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

↑