miasm
Reverse engineering framework
miasm.expression.simplifications.ExpressionSimplifier Class Reference
Inheritance diagram for miasm.expression.simplifications.ExpressionSimplifier:
Collaboration diagram for miasm.expression.simplifications.ExpressionSimplifier:

Public Member Functions

def __init__ (self)
 
def enable_passes (self, passes)
 
def apply_simp (self, expression)
 
def expr_simp_inner (self, expression)
 
def expr_simp (self, expression)
 
def __call__ (self, expression)
 
- Public Member Functions inherited from miasm.expression.expression.ExprVisitorCallbackBottomToTop
def __init__ (self, callback)
 
def visit (self, expr, *args, **kwargs)
 
def visit_inner (self, expr, *args, **kwargs)
 

Public Attributes

 expr_simp_cb
 
- Public Attributes inherited from miasm.expression.expression.ExprVisitorCallbackBottomToTop
 cache
 
 callback
 

Static Public Attributes

dictionary PASS_COMMONS
 
dictionary PASS_HEAVY = {}
 
dictionary PASS_COND
 
dictionary PASS_HIGH_TO_EXPLICIT
 

Detailed Description

Wrapper on expression simplification passes.

Instance handle passes lists.

Available passes lists are:
 - commons: common passes such as constant folding
 - heavy  : rare passes (for instance, in case of obfuscation)

Constructor & Destructor Documentation

◆ __init__()

def miasm.expression.simplifications.ExpressionSimplifier.__init__ (   self)
Here is the call graph for this function:

Member Function Documentation

◆ __call__()

def miasm.expression.simplifications.ExpressionSimplifier.__call__ (   self,
  expression 
)
Here is the call graph for this function:

◆ apply_simp()

def miasm.expression.simplifications.ExpressionSimplifier.apply_simp (   self,
  expression 
)
Apply enabled simplifications on expression
@expression: Expr instance
Return an Expr instance
Here is the caller graph for this function:

◆ enable_passes()

def miasm.expression.simplifications.ExpressionSimplifier.enable_passes (   self,
  passes 
)
Add passes from @passes
@passes: dict(Expr class : list(callback))

Callback signature: Expr callback(ExpressionSimplifier, Expr)
Here is the call graph for this function:

◆ expr_simp()

def miasm.expression.simplifications.ExpressionSimplifier.expr_simp (   self,
  expression 
)
Here is the call graph for this function:

◆ expr_simp_inner()

def miasm.expression.simplifications.ExpressionSimplifier.expr_simp_inner (   self,
  expression 
)
Apply enabled simplifications on expression and find a stable state
@expression: Expr instance
Return an Expr instance
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ expr_simp_cb

miasm.expression.simplifications.ExpressionSimplifier.expr_simp_cb

◆ PASS_COMMONS

dictionary miasm.expression.simplifications.ExpressionSimplifier.PASS_COMMONS
static

◆ PASS_COND

dictionary miasm.expression.simplifications.ExpressionSimplifier.PASS_COND
static
Initial value:
= {
m2_expr.ExprSlice: [
simplifications_cond.expr_simp_inf_signed,
simplifications_cond.expr_simp_inf_unsigned_inversed
],
m2_expr.ExprOp: [
simplifications_cond.expr_simp_inverse,
],
m2_expr.ExprCond: [
simplifications_cond.expr_simp_equal
]
}

◆ PASS_HEAVY

dictionary miasm.expression.simplifications.ExpressionSimplifier.PASS_HEAVY = {}
static

◆ PASS_HIGH_TO_EXPLICIT

dictionary miasm.expression.simplifications.ExpressionSimplifier.PASS_HIGH_TO_EXPLICIT
static
Initial value:
= {
m2_expr.ExprOp: [
simplifications_explicit.simp_flags,
simplifications_explicit.simp_ext,
],
}

The documentation for this class was generated from the following file: