angr.knowledge_plugins.key_definitions.environment

class angr.knowledge_plugins.key_definitions.environment.Environment

Bases: object

Represent the environment in which a program runs. It’s a mapping of variable names, to claripy.ast.Base that should contain possible addresses, or <UNDEFINED>, at which their respective values are stored.

Note: The <Environment> object does not store the values associated with variables themselves.

__init__(environment=None)
Parameters:

environment (dict[str | Undefined, set[Base]] | None)

get(names)
Parameters:

names (set[str]) – Potential values for the name of the environment variable to get the pointers of.

Return type:

tuple[set[Base], bool]

Returns:

The potential addresses of the values the environment variable can take; And a boolean value telling whether all the names were known of the internal representation (i.e. will be False if one of the queried variable was not found).

set(name, pointers)
Parameters:
  • name (str | Undefined) – Name of the environment variable to which we will associate the pointers.

  • pointers (set[Base]) – New addresses where the new values of the environment variable are located.

merge(*others)
Return type:

tuple[Environment, bool]

Parameters:

others (Environment)

compare(other)
Return type:

bool

Parameters:

other (Environment)