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.
Merge pull request diffblue#2225 from cesaro/extended-java-models
JBMC: Added java-models-library dependency
- Loading branch information
Showing
19 changed files
with
79 additions
and
257 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 |
---|---|---|
|
@@ -238,6 +238,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" | ||
|
@@ -264,6 +265,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 | ||
|
@@ -291,4 +293,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
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.