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.
1818.SH OPTIONS
1919.TP
2020\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
2222.TP
2323\fB \-\- dump \- loop \- contracts
24- Dump the synthesized loop contracts as JSON.
24+ dump the synthesized loop contracts as JSON
2525.TP
2626\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
2832.SS "User-interface options:"
2933.TP
3034\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: "
4848if echo $args_synthesizer | grep -q -- " --dump-loop-contracts" ; then
4949 $goto_synthesizer ${args_synthesizer} " ${name} -mod.gb"
5050else
51- $goto_synthesizer " ${name} -mod.gb" " ${name} -mod-2.gb"
51+ $goto_synthesizer ${args_synthesizer} " ${name} -mod.gb" " ${name} -mod-2.gb"
5252 echo " Running CBMC: "
5353 $cbmc " ${name} -mod-2.gb"
5454fi
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ Author: Qinheping Hu
88
99#include " goto_synthesizer_parse_options.h"
1010
11- #include < util/config.h>
1211#include < util/exit_codes.h>
1312#include < util/version.h>
1413
@@ -196,6 +195,9 @@ void goto_synthesizer_parse_optionst::help()
196195 HELP_DUMP_LOOP_CONTRACTS
197196 HELP_LOOP_CONTRACTS_NO_UNWIND
198197 " \n "
198+ " Backend options:\n "
199+ HELP_CONFIG_BACKEND
200+ " \n "
199201 " Other options:\n "
200202 " --version show version and exit\n "
201203 " --xml-ui use XML-formatted output\n "
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ Author: Qinheping Hu
99#ifndef CPROVER_GOTO_SYNTHESIZER_GOTO_SYNTHESIZER_PARSE_OPTIONS_H
1010#define CPROVER_GOTO_SYNTHESIZER_GOTO_SYNTHESIZER_PARSE_OPTIONS_H
1111
12+ #include < util/config.h>
1213#include < util/parse_options.h>
1314
1415#include < goto-programs/goto_model.h>
@@ -21,6 +22,7 @@ Author: Qinheping Hu
2122#define GOTO_SYNTHESIZER_OPTIONS \
2223 OPT_DUMP_LOOP_CONTRACTS \
2324 " (" FLAG_LOOP_CONTRACTS_NO_UNWIND " )" \
25+ OPT_CONFIG_BACKEND \
2426 " (verbosity):(version)(xml-ui)(json-ui)" \
2527 // empty last line
2628
You can’t perform that action at this time.
0 commit comments