File tree 5 files changed +75
-0
lines changed
regenerate-entry-function
5 files changed +75
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ DIRS = ansi-c \
5
5
cbmc-java-inheritance \
6
6
cpp \
7
7
goto-analyzer \
8
+ goto-cc-cbmc \
8
9
goto-diff \
9
10
goto-gcc \
10
11
goto-instrument \
Original file line number Diff line number Diff line change
1
+ default: tests.log
2
+
3
+ test:
4
+ @if ! ../test.pl -c ../chain.sh ; then \
5
+ ../failed-tests-printer.pl ; \
6
+ exit 1; \
7
+ fi
8
+
9
+ tests.log:
10
+ @if ! ../test.pl -c ../chain.sh ; then \
11
+ ../failed-tests-printer.pl ; \
12
+ exit 1; \
13
+ fi
14
+
15
+ show:
16
+ @for dir in *; do \
17
+ if [ -d "$$dir" ]; then \
18
+ vim -o "$$dir/*.c" "$$dir/*.out"; \
19
+ fi; \
20
+ done;
21
+
22
+ clean:
23
+ @for dir in *; do \
24
+ $(RM) tests.log; \
25
+ if [ -d "$$dir" ]; then \
26
+ cd "$$dir"; \
27
+ $(RM) *.out *.gb; \
28
+ cd ..; \
29
+ fi \
30
+ 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
+ CBMC=$SRC/cbmc/cbmc
7
+
8
+ OPTS=$1
9
+ NAME=${2%.c}
10
+
11
+ $GC $NAME.c -o $NAME.gb
12
+ $CBMC $NAME.gb $OPTS
Original file line number Diff line number Diff line change
1
+ int fun(int x)
2
+ {
3
+ if(x > 0)
4
+ {
5
+ return x * x;
6
+ }
7
+ else
8
+ {
9
+ return x;
10
+ }
11
+ }
12
+
13
+ int main(int argc, char** argv)
14
+ {
15
+ if(argc>4)
16
+ {
17
+ return 0;
18
+ }
19
+ else
20
+ {
21
+ return 1;
22
+ }
23
+ }
Original file line number Diff line number Diff line change
1
+ CORE
2
+ main.c
3
+ "--function fun --cover branch"
4
+
5
+ ^EXIT=0$
6
+ ^SIGNAL=0$
7
+ ^x=
8
+ --
9
+ ^warning: ignoring
You can’t perform that action at this time.
0 commit comments