File tree 5 files changed +49
-12
lines changed
5 files changed +49
-12
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ add_subdirectory(statement-list)
53
53
add_subdirectory (systemc)
54
54
add_subdirectory (contracts)
55
55
add_subdirectory (acceleration)
56
+ add_subdirectory (k-induction)
56
57
add_subdirectory (goto-harness)
57
58
add_subdirectory (goto-harness-multi-file-project)
58
59
add_subdirectory (goto-cc-file-local)
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ DIRS = cbmc \
28
28
systemc \
29
29
contracts \
30
30
acceleration \
31
+ k-induction \
31
32
goto-harness \
32
33
goto-harness-multi-file-project \
33
34
goto-cc-file-local \
Original file line number Diff line number Diff line change
1
+ if (WIN32 )
2
+ set (is_windows true )
3
+ else ()
4
+ set (is_windows false )
5
+ endif ()
6
+
7
+ add_test_pl_tests(
8
+ "${CMAKE_CURRENT_SOURCE_DIR} /chain.sh $<TARGET_FILE:goto-cc> $<TARGET_FILE:goto-instrument> $<TARGET_FILE:cbmc> ${is_windows} "
9
+ )
Original file line number Diff line number Diff line change 1
1
default : tests.log
2
2
3
+ include ../../src/config.inc
4
+ include ../../src/common
5
+
6
+ ifeq ($(BUILD_ENV_ ) ,MSVC)
7
+ exe=../../../src/goto-cc/goto-cl
8
+ is_windows=true
9
+ else
10
+ exe=../../../src/goto-cc/goto-cc
11
+ is_windows=false
12
+ endif
13
+
3
14
test :
4
- @../test.pl -c ../chain.sh
15
+ @../test.pl -e -p -c ' ../chain.sh $(exe) ../../../src/goto-instrument/goto-instrument ../../../src/cbmc/cbmc $(is_windows) '
5
16
6
- tests.log : ../test.pl
7
- @../test.pl -c ../chain.sh
17
+ tests.log :
18
+ @../test.pl -e -p -c ' ../chain.sh $(exe) ../../../src/goto-instrument/goto-instrument ../../../src/cbmc/cbmc $(is_windows) '
8
19
9
20
show :
10
21
@for dir in * ; do \
Original file line number Diff line number Diff line change 2
2
3
3
set -e
4
4
5
- src=../../../src
6
- goto_cc=$src /goto-cc/goto-cc
7
- goto_instrument=$src /goto-instrument/goto-instrument
8
- cbmc=$src /cbmc/cbmc
5
+ goto_cc=$1
6
+ goto_instrument=$2
7
+ cbmc=$3
8
+ is_windows=$4
9
+
10
+ shift 4
9
11
10
12
function usage() {
11
13
echo " Usage: chain k test_file.c"
@@ -15,10 +17,23 @@ function usage() {
15
17
name=` echo $2 | cut -d. -f1`
16
18
k=$1
17
19
18
- $goto_cc -o $name .o $name .c
20
+ if [[ " ${is_windows} " == " true" ]]; then
21
+ $goto_cc " ${name} .c" " /Fe${name} .gb"
22
+ else
23
+ $goto_cc -o " ${name} .gb" " ${name} .c"
24
+ fi
25
+
19
26
20
- $goto_instrument --k-induction $k --base-case $name .o $name .base.o
21
- if $cbmc $name .base.o ; then echo " ## Base case passes" ; else echo " ## Base case fails" ; fi
27
+ " $goto_instrument " --k-induction $k --base-case " $name .gb" " $name .base.gb"
28
+ if " $cbmc " " $name .base.gb" ; then
29
+ echo " ## Base case passes"
30
+ else
31
+ echo " ## Base case fails"
32
+ fi
22
33
23
- $goto_instrument --k-induction $k --step-case $name .o $name .step.o
24
- if $cbmc $name .step.o ; then echo " ## Step case passes" ; else echo " ## Step case fails" ; fi
34
+ " $goto_instrument " --k-induction $k --step-case " $name .gb" " $name .step.gb"
35
+ if " $cbmc " " $name .step.gb" ; then
36
+ echo " ## Step case passes"
37
+ else
38
+ echo " ## Step case fails"
39
+ fi
You can’t perform that action at this time.
0 commit comments