Candice Schumann

21 papers A* 4A 3C 2Journal 10Unranked 1
YearRankTypeTitle / Venue / Authors
2025 A* conf
ICLR
Ahmed Imtiaz Humayun, Ibtihel Amara, Cristina Nader Vasconcelos, Deepak Ramachandran, Candice Schumann, Junfeng He, Katherine A. Heller, Golnoosh Farnadi, Negar Rostamzadeh, Mohammad Havaei
2024 conf
FAccT
Hansa Srinivasan, Candice Schumann, Aradhana Sinha, David Madras, Gbolahan Oluwafemi Olanubi, Alex Beutel, Susanna Ricco, Jilin Chen
2024 J jnl
CoRR
Hansa Srinivasan, Candice Schumann, Aradhana Sinha, David Madras, Gbolahan Oluwafemi Olanubi, Alex Beutel, Susanna Ricco, Jilin Chen
2024 J jnl
CoRR
Ahmed Imtiaz Humayun, Ibtihel Amara, Candice Schumann, Golnoosh Farnadi, Negar Rostamzadeh, Mohammad Havaei
2023 A* conf
NeurIPS
Candice Schumann, Femi Olanubi, Auriel Wright, Ellis Monk Jr., Courtney Heldreth, Susanna Ricco
2023 J jnl
CoRR
Candice Schumann, Gbolahan O. Olanubi, Auriel Wright, Ellis Monk Jr., Courtney Heldreth, Susanna Ricco
2022 A conf
AAMAS
Candice Schumann, Zhi Lang, Nicholas Mattei, John P. Dickerson
2021 C conf
AIES
Candice Schumann, Susanna Ricco, Utsav Prabhu, Vittorio Ferrari, Caroline Pantofaru
2021 J jnl
CoRR
Candice Schumann, Susanna Ricco, Utsav Prabhu, Vittorio Ferrari, Caroline Pantofaru
2020
Candice Schumann
2020 C conf
AIES
Debjani Saha, Candice Schumann, Duncan C. McElfresh, John P. Dickerson, Michelle L. Mazurek, Michael Carl Tschantz
2020 J jnl
CoRR
Debjani Saha, Candice Schumann, Duncan C. McElfresh, John P. Dickerson, Michelle L. Mazurek, Michael Carl Tschantz
2020 A* conf
ICML
Debjani Saha, Candice Schumann, Duncan C. McElfresh, John P. Dickerson, Michelle L. Mazurek, Michael Carl Tschantz
2020 A conf
AAMAS
Candice Schumann, Jeffrey S. Foster, Nicholas Mattei, John P. Dickerson
2019 J jnl
CoRR
Candice Schumann, Zhi Lang, Nicholas Mattei, John P. Dickerson
2019 A* conf
NeurIPS
Candice Schumann, Zhi Lang, Jeffrey S. Foster, John P. Dickerson
2019 J jnl
CoRR
Candice Schumann, Zhi Lang, Jeffrey S. Foster, John P. Dickerson
2019 A conf
AAMAS
Candice Schumann, Samsara N. Counts, Jeffrey S. Foster, John P. Dickerson
2019 J jnl
CoRR
Candice Schumann, Xuezhi Wang, Alex Beutel, Jilin Chen, Hai Qian, Ed H. Chi
2017 J jnl
CoRR
Candice Schumann, Samsara N. Counts, Jeffrey S. Foster, John P. Dickerson
2015 J jnl
J. Comput. Sci. Coll.
Candice Schumann, Timothy Highley, Howard Stickley
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