Skip to content

Commit ec395cd

Browse files
authored
Merge pull request #7005 from esteffin/esteffin/smt-args-docs
Docs for incremental SMT backed
2 parents 45258ef + 2610713 commit ec395cd

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

doc/man/cbmc.1

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,25 @@ Output formula to given file
174174
Never turn arrays into uninterpreted functions
175175
.IP --arrays-uf-always
176176
Always turn arrays into uninterpreted functions
177+
.IP "--incremental-smt2-solver <cmd>"
178+
Use the incremental SMT backend where <cmd> is the command to invoke the SMT
179+
solver of choice.
180+
.br
181+
Examples invocations:
182+
.br
183+
--incremental-smt2-solver 'z3 -smt2 -in' (use the Z3 solver).
184+
.br
185+
--incremental-smt2-solver 'cvc5 --lang=smtlib2.6 --incremental' (use the CVC5 solver).
186+
.sp
187+
Note that:
188+
.br
189+
The solver name must be in the "PATH" or be an executable with full path.
190+
.br
191+
The SMT solver should accept incremental SMTlib v2.6 formatted input from the stdin.
192+
.br
193+
The SMT solver should support the QF_AUFBV logic.
194+
.br
195+
The flag --slice-formula should be added to remove some not-yet supported features.
177196
.SH ENVIRONMENT
178197
All tools honor the TMPDIR environment variable when generating temporary
179198
files and directories. Furthermore note that
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Incremental SMT backend
2+
3+
CBMC comes with a solver-agnostic incremental SMT backend.
4+
5+
The SMT incremental backend supports the following `C` features:
6+
7+
- Integers (via Bit vector arithmetics)
8+
- Pointers
9+
- Arrays (support is currently incomplete)
10+
11+
Primitive not supported are:
12+
13+
- Floating point values and arithmetics
14+
- Structs
15+
16+
Usage of the incremental SMT backend requires a SMT solver compatible with
17+
incremental SMTlib v2.6 formatted input from the standard input and that
18+
supports the `QF_AUFBV` (Quantifier Free Array Uninterpreted Functions and Bit
19+
Vectors) logic.
20+
21+
To use this functionality it is enough to add the argument
22+
`--incremental-smt2-solver <cmd>` where `<cmd>` is the command to invoke the SMT
23+
solver of choice using the incremental mode and accepting input from the
24+
standard input.
25+
26+
Examples of invocations with various solvers:
27+
28+
1. `--incremental-smt2-solver 'z3 -smt2 -in'` to use the Z3 solver.
29+
2. `--incremental-smt2-solver 'cvc5 --lang=smtlib2.6 --incremental'` to use the
30+
CVC5 solver.
31+
32+
The new incremental SMT backend has been designed to interoperate with external
33+
solvers, so the solver name must be in the `PATH` or an executable with full
34+
path must be provided.
35+
36+
Due to lack of support for conversion of `array_of` expressions that are added
37+
by CBMC in the before the new SMT backend is invoked, it is necessary to supply
38+
an extra argument `--slice-formula` so that instances of `arrayof_exprt` are
39+
removed from the formula to be converted.
40+
41+
As we move forward with our array-support implementation, we anticipate that the
42+
need for this extra flag will be diminished.

0 commit comments

Comments
 (0)