Skip to content

cbmc: remove dependency on java_bytecode #2080

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/cbmc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ target_link_libraries(cbmc-lib
goto-instrument-lib
goto-programs
goto-symex
java_bytecode
json
langapi
linking
Expand Down
1 change: 0 additions & 1 deletion src/cbmc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ SRC = all_properties.cpp \

OBJ += ../ansi-c/ansi-c$(LIBEXT) \
../cpp/cpp$(LIBEXT) \
../java_bytecode/java_bytecode$(LIBEXT) \
../linking/linking$(LIBEXT) \
../big-int/big-int$(LIBEXT) \
../goto-programs/goto-programs$(LIBEXT) \
Expand Down
4 changes: 0 additions & 4 deletions src/cbmc/cbmc_parse_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ Author: Daniel Kroening, [email protected]
#include <goto-programs/mm_io.h>
#include <goto-programs/read_goto_binary.h>
#include <goto-programs/remove_function_pointers.h>
#include <goto-programs/remove_instanceof.h>
#include <goto-programs/remove_returns.h>
#include <goto-programs/remove_exceptions.h>
#include <goto-programs/remove_vector.h>
#include <goto-programs/remove_complex.h>
#include <goto-programs/remove_asm.h>
Expand Down Expand Up @@ -760,8 +758,6 @@ bool cbmc_parse_optionst::process_goto_program(
log.get_message_handler(),
goto_model,
options.get_bool_option("pointer-check"));
// remove catch and throw (introduces instanceof)
remove_exceptions(goto_model);

mm_io(goto_model);

Expand Down
5 changes: 3 additions & 2 deletions src/goto-analyzer/goto_analyzer_parse_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ Author: Daniel Kroening, [email protected]
#include <goto-programs/set_properties.h>
#include <goto-programs/remove_function_pointers.h>
#include <goto-programs/remove_virtual_functions.h>
#include <goto-programs/remove_exceptions.h>
#include <goto-programs/remove_instanceof.h>
#include <goto-programs/remove_returns.h>
#include <goto-programs/remove_vector.h>
#include <goto-programs/remove_complex.h>
Expand All @@ -45,6 +43,9 @@ Author: Daniel Kroening, [email protected]
#include <analyses/dependence_graph.h>
#include <analyses/interval_domain.h>

#include <java_bytecode/remove_exceptions.h>
#include <java_bytecode/remove_instanceof.h>

#include <langapi/mode.h>
#include <langapi/language.h>

Expand Down
4 changes: 2 additions & 2 deletions src/goto-diff/goto_diff_parse_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ Author: Peter Schrammel
#include <goto-programs/mm_io.h>
#include <goto-programs/remove_function_pointers.h>
#include <goto-programs/remove_virtual_functions.h>
#include <goto-programs/remove_instanceof.h>
#include <goto-programs/remove_returns.h>
#include <goto-programs/remove_exceptions.h>
#include <goto-programs/remove_vector.h>
#include <goto-programs/remove_complex.h>
#include <goto-programs/remove_asm.h>
Expand All @@ -54,6 +52,8 @@ Author: Peter Schrammel
#include <pointer-analysis/add_failed_symbols.h>

#include <java_bytecode/java_bytecode_language.h>
#include <java_bytecode/remove_instanceof.h>
#include <java_bytecode/remove_exceptions.h>

#include <langapi/mode.h>

Expand Down
5 changes: 3 additions & 2 deletions src/goto-instrument/goto_instrument_parse_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ Author: Daniel Kroening, [email protected]
#include <goto-programs/remove_calls_no_body.h>
#include <goto-programs/remove_function_pointers.h>
#include <goto-programs/remove_virtual_functions.h>
#include <goto-programs/remove_exceptions.h>
#include <goto-programs/remove_instanceof.h>
#include <goto-programs/remove_skip.h>
#include <goto-programs/goto_inline.h>
#include <goto-programs/show_properties.h>
Expand All @@ -51,6 +49,9 @@ Author: Daniel Kroening, [email protected]
#include <pointer-analysis/add_failed_symbols.h>
#include <pointer-analysis/show_value_sets.h>

#include <java_bytecode/remove_exceptions.h>
#include <java_bytecode/remove_instanceof.h>

#include <analyses/natural_loops.h>
#include <analyses/global_may_alias.h>
#include <analyses/local_bitvector_analysis.h>
Expand Down
2 changes: 0 additions & 2 deletions src/goto-programs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ SRC = basic_blocks.cpp \
remove_calls_no_body.cpp \
remove_complex.cpp \
remove_const_function_pointers.cpp \
remove_exceptions.cpp \
remove_function_pointers.cpp \
remove_instanceof.cpp \
remove_returns.cpp \
remove_skip.cpp \
remove_unreachable.cpp \
Expand Down
2 changes: 2 additions & 0 deletions src/java_bytecode/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ SRC = bytecode_info.cpp \
java_types.cpp \
java_utils.cpp \
mz_zip_archive.cpp \
remove_exceptions.cpp \
remove_instanceof.cpp \
select_pointer_type.cpp \
# Empty last line

Expand Down
11 changes: 6 additions & 5 deletions src/java_bytecode/ci_lazy_methods.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@
Author: Diffblue Ltd.

\*******************************************************************/

#include "ci_lazy_methods.h"
#include "java_entry_point.h"
#include "java_class_loader.h"
#include "java_utils.h"
#include "java_string_library_preprocess.h"
#include "remove_exceptions.h"

#include <java_bytecode/java_entry_point.h>
#include <java_bytecode/java_class_loader.h>
#include <java_bytecode/java_utils.h>
#include <util/suffix.h>
#include <java_bytecode/java_string_library_preprocess.h>

#include <goto-programs/resolve_inherited_component.h>
#include <goto-programs/remove_exceptions.h>

/// Constructor for lazy-method loading
/// \param symbol_table: the symbol table to use
Expand Down
2 changes: 1 addition & 1 deletion src/java_bytecode/java_bytecode_convert_method.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Author: Daniel Kroening, [email protected]
#include "java_string_library_preprocess.h"
#include "java_types.h"
#include "java_utils.h"
#include "remove_exceptions.h"

#include <util/arith_tools.h>
#include <util/c_types.h>
Expand All @@ -34,7 +35,6 @@ Author: Daniel Kroening, [email protected]
#include <linking/zero_initializer.h>

#include <goto-programs/cfg.h>
#include <goto-programs/remove_exceptions.h>
#include <goto-programs/class_hierarchy.h>
#include <goto-programs/resolve_inherited_component.h>
#include <analyses/cfg_dominators.h>
Expand Down
5 changes: 3 additions & 2 deletions src/java_bytecode/java_bytecode_internal_additions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ Author: Daniel Kroening, [email protected]

#include "java_bytecode_internal_additions.h"

// For INFLIGHT_EXCEPTION_VARIABLE_NAME
#include "remove_exceptions.h"

#include <util/std_types.h>
#include <util/cprover_prefix.h>
#include <util/c_types.h>
// For INFLIGHT_EXCEPTION_VARIABLE_NAME
#include <goto-programs/remove_exceptions.h>

void java_internal_additions(symbol_table_baset &dest)
{
Expand Down
3 changes: 1 addition & 2 deletions src/java_bytecode/java_entry_point.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ Author: Daniel Kroening, [email protected]
#include <util/string_constant.h>
#include <util/suffix.h>

#include <goto-programs/remove_exceptions.h>

#include "remove_exceptions.h"
#include "java_object_factory.h"
#include "java_types.h"
#include "java_utils.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Date: December 2016
/// \file
/// Remove function exceptional returns

#ifndef CPROVER_GOTO_PROGRAMS_REMOVE_EXCEPTIONS_H
#define CPROVER_GOTO_PROGRAMS_REMOVE_EXCEPTIONS_H
#ifndef CPROVER_JAVA_BYTECODE_REMOVE_EXCEPTIONS_H
#define CPROVER_JAVA_BYTECODE_REMOVE_EXCEPTIONS_H

#include <goto-programs/goto_model.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Author: Chris Smowton, [email protected]

#include "remove_instanceof.h"

#include "class_hierarchy.h"
#include "class_identifier.h"
#include <goto-programs/class_hierarchy.h>
#include <goto-programs/class_identifier.h>

#include <util/fresh_symbol.h>
#include <java_bytecode/java_types.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ Author: Chris Smowton, [email protected]
/// \file
/// Remove Instance-of Operators

#ifndef CPROVER_GOTO_PROGRAMS_REMOVE_INSTANCEOF_H
#define CPROVER_GOTO_PROGRAMS_REMOVE_INSTANCEOF_H
#ifndef CPROVER_JAVA_BYTECODE_REMOVE_INSTANCEOF_H
#define CPROVER_JAVA_BYTECODE_REMOVE_INSTANCEOF_H

#include <util/symbol_table.h>
#include "goto_functions.h"
#include "goto_model.h"

#include <goto-programs/goto_functions.h>
#include <goto-programs/goto_model.h>

void remove_instanceof(
goto_programt::targett target,
Expand Down
4 changes: 2 additions & 2 deletions src/jbmc/jbmc_parse_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ Author: Daniel Kroening, [email protected]
#include <goto-programs/goto_inline.h>
#include <goto-programs/loop_ids.h>
#include <goto-programs/remove_virtual_functions.h>
#include <goto-programs/remove_instanceof.h>
#include <goto-programs/remove_returns.h>
#include <goto-programs/remove_exceptions.h>
#include <goto-programs/remove_asm.h>
#include <goto-programs/remove_unused_functions.h>
#include <goto-programs/remove_skip.h>
Expand All @@ -56,6 +54,8 @@ Author: Daniel Kroening, [email protected]

#include <java_bytecode/java_bytecode_language.h>
#include <java_bytecode/java_enum_static_init_unwind_handler.h>
#include <java_bytecode/remove_instanceof.h>
#include <java_bytecode/remove_exceptions.h>

#include <cbmc/version.h>

Expand Down
12 changes: 8 additions & 4 deletions unit/java_bytecode/java_replace_nondet/replace_nondet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@

#include <goto-programs/goto_convert_functions.h>
#include <goto-programs/remove_virtual_functions.h>
#include <goto-programs/remove_returns.h>
#include <goto-programs/replace_java_nondet.h>

#include <java_bytecode/remove_instanceof.h>

#include <util/config.h>
#include <goto-instrument/cover.h>
#include <util/options.h>

#include <goto-instrument/cover.h>

#include <iostream>
#include <goto-programs/remove_returns.h>
#include <goto-programs/replace_java_nondet.h>
#include <goto-programs/remove_instanceof.h>

void validate_method_removal(
std::list<goto_programt::instructiont> instructions)
Expand Down