CProver: open-source verification tools for real code
The CProver ecosystem is a family of open-source tools for finding bugs in software and hardware, and for proving they are absent. They share the core idea of bounded model checking and use common infrastructure.
How it works
A program or circuit is turned into a logical formula, and a satisfiability solver then looks for an input that breaks a property. If one exists, you get a concrete counterexample trace. If none exists within the bound, the property holds there. The tools are widely used in industry and are the workhorse of several commercial verification tools. They cover C, Java, Rust, Verilog and more.
Can any input make this C program violate an assertion, overflow, dereference a bad pointer, or break array bounds?
CBMC is the flagship tool of the ecosystem. It checks memory safety, arithmetic overflow, undefined behaviour and user-written assertions in C programs. When it finds a problem, it reports a step-by-step counterexample you can replay. When it doesn’t, you know the property holds for all inputs up to the unwinding bound. With loop invariants and function contracts, it can also give unbounded proofs.
Reading
- Kroening, Schrammel, Tautschnig. CBMC: The C Bounded Model Checker. arXiv:2302.02384
- Clarke, Kroening, Lerda. A Tool for Checking ANSI-C Programs. TACAS 2004. Read the paper
Can any input make this Java code throw an unexpected exception or violate a property?
JBMC applies the CBMC approach to Java bytecode. It checks for uncaught exceptions, array and arithmetic errors, and assertion violations. It also supports a model of the Java standard library and can handle strings and many modern Java features.
Reading
- Brenguier, Cordeiro, Kroening, Schrammel. JBMC: A Bounded Model Checking Tool for Java Bytecode. arXiv:2302.02381
- Cordeiro, Kesseli, Kroening, Schrammel, Trtik. JBMC: A Bounded Model Checking Tool for Verifying Java Bytecode. CAV 2018. Read the paper
Can any input make this Rust code panic, or violate a property? Can unsafe code cause undefined behaviour?
Kani is a bounded model checker for Rust, built on CBMC. It verifies panic-freedom, functional correctness and the soundness of unsafe code. It goes beyond bug-finding with contracts and other specification features, and it runs at scale in production CI.
Reading
- Delmas et al. Kani: A Model Checker for Rust. arXiv:2607.01504
EBMC is a bounded model checker for hardware. It reads Verilog and SystemVerilog, checks assertions and temporal properties, and can also prove them with k-induction. It can also check that a C program and a Verilog design behave consistently.
Reading
- Clarke, Kroening, Yorav. Behavioral Consistency of C and Verilog Programs Using Bounded Model Checking. DAC 2003. Read the paper
2LS combines bounded model checking, k-induction and abstract interpretation. It aims at proofs that hold for all loop iterations, not just up to a bound, and without requiring invariant annotations. It can also check termination.
Reading
- Kroening, Malík, Schrammel, Vojnar. 2LS for Program Analysis. arXiv:2302.02380
- Schrammel, Kroening. 2LS for Program Analysis. TACAS 2016. Read the paper
- Brain, Joshi, Kroening, Schrammel. Safety Verification and Refutation by k-Invariants and k-Induction. SAS 2015. Read the paper
