angr.exploration_techniques.spiller

class angr.exploration_techniques.spiller.PickledStatesBase

Bases: object

The base class of pickled states

sort()

Sort pickled states.

add(prio, sid)

Add a newly pickled state.

Parameters:
  • prio (int) – Priority of the state.

  • sid (str) – Persistent ID of the state.

Returns:

None

pop_n(n)

Pop the top N states.

Parameters:

n (int) – Number of states to take.

Returns:

A list of states.

class angr.exploration_techniques.spiller.PickledStatesList

Bases: PickledStatesBase

List-backed pickled state storage.

__init__()
class angr.exploration_techniques.spiller.PickledStatesDb

Bases: PickledStatesBase

Database-backed pickled state storage.

__init__(db_str='sqlite:///:memory:')
get_recent_n(n, stash='spilled')
count()
class angr.exploration_techniques.spiller.Spiller

Bases: ExplorationTechnique

Automatically spill states out. It can spill out states to a different stash, spill them out to ANA, or first do the former and then (after enough states) the latter.

__init__(src_stash='active', min=5, max=10, staging_stash='spill_stage', staging_min=10, staging_max=20, pickle_callback=None, unpickle_callback=None, post_pickle_callback=None, priority_key=None, vault=None, states_collection=None)

Initializes the spiller.

Parameters:
  • max – the number of states that are not spilled

  • src_stash – the stash from which to spill states (default: active)

  • staging_stash – the stash to which to spill states (default: “spill_stage”)

  • staging_max – the number of states that can be in the staging stash before things get spilled to ANA (default: None. If staging_stash is set, then this means unlimited, and ANA will not be used).

  • priority_key – a function that takes a state and returns its numerical priority (MAX_INT is lowest priority). By default, self.state_priority will be used, which prioritizes by object ID.

  • vault – an angr.Vault object to handle storing and loading of states. If not provided, an angr.vaults.VaultShelf will be created with a temporary file.

static state_priority(state)