|
| 1 | +[CPROVER Manual TOC](../) |
| 2 | + |
| 3 | +## Incremental SMT backend |
| 4 | + |
| 5 | +CBMC comes with a solver-agnostic incremental SMT backend. |
| 6 | + |
| 7 | +The SMT incremental backend supports the following `C` features: |
| 8 | + |
| 9 | +- Integers (via Bit vector arithmetics) |
| 10 | +- Pointers |
| 11 | +- Arrays (support is currently incomplete) |
| 12 | + |
| 13 | +Primitive not supported are: |
| 14 | + |
| 15 | +- Floating point values and arithmetics |
| 16 | +- Structs |
| 17 | + |
| 18 | +Usage of the incremental SMT backend requires a SMT solver compatible with |
| 19 | +incremental SMTlib v2.6 formatted input from the standard input and that |
| 20 | +supports the `QF_AUFBV` (Quantifier Free Array Uninterpreted Functions and Bit |
| 21 | +Vectors). |
| 22 | + |
| 23 | +To use this functionality it is enough to add the argument |
| 24 | +`--incremental-smt2-solver <cmd>` where `<cmd>` is the command to invoke the SMT |
| 25 | +solver of choice using the interactive mode and accepting input from the |
| 26 | +standard input. |
| 27 | + |
| 28 | +Examples of invocations with various solvers: |
| 29 | + |
| 30 | +1. `--incremental-smt2-solver 'z3 -smt2 -in'` to use the Z3 solver. |
| 31 | +2. `--incremental-smt2-solver 'cvc5 --lang=smtlib2.6 --incremental'` to use the |
| 32 | + CVC5 solver. |
| 33 | + |
| 34 | +The new incremental SMT backend has been designed to interoperate with external |
| 35 | +solvers, so the solver name must be in the `PATH` or an executable with full |
| 36 | +path must be provided. |
| 37 | + |
| 38 | +Due to lack of support for conversion of `array_of` expressions that are added |
| 39 | +by CBMC in the before the new SMT backend is invoked, it is necessary to supply |
| 40 | +an extra argument `--slice-formula` so that instances of `arrayof_exprt` are |
| 41 | +removed from the formula to be converted. |
| 42 | + |
| 43 | +As we move forward with our array-support implementation, we anticipate that the |
| 44 | +need for this extra flag will be diminished. |
0 commit comments