diff options
Diffstat (limited to 'miasm2/analysis')
| -rw-r--r-- | miasm2/analysis/depgraph.py | 6 | ||||
| -rw-r--r-- | miasm2/analysis/dse.py | 8 | ||||
| -rw-r--r-- | miasm2/analysis/ssa.py | 10 |
3 files changed, 12 insertions, 12 deletions
diff --git a/miasm2/analysis/depgraph.py b/miasm2/analysis/depgraph.py index 0d4a3719..5923e7ed 100644 --- a/miasm2/analysis/depgraph.py +++ b/miasm2/analysis/depgraph.py @@ -1,6 +1,6 @@ """Provide dependency graph""" -from miasm2.expression.expression import ExprInt, ExprLoc, ExprAff +from miasm2.expression.expression import ExprInt, ExprLoc, ExprAssign from miasm2.core.graph import DiGraph from miasm2.core.locationdb import LocationDB from miasm2.expression.simplifications import expr_simp_explicit @@ -319,7 +319,7 @@ class DependencyResultImplicit(DependencyResult): # Z3 Solver instance _solver = None - unsat_expr = ExprAff(ExprInt(0, 1), ExprInt(1, 1)) + unsat_expr = ExprAssign(ExprInt(0, 1), ExprInt(1, 1)) def _gen_path_constraints(self, translator, expr, expected): """Generate path constraint from @expr. Handle special case with @@ -341,7 +341,7 @@ class DependencyResultImplicit(DependencyResult): conds = z3.And( conds, translator.from_expr( - ExprAff(value, + ExprAssign(value, expected)) ) out.append(conds) diff --git a/miasm2/analysis/dse.py b/miasm2/analysis/dse.py index fb332154..1a3c0259 100644 --- a/miasm2/analysis/dse.py +++ b/miasm2/analysis/dse.py @@ -56,7 +56,7 @@ except ImportError: z3 = None from miasm2.expression.expression import ExprMem, ExprInt, ExprCompose, \ - ExprAff, ExprId, ExprLoc, LocKey + ExprAssign, ExprId, ExprLoc, LocKey from miasm2.core.bin_stream import bin_stream_vm from miasm2.jitter.emulatedsymbexec import EmulatedSymbExec from miasm2.expression.expression_helper import possible_values @@ -626,14 +626,14 @@ class DSEPathConstraint(DSEEngine): target_addr = self.ir_arch.loc_db.canonize_to_exprloc( possibility.value ) - path_constraint = set() # Set of ExprAff for the possible path + path_constraint = set() # Set of ExprAssign for the possible path # Get constraint associated to the possible path memory_to_add = ModularIntervals(symb_pc.size) for cons in possibility.constraints: eaff = cons.to_constraint() # eaff.get_r(mem_read=True) is not enough - # ExprAff consider a Memory access in dst as a write + # ExprAssign consider a Memory access in dst as a write mem = eaff.dst.get_r(mem_read=True) mem.update(eaff.src.get_r(mem_read=True)) for expr in mem: @@ -663,7 +663,7 @@ class DSEPathConstraint(DSEEngine): if not value.is_int(): raise TypeError("Rely on a symbolic memory case, " \ "address 0x%x" % address) - path_constraint.add(ExprAff(expr_mem, value)) + path_constraint.add(ExprAssign(expr_mem, value)) if target_addr == cur_addr: # Add path constraint diff --git a/miasm2/analysis/ssa.py b/miasm2/analysis/ssa.py index 61aa987f..0320d117 100644 --- a/miasm2/analysis/ssa.py +++ b/miasm2/analysis/ssa.py @@ -1,6 +1,6 @@ from collections import deque -from miasm2.expression.expression import ExprId, ExprAff, ExprOp, get_expr_ids +from miasm2.expression.expression import ExprId, ExprAssign, ExprOp, get_expr_ids from miasm2.ir.ir import AssignBlock, IRBlock @@ -185,7 +185,7 @@ class SSA(object): instructions = [] for dst in assignblk: # dst = src - aff = assignblk.dst2ExprAff(dst) + aff = assignblk.dst2ExprAssign(dst) # insert memory expression into start of list if dst.is_mem(): instructions.insert(0, aff) @@ -259,7 +259,7 @@ class SSA(object): src_ssa = rhs.popleft() # rebuild SSA expression - expr = ExprAff(dst_ssa, src_ssa) + expr = ExprAssign(dst_ssa, src_ssa) self.expressions[dst_ssa] = src_ssa self.ssa_to_location[dst_ssa] = (loc_key, index) @@ -455,10 +455,10 @@ class SSADiGraph(SSA): """ Generates an empty phi function for a variable :param expr: variable - :return: ExprAff, empty phi function for expr + :return: ExprAssign, empty phi function for expr """ phi = ExprId(self.PHI_STR, expr.size) - return ExprAff(expr, phi) + return ExprAssign(expr, phi) def _fill_phi(self, *args): """ |