#include "java_bytecode_convert_class.h"#include <util/cmdline.h>#include <util/config.h>#include <util/expr_iterator.h>#include <util/invariant.h>#include <util/journalling_symbol_table.h>#include <util/options.h>#include <util/suffix.h>#include <util/symbol_table_builder.h>#include <goto-programs/class_hierarchy.h>#include <json/json_parser.h>#include <linking/static_lifetime_init.h>#include "ci_lazy_methods.h"#include "create_array_with_type_intrinsic.h"#include "expr2java.h"#include "java_bytecode_concurrency_instrumentation.h"#include "java_bytecode_convert_method.h"#include "java_bytecode_instrument.h"#include "java_bytecode_internal_additions.h"#include "java_bytecode_language.h"#include "java_bytecode_typecheck.h"#include "java_class_loader.h"#include "java_class_loader_limit.h"#include "java_entry_point.h"#include "java_static_initializers.h"#include "java_string_literal_expr.h"#include "java_string_literals.h"#include "java_utils.h"#include "lambda_synthesis.h"#include "lift_clinit_calls.h"#include "load_method_by_regex.h"#include <fstream>#include <string>Go to the source code of this file.
Add a stub global symbol to the symbol table, initialising pointer-typed symbols with null and primitive-typed ones with an arbitrary (nondet) value.
Definition at line 636 of file java_bytecode_language.cpp.
Search for getstatic and putstatic instructions in a class' bytecode and create stub symbols for any static fields that aren't already in the symbol table.
The new symbols are null-initialized for reference-typed globals / static fields, and nondet-initialized for primitives.
Definition at line 719 of file java_bytecode_language.cpp.
Creates global variables for constants mentioned in a given method.
These are either string literals, or class literals (the java.lang.Class instance returned by (some_reference_typed_expression).class). The method parse tree is rewritten to directly reference these globals.
--refine-stings is active, which changes how string literals are structured. Definition at line 591 of file java_bytecode_language.cpp.
Find any incomplete ancestor of a given class that can have a stub static field attached to it.
This specifically excludes java.lang.Object, which we know cannot have static fields.
Definition at line 677 of file java_bytecode_language.cpp.
Definition at line 112 of file java_bytecode_language.cpp.
Get result of a Java load-constant (ldc) instruction.
Possible cases: 1) Pushing a String causes a reference to a java.lang.String object to be constructed and pushed onto the operand stack. 2) Pushing an int or a float causes a primitive value to be pushed onto the stack. 3) Pushing a Class constant causes a reference to a java.lang.Class to be pushed onto the operand stack
ldc_arg0 is a String or Class constant then a new constant global may be added. Definition at line 554 of file java_bytecode_language.cpp.
Create if necessary, then return the constant global java.lang.Class symbol for a given class id.
Definition at line 513 of file java_bytecode_language.cpp.
Infer fields that must exist on opaque types from field accesses against them.
Note that we don't yet try to infer inheritence between opaque types here, so we may introduce the same field onto a type and its ancestor without realising that is in fact the same field, inherited from that ancestor. This can lead to incorrect results when opaque types are cast to other opaque types and their fields do not alias as intended. We set opaque fields as final to avoid assuming they can be overridden.
Definition at line 447 of file java_bytecode_language.cpp.
Definition at line 1532 of file java_bytecode_language.cpp.
Notify ci_lazy_methods, if present, of any static function calls made by the given function body.
Note only static function calls need to be reported – virtual function calls are routinely found by searching the function body after conversion because we can only approximate the possible callees once all function bodies currently believed to be needed have been loaded.
function_body. Definition at line 1226 of file java_bytecode_language.cpp.
Parse options that are java bytecode specific.
Definition at line 51 of file java_bytecode_language.cpp.
Definition at line 316 of file java_bytecode_language.cpp.