angr.knowledge_plugins.cfg.spilling_digraph¶
SpillingDiGraph - a networkx.DiGraph subclass with LMDB-backed edge spilling.
This module provides SpillingAdjDict and SpillingDiGraph classes that implement disk-backed storage for graph adjacency data, following the SpillingCFGNodeDict pattern.
Edge attributes are serialized using the Edge protobuf message from primitives.proto.
- class angr.knowledge_plugins.cfg.spilling_digraph.DirtyDict¶
-
A simple dict subclass that tracks whether it has been modified since creation or last reset.
This is used for edge attribute dicts to know when they need to be re-serialized and saved to LMDB.
- class angr.knowledge_plugins.cfg.spilling_digraph.SpillingAdjDict¶
Bases:
MutableMappingA dict-like container for adjacency data with LRU caching and LMDB spilling.
Keys are node keys (block_key tuples), values are inner adjacency dicts (mapping neighbor_key -> edge_attr_dict).
When the number of cached entries exceeds
cache_limit + db_batch_size, thedb_batch_sizeleast recently used entries are evicted to LMDB.Edge attributes within each inner dict are serialized/deserialized using the
Edgeprotobuf message fromprimitives.proto.- __init__(addr_type, rtdb=None, cache_limit=1000, db_batch_size=800)¶
- copy()¶
- Return type:
- class angr.knowledge_plugins.cfg.spilling_digraph.SpillingDiGraph¶
Bases:
DiGraphA networkx DiGraph subclass whose
adjlist_outer_dict_factoryproducesSpillingAdjDictinstances, enabling LRU-based LMDB spilling of adjacency data (edges and their attributes).- Parameters: