Carlos Guindel

26 papers Journal 14Unranked 12
YearRankTypeTitle / Venue / Authors
2024 J jnl
Neural Comput. Appl.
Armando Astudillo, Alejandro Barrera, Carlos Guindel, Abdulla Al-Kaff, Fernando García
2022 J jnl
IEEE Trans. Intell. Transp. Syst.
Jorge Beltrán, Carlos Guindel, Arturo de la Escalera, Fernando García
2022 J jnl
IEEE Intell. Transp. Syst. Mag.
Vicente Milanés, David González, Francisco Navas, Imane Mahtout, Alexandre Armand, Clément Zinoune, Arunkumar Ramaswamy, Farid Bekka, Nievsabel Molina, Emmanuel Battesti, Yvon Kerdoncuff, Carlos Guindel, Jorge Beltrán, Irene Cortés, Alejandro Barrera, Fernando García
2021 J jnl
CoRR
Jorge Beltrán, Carlos Guindel, Fernando García
2021 J jnl
IEEE Access
Alejandro Barrera, Jorge Beltrán, Carlos Guindel, José Antonio Iglesias, Fernando García
2021 conf
ITSC
Alejandro Barrera, Jorge Beltrán, Carlos Guindel, José Antonio Iglesias, Fernando García
2021 J jnl
CoRR
Alejandro Barrera, Jorge Beltrán, Carlos Guindel, José Antonio Iglesias, Fernando García
2021 conf
ITSC
Armando Astudillo, Nievsabel Molina, Irene Cortés, Imane Mahtout, David González, Jorge Beltrán, Carlos Guindel, Alejandro Barrera, Mario Álvarez, Clément Zinoune, Vicente Milanés, Fernando García
2021 J jnl
Sensors
Juan Carmona, Carlos Guindel, Fernando García, Arturo de la Escalera
2020 conf
ITSC
Alejandro Barrera, Carlos Guindel, Jorge Beltrán, Fernando García
2020 J jnl
CoRR
Alejandro Barrera, Carlos Guindel, Jorge Beltrán, Fernando García
2020 J jnl
Sensors
Laura Garcia Cuenca, Carlos Guindel, Nourdine Aliane, José María Armingol, Javier Fernández Andres
2020 J jnl
CoRR
Jorge Beltrán, Carlos Guindel, Irene Cortés, Alejandro Barrera, Armando Astudillo, Jesús Urdiales, Mario Álvarez, Farid Bekka, Vicente Milanés, Fernando García
2020 conf
ITSC
Jorge Beltrán, Carlos Guindel, Irene Cortés, Alejandro Barrera, Armando Astudillo, Jesús Urdiales, Mario Álvarez, Farid Bekka, Vicente Milanés, Fernando García
2019 conf
ITSC
Jorge Beltrán, Irene Cortés, Alejandro Barrera, Jesús Urdiales, Carlos Guindel, Fernando García, Arturo de la Escalera
2019 J jnl
Robotics Auton. Syst.
Carlos Guindel, David Martín, José María Armingol
2018 conf
ITSC
Carlos Fernández, Carlos Guindel, Niels Ole Salscheider, Christoph Stiller
2018 conf
ICVES
Carlos Guindel, David Martín, José María Armingol, Christoph Stiller
2018 conf
ITSC
Jorge Beltrán, Carlos Guindel, Francisco Miguel Moreno, Daniel Cruzado, Fernando García, Arturo de la Escalera
2018 J jnl
CoRR
Jorge Beltrán, Carlos Guindel, Francisco Miguel Moreno, Daniel Cruzado, Fernando García, Arturo de la Escalera
2018 J jnl
IEEE Intell. Transp. Syst. Mag.
Carlos Guindel, David Martín, José María Armingol
2017 J jnl
CoRR
Carlos Guindel, Jorge Beltrán, David Martín, Fernando García
2017 conf
ITSC
Carlos Guindel, Jorge Beltrán, David Martín, Fernando García
2017 conf
ICVES
Carlos Guindel, David Martín, José María Armingol
2017 conf
ROBOT (2)
Carlos Guindel, David Martín, José María Armingol
2017 conf
EUROCAST (2)
Carlos Guindel, David Martín, José María Armingol
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