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

通过大语言模型驱动的科学调试实现可解释的自动化调试

Explainable Automated Debugging via Large Language Model-driven Scientific Debugging

Sungmin Kang, Bei Chen, Shin Yoo, Jian-Guang Lou

AI总结:

本文提出AutoSD技术,通过大语言模型生成假设并用调试器与缺陷代码交互,使自动化调试推理对齐人类开发者,从而提供可解释的补丁生成过程,实验证明其修复效果具竞争力且能提升开发者判断准确率。

摘要:

自动化调试技术有望减少开发者在调试上的工作量,并且已经足够成熟,可以被工业界采用。然而,现有技术的一个关键问题是,尽管开发者希望获得关于所提供的自动调试结果的解释,但现有技术却难以提供这些解释,因为它们的推理过程与人类开发者的推理过程截然不同。受开发者调试时与代码交互方式的启发,我们提出了自动化科学调试(AutoSD)技术。该技术在给定有缺陷的代码和揭示缺陷的测试后,会提示大语言模型自动生成假设,使用调试器主动与有缺陷的代码进行交互,从而在补丁生成之前自动得出结论。通过将自动化调试的推理过程与人类开发者的推理过程更紧密地对齐,我们旨在对特定补丁是如何生成的产生易于理解的解释,希望这种解释能带来更高效、更准确的开发者决策。我们在三个程序修复基准上的实证分析表明,AutoSD与其他程序修复基线相比表现具有竞争力,并且它能够指示何时对其结果有信心。此外,我们进行了一项包含20名参与者的人类研究,其中包括六名专业开发者,以评估AutoSD解释的实用性。能够查看解释的参与者判断补丁正确性的时间与无法查看解释的参与者大致相同,但在所研究的六个真实世界缺陷中的五个上,他们的准确率得到了提高:70%的参与者回答称在使用修复工具时希望获得解释,而55%的参与者回答称他们对科学调试的呈现方式感到满意。

英文摘要:

Automated debugging techniques have the potential to reduce developer effort in debugging, and have matured enough to be adopted by industry. However, one critical issue with existing techniques is that, while developers want rationales for the provided automatic debugging results, existing techniques are ill-suited to provide them, as their deduction process differs significantly from that of human developers. Inspired by the way developers interact with code when debugging, we propose Automated Scientific Debugging (AutoSD), a technique that given buggy code and a bug-revealing test, prompts large language models to automatically generate hypotheses, uses debuggers to actively interact with buggy code, and thus automatically reach conclusions prior to patch generation. By aligning the reasoning of automated debugging more closely with that of human developers, we aim to produce intelligible explanations of how a specific patch has been generated, with the hope that the explanation will lead to more efficient and accurate developer decisions. Our empirical analysis on three program repair benchmarks shows that AutoSD performs competitively with other program repair baselines, and that it can indicate when it is confident in its results. Furthermore, we perform a human study with 20 participants, including six professional developers, to evaluate the utility of explanations from AutoSD. Participants with access to explanations could judge patch correctness in roughly the same time as those without, but their accuracy improved for five out of six real-world bugs studied: 70% of participants answered that they wanted explanations when using repair tools, while 55% answered that they were satisfied with the Scientific Debugging presentation.

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

↑