File tree Expand file tree Collapse file tree 6 files changed +41
-5
lines changed
regression/goto-synthesizer Expand file tree Collapse file tree 6 files changed +41
-5
lines changed Original file line number Diff line number Diff line change @@ -18,13 +18,17 @@ resulting program as GOTO binary on disk.
18
18
.SH OPTIONS
19
19
.TP
20
20
\fB \- loop \- contracts \- no \- unwind \fR
21
- Do not unwind transformed loops after applying the synthesized loop contracts.
21
+ do not unwind transformed loops after applying the synthesized loop contracts
22
22
.TP
23
23
\fB \-\- dump \- loop \- contracts
24
- Dump the synthesized loop contracts as JSON.
24
+ dump the synthesized loop contracts as JSON
25
25
.TP
26
26
\fB \-\- json- \o utpu t \fR \fI file \fR
27
- Specify the output destination of the loop-contracts JSON.
27
+ specify the output destination of the loop-contracts JSON
28
+ .SS "Backend options:"
29
+ .TP
30
+ \fB \-\- object \- bits \fR n
31
+ number of bits used for object addresses
28
32
.SS "User-interface options:"
29
33
.TP
30
34
\fB \-\- xml \- ui \fR
Original file line number Diff line number Diff line change
1
+ #include <assert.h>
2
+ #include <stdlib.h>
3
+
4
+ int main ()
5
+ {
6
+ int i ;
7
+ char * a ;
8
+ char * b ;
9
+ char * c ;
10
+ a = (char * )malloc (1 );
11
+ b = (char * )malloc (1 );
12
+ c = (char * )malloc (1 );
13
+ for (i = 0 ; i < 5 ; ++ i )
14
+ {
15
+ * a = 0 ;
16
+ * b = 0 ;
17
+ * c = 0 ;
18
+ }
19
+ assert (* c + * b + * c == 1 );
20
+ }
Original file line number Diff line number Diff line change
1
+ CORE
2
+ main.c
3
+ --pointer-check _ --object-bits 1
4
+ too many addressed objects
5
+ ^EXIT=6$
6
+ ^SIGNAL=0$
7
+ --
8
+ Check if the synthesizer can correctly set object bits when calling CBMC.
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ echo "Running goto-synthesizer: "
48
48
if echo $args_synthesizer | grep -q -- " --dump-loop-contracts" ; then
49
49
$goto_synthesizer ${args_synthesizer} " ${name} -mod.gb"
50
50
else
51
- $goto_synthesizer " ${name} -mod.gb" " ${name} -mod-2.gb"
51
+ $goto_synthesizer ${args_synthesizer} " ${name} -mod.gb" " ${name} -mod-2.gb"
52
52
echo " Running CBMC: "
53
53
$cbmc " ${name} -mod-2.gb"
54
54
fi
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ Author: Qinheping Hu
8
8
9
9
#include " goto_synthesizer_parse_options.h"
10
10
11
- #include < util/config.h>
12
11
#include < util/exit_codes.h>
13
12
#include < util/version.h>
14
13
@@ -196,6 +195,9 @@ void goto_synthesizer_parse_optionst::help()
196
195
HELP_DUMP_LOOP_CONTRACTS
197
196
HELP_LOOP_CONTRACTS_NO_UNWIND
198
197
" \n "
198
+ " Backend options:\n "
199
+ HELP_CONFIG_BACKEND
200
+ " \n "
199
201
" Other options:\n "
200
202
" --version show version and exit\n "
201
203
" --xml-ui use XML-formatted output\n "
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ Author: Qinheping Hu
9
9
#ifndef CPROVER_GOTO_SYNTHESIZER_GOTO_SYNTHESIZER_PARSE_OPTIONS_H
10
10
#define CPROVER_GOTO_SYNTHESIZER_GOTO_SYNTHESIZER_PARSE_OPTIONS_H
11
11
12
+ #include < util/config.h>
12
13
#include < util/parse_options.h>
13
14
14
15
#include < goto-programs/goto_model.h>
@@ -21,6 +22,7 @@ Author: Qinheping Hu
21
22
#define GOTO_SYNTHESIZER_OPTIONS \
22
23
OPT_DUMP_LOOP_CONTRACTS \
23
24
" (" FLAG_LOOP_CONTRACTS_NO_UNWIND " )" \
25
+ OPT_CONFIG_BACKEND \
24
26
" (verbosity):(version)(xml-ui)(json-ui)" \
25
27
// empty last line
26
28
You can’t perform that action at this time.
0 commit comments