Victoria Nebot

28 papers B 1C 1Journal 13Unranked 12
YearRankTypeTitle / Venue / Authors
2018 C conf
NLDB
Victoria Nebot, Francisco M. Rangel Pardo, Rafael Berlanga Llavori, Paolo Rosso
2016 J jnl
Knowl. Based Syst.
Victoria Nebot, Rafael Berlanga Llavori
2015 conf
eBISS
Rafael Berlanga Llavori, Victoria Nebot
2015 J jnl
Int. J. Data Warehous. Min.
Rafael Berlanga Llavori, Lisette García-Moya, Victoria Nebot, María José Aramburu, Ismael Sanz, Dolores María Llidó
2015 J jnl
J. Web Semant.
Rafael Berlanga Llavori, Victoria Nebot, María Pérez Catalán
2015 J jnl
IEEE Trans. Knowl. Data Eng.
Alberto Abelló, Oscar Romero, Torben Bach Pedersen, Rafael Berlanga Llavori, Victoria Nebot, María José Aramburu Cabo, Alkis Simitsis
2014 conf
IC3K (Selected Papers)
Victoria Nebot, Rafael Berlanga Llavori
2014 J jnl
Knowl. Inf. Syst.
Victoria Nebot, Rafael Berlanga Llavori
2014 conf
KDIR
Victoria Nebot, Rafael Berlanga Llavori
2013
Victoria Nebot
2013 conf
KDIR/KMIS
Rafael Berlanga Llavori, Dolores María Llidó, Lisette García-Moya, Victoria Nebot, María José Aramburu, Ismael Sanz
2012 J jnl
Decis. Support Syst.
Victoria Nebot, Rafael Berlanga Llavori
2012 J jnl
BMC Bioinform.
Rafael Berlanga Llavori, Ernesto Jiménez-Ruiz, Victoria Nebot
2012 J jnl
Knowl. Based Syst.
Victoria Nebot, Rafael Berlanga Llavori
2011 conf
SWAT4LS
Victoria Nebot, Rafael Berlanga Llavori
2011 conf
DEXA Workshops
Shahad Kudama, Rafael Berlanga Llavori, Lisette García-Moya, Victoria Nebot, María José Aramburu Cabo
2010 conf
SWAT4LS
Rafael Berlanga Llavori, Ernesto Jiménez-Ruiz, Victoria Nebot
2010 J jnl
CoRR
Rafael Berlanga Llavori, Ernesto Jiménez-Ruiz, Victoria Nebot
2010 conf
EDBT/ICDT Workshops
Victoria Nebot, Rafael Berlanga Llavori
2010 J jnl
Int. J. Comput. Appl. Technol.
Rafael Berlanga Llavori, Ernesto Jiménez-Ruiz, Victoria Nebot, Ismael Sanz
2010 conf
IEA/AIE (2)
Victoria Nebot, Rafael Berlanga Llavori
2010 J jnl
Proces. del Leng. Natural
Rafael Berlanga Llavori, Victoria Nebot, Ernesto Jiménez-Ruiz
2009 conf
ICEIS (2)
Victoria Nebot, Rafael Berlanga Llavori
2009 J jnl
Inf. Sci.
Victoria Nebot, Rafael Berlanga Llavori
2009 J jnl
J. Data Semant.
Victoria Nebot, Rafael Berlanga Llavori, Juan Manuel Pérez-Martínez, María José Aramburu, Torben Bach Pedersen
2009 conf
JISBD
Victoria Nebot, Rafael Berlanga Llavori
2008 B conf
CBMS
Rafael Berlanga Llavori, Ernesto Jiménez-Ruiz, Victoria Nebot, David Manset, Andrew Branson, Tamas Hauer, Richard McClatchey, Dmitri Rogulin, Jetendr Shamdasani, Sonja Zillner, Joerg Freund
2007 conf
OTM Conferences (1)
Ernesto Jiménez-Ruiz, Rafael Berlanga Llavori, Victoria Nebot, Ismael Sanz
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