angr.analyses.decompiler.semantic_naming.naming_base¶
Base class for semantic variable naming patterns.
This module provides two base classes for semantic naming: - ClinicNamingBase: For passes running in Clinic on AIL graphs - RegionNamingBase: For passes running in RegionSimplifier on structured regions
- class angr.analyses.decompiler.semantic_naming.naming_base.SemanticNamingBase¶
Bases:
ABCAbstract base class for semantic variable naming patterns.
Subclasses implement specific naming patterns (loop counters, array indices, etc.) This is the common base for both Clinic-based and RegionSimplifier-based passes.
- __init__(variable_manager, functions)¶
- Parameters:
variable_manager (VariableManagerInternal)
functions (FunctionManager)
- abstractmethod analyze()¶
Analyze and return a mapping of variables to their suggested names.
- Return type:
- Returns:
Dictionary mapping SimVariable to suggested name
- apply_names(exclude_vars=None)¶
Apply the computed names to the variables.
- Parameters:
exclude_vars (
set[SimVariable] |None) – Variables to skip (already named by higher priority patterns)- Return type:
- Returns:
Set of variables that were renamed
- class angr.analyses.decompiler.semantic_naming.naming_base.ClinicNamingBase¶
Bases:
SemanticNamingBaseBase class for semantic naming passes that run in Clinic on AIL graphs.
These passes operate on the raw AIL graph before structuring, allowing them to analyze control flow patterns directly.
- __init__(ail_graph, variable_manager, functions, entry_node)¶
- Parameters:
ail_graph (DiGraph)
variable_manager (VariableManagerInternal)
functions (FunctionManager)
entry_node (Block)
- class angr.analyses.decompiler.semantic_naming.naming_base.RegionNamingBase¶
Bases:
SemanticNamingBaseBase class for semantic naming passes that run in RegionSimplifier on structured regions.
These passes operate after structuring, allowing them to leverage structured information like LoopNode, ConditionNode, etc. They can reuse loop analysis results from structuring instead of re-analyzing the graph.
- __init__(region, variable_manager, functions)¶
- Parameters:
region (BaseNode)
variable_manager (VariableManagerInternal)
functions (FunctionManager)