一句话:实现 TBFV4J 工具,将基于规约的测试与形式验证结合,使 Java 程序无需手工推导循环不变式即可自动验证。
基于规约的测试只能揭示程序中的缺陷,无法严格证明程序无错;而形式验证虽能针对规约给出功能正确性的严格证明,却往往需要大量人工专业知识来推导循环不变式,才能完成自动化验证。基于测试的形式验证(TBFV)把基于规约的测试与形式验证结合起来,在无需推导循环不变式的前提下自动验证程序是否满足其规约。本文实现了支持 Java 程序的 TBFV4J 工具:用户只需输入功能场景(functional scenario)和相应的 Java 代码,工具即可自动执行测试与验证流程。
To check whether a program meets its specification, specification-based testing can only reveal bugs but cannot strictly prove that there is no bug in programs. Although formal verification can provide a strict proof for the functional correctness of programs with respect to the corresponding specifications, it often requires significant manual expertise to derive loop invariants to complete automated verification. Testing-based formal verification (TBFV) integrates specification-based testing and formal verification to implement automated verification of whether a program satisfies its specification without the need to derive loop invariants. In this paper, we implement the TBFV4J tool, which supports TBFV for Java programs, where the user only needs to input a functional scenario with Java code and it will automatically perform testing and verification.