Nagasuma R. Chandra

19 papers A* 1Journal 17Unranked 1
YearRankTypeTitle / Venue / Authors
2015 J jnl
BMC Bioinform.
Talha Bin Masood, Sankaran Sandhya, Nagasuma R. Chandra, Vijay Natarajan
2015 J jnl
PLoS Comput. Biol.
Soma Ghosh, Nagasuma R. Chandra, Saraswathi Vishveshwara
2015 J jnl
Nucleic Acids Res.
Richa Mudgal, Sankaran Sandhya, Gayatri Kumar, Ramanathan Sowdhamini, Nagasuma R. Chandra, Narayanaswamy Srinivasan
2015 J jnl
Database J. Biol. Databases Curation
Rahul Metri, Sridhar Hariharaputran, Gayatri Ramakrishnan, Praveen Anand, Upadhyayula S. Raghavender, Bernardo Ochoa-Montaño, Alicia P. Higueruelo, Ramanathan Sowdhamini, Nagasuma R. Chandra, Tom L. Blundell, Narayanaswamy Srinivasan
2014 J jnl
Database J. Biol. Databases Curation
Praveen Anand, Deepesh Nagarajan, Sumanta Mukherjee, Nagasuma R. Chandra
2013 J jnl
BMC Syst. Biol.
Soma Ghosh, Priyanka Baloni, Sumanta Mukherjee, Praveen Anand, Nagasuma R. Chandra
2013 J jnl
WIREs Data Mining Knowl. Discov.
Sumanta Mukherjee, Awanti Sambarey, Karyala Prashanthi, Nagasuma R. Chandra
2012 J jnl
Nucleic Acids Res.
Praveen Anand, Kalidas Yeturu, Nagasuma R. Chandra
2011 J jnl
J. Chem. Inf. Model.
Kalidas Yeturu, Nagasuma R. Chandra
2010 J jnl
BMC Bioinform.
Kalidas Yeturu, Tapani Utriainen, Graham J. L. Kemp, Nagasuma R. Chandra
2010 conf
BCB
Nishanth Ulhas Nair, Navin Goyal, Nagasuma R. Chandra
2009 J jnl
Algorithms Mol. Biol.
Sahely Bhadra, Chiranjib Bhattacharyya, Nagasuma R. Chandra, I. Saira Mian
2009 J jnl
Briefings Bioinform.
Karthik Raman, Nagasuma R. Chandra
2008 J jnl
BMC Bioinform.
Kalidas Yeturu, Nagasuma R. Chandra
2008 J jnl
BMC Syst. Biol.
Karthik Raman, Kalidas Yeturu, Nagasuma R. Chandra
2007 J jnl
BMC Bioinform.
Sourangshu Bhattacharya, Chiranjib Bhattacharyya, Nagasuma R. Chandra
2007 A* conf
ICML
Sourangshu Bhattacharya, Chiranjib Bhattacharyya, Nagasuma R. Chandra
2006 J jnl
BMC Bioinform.
Sourangshu Bhattacharya, Chiranjib Bhattacharyya, Nagasuma R. Chandra
2005 J jnl
PLoS Comput. Biol.
Karthik Raman, Preethi Rajagopalan, Nagasuma R. Chandra
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