Indra Neil Sarkar

88 papers Misc 41Journal 40Unranked 6
YearRankTypeTitle / Venue / Authors
2025 J jnl
J. Am. Medical Informatics Assoc.
Aaron S. Eisman, Elizabeth S. Chen, Wen-Chih Wu, Karen Crowley, Dilum P. Aluthge, Katherine A. Brown, Indra Neil Sarkar
2025 J jnl
J. Am. Medical Informatics Assoc.
Anjum Khurshid, Indra Neil Sarkar
2022 Misc conf
AMIA
Katherine A. Brown, Indra Neil Sarkar, Karen Crowley, Dilum P. Aluthge, Elizabeth S. Chen
2022 J jnl
Bioinform.
Vivek Ramanan, Shanti Mechery, Indra Neil Sarkar
2022 J jnl
J. Am. Medical Informatics Assoc.
Emily R. Pfaff, Andrew T. Girvin, Davera Gabriel, Kristin Kostka, Michele Morris, Matvey B. Palchuk, Harold P. Lehmann, Benjamin R. C. Amor, Mark Bissell, Katie R. Bradwell, Sigfried Gold, Stephanie S. Hong, Johanna Loomba, Amin Manna, Julie A. McMurry, Emily Niehaus, Nabeel Qureshi, Anita Walden, Xiaohan Tanner Zhang, Richard L. Zhu, Richard A. Moffitt, Christopher G. Chute, William G. Adams, Shaymaa Al-Shukri, Alfred Anzalone, Ahmad Baghal, Tellen D. Bennett, Elmer V. Bernstam, Mark M. Bissell, Brian Bush, Thomas R. Campion Jr., Victor Castro, Jack Chang, Deepa D. Chaudhari, Wenjin Chen, San Chu, James J. Cimino, Keith A. Crandall, Mark Crooks, Sara J. Deakyne Davies, John Dipalazzo, David A. Dorr, Dan Eckrich, Sarah E. Eltinge, Daniel G. Fort, George Golovko, Snehil Gupta, Melissa A. Haendel, Janos G. Hajagos, David A. Hanauer, Brett M. Harnett, Ronald Horswell, Nancy Huang, Steven G. Johnson, Michael Kahn, Kamil Khanipov, Curtis Kieler, Katherine Ruiz De Luzuriaga, Sarah E. Maidlow, Ashley Martinez, Jomol Mathew, James C. McClay, Gabriel McMahan, Brian Melancon, Stéphane M. Meystre, Lucio Miele, Hiroki Morizono, Ray Pablo, Lav P. Patel, Jimmy Phuong, Daniel J. Popham, Claudia P. Pulgarin, Carlos Santos, Indra Neil Sarkar, Nancy Sazo, Soko Setoguchi, Selvin Soby, Sirisha Surampalli, Christine Suver, Uma Maheswara Reddy Vangala, Shyam Visweswaran, James von Oehsen, Kellie M. Walters, Laura K. Wiley, David A. Williams, Adrian H. Zai
2021 Misc conf
AMIA
Aaron S. Eisman, Katherine A. Brown, Elizabeth S. Chen, Indra Neil Sarkar
2021 Misc conf
AMIA
Jessica D. Tenenbaum, Theresa Cullen, Indra Neil Sarkar, Philip R. O. Payne, Brian E. Dixon
2020 Misc conf
AMIA
Jiaying Lai, Indra Neil Sarkar
2020 Misc conf
AMIA
Sotiris Karagounis, Indra Neil Sarkar, Elizabeth S. Chen
2020 Misc conf
AMIA
Aaron S. Eisman, Nishant R. Shah, Carsten Eickhoff, George Zerveas, Elizabeth S. Chen, Wen-Chih Wu, Indra Neil Sarkar
2020 J jnl
CoRR
Aaron S. Eisman, Nishant R. Shah, Carsten Eickhoff, George Zerveas, Elizabeth S. Chen, Wen-Chih Wu, Indra Neil Sarkar
2020 Misc conf
AMIA
Katherine A. Brown, Indra Neil Sarkar, Elizabeth S. Chen
2019 conf
MedInfo
Indra Neil Sarkar, Wayne Law, Michael J. Balick
2019 J jnl
Database J. Biol. Databases Curation
Jessica Schuster, Michael Superdock, Anthony Agudelo, Paul Stey, James Padbury, Indra Neil Sarkar, Alper Uzun
2019 conf
MedInfo
Isaac E. Kim Jr., Indra Neil Sarkar
2019 J jnl
BMC Bioinform.
Vivekanand Sharma, Maria Isabel Restrepo, Indra Neil Sarkar
2019 conf
MedInfo
Maria I. Restrepo, Mary C. McGrath, Indra Neil Sarkar, Elizabeth S. Chen
2018 Misc conf
PSB
Vivekanand Sharma, Indra Neil Sarkar
2018 Misc conf
AMIA
Justin E. Kleiner, Michael Cohen, Dilum P. Aluthge, Ishan Sinha, Indra Neil Sarkar, Elizabeth S. Chen, Dario R. Roque
2018 Misc conf
AMIA
Jonathan T. Vu, Dilum P. Aluthge, Ishan Sinha, Elizabeth S. Chen, Indra Neil Sarkar
2018 Misc conf
AMIA
Sukrit S. Jain, Indra Neil Sarkar, Paul Stey, Rajsavi S. Anand, Dustin R. Biron, Elizabeth S. Chen
2017 Misc conf
AMIA
Aaron S. Eisman, Rory B. Weiner, Elizabeth S. Chen, Paul Stey, Rishi K. Wadhera, Aaron P. Kithcart, Indra Neil Sarkar
2017 Misc conf
AMIA
Margaret M. Thorsen, Indra Neil Sarkar, Elizabeth S. Chen, Elaine Fontaine, Gregory Walker, Megan L. Ranney
2017 Misc conf
AMIA
Ashley S. Lee, Indra Neil Sarkar, Genevieve B. Melton, Yuanqing Liu, Vivekanand Sharma, Elizabeth S. Chen
2017 J jnl
J. Am. Medical Informatics Assoc.
Julia Adler-Milstein, Peter J. Embí, Blackford Middleton, Indra Neil Sarkar, Jeff Smith
2017 Misc conf
AMIA
Vivekanand Sharma, Wayne Law, Michael J. Balick, Indra Neil Sarkar
2016 J jnl
J. Am. Medical Informatics Assoc.
Kim M. Unertl, John T. Finnell, Indra Neil Sarkar
2016 J jnl
J. Am. Medical Informatics Assoc.
Laura K. Wiley, Peter Tarczy-Hornoch, Joshua C. Denny, Robert R. Freimuth, Casey L. Overby, Nigam Shah, Ross D. Martin, Indra Neil Sarkar
2016 conf
Nursing Informatics
Kaija Saranto, Elizabeth M. Borycki, Indra Neil Sarkar
2016 conf
CRI
Yan Wang, Elizabeth S. Chen, Ilo Leppik, Serguei V. S. Pakhomov, Indra Neil Sarkar, Genevieve B. Melton
2016 Misc conf
AMIA
Elizabeth S. Chen, Genevieve B. Melton, Mark Howison, Erik Knoll, Ashley S. Lee, Indra Neil Sarkar
2016 Misc conf
AMIA
David Boone, John T. Finnell, Kim M. Unertl, Indra Neil Sarkar
2016 Misc conf
AMIA
Saif S. Khairat, Glynda Doyle, Indra Neil Sarkar, Jeff Williamson
2015 J jnl
J. Biomed. Informatics
Joseph D. Romano, William G. Tharp, Indra Neil Sarkar
2015 Misc conf
AMIA
Yan Wang, Elizabeth S. Chen, Serguei V. S. Pakhomov, Elliot G. Arsoniadis, Elizabeth W. Carter, Elizabeth Lindemann, Indra Neil Sarkar, Genevieve B. Melton
2015 ed.
MedInfo
Indra Neil Sarkar, Andrew Georgiou, Paulo Mazzoncini de Azevedo Marques
2015 Misc conf
AMIA
Elizabeth S. Chen, Genevieve B. Melton, Richard Wasserman, Paul Rosenau, Diantha B. Howard, Indra Neil Sarkar
2015 J jnl
J. Am. Medical Informatics Assoc.
Elizabeth S. Chen, Elizabeth W. Carter, Tamara Winden, Indra Neil Sarkar, Yan Wang, Genevieve B. Melton
2015 Misc conf
AMIA
Elizabeth W. Carter, Indra Neil Sarkar, Genevieve B. Melton, Elizabeth S. Chen
2015 Misc conf
AMIA
Darlene Peterson, Timothy E. Burdick, Joshua Cohen, Indra Neil Sarkar, Julie Lin, Dennis Plante, Elizabeth S. Chen
2014 J jnl
J. Am. Medical Informatics Assoc.
Adam Sateriale, Kovi Bessoff, Indra Neil Sarkar, Christopher D. Huston
2014 Misc conf
AMIA
Elizabeth S. Chen, Elizabeth W. Carter, Indra Neil Sarkar, Tamara Winden, Genevieve B. Melton
2014 Misc conf
AMIA
Yucan Zhang, Indra Neil Sarkar, Elizabeth S. Chen
2014 J jnl
J. Biomed. Informatics
Ahmed Ragab Nabhan, Indra Neil Sarkar
2014 Misc conf
AMIA
Indra Neil Sarkar, Elizabeth S. Chen, Paul Rosenau, Matthew B. Storer, Beth Anderson, Jeffrey D. Horbar
2013 J jnl
Briefings Bioinform.
Vivekanand Sharma, Indra Neil Sarkar
2013 Misc conf
AMIA
Elizabeth S. Chen, Elizabeth W. Carter, Tamara Winden, Indra Neil Sarkar, Genevieve B. Melton
2013 J jnl
J. Biomed. Informatics
Vivekanand Sharma, Indra Neil Sarkar
2013 J jnl
BMC Medical Informatics Decis. Mak.
Philip R. O. Payne, Taylor R. Pressler, Indra Neil Sarkar, Yves A. Lussier
2013 J jnl
J. Am. Medical Informatics Assoc.
Vivekanand Sharma, Indra Neil Sarkar
2013 Misc conf
AMIA
Indra Neil Sarkar, Elizabeth S. Chen, Steven J. Kappel
2012 J jnl
J. Am. Medical Informatics Assoc.
Indra Neil Sarkar
2012 Misc conf
AMIA
Elizabeth S. Chen, Genevieve B. Melton, Timothy E. Burdick, Paul Rosenau, Indra Neil Sarkar
2012 Misc conf
AMIA
Indra Neil Sarkar, Elizabeth S. Chen
2012 Misc conf
AMIA
Ahmed Ragab Nabhan, Indra Neil Sarkar
2012 Misc conf
AMIA
Genevieve B. Melton, Sharad Manaktala, Indra Neil Sarkar, Elizabeth S. Chen
2012 J jnl
Briefings Bioinform.
Ahmed Ragab Nabhan, Indra Neil Sarkar
2012 J jnl
J. Biomed. Informatics
Elizabeth S. Chen, Genevieve B. Melton, Indra Neil Sarkar
2011 J jnl
J. Biomed. Informatics
Matthew Scotch, Indra Neil Sarkar, Changjiang Mei, Robert Leaman, Kei-Hoi Cheung, Pierina Ortiz, Ashutosh Singraur, Graciela Gonzalez
2011 J jnl
J. Biomed. Informatics
Indra Neil Sarkar
2011 J jnl
J. Biomed. Informatics
Indra Neil Sarkar, Philip R. O. Payne
2011 J jnl
J. Am. Medical Informatics Assoc.
Indra Neil Sarkar, Atul J. Butte, Yves A. Lussier, Peter Tarczy-Hornoch, Lucila Ohno-Machado
2010 J jnl
Briefings Bioinform.
Indra Neil Sarkar
2010 J jnl
J. Am. Medical Informatics Assoc.
Genevieve B. Melton, Nandhini Raman, Elizabeth S. Chen, Indra Neil Sarkar, Serguei V. S. Pakhomov, Robert D. Madoff
2010 J jnl
J. Biomed. Informatics
Elizabeth S. Chen, Indra Neil Sarkar
2009 J jnl
BMC Bioinform.
Indra Neil Sarkar
2009 Misc conf
AMIA
Indra Neil Sarkar, Ryan Schenk, Holly Miller, Catherine N. Norton
2009 J jnl
BMC Bioinform.
Yves A. Lussier, Indra Neil Sarkar
2009 J jnl
BMC Bioinform.
Atul J. Butte, Indra Neil Sarkar, Marco Ramoni, Yves A. Lussier, Olga G. Troyanskaya
2008 J jnl
BMC Bioinform.
Indra Neil Sarkar, Mary G. Egan, Gloria M. Coruzzi, Ernest K. Lee, Robert DeSalle
2007 J jnl
Briefings Bioinform.
Indra Neil Sarkar
2007 Misc conf
Pacific Symposium on Biocomputing
Indra Neil Sarkar
2007 J jnl
Bioinform.
Patrick R. Leary, David P. Remsen, Catherine N. Norton, David J. Patterson, Indra Neil Sarkar
2006 Misc conf
AMIA
Indra Neil Sarkar, Abha Agrawal
2006 J jnl
Bioinform.
Joanna C. Chiu, Ernest K. Lee, Mary G. Egan, Indra Neil Sarkar, Gloria M. Coruzzi, Robert DeSalle
2006 J jnl
J. Biomed. Informatics
Indra Neil Sarkar
2006 Misc conf
AMIA
Chif N. Umejei, Indra Neil Sarkar
2005 Misc conf
Pacific Symposium on Biocomputing
Michael N. Cantor, Indra Neil Sarkar, Olivier Bodenreider, Yves A. Lussier
2005 J jnl
Bioinform.
Paul J. Planet, Indra Neil Sarkar
2004 J jnl
Bioinform.
Jeffrey A. Rosenfeld, Indra Neil Sarkar, Paul J. Planet, David H. Figurski, Robert DeSalle
2003 conf
MIE
Michael N. Cantor, Indra Neil Sarkar, R. Gelman, Frank W. Hartel, Olivier Bodenreider, Yves A. Lussier
2003 Misc conf
Pacific Symposium on Biocomputing
Indra Neil Sarkar, Michael N. Cantor, R. Gelman, Frank W. Hartel, Yves A. Lussier
2002 Misc conf
AMIA
Yves A. Lussier, Indra Neil Sarkar, Michael Cantor
2002 J jnl
J. Biomed. Informatics
Indra Neil Sarkar, Paul J. Planet, T. E. Bael, S. E. Stanley, Mark Siddall, Robert DeSalle, David H. Figurski
2002 Misc conf
AMIA
Indra Neil Sarkar, Thomas C. Rindflesch
2002 Misc conf
AMIA
Indra Neil Sarkar, Michael N. Cantor, Robert DeSalle, Yves A. Lussier
2002 J jnl
J. Am. Medical Informatics Assoc.
Indra Neil Sarkar, Justin Starren
2001 Misc conf
AMIA
Indra Neil Sarkar, Paul J. Planet, Robert DeSalle, David H. Figurski
tests/unit/conftest_binja_stubs.py
← Index tests/unit/conftest_binja_stubs.py python
"""Stubs for binaryninja module so decompiler unit tests can import
without a Binary Ninja license."""

import sys
from unittest.mock import MagicMock
from enum import IntEnum


# Stub binaryninja.enums
class BranchType(IntEnum):
    UnconditionalBranch = 0
    FalseBranch = 1
    TrueBranch = 2
    CallDestination = 3
    FunctionReturn = 4
    SystemCall = 5
    IndirectBranch = 6
    ExceptionBranch = 7
    UnresolvedBranch = 8
    UserDefinedBranch = 9


class InstructionTextTokenType(IntEnum):
    TextToken = 0
    InstructionToken = 1
    RegisterToken = 2
    IntegerToken = 3
    PossibleAddressToken = 4
    BeginMemoryOperandToken = 10
    EndMemoryOperandToken = 11
    FloatingPointToken = 12
    AnnotationToken = 13
    CodeRelativeAddressToken = 14
    ArgumentNameToken = 15
    HexDumpByteValueToken = 16
    HexDumpSkippedByteToken = 17
    HexDumpInvalidByteToken = 18
    HexDumpTextToken = 19
    OpcodeToken = 20
    StringToken = 21
    CharacterConstantToken = 22
    KeywordToken = 23
    TypeNameToken = 24
    FieldNameToken = 25
    NameSpaceToken = 26
    NameSpaceSeparatorToken = 27
    TagToken = 28
    StructOffsetToken = 29
    StructOffsetByteValueToken = 30
    StructureHexDumpTextToken = 31
    GotoLabelToken = 32
    CommentToken = 33
    PossibleValueToken = 34
    PossibleValueTypeToken = 35
    ArrayIndexToken = 36
    IndentationToken = 37
    UnknownMemoryToken = 38
    EnumerationMemberToken = 39
    OperationToken = 40
    BaseStructureOffsetToken = 41
    BaseStructureSeparatorToken = 42
    BraceToken = 43
    PlainTextToken = 44
    CollapsedInformationToken = 45


class SymbolType(IntEnum):
    FunctionSymbol = 0
    ImportAddressSymbol = 1
    ImportedFunctionSymbol = 2
    DataSymbol = 3
    ImportedDataSymbol = 4
    ExternalSymbol = 5
    LibraryFunctionSymbol = 6
    SymbolicFunctionSymbol = 7
    LocalLabelSymbol = 8


class HighLevelILOperation(IntEnum):
    HLIL_NOP = 0
    HLIL_ADD = 1
    HLIL_SUB = 2
    HLIL_MUL = 3
    HLIL_DIVS = 4
    HLIL_NEG = 5
    HLIL_NOT = 6
    HLIL_AND = 7
    HLIL_OR = 8
    HLIL_XOR = 9
    HLIL_LSR = 10
    HLIL_LSL = 11
    HLIL_MODS = 12
    HLIL_IF = 13
    HLIL_GOTO = 14
    HLIL_RET = 15
    HLIL_ASSIGN = 16
    HLIL_CALL = 17
    HLIL_VAR = 18
    HLIL_CONST = 19
    HLIL_BLOCK = 20


class LowLevelILOperation(IntEnum):
    LLIL_NOP = 0
    LLIL_SET_REG = 1
    LLIL_SET_REG_SPLIT = 2
    LLIL_SET_FLAG = 3
    LLIL_LOAD = 4
    LLIL_STORE = 5
    LLIL_PUSH = 6
    LLIL_POP = 7
    LLIL_REG = 8
    LLIL_CONST = 9
    LLIL_CONST_PTR = 10
    LLIL_FLAG = 11
    LLIL_FLAG_BIT = 12
    LLIL_ADD = 13
    LLIL_ADC = 14
    LLIL_SUB = 15
    LLIL_SBB = 16
    LLIL_AND = 17
    LLIL_OR = 18
    LLIL_XOR = 19
    LLIL_LSL = 20
    LLIL_LSR = 21
    LLIL_ASR = 22
    LLIL_ROL = 23
    LLIL_RLC = 24
    LLIL_ROR = 25
    LLIL_RRC = 26
    LLIL_MUL = 27
    LLIL_MULU_DP = 28
    LLIL_MULS_DP = 29
    LLIL_DIVU = 30
    LLIL_DIVU_DP = 31
    LLIL_DIVS = 32
    LLIL_DIVS_DP = 33
    LLIL_MODU = 34
    LLIL_MODS = 35
    LLIL_NEG = 36
    LLIL_NOT = 37
    LLIL_SX = 38
    LLIL_ZX = 39
    LLIL_LOW_PART = 40
    LLIL_JUMP = 41
    LLIL_JUMP_TO = 42
    LLIL_CALL = 43
    LLIL_CALL_SSA = 44
    LLIL_RET = 45
    LLIL_NORET = 46
    LLIL_IF = 47
    LLIL_GOTO = 48
    LLIL_FLAG_COND = 49
    LLIL_CMP_E = 50
    LLIL_CMP_NE = 51
    LLIL_CMP_SLT = 52
    LLIL_CMP_ULT = 53
    LLIL_CMP_SLE = 54
    LLIL_CMP_ULE = 55
    LLIL_CMP_SGE = 56
    LLIL_CMP_UGE = 57
    LLIL_CMP_SGT = 58
    LLIL_CMP_UGT = 59
    LLIL_TEST_BIT = 60
    LLIL_BOOL_TO_INT = 61
    LLIL_TAILCALL = 62
    LLIL_SYSCALL = 63
    LLIL_BP = 64
    LLIL_TRAP = 65
    LLIL_UNDEF = 66
    LLIL_UNIMPL = 67
    LLIL_UNIMPL_MEM = 68


class AnalysisState(IntEnum):
    IdleState = 0
    DisassembleState = 1
    AnalyzeState = 2


def install_binja_stubs():
    """Install binaryninja module stubs into sys.modules.
    Call this BEFORE importing any decompiler modules.
    Idempotent — returns the existing mock if already installed.
    """
    if "binaryninja" in sys.modules and not isinstance(sys.modules["binaryninja"], MagicMock):
        return sys.modules["binaryninja"]
    if "binaryninja" in sys.modules and hasattr(sys.modules["binaryninja"], "_redb_stub"):
        return sys.modules["binaryninja"]

    # Create the main mock
    bn_mock = MagicMock()
    bn_mock._redb_stub = True

    # Wire up enums as real enums (not mocks)
    enums_mod = MagicMock()
    enums_mod.BranchType = BranchType
    enums_mod.InstructionTextTokenType = InstructionTextTokenType
    enums_mod.SymbolType = SymbolType
    enums_mod.HighLevelILOperation = HighLevelILOperation
    enums_mod.LowLevelILOperation = LowLevelILOperation
    enums_mod.AnalysisState = AnalysisState

    bn_mock.enums = enums_mod
    bn_mock.enums.BranchType = BranchType
    bn_mock.enums.InstructionTextTokenType = InstructionTextTokenType
    bn_mock.enums.SymbolType = SymbolType
    bn_mock.enums.HighLevelILOperation = HighLevelILOperation
    bn_mock.enums.LowLevelILOperation = LowLevelILOperation
    bn_mock.enums.AnalysisState = AnalysisState

    # LowLevelILOperation on the top-level module
    bn_mock.LowLevelILOperation = LowLevelILOperation
    bn_mock.LowLevelILInstruction = MagicMock

    # highlevelil sub-module
    hlil_mod = MagicMock()
    hlil_mod.HighLevelILInstruction = type("HighLevelILInstruction", (), {})
    bn_mock.highlevelil = hlil_mod

    # lowlevelil sub-module
    llil_mod = MagicMock()
    llil_mod.LowLevelILAdd = type("LowLevelILAdd", (), {})
    llil_mod.LowLevelILConst = type("LowLevelILConst", (), {})
    llil_mod.LowLevelILConstPtr = type("LowLevelILConstPtr", (), {})
    llil_mod.LowLevelILLoad = type("LowLevelILLoad", (), {})
    llil_mod.LowLevelILLsl = type("LowLevelILLsl", (), {})
    llil_mod.LowLevelILMul = type("LowLevelILMul", (), {})
    llil_mod.LowLevelILPop = type("LowLevelILPop", (), {})
    llil_mod.LowLevelILPush = type("LowLevelILPush", (), {})
    llil_mod.LowLevelILReg = type("LowLevelILReg", (), {})
    llil_mod.LowLevelILStore = type("LowLevelILStore", (), {})
    llil_mod.LowLevelILSub = type("LowLevelILSub", (), {})
    bn_mock.lowlevelil = llil_mod

    # mediumlevelil sub-module
    mlil_mod = MagicMock()
    mlil_mod.MediumLevelILConst = type("MediumLevelILConst", (), {})
    mlil_mod.MediumLevelILConstPtr = type("MediumLevelILConstPtr", (), {})
    bn_mock.mediumlevelil = mlil_mod

    sys.modules["binaryninja"] = bn_mock
    sys.modules["binaryninja.enums"] = enums_mod
    sys.modules["binaryninja.lowlevelil"] = llil_mod
    sys.modules["binaryninja.highlevelil"] = hlil_mod
    sys.modules["binaryninja.mediumlevelil"] = mlil_mod

    return bn_mock


# ============================================================================
# Mock Factories
# ============================================================================

class MockToken:
    """Mock for instruction text tokens."""
    def __init__(self, text, token_type=None):
        self.text = text
        if token_type is None:
            self.type = InstructionTextTokenType.TextToken
        else:
            self.type = token_type

    def __str__(self):
        return self.text


class MockDisassemblyLine:
    """Mock for a disassembly text line."""
    def __init__(self, tokens=None):
        self.tokens = tokens or []

    def __str__(self):
        return "".join(t.text for t in self.tokens)


class MockEdge:
    """Mock for a basic block edge."""
    def __init__(self, source=None, target=None, edge_type=None):
        self.source = source
        self.target = target
        self.type = edge_type


class MockBasicBlock:
    """Mock for a basic block."""
    def __init__(
        self,
        start=0,
        end=0,
        disassembly_text=None,
        outgoing_edges=None,
        incoming_edges=None,
        dominators=None,
        post_dominators=None,
        dominance_frontier=None,
        dominator_tree_children=None,
        instruction_count=None,
    ):
        self.start = start
        self.end = end
        self.disassembly_text = disassembly_text or []
        self.outgoing_edges = outgoing_edges or []
        self.incoming_edges = incoming_edges or []
        self.dominators = dominators if dominators is not None else [self]
        self.post_dominators = post_dominators if post_dominators is not None else [self]
        self.dominance_frontier = dominance_frontier if dominance_frontier is not None else set()
        self.dominator_tree_children = dominator_tree_children or []
        self.instruction_count = instruction_count if instruction_count is not None else len(self.disassembly_text)

    def __iter__(self):
        return iter(self.disassembly_text)


class MockFunction:
    """Mock for a Binary Ninja function."""
    def __init__(
        self,
        name="sub_1000",
        start=0x1000,
        basic_blocks=None,
        instructions=None,
        hlil=None,
        llil=None,
        mlil=None,
        symbol=None,
        is_thunk=False,
        stack_adjustment=0,
        call_sites=None,
        caller_sites=None,
        low_level_il=None,
    ):
        self.name = name
        self.start = start
        self.basic_blocks = basic_blocks or []
        self._instructions = instructions or []
        self.hlil = hlil
        self.llil = llil
        self.mlil = mlil
        self.symbol = symbol
        self.is_thunk = is_thunk
        self.stack_adjustment = stack_adjustment
        self.call_sites = call_sites or []
        self.caller_sites = caller_sites or []
        self.low_level_il = low_level_il

    @property
    def instructions(self):
        return iter(self._instructions)

    def get_basic_block_at(self, addr):
        for bb in self.basic_blocks:
            if bb.start <= addr < bb.end or bb.start == addr:
                return bb
        return self.basic_blocks[0] if self.basic_blocks else None

    def get_regs_read_by(self, addr, arch):
        return []

    def get_regs_written_by(self, addr, arch):
        return []

    def __str__(self):
        return f"uint64_t {self.name}()"


class MockBinaryView:
    """Mock for a Binary Ninja binary view."""
    def __init__(
        self,
        functions=None,
        strings=None,
        arch=None,
    ):
        self.functions = functions or []
        self.strings = strings or []
        self.arch = arch

    def get_segment_at(self, addr):
        return None

    def get_section_at(self, addr):
        return None

    def get_symbol_at(self, addr):
        return None

    def get_functions_at(self, addr):
        return []

    def get_string_at(self, addr):
        return None

    def get_data_var_at(self, addr):
        return None


class MockSymbol:
    """Mock for a Binary Ninja symbol."""
    def __init__(self, symbol_type=None, name="unknown"):
        self.type = symbol_type if symbol_type is not None else SymbolType.FunctionSymbol
        self.name = name
        self.full_name = name


class MockILInstruction:
    """Mock for an IL instruction (LLIL/HLIL)."""
    def __init__(self, operation, operands=None, address=0):
        self.operation = operation
        self.operands = operands or []
        self.address = address


class MockStringEntry:
    """Mock for a Binary Ninja string reference."""
    def __init__(self, value, raw=None, start=0, length=0, string_type=None):
        self.value = value
        self.raw = raw if raw is not None else value.encode("utf-8") if isinstance(value, str) else value
        self.start = start
        self.length = length if length else len(self.raw)
        self.type = string_type or MockStringType("Utf8String")


class MockStringType:
    """Mock for string type."""
    def __init__(self, name="Utf8String"):
        self.name = name