ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
jimple_ast Class Referenceabstract

Base interface for Jimple AST. More...

#include <jimple_ast.h>

Inheritance diagram for jimple_ast:
[legend]

Public Member Functions

void dump () const
 Prints the contents into the the stdout.
virtual void from_json (const json &)=0
 Initializes the current instance by parsing a JSON.
virtual std::string to_string () const =0
 Converts the object into a string.

Public Attributes

int line_location = -1
 instruction location

Static Protected Member Functions

static symbolt create_jimple_symbolt (const type2tc &t, const std::string &module, const std::string &name, const std::string &id, const std::string function_name="")
 creates a symbol with the default characteristics
static symbolt get_temp_symbol (const type2tc &t, const std::string &class_name, const std::string &function_name)
 Create a temporary variable to be used.
static symbolt get_allocation_function ()
 Get the allocation function symbol.
static symbolt get_lengthof_function ()
 Get the esbmc_get_object_size symbol.
static std::string get_method_name (std::string class_name, std::string function_name)
 Get the unique method name.
static std::string get_symbol_name (std::string class_name, std::string function_name, std::string symbol)
 Get the symbol name id.
static locationt get_location (const std::string &module, const std::string function_name="")
 initialize a location for the symbol

Detailed Description

Base interface for Jimple AST.

Member Function Documentation

◆ create_jimple_symbolt()

symbolt jimple_ast::create_jimple_symbolt ( const type2tc & t,
const std::string & module,
const std::string & name,
const std::string & id,
const std::string function_name = "" )
inlinestaticprotected

creates a symbol with the default characteristics

TODO: Right now, we are setting it as C mode. In time, we should convert it to Jimple. By using C mode, we don't have to worry about typecast and primitives for now.

We still need to create every intrinsic type and variable for JVM

Returns
an initialized symbolt

◆ dump()

void jimple_ast::dump ( ) const
inline

Prints the contents into the the stdout.

◆ from_json()

◆ get_allocation_function()

symbolt jimple_ast::get_allocation_function ( )
inlinestaticprotected

Get the allocation function symbol.

This is going to be the function to be called for new and newarray calls

Returns
symbolt

◆ get_lengthof_function()

symbolt jimple_ast::get_lengthof_function ( )
inlinestaticprotected

Get the esbmc_get_object_size symbol.

This is going to be the function to be called for lengthof

Returns
symbolt

◆ get_location()

locationt jimple_ast::get_location ( const std::string & module,
const std::string function_name = "" )
inlinestaticprotected

initialize a location for the symbol

Returns
the location of a symbol (file, class, function)

◆ get_method_name()

std::string jimple_ast::get_method_name ( std::string class_name,
std::string function_name )
inlinestaticprotected

Get the unique method name.

This is the full id for the method,

In jimple this will mean class_name:function_name

Parameters
class_name
function_name
Returns
std::string

◆ get_symbol_name()

std::string jimple_ast::get_symbol_name ( std::string class_name,
std::string function_name,
std::string symbol )
inlinestaticprotected

Get the symbol name id.

Note: Jimple is already in SSA form

Parameters
class_name
function_name
symbol
Returns
std::string

◆ get_temp_symbol()

symbolt jimple_ast::get_temp_symbol ( const type2tc & t,
const std::string & class_name,
const std::string & function_name )
inlinestaticprotected

Create a temporary variable to be used.

Parameters
ttype of the variable
class_nameclass package to the variable
function_namefunction where the variable is going to be created
Returns
symbolt

◆ to_string()

Member Data Documentation

◆ line_location

int jimple_ast::line_location = -1

instruction location


The documentation for this class was generated from the following file: