Skip to content

Commit cc56c44

Browse files
Move lazy_goto_modelt to JBMC
Lazy_goto_modelt is currently only used for Java bytecode. Loading Java classes cannot be shoehorned into the current interfaces provided by languaget without a redesign of languaget (which is currently not desired). We will therefore special-case Java-style loading in lazy_goto_modelt until the languaget interface has been rethought. Lazy loading support for other languages is not planned in forseeable future.
1 parent be384e5 commit cc56c44

File tree

8 files changed

+19
-17
lines changed

8 files changed

+19
-17
lines changed

jbmc/src/java_bytecode/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ SRC = assignments_from_json.cpp \
4343
java_trace_validation.cpp \
4444
java_types.cpp \
4545
java_utils.cpp \
46-
lift_clinit_calls.cpp \
4746
lambda_synthesis.cpp \
47+
lazy_goto_model.cpp \
48+
lift_clinit_calls.cpp \
4849
load_method_by_regex.cpp \
4950
mz_zip_archive.cpp \
5051
remove_exceptions.cpp \

src/goto-programs/lazy_goto_functions_map.h renamed to jbmc/src/java_bytecode/lazy_goto_functions_map.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
#include <unordered_set>
1010

11-
#include "goto_functions.h"
12-
#include "goto_convert_functions.h"
11+
#include <goto-programs/goto_convert_functions.h>
12+
#include <goto-programs/goto_functions.h>
1313

1414
#include <langapi/language_file.h>
1515
#include <util/journalling_symbol_table.h>

src/goto-programs/lazy_goto_model.cpp renamed to jbmc/src/java_bytecode/lazy_goto_model.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
/// Model for lazy loading of functions
55

66
#include "lazy_goto_model.h"
7-
#include "read_goto_binary.h"
8-
#include "rebuild_goto_start_function.h"
7+
8+
#include <goto-programs/read_goto_binary.h>
9+
#include <goto-programs/rebuild_goto_start_function.h>
910

1011
#include <langapi/mode.h>
1112

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88

99
#include <langapi/language_file.h>
1010

11-
#include "abstract_goto_model.h"
12-
#include "goto_model.h"
11+
#include <goto-programs/abstract_goto_model.h>
12+
#include <goto-programs/goto_convert_functions.h>
13+
#include <goto-programs/goto_model.h>
14+
1315
#include "lazy_goto_functions_map.h"
14-
#include "goto_convert_functions.h"
1516

1617
class optionst;
1718

jbmc/src/jbmc/jbmc_parse_options.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,22 @@ Author: Daniel Kroening, kroening@kroening.com
3535
#include <goto-checker/stop_on_fail_verifier_with_fault_localization.h>
3636

3737
#include <goto-programs/adjust_float_expressions.h>
38-
#include <goto-programs/lazy_goto_model.h>
39-
#include <goto-programs/instrument_preconditions.h>
4038
#include <goto-programs/goto_convert_functions.h>
4139
#include <goto-programs/goto_inline.h>
40+
#include <goto-programs/instrument_preconditions.h>
4241
#include <goto-programs/loop_ids.h>
43-
#include <goto-programs/remove_virtual_functions.h>
4442
#include <goto-programs/remove_returns.h>
45-
#include <goto-programs/remove_unused_functions.h>
4643
#include <goto-programs/remove_skip.h>
44+
#include <goto-programs/remove_unused_functions.h>
45+
#include <goto-programs/remove_virtual_functions.h>
4746
#include <goto-programs/set_properties.h>
4847
#include <goto-programs/show_goto_functions.h>
49-
#include <goto-programs/show_symbol_table.h>
5048
#include <goto-programs/show_properties.h>
49+
#include <goto-programs/show_symbol_table.h>
5150

5251
#include <goto-instrument/full_slicer.h>
53-
#include <goto-instrument/reachability_slicer.h>
5452
#include <goto-instrument/nondet_static.h>
53+
#include <goto-instrument/reachability_slicer.h>
5554

5655
#include <goto-symex/path_storage.h>
5756

@@ -68,6 +67,7 @@ Author: Daniel Kroening, kroening@kroening.com
6867
#include <java_bytecode/java_multi_path_symex_only_checker.h>
6968
#include <java_bytecode/java_single_path_symex_checker.h>
7069
#include <java_bytecode/java_single_path_symex_only_checker.h>
70+
#include <java_bytecode/lazy_goto_model.h>
7171
#include <java_bytecode/remove_exceptions.h>
7272
#include <java_bytecode/remove_instanceof.h>
7373
#include <java_bytecode/remove_java_new.h>

jbmc/src/jbmc/jbmc_parse_options.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ Author: Daniel Kroening, kroening@kroening.com
2525

2626
#include <goto-programs/class_hierarchy.h>
2727
#include <goto-programs/goto_trace.h>
28-
#include <goto-programs/lazy_goto_model.h>
2928
#include <goto-programs/show_properties.h>
29+
#include <java_bytecode/lazy_goto_model.h>
3030

3131
#include <goto-symex/path_storage.h>
3232

jbmc/unit/java-testing-utils/load_java_class.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Author: Diffblue Ltd.
1717
#include <util/options.h>
1818
#include <util/suffix.h>
1919

20-
#include <goto-programs/lazy_goto_model.h>
20+
#include <java_bytecode/lazy_goto_model.h>
2121

2222
#include <java_bytecode/java_bytecode_language.h>
2323
#include <util/file_util.h>

src/goto-programs/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ SRC = adjust_float_expressions.cpp \
2828
interpreter_evaluate.cpp \
2929
json_expr.cpp \
3030
json_goto_trace.cpp \
31-
lazy_goto_model.cpp \
3231
link_goto_model.cpp \
3332
link_to_library.cpp \
3433
loop_ids.cpp \

0 commit comments

Comments
 (0)