angr.engines.soot.values

class angr.engines.soot.values.SimSootValue_ArrayBaseRef

Bases: SimSootValue

__init__(heap_alloc_id, element_type, size, default_value_generator=None)
id
element_type
size
type
get_default_value(state)
Returns:

Default value for array elements.

add_default_value_generator(generator)

Add a generator for overwriting the default value for array elements.

Parameters:

generator (function) – Function that given the state, returns a default value for array elements, e.g. generator = lambda state: claripy.BVV(0, 32)

classmethod from_sootvalue(soot_value, state)
class angr.engines.soot.values.SimSootValue_ArrayRef

Bases: SimSootValue

__init__(base, index)
id
base
index
classmethod from_sootvalue(soot_value, state)
static translate_array_index(idx, state)
static check_array_bounds(idx, array, state)
class angr.engines.soot.values.SimSootValue_InstanceFieldRef

Bases: SimSootValue

__init__(heap_alloc_id, class_name, field_name, type_)
id
class_name
field_name
type
classmethod from_field_id(heap_alloc_id, field_id)
classmethod from_sootvalue(soot_value, state)
classmethod get_ref(state, obj_alloc_id, field_class_name, field_name, field_type)

Resolve the field within the given state.

class angr.engines.soot.values.SimSootValue_IntConstant

Bases: SimSootValue

__init__(value, type_)
value
type
classmethod from_sootvalue(soot_value, state)
class angr.engines.soot.values.SimSootValue_Local

Bases: SimSootValue

__init__(name, type_)
id
type
classmethod from_sootvalue(soot_value, state)
class angr.engines.soot.values.SimSootValue_ParamRef

Bases: SimSootValue

__init__(index, type_)
id
index
type
classmethod from_sootvalue(soot_value, state)
class angr.engines.soot.values.SimSootValue_StaticFieldRef

Bases: SimSootValue

__init__(class_name, field_name, type_)
id
class_name
field_name
type
classmethod from_field_id(field_id)
classmethod from_sootvalue(soot_value, state)
classmethod get_ref(state, field_class_name, field_name, field_type)

Resolve the field within the given state.

class angr.engines.soot.values.SimSootValue_StringRef

Bases: SimSootValue

__init__(heap_alloc_id)
id
type
classmethod from_sootvalue(soot_value, state)
static new_string(state, value)

Allocate and initialize a new string in the context of the state passed.

The method returns the reference to the newly allocated string

Parameters:
  • state (SimState) – angr state where we want to allocate the string

  • value (claripy.String) – value of the string to initialize

Returns:

SimSootValue_StringRef

class angr.engines.soot.values.SimSootValue_ThisRef

Bases: SimSootValue

__init__(heap_alloc_id, type_, symbolic=False)
property id
set_field(state, field_name, field_type, field_value)

Sets an instance field.

Parameters:
  • state (SimState) – angr state where we want to allocate the object attribute

  • field_name (str) – name of the attribute

  • field_type (str) – type of the attribute

  • field_value (SimSootValue) – attribute’s value

get_field(state, field_name, field_type)

Gets the value of an instance field.

Parameters:
  • state (SimState) – angr state where we want to allocate the object attribute

  • field_name (str) – name of the attribute

  • field_type (str) – type of the attribute

store_field(state, field_name, field_type, value)

Store a field of a given object, WITHOUT RESOLVING HIERARCHY

Parameters:
  • state (SimState) – angr state where we want to allocate the object attribute

  • field_name (str) – name of the attribute

  • field_value (SimSootValue) – attribute’s value

load_field(state, field_name, field_type)

Load a field of a given object, without resolving HIERARCHY

Parameters:
  • tastate (SimState) – angr state where we want to load the object attribute

  • field_name (str) – name of the attribute

  • field_type (str) – type of the attribute

classmethod from_sootvalue(soot_value, state)
classmethod new_object(state, type_, symbolic=False, init_object=False, init_class=False)

Creates a new object reference.

Parameters:
  • state – State associated to the object.

  • type_ – Class of the object.

  • init_object – Whether the objects initializer method should be run.

  • init_class – Whether the class initializer method should be run.

Returns:

Reference to the new object.

angr.engines.soot.values.translate_value(value, state)

Submodules