SMT2Test: From SMT Formulas to Effective Test Cases


Loading...

Date

2024-10

Publication Type

Journal Article

ETH Bibliography

yes

Citations

Altmetric

Data

Abstract

One of the primary challenges in software testing is generating high-quality test inputs and obtaining corresponding test oracles. This paper introduces a novel methodology to mitigate this challenge in testing program verifiers by employing SMT (Satisfiability Modulo Theories) formulas as a universal test case generator. The key idea is to transform SMT formulas into programs and link the satisfiability of the formulas with the safety property of the programs, allowing the satisfiability of the formulas to act as a test oracle for program verifiers. This method was implemented as a framework named SMT2Test, which enables the transformation of SMT formulas into Dafny and C programs. An intermediate representation was designed to augment the flexibility of this framework, streamlining the transformation for other programming languages and fostering modular transformation strategies. We evaluated the effectiveness of SMT2Test by finding defects in two program verifiers: the Dafny verifier and CPAchecker. Utilizing the SMT2Test framework with the SMT formulas from the SMT competition and SMT solver fuzzers, we discovered and reported a total of 14 previously unknown defects in these program verifiers that were not found by previous methods. After reporting, all of them have been confirmed, and 6 defects have been fixed. These findings show the effectiveness of our method and imply its potential application in testing other programming language infrastructures.

Publication status

published

Editor

Book title

Volume

8 (OOPSLA2)

Pages / Article No.

279

Publisher

Association for Computing Machinery

Event

Edition / version

Methods

Software

Geographic location

Date collected

Date created

Subject

Software Testing; Program Verification; SMT Solving

Organisational unit

09628 - Su, Zhendong / Su, Zhendong check_circle

Notes

Funding

Related publications and datasets