Skip to content

Commit 108129c

Browse files
Merge pull request diffblue#2118 from diffblue/remove-jbmc
remove usage of Java bytecode frontend
2 parents 31ef182 + 29a8818 commit 108129c

File tree

2,656 files changed

+2878
-547
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,656 files changed

+2878
-547
lines changed

.travis.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ jobs:
237237
description: "Travis build of ${TRAVIS_COMMIT}"
238238
notification_email: "[email protected]"
239239
build_command_prepend: "make -C src minisat2-download"
240-
build_command: "make -C src -j2"
240+
build_command: "make -C src -j2; make -C jbmc/src -j2"
241241
branch_pattern: "develop"
242242
before_install:
243243
- |
@@ -266,12 +266,16 @@ install:
266266
- make -C src/ansi-c library_check
267267
- make -C src "CXX=${COMPILER} ${EXTRA_CXXFLAGS}" -j3
268268
- make -C src "CXX=${COMPILER} ${EXTRA_CXXFLAGS}" -j3 clobber.dir memory-models.dir
269+
- make -C jbmc/src "CXX=${COMPILER} ${EXTRA_CXXFLAGS}" -j3
269270

270271
script:
271272
- if [ -e bin/gcc ] ; then export PATH=$PWD/bin:$PATH ; fi ;
272273
- env UBSAN_OPTIONS=print_stacktrace=1 make -C regression test-parallel "CXX=${COMPILER} ${EXTRA_CXXFLAGS}" -j2 JOBS=2
273274
- make -C unit "CXX=${COMPILER} ${EXTRA_CXXFLAGS}" -j2
274275
- make -C unit test
276+
- env UBSAN_OPTIONS=print_stacktrace=1 make -C jbmc/regression test-parallel "CXX=${COMPILER} ${EXTRA_CXXFLAGS}" -j2 JOBS=2
277+
- make -C jbmc/unit "CXX=${COMPILER} ${EXTRA_CXXFLAGS}" -j2
278+
- make -C jbmc/unit test
275279

276280
before_cache:
277281
- ccache -s

CMakeLists.txt

+12-4
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ set(sat_impl "minisat2" CACHE STRING
3535
)
3636

3737
add_subdirectory(src)
38+
add_subdirectory(jbmc)
3839

3940
if(${enable_cbmc_tests})
4041
enable_testing()
@@ -63,15 +64,11 @@ set_target_properties(
6364
goto-instrument-lib
6465
goto-programs
6566
goto-symex
66-
java_bytecode
67-
jbmc
68-
jbmc-lib
6967
jsil
7068
json
7169
langapi
7270
linking
7371
miniBDD
74-
miniz
7572
mmcc
7673
pointer-analysis
7774
solvers
@@ -81,6 +78,17 @@ set_target_properties(
8178
util
8279
xml
8380

81+
java_bytecode
82+
jbmc
83+
jbmc-lib
84+
janalyzer
85+
janalyzer-lib
86+
jdiff
87+
jdiff-lib
88+
java-testing-utils
89+
java-unit
90+
miniz
91+
8492
PROPERTIES
8593
CXX_STANDARD 11
8694
CXX_STANDARD_REQUIRED true

COMPILING.md

+19-4

appveyor.yml

+17-8
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ build_script:
5353
call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x64
5454
sed -i "s/BUILD_ENV[ ]*=.*/BUILD_ENV = MSVC/" src/config.inc
5555
make -C src -j2
56+
make -C jbmc/src -j2
5657
5758
test_script:
5859
- cmd: |
5960
cd regression
60-
6161
rem HACK disable failing tests
6262
rmdir /s /q ansi-c\arch_flags_mcpu_bad
6363
rmdir /s /q ansi-c\arch_flags_mcpu_good
@@ -90,15 +90,24 @@ test_script:
9090
rmdir /s /q cpp\nullptr1
9191
rmdir /s /q cpp\sizeof1
9292
rmdir /s /q cpp\static_assert1
93-
rmdir /s /q cbmc-java\VarLengthArrayTrace1
94-
rmdir /s /q cbmc-java\classpath1
95-
rmdir /s /q cbmc-java\jar-file3
96-
rmdir /s /q cbmc-java\tableswitch2
9793
rmdir /s /q goto-gcc
9894
rmdir /s /q goto-instrument\slice08
95+
cd ..
9996
100-
make test
97+
make -C regression test
10198
102-
cd ..
103-
make -C unit all
99+
make -C unit all -j2
104100
make -C unit test
101+
102+
cd jbmc/regression
103+
rmdir /s /q jbmc\VarLengthArrayTrace1
104+
rmdir /s /q jbmc\classpath1
105+
rmdir /s /q jbmc\jar-file3
106+
rmdir /s /q jbmc\tableswitch2
107+
rmdir /s /q jbmc-concurrency\explicit_thread_blocks
108+
cd ../..
109+
110+
make -C jbmc/regression test
111+
112+
make -C jbmc/unit all -j2
113+
make -C jbmc/unit test

jbmc/CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
add_subdirectory(regression)
2+
add_subdirectory(src)
3+
add_subdirectory(unit)

jbmc/README.md

+52

jbmc/regression/CMakeLists.txt

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
set(test_pl_path "${CMAKE_CURRENT_SOURCE_DIR}/test.pl")
2+
3+
macro(add_test_pl_profile name cmdline flag profile)
4+
add_test(
5+
NAME "${name}-${profile}"
6+
COMMAND ${test_pl_path} -p -c ${cmdline} ${flag} ${ARGN}
7+
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
8+
)
9+
set_tests_properties("${name}-${profile}" PROPERTIES
10+
LABELS "${profile};CBMC"
11+
)
12+
endmacro(add_test_pl_profile)
13+
14+
macro(add_test_pl_tests cmdline)
15+
get_filename_component(TEST_DIR_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
16+
message(STATUS "Adding tests in directory: ${TEST_DIR_NAME}")
17+
add_test_pl_profile("${TEST_DIR_NAME}" "${cmdline}" -C CORE ${ARGN})
18+
add_test_pl_profile("${TEST_DIR_NAME}" "${cmdline}" -T THOROUGH ${ARGN})
19+
add_test_pl_profile("${TEST_DIR_NAME}" "${cmdline}" -F FUTURE ${ARGN})
20+
add_test_pl_profile("${TEST_DIR_NAME}" "${cmdline}" -K KNOWNBUG ${ARGN})
21+
endmacro(add_test_pl_tests)
22+
23+
# For the best possible utilisation of multiple cores when
24+
# running tests in parallel, it is important that these directories are
25+
# listed with decreasing runtimes (i.e. longest running at the top)
26+
add_subdirectory(jbmc)
27+
add_subdirectory(strings-smoke-tests)
28+
add_subdirectory(jbmc-strings)
29+
add_subdirectory(jdiff)
30+
add_subdirectory(janalyzer-taint)
31+
add_subdirectory(jbmc-concurrency)
32+
add_subdirectory(jbmc-inheritance)
33+
add_subdirectory(jbmc-cover)

jbmc/regression/Makefile

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# For the best possible utilisation of multiple cores when
2+
# running tests in parallel, it is important that these directories are
3+
# listed with decreasing runtimes (i.e. longest running at the top)
4+
DIRS = janalzyer-taint \
5+
jbmc \
6+
jbmc-concurrency \
7+
jbmc-cover \
8+
jbmc-inheritance \
9+
jbmc-strings \
10+
jdiff \
11+
string-smoke-tests \
12+
# Empty last line
13+
14+
# Tests under goto-gcc cannot be run on Windows, so appveyor.yml unlinks
15+
# the entire directory under Windows. This variable will contain the list
16+
# of directories that actually exist on the current platform.
17+
PLATFORM_DIRS = $(wildcard $(DIRS))
18+
19+
# Run all test directories in sequence
20+
.PHONY: test
21+
test:
22+
@for dir in $(PLATFORM_DIRS); do \
23+
$(MAKE) "$$dir" || exit 1; \
24+
done;
25+
26+
# Pattern to execute a single test suite directory
27+
.PHONY: $(PLATFORM_DIRS)
28+
$(PLATFORM_DIRS):
29+
@echo "Running $@..." ;
30+
$(MAKE) -C "$@" test || exit 1;
31+
32+
# Run all test directories using GNU Parallel
33+
.PHONY: test-parallel
34+
.NOTPARALLEL: test-parallel
35+
test-parallel:
36+
@echo "Building with $(JOBS) jobs"
37+
parallel \
38+
--halt soon,fail=1 \
39+
--tag \
40+
--tagstring '{#}:' \
41+
--linebuffer \
42+
--jobs $(JOBS) \
43+
$(MAKE) "{}" \
44+
::: $(PLATFORM_DIRS)
45+
46+
47+
.PHONY: clean
48+
clean:
49+
@for dir in *; do \
50+
if [ -d "$$dir" ]; then \
51+
$(MAKE) -C "$$dir" clean; \
52+
fi; \
53+
done;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
add_test_pl_tests(
2+
"$<TARGET_FILE:goto-analyzer>"
3+
)

regression/goto-analyzer-taint-ansi-c/Makefile renamed to jbmc/regression/janalyzer-taint/Makefile

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
default: tests.log
22

3+
include ../../src/config.inc
4+
35
test:
4-
@../test.pl -p -c ../../../src/goto-analyzer/goto-analyzer
6+
@../$(CPROVER_DIR)/regression/test.pl -p -c ../../../src/janalyzer/janalyzer
57

6-
tests.log: ../test.pl
7-
@../test.pl -p -c ../../../src/goto-analyzer/goto-analyzer
8+
tests.log: ../$(CPROVER_DIR)/regression/test.pl
9+
@../$(CPROVER_DIR)/regression/test.pl -p -c ../../../src/janalyzer/janalyzer
810

911
show:
1012
@for dir in *; do \

regression/cbmc-java-concurrency/Makefile renamed to jbmc/regression/jbmc-concurrency/Makefile

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
default: tests.log
22

3+
include ../../src/config.inc
4+
35
test:
4-
@../test.pl -p -c ../../../src/jbmc/jbmc
6+
@../$(CPROVER_DIR)/regression/test.pl -p -c ../../../src/jbmc/jbmc
57

6-
tests.log: ../test.pl
7-
@../test.pl -p -c ../../../src/jbmc/jbmc
8+
tests.log: ../$(CPROVER_DIR)/regression/test.pl
9+
@../$(CPROVER_DIR)/regression/test.pl -p -c ../../../src/jbmc/jbmc
810

911
show:
1012
@for dir in *; do \

regression/cbmc-java-inheritance/Makefile renamed to jbmc/regression/jbmc-cover/Makefile

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
default: tests.log
22

3+
include ../../src/config.inc
4+
35
test:
4-
@../test.pl -p -c ../../../src/jbmc/jbmc
6+
@../$(CPROVER_DIR)/regression/test.pl -p -c ../../../src/jbmc/jbmc
57

6-
tests.log: ../test.pl
7-
@../test.pl -p -c ../../../src/jbmc/jbmc
8+
tests.log: ../$(CPROVER_DIR)/regression/test.pl
9+
@../$(CPROVER_DIR)/regression/test.pl -p -c ../../../src/jbmc/jbmc
810

911
show:
1012
@for dir in *; do \

regression/cbmc-java/Makefile renamed to jbmc/regression/jbmc-inheritance/Makefile

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
default: tests.log
22

3+
include ../../src/config.inc
4+
35
test:
4-
@../test.pl -p -c ../../../src/jbmc/jbmc
5-
@../test.pl -p -c "../../../src/jbmc/jbmc --symex-driven-lazy-loading" -X symex-driven-lazy-loading-expected-failure
6+
@../$(CPROVER_DIR)/regression/test.pl -p -c ../../../src/jbmc/jbmc
67

7-
tests.log: ../test.pl
8-
@../test.pl -p -c ../../../src/jbmc/jbmc
9-
@../test.pl -p -c "../../../src/jbmc/jbmc --symex-driven-lazy-loading" -X symex-driven-lazy-loading-expected-failure
8+
tests.log: ../$(CPROVER_DIR)/regression/test.pl
9+
@../$(CPROVER_DIR)/regression/test.pl -p -c ../../../src/jbmc/jbmc
1010

1111
show:
1212
@for dir in *; do \

0 commit comments

Comments
 (0)