Skip to content

Commit 4fdab91

Browse files
committed
Add new flags to CBMC man page
1 parent cc309db commit 4fdab91

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed

doc/man/cbmc.1

+77
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ cbmc \- Bounded Model Checker for C/C++ and Java programs
88

99
.B cbmc [--all-properties] \fIfile.c\fB ...
1010

11+
.B cbmc [--no-standard-checks] \fIfile.c\fB ...
12+
13+
.B cbmc [--no-standard-checks] [--pointer-check] \fIfile.c\fB ...
14+
15+
.B cbmc [--no-bounds-check] \fIfile.c\fB ...
16+
1117
.B goto-cc [-I \fIinclude-path\fB] [-c] \fIfile.c\fB [-o \fIoutfile.o\fB]
1218

1319
.B goto-instrument \fIinfile\fB \fIoutfile\fR
@@ -41,8 +47,79 @@ The usual flow is to (1) translate source into a GOTO binary using
4147
goto-cc, then (2) perform instrumentation with goto-instrument, and
4248
finally (3) perform the analysis with cbmc.
4349
.SH OPTIONS
50+
.SS "Standard Checks"
51+
From version \fB6.0\fR onwards, \fBcbmc\fR, \fBgoto-analyzer\fR and some other tools
52+
apply some checks to the program by default (called the "standard checks"), with the
53+
aim to provide a better user experience for a non-expert user of the tool. These checks are:
54+
.TP
55+
\fB\-\-pointer\-check\fR
56+
enable pointer checks
57+
.TP
58+
\fB\-\-bounds\-check\fR
59+
enable array bounds checks
60+
.TP
61+
\fB\-\-undefined\-shift\-check\fR
62+
check shift greater than bit\-width
63+
.TP
64+
\fB\-\-div\-by\-zero\-check\fR
65+
enable division by zero checks
66+
.TP
67+
\fB\-\-pointer\-primitive\-check\fR
68+
checks that all pointers in pointer primitives are valid or null
69+
.TP
70+
\fB\-\-signed\-overflow\-check\fR
71+
enable signed arithmetic over\- and underflow checks
72+
.TP
73+
\fB\-\-malloc\-may\-fail\fR
74+
allow malloc calls to return a null pointer
75+
.TP
76+
\fB\-\-malloc\-fail\-null\fR
77+
set malloc failure mode to return null
78+
.TP
79+
\fB\-\-unwinding\-assertions\fR (\fBcbmc\fR\-only)
80+
generate unwinding assertions (cannot be
81+
used with \fB\-\-cover\fR)
82+
.PP
83+
These checks can all be deactivated at once by using the \fB\-\-no\-standard\-checks\fR flag
84+
like in the header example, or individually, by prepending a \fBno\-\fR before the flag, like
85+
so:
86+
.TP
87+
\fB\-\-no\-pointer\-check\fR
88+
disable pointer checks
89+
.TP
90+
\fB\-\-no\-bounds\-check\fR
91+
disable array bounds checks
92+
.TP
93+
\fB\-\-no\-undefined\-shift\-check\fR
94+
do not perform check for shift greater than bit\-width
95+
.TP
96+
\fB\-\-no\-div\-by\-zero\-check\fR
97+
disable division by zero checks
98+
.TP
99+
\fB\-\-no\-pointer\-primitive\-check\fR
100+
do not check that all pointers in pointer primitives are valid or null
101+
.TP
102+
\fB\-\-no\-signed\-overflow\-check\fR
103+
disable signed arithmetic over\- and underflow checks
104+
.TP
105+
\fB\-\-no\-malloc\-may\-fail\fR
106+
do not allow malloc calls to fail by default
107+
.TP
108+
\fB\-\-no\-malloc\-fail\-null\fR
109+
do not set malloc failure mode to return null pointer
110+
.TP
111+
\fB\-\-no\-unwinding\-assertions\fR (\fBcbmc\fR\-only)
112+
do not generate unwinding assertions (cannot be
113+
used with \fB\-\-cover\fR)
114+
.PP
115+
If an already set flag is re-set, like calling \fB\-\-pointer\-check\fR
116+
when default checks are already on, the flag is simply ignored.
44117
.SS "Analysis options:"
45118
.TP
119+
\fB\-\-no\-standard\-checks\fR
120+
disable the standard (default) checks applied to a C/GOTO program
121+
(see above for more information)
122+
.TP
46123
\fB\-\-show\-properties\fR
47124
show the properties, but don't run analysis
48125
.TP

0 commit comments

Comments
 (0)