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

大型语言模型在生成软件规约方面的有效性如何?

How Effective are Large Language Models in Generating Software Specifications?

Danning Xie, Byungwoo Yoo, Nan Jiang, Mijung Kim, Lin Tan, Xiangyu Zhang, Judy S. Lee

AI总结:

本文首次实证评估了大型语言模型从软件注释或文档生成软件规约的能力,通过少样本学习在三个公开数据集上比较13个LLMs与传统方法,并诊断失败案例以揭示各自优劣,为改进规约生成提供指导。

摘要:

软件规约对于许多软件工程(SE)任务(如缺陷检测和测试生成)至关重要。许多现有方法被提出用于将以自然语言形式定义的规约(例如注释)提取为形式化的机器可读形式(例如一阶逻辑)。然而,现有方法存在泛化能力有限的问题,并且需要人工努力。最近出现的、已成功应用于众多SE任务的大型语言模型(LLMs),为自动化这一过程提供了一条有前景的途径。在本文中,我们开展了首个实证研究,以评估LLMs从软件注释或文档生成软件规约的能力。我们使用少样本学习(FSL)评估LLMs的性能,并在三个公开数据集上将13个最先进的LLMs与传统方法的性能进行比较。此外,我们对来自LLMs和传统方法的失败案例进行了对比诊断,识别出它们各自的优势与不足。我们的研究为未来改进规约生成的研究提供了有价值的见解。

英文摘要:

Software specifications are essential for many Software Engineering (SE) tasks such as bug detection and test generation. Many existing approaches are proposed to extract the specifications defined in natural language form (e.g., comments) into formal machine readable form (e.g., first order logic). However, existing approaches suffer from limited generalizability and require manual efforts. The recent emergence of Large Language Models (LLMs), which have been successfully applied to numerous SE tasks, offers a promising avenue for automating this process. In this paper, we conduct the first empirical study to evaluate the capabilities of LLMs for generating software specifications from software comments or documentation. We evaluate LLMs performance with Few Shot Learning (FSL) and compare the performance of 13 state of the art LLMs with traditional approaches on three public datasets. In addition, we conduct a comparative diagnosis of the failure cases from both LLMs and traditional methods, identifying their unique strengths and weaknesses. Our study offers valuable insights for future research to improve specification generation.

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

↑