Igor Pontes Duff

38 papers Journal 33Unranked 5
YearRankTypeTitle / Venue / Authors
2026 J jnl
Appl. Math. Lett.
Leonidas Gkimisis, Igor Pontes Duff, Pawan Goyal, Peter Benner
2025 J jnl
Autom.
Celine Reddig, Igor Pontes Duff, Pawan Goyal, Peter Benner
2025 J jnl
IEEE Control. Syst. Lett.
Reetish Padhi, Ion Victor Gosea, Igor Pontes Duff, Serkan Gugercin
2025 J jnl
CoRR
Reetish Padhi, Ion Victor Gosea, Igor Pontes Duff, Serkan Gugercin
2025 J jnl
CoRR
Diana Manvelyan-Stroot, Yevgeniya Filanova, Igor Pontes Duff, Peter Benner, Utz Wever
2025 J jnl
CoRR
Leonidas Gkimisis, Igor Pontes Duff, Pawan Goyal, Peter Benner
2025 J jnl
CoRR
Sean Reiter, Ion Victor Gosea, Igor Pontes Duff, Serkan Gugercin
2024 J jnl
CoRR
Celine Reddig, Pawan Goyal, Igor Pontes Duff, Peter Benner
2024 J jnl
Adv. Comput. Math.
Pawan Goyal, Igor Pontes Duff, Peter Benner
2024 J jnl
Syst. Control. Lett.
Jennifer Przybilla, Igor Pontes Duff, Peter Benner
2024 J jnl
Adv. Comput. Math.
Jennifer Przybilla, Igor Pontes Duff, Peter Benner
2024 J jnl
CoRR
Igor Pontes Duff, Pawan Goyal, Peter Benner
2024 J jnl
CoRR
Sean Reiter, Igor Pontes Duff, Ion Victor Gosea, Serkan Gugercin
2023 J jnl
CoRR
Pawan Goyal, Igor Pontes Duff, Peter Benner
2023 J jnl
CoRR
Pawan Goyal, Igor Pontes Duff, Peter Benner
2023 J jnl
CoRR
Pawan Goyal, Igor Pontes Duff, Peter Benner
2023 J jnl
Int. J. Control
Martin Redmann, Igor Pontes Duff
2022 conf
ECC
Ion Victor Gosea, Igor Pontes Duff
2022 J jnl
Appl. Math. Comput.
Martin Redmann, Igor Pontes Duff
2022 J jnl
IEEE Trans. Autom. Control.
Peter Benner, Pawan Goyal, Igor Pontes Duff
2021 J jnl
CoRR
Martin Redmann, Igor Pontes Duff
2021 J jnl
Int. J. Control
Xingang Cao, Peter Benner, Igor Pontes Duff, Wil H. A. Schilders
2021 J jnl
CoRR
Martin Redmann, Igor Pontes Duff
2020 J jnl
IEEE Trans. Autom. Control.
Igor Pontes Duff, Sara Grundel, Peter Benner
2020 J jnl
CoRR
Peter Benner, Pawan Goyal, Jan Heiland, Igor Pontes Duff
2020 J jnl
CoRR
Ion Victor Gosea, Igor Pontes Duff
2019 J jnl
IEEE Control. Syst. Lett.
Igor Pontes Duff, Pawan Goyal, Peter Benner
2019 J jnl
CoRR
Igor Pontes Duff, Pawan Goyal, Peter Benner
2019 J jnl
CoRR
Peter Benner, Pawan Goyal, Igor Pontes Duff
2019 J jnl
CoRR
Peter Benner, Pawan Goyal, Igor Pontes Duff
2019 conf
ECC
Ion Victor Gosea, Igor Pontes Duff, Peter Benner, Athanasios C. Antoulas
2018 J jnl
Syst. Control. Lett.
Igor Pontes Duff, Charles Poussot-Vassal, Cédric Seren
2018 J jnl
CoRR
Igor Pontes Duff, Sara Grundel, Peter Benner
2016 conf
ECC
Violaine Dalmas, Gerard Robert, Charles Poussot-Vassal, Igor Pontes Duff, Cédric Seren
2015 conf
ECC
Igor Pontes Duff, Pierre Vuillemin, Charles Poussot-Vassal, Cédric Seren, Corentin Briat
2015 J jnl
CoRR
Igor Pontes Duff, Charles Poussot-Vassal, Cédric Seren
2015 J jnl
CoRR
Igor Pontes Duff, Charles Poussot-Vassal, Cédric Seren
2015 conf
CDC
Igor Pontes Duff, Charles Poussot-Vassal, Cédric Seren
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