[论文解读] Expressing and verifying embedded software requirements.
本文提出 AutoReq,一种通过在编程语言中使用形式化断言,直接以代码表达嵌入式软件需求的方法,使借助 AutoProof 等程序验证工具实现早期验证成为可能。通过整合契约式设计与霍尔风格逻辑,该方法确保了一致性,并在着陆 gear 系统案例研究中通过机械验证的正确性证明,展示了早期发现错误的能力。
Writing requirements for embedded software is pointless unless they reflect actual needs and the final software implements them. In usual approaches, the use of different notations for requirements (often natural language) and code (a programming language) makes both conditions elusive. To address the problem, we propose to write requirements in the programming language itself. The expected advantages of this seamless approach, called AutoReq include: avoiding the potentially costly miss due to the use of different notations; facilitating software change and evolution, by making it easier to update code when requirements change and conversely; benefiting from the remarkable expressive power of modern object-oriented programming languages, while retaining a level of abstraction appropriate for requirements; leveraging, in both requirements and code, the ideas of Design by Contract, including (as the article shows) applying Hoare-style assertions to express temporal-logic-style properties and timing constraints; and taking advantage of the powerful verification tools that have been developed in recent years. The last goal, verification, is a focus of this article. While the idea of verifying requirements is not widely applied, the use of a precise formalism and a modern program prover (in our case, AutoProof for Eiffel) makes it possible at a very early stage to identify errors and inconsistencies which would, if not caught in the requirements, contaminate the final code. Applying the approach to a well-documented industrial example (a landing gear system) allowed a mechanical proof of consistency and uncovered an error in a previously published discussion of the problem.
研究动机与目标
- 为弥合非形式化自然语言需求与形式化代码之间的差距,通过单一符号统一二者。
- 通过在需求和实现中使用不同符号造成的昂贵误解。
- 通过形式化验证需求,实现在开发早期检测不一致性和错误。
- 利用现代程序证明工具,在实现开始前验证需求。
- 证明在编程语言中使用形式化断言编写需求的可行性和优势。
提出的方法
- 使用面向对象结构和形式化契约,在编程语言(Eiffel)中直接表达需求。
- 应用霍尔风格断言,在代码中指定时序和时序属性。
- 使用 AutoProof 验证器,对代码中作为断言表达的需求进行形式化验证。
- 通过契约式设计原则,确保在需求级别实现正确性和一致性。
- 将自然语言需求映射为精确、可执行且可验证的编程语言断言。
- 在真实工业案例(着陆 gear 控制系统)上验证该方法。
实验结果
研究问题
- RQ1能否通过编程语言和形式化断言有效表达并验证嵌入式软件需求?
- RQ2与传统的自然语言方法相比,在代码中表达需求是否能降低不一致性和错误的风险?
- RQ3现代程序证明工具在开发早期阶段在多大程度上能够验证需求?
- RQ4在需求和代码中使用统一符号如何影响软件演化和维护?
- RQ5对需求的形式化验证能否发现以往非形式化分析中未察觉的错误?
主要发现
- AutoReq 方法实现了对一个着陆 gear 系统的机械验证一致性证明,展示了形式化需求验证的可行性。
- 通过形式化验证需求,在先前发表的着陆 gear 系统分析中发现了一个错误。
- 在编程语言中使用断言,使得时序和时序逻辑属性得以精确表达。
- 在需求阶段的形式化验证识别出将传播至最终实现的不一致性。
- 契约式设计与程序证明工具的集成,实现了对逻辑缺陷的早期检测。
- 从需求到代码的无缝过渡降低了误解风险,并提高了可维护性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。