File tree 22 files changed +203
-7
lines changed
goto-analyzer/regenerate-entry-function
goto-cc-cbmc/regenerate-entry-function
regenerate-entry-function
regenerate-entry-function
symex/regenerate-entry-function
22 files changed +203
-7
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ DIRS = ansi-c \
6
6
cpp \
7
7
goto-analyzer \
8
8
goto-cc-cbmc \
9
+ goto-cc-goto-analyzer \
10
+ goto-cc-goto-symex \
9
11
goto-diff \
10
12
goto-gcc \
11
13
goto-instrument \
Original file line number Diff line number Diff line change
1
+ #include <assert.h>
2
+
3
+ int fun (int x )
4
+ {
5
+ int i ;
6
+ if (i >=20 )
7
+ assert (i >=10 );
8
+ }
9
+
10
+ int main (int argc , char * * argv )
11
+ {
12
+ int i ;
13
+
14
+ if (i >=5 )
15
+ assert (i >=10 );
16
+ }
Original file line number Diff line number Diff line change
1
+ CORE
2
+ main.c
3
+ --function fun --show-goto-functions
4
+ ^\s*fun\(x\);$
5
+ ^EXIT=6$
6
+ ^SIGNAL=0$
7
+ --
8
+ ^warning: ignoring
Original file line number Diff line number Diff line change 1
1
CORE
2
2
main.c
3
3
"--function fun --cover branch"
4
-
5
4
^EXIT=0$
6
5
^SIGNAL=0$
7
6
^x=
Original file line number Diff line number Diff line change
1
+
2
+ default : tests.log
3
+
4
+ test :
5
+ @if ! ../test.pl -c ../chain.sh ; then \
6
+ ../failed-tests-printer.pl ; \
7
+ exit 1; \
8
+ fi
9
+
10
+ tests.log :
11
+ pwd
12
+ @if ! ../test.pl -c ../chain.sh ; then \
13
+ ../failed-tests-printer.pl ; \
14
+ exit 1; \
15
+ fi
16
+
17
+ show :
18
+ @for dir in * ; do \
19
+ if [ -d " $$ dir" ]; then \
20
+ vim -o " $$ dir/*.c" " $$ dir/*.out" ; \
21
+ fi ; \
22
+ done ;
23
+
24
+ clean :
25
+ @for dir in * ; do \
26
+ rm -f tests.log; \
27
+ if [ -d " $$ dir" ]; then \
28
+ cd " $$ dir" ; \
29
+ rm -f * .out * .gb; \
30
+ cd ..; \
31
+ fi \
32
+ done
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ src=../../../src
4
+
5
+ gc=$src /goto-cc/goto-cc
6
+ goto_analyzer=$src /goto-analyzer/goto-analyzer
7
+
8
+ options=$1
9
+ name=${2% .c}
10
+
11
+ $gc $name .c -o $name .gb
12
+ $goto_analyzer $name .gb $options
Original file line number Diff line number Diff line change
1
+ #include <assert.h>
2
+
3
+ int fun (int x )
4
+ {
5
+ int i ;
6
+ if (i >=20 )
7
+ assert (i >=10 );
8
+ }
9
+
10
+ int main (int argc , char * * argv )
11
+ {
12
+ int i ;
13
+
14
+ if (i >=5 )
15
+ assert (i >=10 );
16
+ }
Original file line number Diff line number Diff line change
1
+ CORE
2
+ main.c
3
+ "--function fun --show-goto-functions"
4
+ ^\s*fun\(x\);$
5
+ ^EXIT=6$
6
+ ^SIGNAL=0$
7
+ --
8
+ ^warning: ignoring
Original file line number Diff line number Diff line change
1
+
2
+ default : tests.log
3
+
4
+ test :
5
+ @if ! ../test.pl -c ../chain.sh ; then \
6
+ ../failed-tests-printer.pl ; \
7
+ exit 1; \
8
+ fi
9
+
10
+ tests.log :
11
+ pwd
12
+ @if ! ../test.pl -c ../chain.sh ; then \
13
+ ../failed-tests-printer.pl ; \
14
+ exit 1; \
15
+ fi
16
+
17
+ show :
18
+ @for dir in * ; do \
19
+ if [ -d " $$ dir" ]; then \
20
+ vim -o " $$ dir/*.c" " $$ dir/*.out" ; \
21
+ fi ; \
22
+ done ;
23
+
24
+ clean :
25
+ @for dir in * ; do \
26
+ rm -f tests.log; \
27
+ if [ -d " $$ dir" ]; then \
28
+ cd " $$ dir" ; \
29
+ rm -f * .out * .gb; \
30
+ cd ..; \
31
+ fi \
32
+ done
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ src=../../../src
4
+
5
+ gc=$src /goto-cc/goto-cc
6
+ symex=$src /symex/symex
7
+
8
+ options=$1
9
+ name=${2% .c}
10
+
11
+ $gc $name .c -o $name .gb
12
+ $symex $name .gb $options
Original file line number Diff line number Diff line change
1
+ #include <assert.h>
2
+
3
+ int fun (int x )
4
+ {
5
+ int i ;
6
+ if (i >=20 )
7
+ assert (i >=10 );
8
+ }
9
+
10
+ int main (int argc , char * * argv )
11
+ {
12
+ int i ;
13
+
14
+ if (i >=5 )
15
+ assert (i >=10 );
16
+ }
Original file line number Diff line number Diff line change
1
+ CORE
2
+ main.c
3
+ "--function fun --show-goto-functions"
4
+ ^\s*return.=fun\(x\);$
5
+ ^EXIT=6$
6
+ ^SIGNAL=0$
7
+ --
8
+ ^warning: ignoring
Original file line number Diff line number Diff line change
1
+ #include <assert.h>
2
+
3
+ int fun (int x )
4
+ {
5
+ int i ;
6
+ if (i >=20 )
7
+ assert (i >=10 );
8
+ }
9
+
10
+ int main (int argc , char * * argv )
11
+ {
12
+ int i ;
13
+
14
+ if (i >=5 )
15
+ assert (i >=10 );
16
+ }
Original file line number Diff line number Diff line change
1
+ CORE
2
+ main.c
3
+ --function fun --show-goto-functions
4
+ fun\(x\);$
5
+ ^EXIT=6$
6
+ ^SIGNAL=0$
7
+ --
8
+ ^warning: ignoring
Original file line number Diff line number Diff line change @@ -1009,7 +1009,7 @@ void cbmc_parse_optionst::help()
1009
1009
" --round-to-plus-inf rounding towards plus infinity\n "
1010
1010
" --round-to-minus-inf rounding towards minus infinity\n "
1011
1011
" --round-to-zero rounding towards zero\n "
1012
- " --function name set main function name \n "
1012
+ HELP_FUNCTIONS
1013
1013
" \n "
1014
1014
" Program representations:\n "
1015
1015
" --show-parse-tree show parse tree\n "
Original file line number Diff line number Diff line change 14
14
15
15
#include < util/ui_message.h>
16
16
#include < util/parse_options.h>
17
+ #include < goto-programs/rebuild_goto_start_function.h>
17
18
18
19
#include < analyses/goto_check.h>
19
20
@@ -26,7 +27,8 @@ class goto_functionst;
26
27
class optionst ;
27
28
28
29
#define CBMC_OPTIONS \
29
- " (program-only)(function):(preprocess)(slice-by-trace):" \
30
+ " (program-only)(preprocess)(slice-by-trace):" \
31
+ OPT_FUNCTIONS \
30
32
" (no-simplify)(unwind):(unwindset):(slice-formula)(full-slice)" \
31
33
" (debug-level):(no-propagation)(no-simplify-if)" \
32
34
" (document-subgoals)(outfile):(test-preprocessor)" \
Original file line number Diff line number Diff line change @@ -494,6 +494,7 @@ void goto_analyzer_parse_optionst::help()
494
494
" --classpath dir/jar set the classpath\n "
495
495
" --main-class class-name set the name of the main class\n "
496
496
JAVA_BYTECODE_LANGUAGE_OPTIONS_HELP
497
+ HELP_FUNCTIONS
497
498
" \n "
498
499
" Program representations:\n "
499
500
" --show-parse-tree show parse tree\n "
Original file line number Diff line number Diff line change 17
17
18
18
#include < goto-programs/goto_model.h>
19
19
#include < goto-programs/show_goto_functions.h>
20
+ #include < goto-programs/rebuild_goto_start_function.h>
20
21
21
22
#include < analyses/goto_check.h>
22
23
@@ -27,7 +28,7 @@ class goto_functionst;
27
28
class optionst ;
28
29
29
30
#define GOTO_ANALYSER_OPTIONS \
30
- " (function): " \
31
+ OPT_FUNCTIONS \
31
32
" D:I:(std89)(std99)(std11)" \
32
33
" (classpath):(cp):(main-class):" \
33
34
" (16)(32)(64)(LP64)(ILP64)(LLP64)(ILP32)(LP32)" \
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ bool rebuild_goto_start_functiont::operator()(
69
69
symbol_table);
70
70
71
71
// Remove the function from the goto_functions so it is copied back in
72
- // from the symbol table
72
+ // from the symbol table during goto_convert
73
73
if (!return_code)
74
74
{
75
75
const auto &start_function=
Original file line number Diff line number Diff line change 14
14
class symbol_tablet ;
15
15
class goto_functionst ;
16
16
17
+ #define OPT_FUNCTIONS \
18
+ " (function):"
19
+
20
+ #define HELP_FUNCTIONS \
21
+ " --function name set main function name\n "
22
+
17
23
class rebuild_goto_start_functiont : public messaget
18
24
{
19
25
public:
Original file line number Diff line number Diff line change @@ -587,7 +587,7 @@ void symex_parse_optionst::help()
587
587
" --round-to-plus-inf IEEE floating point rounding mode\n "
588
588
" --round-to-minus-inf IEEE floating point rounding mode\n "
589
589
" --round-to-zero IEEE floating point rounding mode\n "
590
- " --function name set main function name \n "
590
+ HELP_FUNCTIONS
591
591
" \n "
592
592
" Java Bytecode frontend options:\n "
593
593
JAVA_BYTECODE_LANGUAGE_OPTIONS_HELP
Original file line number Diff line number Diff line change 17
17
18
18
#include < goto-programs/goto_model.h>
19
19
#include < goto-programs/show_goto_functions.h>
20
+ #include < goto-programs/rebuild_goto_start_function.h>
20
21
21
22
#include < analyses/goto_check.h>
22
23
@@ -28,7 +29,7 @@ class goto_functionst;
28
29
class optionst ;
29
30
30
31
#define SYMEX_OPTIONS \
31
- " (function): " \
32
+ OPT_FUNCTIONS \
32
33
" D:I:" \
33
34
" (depth):(context-bound):(branch-bound):(unwind):(max-search-time):" \
34
35
OPT_GOTO_CHECK \
You can’t perform that action at this time.
0 commit comments