Test or prove? These two approaches to software verification have long been presented as opposites. One is dynamic, the other static: a test executes the program, a proof only analyzes the program text. A different perspective is emerging, in which testing and proving are complementary rather than competing techniques for producing software of verified quality. Work performed over the past few years and reviewed here develops this complementarity by taking advantage of Design by Contract, as available in Eiffel, and exploiting a feature of modern program-proving tools based on ``Satisfiability Modulo Theories'' (SMT): counterexample generation. A counterexample is an input combination that makes the program fail. If we are trying to prove a program correct, we hope not to find any. One can, however, apply counterexample generation to incorrect programs, as a tool for automatic test generation. We can also introduce faults into a correct program and turn the counterexamples into an automatically generated regression test suite with full coverage. Additionally, we can use these mechanisms to help produce program fixes for incorrect programs, with a guarantee that the fixes are correct. All three applications, leveraging on the mechanisms of Eiffel and Design by Contract, hold significant promise to address some of the challenges of program testing, software maintenance and Automatic Program Repair.


翻译:测试还是证明?这两种软件验证方法长期以来被视为对立面。一种是动态的,另一种是静态的:测试执行程序,而证明仅分析程序文本。一种新的视角正在浮现,即测试与证明是互补而非竞争的技术,共同用于生产具有验证质量的软件。过去几年开展并在此综述的研究工作,通过利用Eiffel语言中的契约式设计特性,并基于“可满足性模理论”(SMT)的现代程序证明工具的反例生成功能,发展了这种互补性。反例是导致程序失败的输入组合。当我们试图证明程序正确时,我们希望找不到任何反例。然而,我们可以将反例生成应用于错误程序,作为自动测试生成工具。我们还可以向正确程序中引入故障,并将反例转化为具有完全覆盖率的自动生成的回归测试套件。此外,我们可以利用这些机制帮助为错误程序生成修复方案,并保证修复的正确性。这三种应用均基于Eiffel语言和契约式设计的机制,有望显著应对程序测试、软件维护和自动程序修复领域的一些挑战。

0
下载
关闭预览

相关内容

软件(中国大陆及香港用语,台湾作软体,英文:Software)是一系列按照特定顺序组织的计算机数据和指令的集合。一般来讲软件被划分为编程语言、系统软件、应用软件和介于这两者之间的中间件。软件就是程序加文档的集合体。
《软件定义网络元素与机器代码的形式化验证》
专知会员服务
12+阅读 · 2025年11月18日
【新书】使用生成式人工智能进行软件测试
专知会员服务
44+阅读 · 2025年1月6日
《综述:测试与评估中应用的人工智能工具》
专知会员服务
73+阅读 · 2024年1月22日
【2023新书】程序证明,Program Proofs,642页pdf
专知会员服务
67+阅读 · 2023年3月29日
《学习型系统的测试与评估》
专知会员服务
60+阅读 · 2023年3月12日
智能合约的形式化验证方法研究综述
专知
16+阅读 · 2021年5月8日
Bert最新进展,继续在NLP各领域开花结果!
机器学习算法与Python学习
20+阅读 · 2019年6月11日
NetworkMiner - 网络取证分析工具
黑白之道
16+阅读 · 2018年6月29日
《软件方法》1-8章全部自测题更新内容
UMLChina
11+阅读 · 2018年3月26日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
10+阅读 · 2013年12月31日
国家自然科学基金
11+阅读 · 2013年12月31日
VIP会员
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
10+阅读 · 2013年12月31日
国家自然科学基金
11+阅读 · 2013年12月31日
Top
微信扫码咨询专知VIP会员