Skip to main content
CenXiv.org
此网站处于试运行阶段,支持我们!
我们衷心感谢所有贡献者的支持。
贡献
赞助
cenxiv logo > cs > arXiv:2502.15441v1

帮助 | 高级搜索

计算机科学 > 软件工程

arXiv:2502.15441v1 (cs)
[提交于 2025年2月21日 ]

标题: 大型语言模型在编写合金公式中的有效性

标题: On the Effectiveness of Large Language Models in Writing Alloy Formulas

Authors:Yang Hong, Shan Jiang, Yulei Fu, Sarfraz Khurshid
摘要: 声明性规范在开发安全和可靠的软件系统中起着至关重要的作用。然而,正确编写规范仍然是一个特别具有挑战性的问题。本文介绍了一个控制实验,研究使用大型语言模型(LLMs)在著名的Alloy语言中编写声明性公式。我们对LLMs的使用有三个方面的应用。第一,我们利用LLMs从给定的自然语言描述(英文)中编写完整的Alloy公式。第二,我们利用LLMs根据给定的Alloy公式创建替代但等效的Alloy公式。第三,我们利用LLMs完成Alloy公式的草图,并通过合成Alloy表达式和运算符来填充草图中的空白,使得完成的公式准确地表示所需的属性(这些属性以自然语言给出)。我们使用11个广泛研究的受试规范进行实验评估,并采用两种流行的LLMs,即ChatGPT和DeepSeek。实验结果表明,LLMs在从以自然语言或Alloy形式给出的输入属性中合成完整的Alloy公式方面表现良好,并能够枚举多个唯一的解决方案。此外,LLMs在根据所需属性的自然语言描述完成给定的Alloy公式草图方面也取得了成功(无需测试用例)。我们认为,LLMs在我们编写规范的能力方面提供了一个非常令人兴奋的进展,并可以帮助使规范在软件开发中发挥关键作用,并增强我们构建健壮软件的能力。
摘要: Declarative specifications have a vital role to play in developing safe and dependable software systems. Writing specifications correctly, however, remains particularly challenging. This paper presents a controlled experiment on using large language models (LLMs) to write declarative formulas in the well-known language Alloy. Our use of LLMs is three-fold. One, we employ LLMs to write complete Alloy formulas from given natural language descriptions (in English). Two, we employ LLMs to create alternative but equivalent formulas in Alloy with respect to given Alloy formulas. Three, we employ LLMs to complete sketches of Alloy formulas and populate the holes in the sketches by synthesizing Alloy expressions and operators so that the completed formulas accurately represent the desired properties (that are given in natural language). We conduct the experimental evaluation using 11 well-studied subject specifications and employ two popular LLMs, namely ChatGPT and DeepSeek. The experimental results show that the LLMs generally perform well in synthesizing complete Alloy formulas from input properties given in natural language or in Alloy, and are able to enumerate multiple unique solutions. Moreover, the LLMs are also successful at completing given sketches of Alloy formulas with respect to natural language descriptions of desired properties (without requiring test cases). We believe LLMs offer a very exciting advance in our ability to write specifications, and can help make specifications take a pivotal role in software development and enhance our ability to build robust software.
主题: 软件工程 (cs.SE)
引用方式: arXiv:2502.15441 [cs.SE]
  (或者 arXiv:2502.15441v1 [cs.SE] 对于此版本)
  https://doi.org/10.48550/arXiv.2502.15441
通过 DataCite 发表的 arXiv DOI

提交历史

来自: Shan Jiang [查看电子邮件]
[v1] 星期五, 2025 年 2 月 21 日 13:09:58 UTC (122 KB)
全文链接:

获取论文:

    查看标题为《》的 PDF
  • 查看中文 PDF
  • 查看 PDF
  • HTML(实验性)
  • TeX 源代码
  • 其他格式
查看许可
当前浏览上下文:
cs.SE
< 上一篇   |   下一篇 >
新的 | 最近的 | 2025-02
切换浏览方式为:
cs

参考文献与引用

  • NASA ADS
  • 谷歌学术搜索
  • 语义学者
a 导出 BibTeX 引用 加载中...

BibTeX 格式的引用

×
数据由提供:

收藏

BibSonomy logo Reddit logo

文献和引用工具

文献资源探索 (什么是资源探索?)
连接的论文 (什么是连接的论文?)
Litmaps (什么是 Litmaps?)
scite 智能引用 (什么是智能引用?)

与本文相关的代码,数据和媒体

alphaXiv (什么是 alphaXiv?)
CatalyzeX 代码查找器 (什么是 CatalyzeX?)
DagsHub (什么是 DagsHub?)
Gotit.pub (什么是 GotitPub?)
Hugging Face (什么是 Huggingface?)
带有代码的论文 (什么是带有代码的论文?)
ScienceCast (什么是 ScienceCast?)

演示

复制 (什么是复制?)
Hugging Face Spaces (什么是 Spaces?)
TXYZ.AI (什么是 TXYZ.AI?)

推荐器和搜索工具

影响之花 (什么是影响之花?)
核心推荐器 (什么是核心?)
IArxiv 推荐器 (什么是 IArxiv?)
  • 作者
  • 地点
  • 机构
  • 主题

arXivLabs:与社区合作伙伴的实验项目

arXivLabs 是一个框架,允许合作伙伴直接在我们的网站上开发和分享新的 arXiv 特性。

与 arXivLabs 合作的个人和组织都接受了我们的价值观,即开放、社区、卓越和用户数据隐私。arXiv 承诺这些价值观,并且只与遵守这些价值观的合作伙伴合作。

有一个为 arXiv 社区增加价值的项目想法吗? 了解更多关于 arXivLabs 的信息.

这篇论文的哪些作者是支持者? | 禁用 MathJax (什么是 MathJax?)
  • 关于
  • 帮助
  • contact arXivClick here to contact arXiv 联系
  • 订阅 arXiv 邮件列表点击这里订阅 订阅
  • 版权
  • 隐私政策
  • 网络无障碍帮助
  • arXiv 运营状态
    通过...获取状态通知 email 或者 slack

京ICP备2025123034号