SMT2Test: From SMT Formulas to Effective Test Cases
Chengyu Zhang, Zhendong Su
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.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Your agent calls
Lunesearch_papers
Free to start. No credit card required.
Terminal
Install the CLIlune papers get 60ba5d6c-b6e6-4276-a36c-44e58ee921a6Cited by top-tier papers1
Ask how each one uses itRelated papers
- Testing Dafny (experience paper)Ahmed Irfan, Sorawee Porncharoenwase, Zvonimir Rakamaric, Neha Rungta et al.ISSTA 2022 · 15 citations
- Automatically testing string solversAlexandra Bugariu, Peter MüllerICSE 2020 · 28 citations
- Validating SMT Solvers via Skeleton Enumeration Empowered by Historical Bug-Triggering InputsMaolin Sun, Yibiao Yang, Ming Wen, Yongcong Wang et al.ICSE 2023 · 9 citations
- Detecting critical bugs in SMT solvers using blackbox mutational fuzzingMuhammad Numair Mansur, Maria Christakis, Valentin Wüstholz, Fuyuan ZhangFSE 2020 · 51 citations
- ZKSMT: A VM for Proving SMT Theorems in Zero KnowledgeDaniel Luick, John C. Kolesar, Timos Antonopoulos, William R. Harris et al.USENIX Security 2024
