forked from diffblue/cbmc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JBMC: Added java-models-library dependency
This commit adds a dependency to the java-models-library (https://github.com/diffblue/java-models-library). This repository contains models for number of classes derived from the java standard library. These models are needed to support concurrency. This means that the process of building JBMC has changed slightly as one first needs to download the java-models-library. I.E: make -C jbmc/src java-models-library-download make -C jbmc/src Due possible licensing issues, the ability to automatically embed the java core models into JBMC has been removed. Instead, one must explicitly use the '--classpath' option to load the models. Consequently, the '--no-core-models' option and related code was removed as it is no longer relevant. Commit also adds a new make target, 'make dist'. This target in addition to building jbmc will create a 'dist' directory with two sub-folders, bin and lib. Executables will be copied to the former, while 'core-models.jar' will copied to the latter. Note: src/org/cprover/CProver.java has also been removed as this has been superseded by the CProver.java in the java-models-library.
- Loading branch information
Showing
18 changed files
with
78 additions
and
256 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -233,6 +233,7 @@ jobs: | |
name: "diffblue/cbmc" | ||
description: "Travis build of ${TRAVIS_COMMIT}" | ||
notification_email: "[email protected]" | ||
build_command_prepend: "make -C jbmc/src java-models-library-download" | ||
build_command_prepend: "make -C src minisat2-download" | ||
build_command: "make -C src -j2; make -C jbmc/src -j2" | ||
branch_pattern: "develop" | ||
|
@@ -259,6 +260,7 @@ jobs: | |
install: | ||
- ccache -z | ||
- ccache --max-size=1G | ||
- make -C jbmc/src java-models-library-download | ||
- make -C src minisat2-download | ||
- make -C src/ansi-c library_check | ||
- make -C src "CXX=${COMPILER} ${EXTRA_CXXFLAGS}" -j3 | ||
|
@@ -286,4 +288,3 @@ notifications: | |
on_start: never | ||
on_cancel: never | ||
on_error: always | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,7 +44,6 @@ Author: Daniel Kroening, [email protected] | |
void java_bytecode_languaget::get_language_options(const cmdlinet &cmd) | ||
{ | ||
assume_inputs_non_null=cmd.isset("java-assume-inputs-non-null"); | ||
java_class_loader.set_use_core_models(!cmd.isset("no-core-models")); | ||
string_refinement_enabled=cmd.isset("refine-strings"); | ||
throw_runtime_exceptions=cmd.isset("java-throw-runtime-exceptions"); | ||
if(cmd.isset("java-max-input-array-length")) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,6 @@ Author: Daniel Kroening, [email protected] | |
#include <langapi/language.h> | ||
|
||
#define JAVA_BYTECODE_LANGUAGE_OPTIONS /*NOLINT*/ \ | ||
"(no-core-models)" \ | ||
"(java-assume-inputs-non-null)" \ | ||
"(java-throw-runtime-exceptions)" \ | ||
"(java-max-input-array-length):" \ | ||
|
@@ -40,8 +39,6 @@ Author: Daniel Kroening, [email protected] | |
"(java-no-load-class):" | ||
|
||
#define JAVA_BYTECODE_LANGUAGE_OPTIONS_HELP /*NOLINT*/ \ | ||
" --no-core-models don't load internally provided models for core classes in\n"/* NOLINT(*) */ \ | ||
" the Java Class Library\n" /* NOLINT(*) */ \ | ||
" --java-assume-inputs-non-null never initialize reference-typed parameter to the\n" /* NOLINT(*) */ \ | ||
" entry point with null\n" /* NOLINT(*) */ \ | ||
" --java-throw-runtime-exceptions make implicit runtime exceptions explicit\n" /* NOLINT(*) */ \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,15 +17,6 @@ Author: Daniel Kroening, [email protected] | |
|
||
#include "java_bytecode_parser.h" | ||
|
||
#include "library/java_core_models.inc" | ||
|
||
/// This variable stores the data of the file core-models.jar. The macro | ||
/// JAVA_CORE_MODELS_SIZE is defined in the header java_core_models.inc, which | ||
/// gets generated at compile time by running a small utility (converter.cpp) on | ||
/// actual .jar file. The number of bytes in the variable is | ||
/// JAVA_CORE_MODELS_SIZE, another macro defined in java_core_models.inc. | ||
unsigned char java_core_models[] = { JAVA_CORE_MODELS_DATA }; | ||
|
||
java_class_loadert::parse_tree_with_overlayst &java_class_loadert::operator()( | ||
const irep_idt &class_name) | ||
{ | ||
|
@@ -137,27 +128,6 @@ java_class_loadert::get_parse_tree( | |
parse_trees.emplace_back(std::move(*parse_tree)); | ||
} | ||
|
||
// Then add core models | ||
if(use_core_models) | ||
{ | ||
// Add internal jar file. The name is used to load it once only and | ||
// reference it later. | ||
std::string core_models = "core-models.jar"; | ||
jar_pool( | ||
class_loader_limit, core_models, java_core_models, JAVA_CORE_MODELS_SIZE); | ||
|
||
// This does not read from the jar file but from the jar_filet object we | ||
// just created | ||
jar_index_optcreft index = read_jar_file(class_loader_limit, core_models); | ||
if(index) | ||
{ | ||
optionalt<java_bytecode_parse_treet> parse_tree = | ||
get_class_from_jar(class_name, core_models, *index, class_loader_limit); | ||
if(parse_tree) | ||
parse_trees.emplace_back(std::move(*parse_tree)); | ||
} | ||
} | ||
|
||
// Then add everything on the class path | ||
for(const auto &cp_entry : config.java.classpath) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.