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

预训练大语言模型修复声明式形式规约的实证评估

An Empirical Evaluation of Pre-trained Large Language Models for Repairing Declarative Formal Specifications

Mohannad Alhanahnah, Md Rashedul Hasan, Lisong Xu, Hamid Bagheri

AI总结:

本研究首次实证评估大语言模型修复声明式形式规约的能力,设计含单/双智能体、自动提示等的12种修复设置,发现带自动提示的双智能体方案优于现有Alloy APR技术,为软件工程中基于智能体的技术奠定基础。

摘要:

自动程序修复(APR)作为专注于自动修复程序中漏洞的实用研究领域,已受到广泛关注。现有APR技术主要针对C、Java等命令式编程语言,而适用于声明式软件规约语言的有效解决方案需求日益增长。本文系统研究了大语言模型(LLM)修复Alloy中声明式规约的能力,Alloy是一种用于软件规约的声明式形式化语言。我们设计了12种不同的修复设置,涵盖单智能体和双智能体范式,使用了多种LLM。这些配置还融入了不同层级的反馈,包括一种利用LLM自主生成提示词的自动提示机制。研究表明,带自动提示的双智能体设置表现优于其他设置,尽管迭代次数和token用量略有增加。在一套全面的基准测试上评估时,该双智能体设置相比最先进的Alloy APR技术展现出更优的效果。本研究首次对LLM修复声明式规约的能力进行实证评估,同时纳入了基于LLM的智能体、反馈、自动提示和工具等近期热门的LLM概念,为软件工程中未来基于智能体的技术铺平了道路。

英文摘要:

Automatic Program Repair (APR) has garnered significant attention as a practical research domain focused on automatically fixing bugs in programs. While existing APR techniques primarily target imperative programming languages like C and Java, there is a growing need for effective solutions applicable to declarative software specification languages. This paper systematically investigates the capacity of Large Language Models (LLMs) to repair declarative specifications in Alloy, a declarative formal language used for software specification. We designed 12 different repair settings, encompassing single-agent and dual-agent paradigms, utilizing various LLMs. These configurations also incorporate different levels of feedback, including an auto-prompting mechanism for generating prompts autonomously using LLMs. Our study reveals that dual-agent with auto-prompting setup outperforms the other settings, albeit with a marginal increase in the number of iterations and token usage. This dual-agent setup demonstrated superior effectiveness compared to state-of-the-art Alloy APR techniques when evaluated on a comprehensive set of benchmarks. This work is the first to empirically evaluate LLM capabilities to repair declarative specifications, while taking into account recent trending LLM concepts such as LLM-based agents, feedback, auto-prompting, and tools, thus paving the way for future agent-based techniques in software engineering.

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

↑