File tree Expand file tree Collapse file tree 13 files changed +56
-47
lines changed
simplify-complex-expression
simplify-lhs-array-pointers-index
simplify-lhs-pointer-array-dereference
simplify-multiply-by-zero Expand file tree Collapse file tree 13 files changed +56
-47
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ add_subdirectory(goto-cc-cbmc)
4949add_subdirectory (goto-cc-cbmc-shared-options )
5050add_subdirectory (cbmc-cpp)
5151add_subdirectory (goto-cc-goto-analyzer)
52+ add_subdirectory (goto-analyzer-simplify)
5253add_subdirectory (statement-list)
5354add_subdirectory (systemc)
5455add_subdirectory (contracts)
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ DIRS = cbmc \
2424 goto-cc-cbmc-shared-options \
2525 cbmc-cpp \
2626 goto-cc-goto-analyzer \
27+ goto-analyzer-simplify \
2728 statement-list \
2829 systemc \
2930 contracts \
Original file line number Diff line number Diff line change 1+ add_test_pl_tests(
2+ "${CMAKE_CURRENT_SOURCE_DIR} /chain.sh $<TARGET_FILE:goto-analyzer>"
3+ )
Original file line number Diff line number Diff line change 1-
21default : tests.log
32
43test :
5- @if ! ../test.pl -c ../chain.sh ; then \
6- ../failed-tests-printer.pl ; \
7- exit 1; \
8- fi
4+ @../test.pl -e -p -c " ../chain.sh ../../../src/goto-analyzer/goto-analyzer"
95
10- tests.log :
11- @if ! ../test.pl -c ../chain.sh ; then \
12- ../failed-tests-printer.pl ; \
13- exit 1; \
14- fi
6+ tests.log : ../test.pl
7+ @../test.pl -e -p -c " ../chain.sh ../../../src/goto-analyzer/goto-analyzer"
158
169show :
1710 @for dir in * ; do \
1811 if [ -d " $$ dir" ]; then \
19- vim -o " $$ dir/*.c " " $$ dir/*.out" ; \
12+ vim -o " $$ dir/*.java " " $$ dir/*.out" ; \
2013 fi ; \
2114 done ;
2215
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- src_dir=../../../src
3+ set -e
44
5- goto_analyzer=$src_dir /goto-analyzer/goto-analyzer
5+ goto_analyzer=$1
66
7- options=$1
8- file_name=${2% .c}
7+ options=${*: 2: $# -2}
8+ name=${*: $# }
9+ name=${name% .c}
910
10- echo options: $options
11- echo file name : $file_name
12-
13- $goto_analyzer $file_name .c $options --simplify $file_name_simp .out
14- $goto_analyzer $file_name_simp .out --show-goto-functions
11+ " ${goto_analyzer} " " ${name} .c" ${options} --simplify " ${name} .gb"
12+ " ${goto_analyzer} " " ${name} .gb" --show-goto-functions
Original file line number Diff line number Diff line change 11CORE
22main.c
3- "--variable-sensitivity --vsd-arrays"
4-
5- arr\[0l\]
3+ --vsd --vsd-arrays every-element
4+ arr\[0l?l?\]
5+ ^SIGNAL=0$
6+ ^EXIT=0$
7+ --
Original file line number Diff line number Diff line change 11CORE
22main.c
3- --variable-sensitivity
3+ --vsd
44r == 2
55^SIGNAL=0$
6- ^EXIT=6 $
6+ ^EXIT=0 $
77--
88--
99
Original file line number Diff line number Diff line change 11CORE
22main.c
3- "--variable-sensitivity --vsd-arrays"
4-
5- arr\[0l\] =
6- arr\[1l\] =
7- arr\[\(signed long int\)nondet\] =
3+ --vsd --vsd-arrays every-element
4+ arr\[0l?l?\] =
5+ arr\[1l?l?\] =
6+ arr\[\(signed (long (long )?)?int\)nondet\] =
7+ ^SIGNAL=0$
8+ ^EXIT=0$
9+ --
Original file line number Diff line number Diff line change 11CORE
22main.c
3- "--variable-sensitivity --vsd-arrays --vsd-pointers"
4-
3+ --vsd --vsd-arrays every-element --vsd-pointers value-set
54symbol_a = 1
65symbol_b = 2
7- \*arr\[2l\] = 3;
8- \*arr\[\(signed long int\)nondet_index\] = 4;
6+ \*arr\[2l?l?\] = 3;
7+ \*arr\[\(signed (long (long )?)?int\)nondet_index\] = 4;
8+ ^SIGNAL=0$
9+ ^EXIT=0$
10+ --
Original file line number Diff line number Diff line change 11CORE
22main.c
3- "--variable-sensitivity --vsd-pointers"
4-
3+ --vsd --vsd-pointers value-set
54symbol = 5
65\*pointer = 6
6+ ^SIGNAL=0$
7+ ^EXIT=0$
8+ --
You can’t perform that action at this time.
0 commit comments