Validation is a central activity when developing formal specifications. Similarly to coding, a possible validation technique is to define upfront test cases or scenarios that a future specification should satisfy or not. Unfortunately, specifying such test cases is burdensome and error prone, which could cause users to skip this validation task. This paper reports the results of an empirical evaluation of using pre-trained large language models (LLMs) to automate the generation of test cases from natural language requirements. In particular, we focus on test cases for structural requirements of simple domain models formalized in the Alloy specification language. Our evaluation focuses on the state-of-the-art GPT-5 model, but results from other closed- and open-source LLMs are also reported. The results show that, in this context, GPT-5 is already quite effective at generating positive (and negative) test cases that are syntactically correct and that satisfy (or not) the given requirement, and that can detect many wrong specifications written by humans.


翻译:验证是开发形式化规约的核心活动。与编码类似,一种可行的验证技术是预先定义测试用例或场景,这些用例或场景应当(或不应当)被未来的规约所满足。然而,指定此类测试用例既繁琐又容易出错,可能导致用户跳过这一验证任务。本文报告了一项实证评估的结果,该评估旨在利用预训练大语言模型(LLM)从自然语言需求自动生成测试用例。我们特别关注针对简单领域模型的结构性需求所生成的测试用例,这些模型使用Alloy规约语言进行形式化描述。评估主要聚焦于当前最先进的GPT-5模型,同时也报告了其他闭源与开源LLM的结果。结果表明,在此背景下,GPT-5已能较为有效地生成语法正确、满足(或不满足)给定需求的正向(与负向)测试用例,并能检测出许多由人工编写的错误规约。

0
下载
关闭预览

相关内容

《软件定义网络元素与机器代码的形式化验证》
专知会员服务
13+阅读 · 2025年11月18日
【2023新书】程序证明,Program Proofs,642页pdf
专知会员服务
67+阅读 · 2023年3月29日
专知会员服务
34+阅读 · 2021年5月8日
智能合约的形式化验证方法研究综述
专知
16+阅读 · 2021年5月8日
异常检测论文大列表:方法、应用、综述
专知
126+阅读 · 2019年7月15日
手把手教你用LDA特征选择
AI研习社
12+阅读 · 2017年8月21日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
10+阅读 · 2013年12月31日
VIP会员
最新内容
2025年大语言模型进展报告
专知会员服务
1+阅读 · 4月25日
多智能体协作机制
专知会员服务
1+阅读 · 4月25日
非对称优势:美海军开发低成本反无人机技术
专知会员服务
4+阅读 · 4月25日
《美战争部小企业创新研究(SBIR)计划》
专知会员服务
6+阅读 · 4月25日
《军事模拟:将军事条令与目标融入AI智能体》
【NTU博士论文】3D人体动作生成
专知会员服务
7+阅读 · 4月24日
以色列军事技术对美国军力发展的持续性赋能
专知会员服务
8+阅读 · 4月24日
《深度强化学习在兵棋推演中的应用》40页报告
专知会员服务
14+阅读 · 4月24日
《多域作战面临复杂现实》
专知会员服务
10+阅读 · 4月24日
《印度的多域作战:条令与能力发展》报告
专知会员服务
5+阅读 · 4月24日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
10+阅读 · 2013年12月31日
Top
微信扫码咨询专知VIP会员