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

面向代理的运行时自愈

Towards Agentic Runtime Healing

Singapore Management University(新加坡国立大学);North Carolina State University(北卡罗来纳州立大学);Monash University(墨尔本大学);Beihang University(北航)

Zhensu Sun, Haotian Zhu, Bowen Xu, Xiaoning Du, Li Li, David Lo

AI总结:

本文提出利用大语言模型实现动态生成错误处理策略,通过Healer框架在四个代码数据集上验证了其在运行时错误恢复中的有效性,展示了LLM在自愈系统中的潜力。

摘要:

自愈系统长期以来一直是研究的重点,旨在使软件能够在不需人工干预的情况下从意外的运行时错误中恢复。传统方法依赖于预定义的启发式规则,例如重用错误处理程序或回滚到检查点,但这些方法在适应广泛范围的运行时错误方面存在困难。大型语言模型的出现为解决这一挑战提供了新的机会。利用其理解和生成代码及自然语言的能力,我们提出利用LLM动态生成错误处理策略,以适应特定的运行时上下文,如错误信息和程序状态。我们通过设计这样的框架Healer并实证表明,它能够以高成功率处理运行时错误。当发生意外的运行时错误时,Healer利用其内部LLM生成定制的错误处理代码。生成的修复代码随后被执行,以产生纠正后的程序状态,使程序能够继续执行,且干扰最小。我们评估了Healer在四个代码数据集和三个最先进的LLM(GPT-3.5、GPT-4和CodeQwen-7B)上的表现,其中GPT-4能够成功从72.8%的运行时错误中恢复,凸显了LLM在此领域的潜力。尽管这些有希望的结果,仍然存在挑战,特别是关于LLM生成代码的可信度及其在现有系统中的集成。我们提到了潜在的解决方案,如安全检查和Healer-aware编程,以缓解风险并确保可靠运行。本工作代表了代理运行时自愈的第一步,为更适应、坚韧和自愈的软件系统铺平了道路。

英文摘要:

Self-healing systems have long been a focus of research, aiming to enable software to recover from unexpected runtime errors without human intervention. Traditional approaches rely on predefined heuristic rules, such as reusing error handlers or rolling back to checkpoints, but these methods struggle to adapt to the diverse range of runtime errors. The emergence of Large Language Models offers a new opportunity to address this challenge. Leveraging their ability to understand and generate code and natural language, we propose using LLMs to dynamically generate error-handling strategies in real time, tailored to specific runtime contexts such as error messages and program states. We demonstrate the feasibility of this approach by designing such a framework, Healer, and empirically showing that it can handle runtime errors with a high success rate. When an unanticipated runtime error occurs, Healer leverages its internal LLM to generate bespoke error-handling code. The generated healing code is then executed to produce a corrected program state, allowing the program to continue execution with minimal disruption. We evaluate Healer across four code datasets and three state-of-the-art LLMs (GPT-3.5, GPT-4, and CodeQwen-7B), where GPT-4 can successfully recover from 72.8% of runtime errors, underscoring the promise of LLMs in this domain. Despite these promising results, challenges remain, particularly regarding the trustworthiness of LLM-generated code and its integration into existing systems. We mention potential solutions, such as safety checks and Healer-aware programming, to mitigate risks and ensure reliable operation. This work represents the first step toward agentic runtime healing, paving the way for more adaptive, resilient, and self-healing software systems.

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

↑