Can Generative AI Enhance the Effectiveness of N-Version Programming?
摘要
N-version programming (NVP) is a classical fault-tolerance technique that enhances software reliability by executing multiple independently developed program variants in parallel. Despite its effectiveness, NVP has seen limited adoption in practice due to its high development cost. With the emergence of large language models (LLMs), generative AI offers a new opportunity to automate the creation of diverse program variants. But can generative AI truly enhance the effectiveness of NVP? In this paper, we attempt to answer this question through an empirical evaluation of LLM-generated code, focusing on two key factors: correctness and diversity. We explore the impact of model quality by comparing high-performing (e.g., GPT-4o) and lower-performing LLMs, and evaluate two diversity-promoting strategies; i.e., temperature tuning and conversation history reuse. Our results show that generative AI can improve NVP effectiveness when using high-quality models, enabling more reliable outcomes through majority voting. However, the benefits are limited with lower-accuracy models. Furthermore, while diversity can be increased by adjusting temperature and leveraging conversation history, such measures do not always translate into improved reliability. These findings highlight both the promise and the limitations of incorporating generative AI into fault-tolerant software development workflows.