Skip to content

Commit 3b022df

Browse files
author
Enrico Steffinlongo
committed
Documentation for new incremental smt backend
1 parent 09f91ee commit 3b022df

File tree

2 files changed

+49
-1
lines changed

2 files changed

+49
-1
lines changed

doc/cprover-manual/index.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,8 @@
3131
[Integration into Build Systems with goto-cc](goto-cc/),
3232
[Integration with Visual Studio builds](visual-studio/)
3333

34-
## 10. [The CPROVER API Reference](api/)
34+
## 10. New SMT backend
35+
36+
[New SMT2 incremental backend](smt2-incr/)
37+
38+
## 11. [The CPROVER API Reference](api/)

doc/cprover-manual/smt2-incr.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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

Comments
 (0)