M. M. Chawla

43 papers Journal 42Unranked 1
YearRankTypeTitle / Venue / Authors
2005 J jnl
Int. J. Comput. Math.
M. M. Chawla, David J. Evans
2005 J jnl
Int. J. Comput. Math.
M. M. Chawla, David J. Evans
2004 J jnl
Int. J. Math. Math. Sci.
R. R. Khazal, M. M. Chawla
2004 J jnl
Int. J. Comput. Math.
M. M. Chawla, Mansour Al-Zanaidi, David J. Evans
2004 J jnl
Neural Parallel Sci. Comput.
M. M. Chawla
2004 J jnl
Int. J. Comput. Math.
M. M. Chawla, David J. Evans
2003 J jnl
Int. J. Comput. Math.
M. M. Chawla, Mansour Al-Zanaidi
2003 J jnl
Neural Parallel Sci. Comput.
M. M. Chawla
2003 J jnl
Int. J. Comput. Math.
M. M. Chawla, R. R. Khazal
2003 J jnl
Int. J. Comput. Math.
M. M. Chawla, David J. Evans
2003 J jnl
Int. J. Comput. Math.
M. M. Chawla, Mansour Al-Zanaidi, David J. Evans
2003 J jnl
Int. J. Comput. Math.
M. M. Chawla
2002 J jnl
Int. J. Comput. Math.
M. M. Chawla, R. R. Khazal
2002 J jnl
Neural Parallel Sci. Comput.
Mansour Al-Zanaidi, M. M. Chawla
2002 J jnl
Int. J. Comput. Math.
M. M. Chawla, Mansour Al-Zanaidi, David J. Evans
2002 J jnl
Int. J. Comput. Math.
M. M. Chawla, Mansour Al-Zanaidi, David J. Evans
2001 J jnl
Int. J. Comput. Math.
M. M. Chawla, Mansour A. Al-Zanaidi
2001 J jnl
Neural Parallel Sci. Comput.
M. M. Chawla, Mansour Al-Zanaidi
2001 J jnl
Int. J. Comput. Math.
M. M. Chawla, Mansour Al-Zanaidi, David J. Evans
2001 J jnl
Neural Parallel Sci. Comput.
M. M. Chawla, Mansour Al-Zanaidi
2001 J jnl
Int. J. Comput. Math.
M. M. Chawla, Mansour Al-Zanaidi, David J. Evans
2000 J jnl
Int. J. Comput. Math.
M. M. Chawla, Mansour Al-Zanaidi, David J. Evans
1999 J jnl
Int. J. Comput. Math.
M. M. Chawla, Mansour A. Al-Zanaidi, David J. Evans
1999 J jnl
Int. J. Comput. Math.
M. M. Chawla, Mansour A. Al-Zanaidi, David J. Evans
1998 J jnl
Neural Parallel Sci. Comput.
M. M. Chawla, Mansour Al-Zanaidi, A. Z. Shammeri
1997 J jnl
Int. J. Comput. Math.
M. M. Chawla, Mansour A. Al-Zanaidi
1996 J jnl
Int. J. Comput. Math.
M. M. Chawla, Mansour A. Al-Zanaidi, David J. Evans
1996 J jnl
Neural Parallel Sci. Comput.
M. M. Chawla, P. N. Shivakumar
1996 J jnl
Neural Parallel Sci. Comput.
M. M. Chawla, Mansour Al-Zanaidi, W. M. Boabbas
1995 J jnl
Parallel Algorithms Appl.
M. M. Chawla, David J. Evans
1995 J jnl
Int. J. Comput. Math.
M. M. Chawla, R. R. Khazal
1995 J jnl
Int. J. Comput. Math.
M. M. Chawla, David J. Evans
1992 J jnl
Int. J. Comput. Math.
M. M. Chawla
1991 J jnl
Int. J. Comput. Math.
M. M. Chawla, Kalpdrum Passi
1991 J jnl
Int. J. Comput. Math.
M. M. Chawla, Kalpdrum Passi
1990 J jnl
Int. J. Comput. Math.
M. M. Chawla, Kalpdrum Passi, R. A. Zalik
1990 J jnl
Int. J. Comput. Math.
M. M. Chawla, Kalpdrum Passi, P. N. Shivakumar
1987 conf
ACM Conference on Computer Science
M. M. Chawla, R. Subramanian, Harbans L. Sathi
1979 J jnl
Computing
M. M. Chawla, Sheo Kumar
1975 J jnl
Computing
M. M. Chawla, N. Jayarajan
1970 J jnl
Comput. J.
M. M. Chawla
1968 J jnl
Comput. J.
M. M. Chawla
1967 J jnl
Comput. J.
M. M. Chawla
redb/extractors/decompiler/bninja/analysis/medium_level_normalization.py
← Index redb/extractors/decompiler/bninja/analysis/medium_level_normalization.py python
from binaryninja import (
    MediumLevelILInstruction,
    Variable, SSAVariable,
    ILIntrinsic,
)


class MediumLevelNormalization:
    def __init__(self):
        return

    def _collect_ops(self, il, ops):
        if il is None:
            return
        ops.append(int(il.operation))
        operands = getattr(il, "operands", None)
        if not operands:
            return
        for op in operands:
            if isinstance(op, MediumLevelILInstruction):
                self._collect_ops(op, ops)
            elif isinstance(op, (list, tuple)):
                for sub in op:
                    if isinstance(sub, MediumLevelILInstruction):
                        self._collect_ops(sub, ops)

    def normalize_instruction_all_levels(self, instr_il):
        ops = []
        self._collect_ops(instr_il, ops)
        return ops

    def _leaf_type(self, val):
        if isinstance(val, SSAVariable):
            return "SSA_VAR"
        if isinstance(val, Variable):
            return "VAR"
        if isinstance(val, ILIntrinsic):
            return "INTRINSIC"
        if isinstance(val, bool):
            return "BOOL"
        if isinstance(val, float):
            return "FLOAT_CONST"
        if isinstance(val, int):
            return "CONST"
        if isinstance(val, str):
            return "STR"
        return type(val).__name__.upper()

    def _collect(self, il, out_op):
        if il is None:
            return
        out_op.append(int(il.operation))
        operands = getattr(il, "operands", None)
        if not operands:
            return
        for op in operands:
            if isinstance(op, MediumLevelILInstruction):
                self._collect(op, out_op)
            elif isinstance(op, (list, tuple)):
                for sub in op:
                    if isinstance(sub, MediumLevelILInstruction):
                        self._collect(sub, out_op)
                    else:
                        out_op.append(self._leaf_type(sub))
            else:
                out_op.append(self._leaf_type(op))

    def normalize_instr_with_operands(self, instr_il):
        ops = []
        self._collect(instr_il, ops)
        return ops