Conditional model checking: a technique to pass information between verifiers

Dirk Beyer, Thomas A. Henzinger, M. Erkan Keremoglu, Philipp Wendler

Introduction

Software verification has traditionally been an "all-or-nothing" gamble. Because software verification is an undecidable problem, tools often face three outcomes: they prove the program is safe, they find a bug, or—most frustratingly—they fail. This failure usually manifests as a "timeout" or "out-of-memory" error after hours of computation, leaving the user with zero information about which parts of the code might actually be safe.

Conditional Model Checking (CMC) transforms this process into an incremental, collaborative effort. Instead of discarding work upon a partial failure, a conditional model checker outputs a precise description of the state space it did successfully verify, allowing other tools to "pick up the baton" and focus only on the remaining unproven parts.

The CMC Framework

In the CMC framework, a model checker doesn't just return a binary "True" or "False"; it returns a condition $\Psi$ (usually a state predicate). This condition represents the "safe zone" where the tool can guarantee the program satisfies its specification.

Visual representation of partial state space exploration, where green nodes represent the verified "safe zone" and white nodes indicate the remaining unverified state space.

Key Technical Components

  • Assumption Automata: A novel way to represent the condition $\Psi$. These are finite-state machines that monitor the program's execution; if the program stays within the transitions defined by the automaton, it is guaranteed to be safe.
  • CPAchecker Integration: CMC was implemented within the Configurable Program Analysis (CPA) framework. This allows different types of analysis (like explicit-value analysis and predicate abstraction) to be composed seamlessly.
  • Sequential Combination: This is the primary application for CMC. Tool A runs until it hits a limit and outputs an assumption. Tool B then takes the negation of that assumption as its input, effectively telling it: "Don't waste time on what Tool A already proved; only look at these specific remaining cases."
An example of an Assumption Automaton used to represent the condition $\Psi$ for a specific program analysis.

Experimental Evaluation

The researchers evaluated their approach using three standard benchmark sets: Windows NT Device Drivers, SSH State Machines, and SystemC Programs. These datasets are known for containing both safe programs and subtle, hard-to-find bugs.

Key Results

The experiments demonstrated that CMC significantly outperforms traditional "monolithic" model checking:

  • Bug Hunting: On programs where standard checkers timed out (180s), conditional checkers found bugs in under 2 seconds by using path-length restrictions.
  • Proving Safety: By combining explicit-value analysis with predicate analysis, the authors could verify 22 out of 24 complex "token ring" programs that neither tool could solve alone.
  • Efficiency: In the "SystemC" benchmarks, the combined conditional approach solved 17 instances in 770 seconds, whereas the best single traditional tool took 7,800 seconds to solve only 10 instances.

Insights and Future Work

The core insight of CMC is that failure is information. Treating a partial verification run as a successful proof of a sub-problem provides a formal "handshake" protocol that lets diverse algorithms work together. By restricting the search space (e.g., "Path Length < 100"), users can find shallow bugs quickly and then systematically explore deeper paths later.

While powerful, the approach currently depends on heuristics for choosing the right conditions. Future work will focus on automatic condition generation, teaching tools to recognize when they are getting "stuck" and automatically pivoting to generate a partial result for a successor tool. For CMC to become an industry standard, broader tool support for importing and exporting "Assumption Automata" is also required.

Summary updated

BibTeX
@inproceedings{beyer2012conditional,
  author = {Dirk Beyer and Thomas A. Henzinger and M. Erkan Keremoglu and Philipp Wendler},
  title = {{Conditional model checking: a technique to pass information between verifiers}},
  booktitle = {SIGSOFT FSE},
  year = {2012},
  doi = {10.1145/2393596.2393664},
}
Figure