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

Galapagos:利用大语言模型实现自动化N版本编程

Galapagos: Automated N-Version Programming with LLMs

KTH Royal Institute of Technology(皇家理工学院)

Javier Ron, Diogo Gaspar, Javier Cabrera-Arteaga, Benoit Baudry, Martin Monperrus

AI总结:

Galapagos利用大语言模型自动化生成功能等价的N版本编程变体,有效提升容错系统开发效率。

摘要:

N版本编程是一种已知的开发容错系统的方法。它通过在程序中添加多样化的冗余来实现运行时的故障检测和纠正,最小化冗余程序变体之间的故障模式重叠。在本工作中,我们提出利用大语言模型自动生成功能变体。我们设计、开发并评估了Galápagos:一个利用LLM生成程序变体、验证其正确性和等价性,并用于组装N版本二进制文件的工具。我们通过创建真实世界C代码的N版本组件来评估Galápagos。我们的原始结果表明,Galápagos能够生成被证明功能等价的程序变体,即使这些变体是用不同的编程语言编写的。我们的系统多样性测量表明,由Galápagos生成的功能等价变体在编译后静态上不同,并在运行时表现出不同的内部行为。我们展示了由Galápagos生成的变体能够保护C代码免受影响Clang编译器的现实编译错误的影响。总体而言,我们的论文表明,通过使用实际的形式验证和生成语言模型,N版本软件的生成可以大幅自动化。

英文摘要:

N-Version Programming is a well-known methodology for developing fault-tolerant systems. It achieves fault detection and correction at runtime by adding diverse redundancy into programs, minimizing fault mode overlap between redundant program variants. In this work, we propose the automated generation of program variants using large language models. We design, develop and evaluate Galápagos: a tool for generating program variants using LLMs, validating their correctness and equivalence, and using them to assemble N-Version binaries. We evaluate Galápagos by creating N-Version components of real-world C code. Our original results show that Galápagos can produce program variants that are proven to be functionally equivalent, even when the variants are written in a different programming language. Our systematic diversity measurement indicates that functionally equivalent variants produced by Galápagos, are statically different after compilation, and present diverging internal behavior at runtime. We demonstrate that the variants produced by Galápagos can protect C code against real miscompilation bugs which affect the Clang compiler. Overall, our paper shows that producing N-Version software can be drastically automated by advanced usage of practical formal verification and generative language models.

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

↑