angr.analyses.decompiler.semantic_naming.boolean_naming¶
Semantic variable naming for boolean flag variables.
This module detects variables used as boolean flags and names them appropriately (e.g., found, done, flag, ok).
- class angr.analyses.decompiler.semantic_naming.boolean_naming.BooleanNaming¶
Bases:
ClinicNamingBaseDetects variables used as boolean flags and renames them.
Boolean flag patterns detected: - Variables assigned only 0 or 1 - Variables used directly in conditions (if (var) or if (!var)) - Variables compared to 1 - Variables that are results of comparison operations
- __init__(*args, **kwargs)¶
- analyze()¶
Analyze the graph for boolean flag patterns.
- Return type:
- Returns:
Dictionary mapping SimVariable to new name