#include "java_root_class.h"#include <util/fresh_symbol.h>#include <util/invariant.h>#include <util/mathematical_expr.h>#include <util/mathematical_types.h>#include <util/message.h>#include <util/prefix.h>#include <util/std_types.h>#include <util/string_utils.h>#include <util/symbol_table_base.h>#include "java_string_library_preprocess.h"#include "java_utils.h"#include <set>#include <unordered_set>Go to the source code of this file.
type_name is a Java boxed type tag, return information about it, otherwise return null. primitive_type is a Java primitive type, return information about it, otherwise return null. t. t. symbol. symbol to declaring_class. method_name is defined. Dereference an expression and flag it for a null-pointer check.
Definition at line 281 of file java_utils.cpp.
Get JVM type name of the class in which method_name is defined.
Returns an empty optional if the class name cannot be retrieved, e.g. method_name is an internal function.
Definition at line 580 of file java_utils.cpp.
Declare a function with the given name and type.
Definition at line 358 of file java_utils.cpp.
Gets the identifier of the class which declared a given symbol.
If the symbol is not declared by a class then an empty optional is returned. This is used for method symbols and static field symbols to link them back to the class which declared them.
Definition at line 568 of file java_utils.cpp.
Finds the corresponding closing delimiter to the given opening delimiter.
It is assumed that open_pos points to the opening delimiter open_char in the src string. The depth of nesting is counted to identify the correct closing delimiter.
A typical use case is for example Java generic types, e.g., List<List<T>>
src Definition at line 302 of file java_utils.cpp.
Definition at line 555 of file java_utils.cpp.
Definition at line 162 of file java_utils.cpp.
If type_name is a Java boxed type tag, return information about it, otherwise return null.
Definition at line 36 of file java_utils.cpp.
Finds an inherited component (method or field), taking component visibility into account.
Definition at line 448 of file java_utils.cpp.
If primitive_type is a Java primitive type, return information about it, otherwise return null.
Definition at line 63 of file java_utils.cpp.
Definition at line 207 of file java_utils.cpp.
Returns true iff the argument represents a string type (CharSequence, StringBuilder, StringBuffer or String).
The check for the length and data components is necessary in the case where string refinement is not activated. In this case, struct_type only contains the standard Object fields (or may have some other model entirely), and in particular may not have length and data fields.
Definition at line 27 of file java_utils.cpp.
Check if a symbol is a well-known non-null global.
Definition at line 519 of file java_utils.cpp.
Returns true iff the argument is the symbol-table identifier of a Java primitive wrapper type (for example, java::java.lang.Byte)
Definition at line 109 of file java_utils.cpp.
Returns true iff the argument is the fully qualified name of a Java primitive wrapper type (for example, java.lang.Byte)
Definition at line 114 of file java_utils.cpp.
Add the components in components_to_add to the class denoted by class symbol.
Definition at line 341 of file java_utils.cpp.
Definition at line 157 of file java_utils.cpp.
Returns the number of JVM local variables (slots) taken by a local variable that, when translated to goto, has type t.
Definition at line 128 of file java_utils.cpp.
Returns the the number of JVM local variables (slots) used by the JVM to pass, upon call, the arguments of a Java method whose type is t.
Definition at line 147 of file java_utils.cpp.
Create a (mathematical) function application expression.
The application has the type of the codomain (range) of the function.
function_name(arguments) Definition at line 384 of file java_utils.cpp.
Attaches a source location to an expression and all of its subexpressions.
Usually only codet needs this, but there are a few known examples of expressions needing a location, such as goto_convertt::do_function_call_symbol (function() needs a location) and goto_convertt::clean_expr (any subexpression being split into a separate instruction needs a location), so for safety we give every mentioned expression a location. Any code or expressions with source location fields already set keep those fields using rules of source_locationt::merge.
Definition at line 198 of file java_utils.cpp.
Given a pointer type to a Java class and a type representing a more specific Java class, return a pointer type to the more specific class with the same structure as the original pointer type.
Definition at line 269 of file java_utils.cpp.
Strip the package name from a java type, for the type to be pretty printed (java::java.lang.Integer -> Integer).
Definition at line 421 of file java_utils.cpp.
Resolves a user-friendly method name (like packagename.Class.method) into an internal name (like java::packagename.Class.method:()V) The input may also have a type descriptor suffix to resolve ambiguity.
On error, returns irep_idt() and sets error.
Definition at line 212 of file java_utils.cpp.
Sets the identifier of the class which declared a given symbol to declaring_class.
Definition at line 574 of file java_utils.cpp.
Strip java:: prefix from given identifier.
Definition at line 407 of file java_utils.cpp.
Methods belonging to the class org.cprover.CProver that should be ignored (not converted), leaving the driver program to stub them if it wishes.
Definition at line 529 of file java_utils.cpp.