Rachel K. Kalaimani

15 papers C 2Journal 7Unranked 6
YearRankTypeTitle / Venue / Authors
2024 J jnl
IEEE Control. Syst. Lett.
Anik Kumar Paul, Arun D. Mahindrakar, Rachel K. Kalaimani
2023 C conf
ACC
Anik Kumar Paul, Arun D. Mahindrakar, Rachel K. Kalaimani
2023 J jnl
IEEE Control. Syst. Lett.
Anik Kumar Paul, Arun D. Mahindrakar, Rachel K. Kalaimani
2019 C conf
ACC
Kiran Rokade, Rachel K. Kalaimani
2019 conf
CDC
Manikya Valli Srighakollapu, Rachel K. Kalaimani, Ramkrishna Pasumarthy
2019 conf
CDC
Kiran Rokade, Gopal Krishna Kamath, Rachel K. Kalaimani
2018 J jnl
CoRR
Milan Jain, Rachel K. Kalaimani, Srinivasan Keshav, Catherine Rosenberg
2018 J jnl
Energy Inform.
Milan Jain, Rachel K. Kalaimani, Srinivasan Keshav, Catherine Rosenberg
2017 J jnl
Syst. Control. Lett.
Shriram C. Jugade, Debasattam Pal, Rachel K. Kalaimani, Madhu N. Belur
2017 J jnl
CoRR
Rachel K. Kalaimani, Milan Jain, Srinivasan Keshav, Catherine Rosenberg
2016 conf
ECC
Atreya Kotoky, Ashutosh Mahajan, Ashwin Arulselvan, Madhu N. Belur, Rachel K. Kalaimani
2016 conf
e-Energy (Posters)
Rachel K. Kalaimani, Srinivasan Keshav, Catherine Rosenberg
2014 conf
CDC
Ashish Kothyari, Rachel K. Kalaimani, Madhu N. Belur
2013 J jnl
CoRR
Ameer K. Mulla, Rachel K. Kalaimani, Debraj Chakraborty, Madhu N. Belur
2013 conf
ECC
Shriram C. Jugade, Debasattam Pal, Rachel K. Kalaimani, Madhu N. Belur
redb/extractors/decompiler/bninja/analysis/low_level_normalization.py
← Index redb/extractors/decompiler/bninja/analysis/low_level_normalization.py python
from binaryninja import (
    ILRegister, ILRegisterStack, ILFlag,
    ILIntrinsic, ILSemanticFlagGroup,
)

class LowLevelNormalization:
    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 hasattr(op, "operation"):
                self._collect_ops(op, ops)
            elif isinstance(op, (list, tuple)):
                for sub in op:
                    if hasattr(sub, "operation"):
                        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, ILRegister):
            return "REG"
        if isinstance(val, ILRegisterStack):
            return "REG_STACK"
        if isinstance(val, ILFlag):
            return "FLAG"
        if isinstance(val, ILSemanticFlagGroup):
            return "FLAG_GROUP"
        if isinstance(val, ILIntrinsic):
            return "INTRINSIC"
        if isinstance(val, bool):
            return "BOOL"
        if isinstance(val, int):
            return "CONST"
        return type(val).__name__.upper()

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

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