Raghavv Goel

20 papers A* 1B 1C 1Journal 15Unranked 2
YearRankTypeTitle / Venue / Authors
2026 J jnl
CoRR
Zongyue Qin, Raghavv Goel, Mukul Gagrani, Risheek Garrepalli, Mingu Lee, Yizhou Sun
2026 J jnl
CoRR
Raghavv Goel, Mukul Gagrani, Mingu Lee, Chris Lott
2026 J jnl
CoRR
Raghavv Goel, Risheek Garrepalli, Sudhanshu Agrawal, Chris Lott, Mingu Lee, Fatih Porikli
2025 J jnl
CoRR
Raghavv Goel, Junyoung Park, Mukul Gagrani, Dalton Jones, Matthew J. Morse, Harper Langston, Mingu Lee, Christopher Lott
2025 J jnl
IEEE Trans. Autom. Control.
Raghavv Goel, Sayan Basu Roy
2025 J jnl
CoRR
Junyoung Park, Dalton Jones, Matthew J. Morse, Raghavv Goel, Mingu Lee, Christopher Lott
2025 J jnl
CoRR
Sudhanshu Agrawal, Risheek Garrepalli, Raghavv Goel, Mingu Lee, Christopher Lott, Fatih Porikli
2025 J jnl
CoRR
Raghavv Goel, Sudhanshu Agrawal, Mukul Gagrani, Junyoung Park, Yifan Zao, He Zhang, Tian Liu, Yiping Yang, Xin Yuan, Jiuyan Lu, Chris Lott, Mingu Lee
2024 J jnl
CoRR
Raghavv Goel, Mukul Gagrani, Wonseok Jeon, Junyoung Park, Mingu Lee, Christopher Lott
2024 conf
ISBI
Raghavv Goel, Cecilia G. Morales, Manpreet Singh, Artur Dubrawski, John M. Galeotti, Howie Choset
2024 conf
CVPR Workshops
Raghavv Goel, Cecilia G. Morales, Manpreet Singh, Artur Dubrawski, Jonh Galeotti, Howie Choset
2024 J jnl
CoRR
Mukul Gagrani, Raghavv Goel, Wonseok Jeon, Junyoung Park, Mingu Lee, Christopher Lott
2024 J jnl
CoRR
Wonseok Jeon, Mukul Gagrani, Raghavv Goel, Junyoung Park, Mingu Lee, Christopher Lott
2023 J jnl
CoRR
Raghavv Goel, Cecilia G. Morales, Manpreet Singh, Artur Dubrawski, John M. Galeotti, Howie Choset
2022 A* conf
ICRA
Raghavv Goel, Abhimanyu, Kirtan Patel, John M. Galeotti, Howie Choset
2022 J jnl
IEEE Trans. Control. Netw. Syst.
Raghavv Goel, Tushar Garg, Sayan Basu Roy
2022 J jnl
CoRR
Raghavv Goel, Sayan Basu Roy
2021 J jnl
IEEE Control. Syst. Lett.
Raghavv Goel, Sayan Basu Roy
2021 C conf
ACC
Raghavv Goel, Sayan Basu Roy
2019 B conf
SMC
Raghavv Goel, John Lewis, Michael A. Goodrich, P. B. Sujit
tests/unit/test_decompile_function_type.py
← Index tests/unit/test_decompile_function_type.py python
"""Unit tests for bninja/function_type.py."""
import sys
import pytest
from unittest.mock import MagicMock

# Install binaryninja stubs before importing
from tests.unit.conftest_binja_stubs import install_binja_stubs, SymbolType
install_binja_stubs()

from redb.extractors.decompiler.bninja.function_type import (
    FunctionType,
    FunctionTypeAnalysis,
)


# ============================================================================
# 4a. FunctionType / FunctionTypeAnalysis
# ============================================================================


class TestFunctionTypeEnum:
    def test_function_type_enum_values(self):
        assert FunctionType.USER.value == "USER"
        assert FunctionType.LIBRARY.value == "LIBRARY"
        assert FunctionType.EXTERNAL.value == "EXTERNAL"
        assert FunctionType.THUNK.value == "THUNK"
        assert FunctionType.UNKNOWN.value == "UNKNOWN"


class TestFunctionTypeAnalysis:
    def _make_function(self, symbol_type=None, is_thunk=False, raise_on_symbol=False):
        func = MagicMock()
        func.is_thunk = is_thunk
        if raise_on_symbol:
            type(func).symbol = property(lambda self: (_ for _ in ()).throw(Exception("no symbol")))
        else:
            func.symbol.type = symbol_type if symbol_type is not None else SymbolType.FunctionSymbol
        return func

    def test_user_function_type(self):
        func = self._make_function(symbol_type=SymbolType.FunctionSymbol)
        analysis = FunctionTypeAnalysis(func)
        assert analysis.get_function_type() == FunctionType.USER

    def test_external_function_type(self):
        func = self._make_function(symbol_type=SymbolType.ImportedFunctionSymbol)
        analysis = FunctionTypeAnalysis(func)
        assert analysis.get_function_type() == FunctionType.EXTERNAL

    def test_library_function_type(self):
        func = self._make_function(symbol_type=SymbolType.LibraryFunctionSymbol)
        analysis = FunctionTypeAnalysis(func)
        assert analysis.get_function_type() == FunctionType.LIBRARY

    def test_thunk_function_type(self):
        # Thunk overrides the symbol type
        func = self._make_function(
            symbol_type=SymbolType.FunctionSymbol, is_thunk=True
        )
        analysis = FunctionTypeAnalysis(func)
        assert analysis.get_function_type() == FunctionType.THUNK

    def test_exception_returns_unknown(self):
        func = self._make_function(raise_on_symbol=True)
        analysis = FunctionTypeAnalysis(func)
        assert analysis.get_function_type() == FunctionType.UNKNOWN