miasm
Reverse engineering framework
miasm.expression.expression_helper Namespace Reference

Classes

class  CondConstraint
 
class  CondConstraintNotZero
 
class  CondConstraintZero
 
class  ConstrainedValues
 
class  ExprRandom
 
class  Variables_Identifier
 

Functions

def parity (a)
 
def merge_sliceto_slice (expr)
 
def is_pure_int (e)
 
def is_int_or_cond_src_int (e)
 
def fast_unify (seq, idfun=None)
 
def get_missing_interval (all_intervals, i_min=0, i_max=32)
 
def expr_cmpu (arg1, arg2)
 
def expr_cmps (arg1, arg2)
 
def possible_values (expr)
 

Variables

list op_propag_cst
 
 ConstrainedValue
 

Function Documentation

◆ expr_cmps()

def miasm.expression.expression_helper.expr_cmps (   arg1,
  arg2 
)
Returns a one bit long Expression:
* 1 if @arg1 is strictly greater than @arg2 (signed)
* 0 otherwise.

◆ expr_cmpu()

def miasm.expression.expression_helper.expr_cmpu (   arg1,
  arg2 
)
Returns a one bit long Expression:
* 1 if @arg1 is strictly greater than @arg2 (unsigned)
* 0 otherwise.

◆ fast_unify()

def miasm.expression.expression_helper.fast_unify (   seq,
  idfun = None 
)
Here is the caller graph for this function:

◆ get_missing_interval()

def miasm.expression.expression_helper.get_missing_interval (   all_intervals,
  i_min = 0,
  i_max = 32 
)
Return a list of missing interval in all_interval
@all_interval: list of (int, int)
@i_min: int, minimal missing interval bound
@i_max: int, maximal missing interval bound
Here is the caller graph for this function:

◆ is_int_or_cond_src_int()

def miasm.expression.expression_helper.is_int_or_cond_src_int (   e)

◆ is_pure_int()

def miasm.expression.expression_helper.is_pure_int (   e)
return True if expr is only composed with integers
/!\ ExprCond returns True is src1 and src2 are integers

◆ merge_sliceto_slice()

def miasm.expression.expression_helper.merge_sliceto_slice (   expr)
Apply basic factorisation on ExprCompose sub components
@expr: ExprCompose
Here is the caller graph for this function:

◆ parity()

def miasm.expression.expression_helper.parity (   a)

◆ possible_values()

def miasm.expression.expression_helper.possible_values (   expr)
Return possible values for expression @expr, associated with their
condition constraint as a ConstrainedValues instance
@expr: Expr instance
Here is the caller graph for this function:

Variable Documentation

◆ ConstrainedValue

miasm.expression.expression_helper.ConstrainedValue
Initial value:
1 = collections.namedtuple("ConstrainedValue",
2  ["constraints", "value"])

◆ op_propag_cst

list miasm.expression.expression_helper.op_propag_cst
Initial value:
1 = ['+', '*', '^', '&', '|', '>>',
2  '<<', "a>>", ">>>", "<<<",
3  "/", "%", 'sdiv', 'smod', 'umod', 'udiv','**']