Ibrahim Rashdan

14 papers B 3Journal 4Unranked 7
YearRankTypeTitle / Venue / Authors
2026 J jnl
CoRR
Shrief Rizkalla, Adrian Kliks, Nila Bagheri, Miguel A. Bellido-Manganell, Aniruddha Chandra, Anja Dakic, Laura Finarelli, Davy Gaillot, Matti Hämäläinen, Ruisi He, Markus Hofer, Sandaruwan Jayaweera, Francesco Linsalata, Konstantin Mikhaylov, Jon M. Peha, Ibrahim Rashdan, Gianluca Rizzo, Abdul Saboor, Martin Schmidhammer, Michal Sybis, Fredrik Tufvesson, Paul Unterhuber, Fernando J. Velez, Evgenii Vinogradov, Michael Walter, Thomas Zemen, Haibin Zhang, Zhengyu Zhang
2025 conf
VTC2025-Spring
Fabian de Ponte Müller, Martin Schmidhammer, Ibrahim Rashdan
2024 J jnl
Veh. Commun.
Yue Lyu, Wei Wang, Yuzhe Sun, Ibrahim Rashdan
2024 conf
JC&S
Fabian de Ponte Müller, Martin Schmidhammer, Christian Gentner, Ibrahim Rashdan, Stephan Sand
2023 J jnl
IEEE Wirel. Commun. Lett.
JingLi Xie, Wei Wang, Xinyi Liu, Ibrahim Rashdan, Chenqi Di, Jiajie Qin
2021 conf
VTC Fall
Stephan Sand, Paul Unterhuber, Dina Bousdar Ahmed, Fabian de Ponte Müller, Andreas Lehner, Ibrahim Rashdan, Martin Schmidhammer, Rostislav Karásek, Benjamin Siebler, Oliver Heirich, Christian Gentner, Michael Walter, Susanna Kaiser, Markus Ulmschneider, Marius Schaab, Luis Wientgens, Thomas Strang
2019 J jnl
IEEE Access
Ibrahim Rashdan, Fabian de Ponte Müller, Thomas Jost, Stephan Sand, Giuseppe Caire
2017 conf
VTC Fall
Ibrahim Rashdan, Martin Schmidhammer, Fabian de Ponte Müller, Stephan Sand
2017 B conf
PIMRC
Guillem Boquet, José López Vicario, Alejandro Correa, Antoni Morell, Ibrahim Rashdan, Estefania Munoz Diaz, Fabian de Ponte Müller
2016 conf
VTC Fall
Ibrahim Rashdan, Fabian de Ponte Müller, Stephan Sand
2016 B conf
PIMRC
Hong Quy Le, Ibrahim Rashdan, Stephan Sand
2016 conf
VTC Fall
Fabian de Ponte Müller, Estefania Munoz Diaz, Ibrahim Rashdan
2016 B conf
Intelligent Vehicles Symposium
Fabian de Ponte Müller, Estefania Munoz Diaz, Ibrahim Rashdan
2016 conf
VTC Fall
Ibrahim Rashdan, Fabian de Ponte Müller, Stephan Sand
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