angr.analyses.decompiler.optimization_passes.flip_boolean_cmp

class angr.analyses.decompiler.optimization_passes.flip_boolean_cmp.FlipBooleanWalker

Bases: SequenceWalker

Walks a SequenceNode and handles every sequence. Uses the flip_size to determine when to flip the condition on large if-statement bodies.

__init__(graph, manager, flip_size=9, last_node=None)
Parameters:

manager (Manager)

class angr.analyses.decompiler.optimization_passes.flip_boolean_cmp.FlipBooleanCmp

Bases: SequenceOptimizationPass

In the scenario in which a false node has no apparent successors, flip the condition on that if-stmt. This is only useful when StructuredCodeGenerator has simplify_else_scopes enabled, as this will allow the flipped if-stmt to remove the redundant else.

ARCHES = None
PLATFORMS = None
STAGE: OptimizationPassStage = 11
NAME = 'Flip small ret booleans'
DESCRIPTION = 'When false node has no successors, flip condition so else scope can be simplified later'
__init__(*args, flip_size=9, **kwargs)