Namhoon Kim

57 papers A* 1A 8B 2C 2Misc 6Journal 24Unranked 13
YearRankTypeTitle / Venue / Authors
2026 J jnl
CoRR
Namhoon Kim, Narges Moeini, Justin Romberg, Sara Fridovich-Keil
2026 J jnl
CoRR
Namhoon Kim, Ashwin Pananjady, Amir Pourmorteza, Sara Fridovich-Keil
2026 J jnl
CoRR
Gyujun Jeong, Sungwon Cho, Minji Shon, Namhoon Kim, Woohyun Hwang, Kwangyou Seo, Suhwan Lim, Wanki Kim, Daewon Ha, Prasanna Venkatesan Ravindran, Kihang Youn, Ram Cherukuri, Yiyi Wang, Suman Datta, Asif Islam Khan, Shimeng Yu
2025 J jnl
CoRR
Namhoon Kim, Sara Fridovich-Keil
2025 conf
CAMSAP
Namhoon Kim, Sara Fridovich-Keil
2025 J jnl
CoRR
Namhoon Kim, Sara Fridovich-Keil
2024 J jnl
Earth Sci. Informatics
Nguyen Hong Quang, Hanna Lee, Namhoon Kim, Gihong Kim
2023 J jnl
Sensors
Namhoon Kim, Sangho Baek, Gi-Hong Kim
2023 J jnl
J. Imaging
Suhong Yoo, Namhoon Kim
2022 A* conf
HPCA
Michael Jaemin Kim, Jaehyun Park, Yeonhong Park, Wanju Doh, Namhoon Kim, Tae Jun Ham, Jae W. Lee, Jung Ho Ahn
2021 J jnl
IEEE Access
Wonkyung Jung, Eojin Lee, Sangpyo Kim, Jongmin Kim, Namhoon Kim, Keewoo Lee, Chohong Min, Jung Hee Cheon, Jung Ho Ahn
2021 B conf
ISPASS
Wonkyung Jung, Eojin Lee, Sangpyo Kim, Namhoon Kim, Keewoo Lee, Chohong Min, Jung Hee Cheon, Jung Ho Ahn
2021 conf
ISQED
Eunice Naswali, Namhoon Kim, Pravin Chandran
2021 J jnl
CoRR
Michael Jaemin Kim, Jaehyun Park, Yeonhong Park, Wanju Doh, Namhoon Kim, Tae Jun Ham, Jae W. Lee, Jung Ho Ahn
2020 J jnl
CoRR
Kyungmin Lee, Chiyoun Park, Ilhwan Kim, Namhoon Kim, Jaewon Lee
2020 J jnl
CoRR
Wonkyung Jung, Eojin Lee, Sangpyo Kim, Keewoo Lee, Namhoon Kim, Chohong Min, Jung Hee Cheon, Jung Ho Ahn
2020 J jnl
Sensors
Namhoon Kim, Junsu Bae, Cheolhwan Kim, Soyeon Park, Hong-Gyoo Sohn
2020 J jnl
Real Time Syst.
Namhoon Kim, Stephen Tang, Nathan Otterness, James H. Anderson, F. Donelson Smith, Donald E. Porter
2019
Namhoon Kim
2018 conf
ISOCC
Min Kim, Kyung-Sub Son, Namhoon Kim, Chang Hang Rho, Jin-Ku Kang
2018 Misc conf
ICASSP
Kyungmin Lee, Chiyoun Park, Namhoon Kim, Jaewon Lee
2018 J jnl
CoRR
Kyungmin Lee, Chiyoun Park, Namhoon Kim, Jaewon Lee
2018 C conf
ICCE
Keunseok Cho, Jaeyoung Roh, Youngho Han, Namhoon Kim, Jaewon Lee
2018 Misc conf
RTNS
Namhoon Kim, Stephen Tang, Nathan Otterness, James H. Anderson, F. Donelson Smith, Donald E. Porter
2017 J jnl
ISPRS Int. J. Geo Inf.
Mi-Kyeong Kim, Sangpil Kim, Hong-Gyoo Sohn, Namhoon Kim, Je-Sung Park
2017 A conf
RTAS
Namhoon Kim, Micaiah Chisholm, Nathan Otterness, James H. Anderson, F. Donelson Smith
2017 J jnl
Real Time Syst.
Namhoon Kim, Bryan C. Ward, Micaiah Chisholm, James H. Anderson, F. Donelson Smith
2017 Misc conf
RTNS
Micaiah Chisholm, Namhoon Kim, Stephen Tang, Nathan Otterness, James H. Anderson, F. Donelson Smith, Donald E. Porter
2016 A conf
RTAS
Namhoon Kim, Bryan C. Ward, Micaiah Chisholm, Cheng-Yang Fu, James H. Anderson, F. Donelson Smith
2016 A conf
RTSS
Micaiah Chisholm, Namhoon Kim, Bryan C. Ward, Nathan Otterness, James H. Anderson, F. Donelson Smith
2015 A conf
INTERSPEECH
Kyungmin Lee, Chiyoun Park, Ilhwan Kim, Namhoon Kim, Jaewon Lee
2015 A conf
RTSS
Micaiah Chisholm, Bryan C. Ward, Namhoon Kim, James H. Anderson
2015 Misc conf
ICASSP
Ivan Himawan, Petr Motlícek, David Imseng, Blaise Potard, Namhoon Kim, Jaewon Lee
2015 A conf
IPDPS
Jeremy P. Erickson, Namhoon Kim, James H. Anderson
2015 J jnl
Sensors
Seunghwan Hong, Hyo-Seon Jang, Namhoon Kim, Hong-Gyoo Sohn
2014 A conf
INTERSPEECH
Petr Motlícek, David Imseng, Milos Cernak, Namhoon Kim
2014 B conf
RTCSA
Glenn A. Elliott, Namhoon Kim, Jeremy P. Erickson, Cong Liu, James H. Anderson
2014 conf
ICCAIS
Namhoon Kim, Hong-Gyoo Sohn, Doe-Gyu Jeon, Hyo-Seon Jang
2013 Misc conf
ICASSP
Petr Motlícek, Philip N. Garner, Namhoon Kim, Jeongmi Cho
2013 C conf
ICCE
Jeong-Gwan Kang, Namhoon Kim, Sungmin Park, KyongHa Park, Hyunsu Hong
2012 conf
ESSCIRC
Liam Madden, Ephrem Wu, Namhoon Kim, Bahareh Banijamali, Khaldoon Abugharbieh, Suresh Ramalingam, Xin Wu
2012 conf
MFI
Youngmok Yun, Jingfu Jin, Namhoon Kim, Jeongyeon Yoon, ChangHwan Kim
2010 Misc conf
ICASSP
Chiyoun Park, Namhoon Kim, Jeongmi Cho, Jeongsu Kim
2010 J jnl
IEICE Trans. Fundam. Electron. Commun. Comput. Sci.
Hyung Seok Kim, Seok Lee, Namhoon Kim
2009 A conf
INTERSPEECH
Chiyoun Park, Namhoon Kim, Jeongmi Cho
2008 J jnl
IEICE Trans. Commun.
Namhoon Kim, Soo Hee Han, Wook Hyun Kwon
2008 J jnl
Comput. Commun.
Namhoon Kim, Jongman Heo, Hyung Seok Kim, Wook Hyun Kwon
2007 J jnl
Comput. Commun.
Namhoon Kim, Soyeon Ahn, Younghee Lee
2006 J jnl
IEEE J. Solid State Circuits
Jaeha Kim, Jeong-Kyoum Kim, Bong-Joon Lee, Namhoon Kim, Deog-Kyoon Jeong, Wonchan Kim
2006 conf
ISSCC
Yongsam Moon, Gijung Ahn, Hoon Choi, Namhoon Kim, Daeyun Shim
2005 conf
ICOIN
Saehoon Kang, Seungbok Ryu, Namhoon Kim, Younghee Lee, Dongman Lee, Kyeong-Deok Moon
2005 conf
ICWN
Bojung Ko, Soyeon Ahn, Namhoon Kim, Younghee Lee, Dongman Lee
2005 conf
WAIM
Minwoo Son, Jonghwa Choi, Namhoon Kim, Dongkyoo Shin, Dongil Shin
2004 conf
International Conference on Wireless Networks
Soyeon Ahn, Namhoon Kim, Woohyun Kim, Younghee Lee
2004 J jnl
IEEE J. Solid State Circuits
Yongsam Moon, Young-Soo Park, Namhoon Kim, Gijung Ahn, Hyun J. Shin, Deog-Kyoon Jeong
2004 conf
ICOIN
XuanTung Hoang, Soyeon Ahn, Namhoon Kim, Hyungkeun Lee
2004 conf
ECUMN
Namhoon Kim, Saehoon Kang, Younghee Lee
tests/unit/test_decompile_scores.py
← Index tests/unit/test_decompile_scores.py python
"""Unit tests for bninja/analysis/scores.py — ObfuscationScores."""
import sys
import pytest
from unittest.mock import MagicMock

# Install binaryninja stubs before importing
from tests.unit.conftest_binja_stubs import (
    install_binja_stubs,
    HighLevelILOperation,
)
bn_mock = install_binja_stubs()

from redb.extractors.decompiler.bninja.analysis.scores import (
    ObfuscationScores,
    get_dominated_by,
    uses_mba,
)
import binaryninja.highlevelil as hlil_mod


# ============================================================================
# Helper: Mock HLIL instruction
# ============================================================================

class MockHLILInstruction(hlil_mod.HighLevelILInstruction):
    """Mock HLIL instruction with operation and operands."""
    def __init__(self, operation, operands=None):
        self.operation = operation
        self.operands = operands or []


class MockHLILBasicBlock:
    """Mock HLIL basic block for flattened score testing."""
    def __init__(self, incoming_edges=None, dominator_tree_children=None):
        self.incoming_edges = incoming_edges or []
        self.dominator_tree_children = dominator_tree_children or []


# ============================================================================
# 5a. ObfuscationScores
# ============================================================================


class TestFlattenedScore:
    def test_flattened_score_no_back_edges(self):
        """Linear CFG with no back edges -> score 0.0."""
        block = MockHLILBasicBlock(incoming_edges=[], dominator_tree_children=[])
        func = MagicMock()
        func.basic_blocks = [block]
        scores = ObfuscationScores(func)
        assert scores.flattened_score() == 0.0

    def test_flattened_score_with_loop(self):
        """CFG with a back edge -> score > 0.0."""
        block = MockHLILBasicBlock(dominator_tree_children=[])
        # Create a back edge: an incoming edge whose source is in the dominated set
        edge = MagicMock()
        edge.source = block  # source IS the dominator -> back edge
        block.incoming_edges = [edge]
        func = MagicMock()
        func.basic_blocks = [block]
        scores = ObfuscationScores(func)
        assert scores.flattened_score() > 0.0

    def test_flattened_score_fully_flat(self):
        """Flattened CFG: one block dominates all -> ratio close to 1.0."""
        children = [MockHLILBasicBlock() for _ in range(4)]
        root = MockHLILBasicBlock(dominator_tree_children=children)
        # Back edge from root incoming
        edge = MagicMock()
        edge.source = root
        root.incoming_edges = [edge]
        all_blocks = [root] + children
        func = MagicMock()
        func.basic_blocks = all_blocks
        scores = ObfuscationScores(func)
        assert scores.flattened_score() == pytest.approx(1.0)


class TestMBAScore:
    def test_mba_score_no_mixed_ops(self):
        """Instructions with only arithmetic -> score 0.0."""
        instr = MockHLILInstruction(HighLevelILOperation.HLIL_ADD, operands=[])
        func = MagicMock()
        func.instructions = [instr]
        scores = ObfuscationScores(func)
        assert scores.MBA_score() == 0.0

    def test_mba_score_mixed_ops(self):
        """Instructions with arithmetic + logic -> score > 0.0."""
        inner_logic = MockHLILInstruction(HighLevelILOperation.HLIL_XOR, operands=[])
        outer_arith = MockHLILInstruction(
            HighLevelILOperation.HLIL_ADD, operands=[inner_logic]
        )
        func = MagicMock()
        func.instructions = [outer_arith]
        scores = ObfuscationScores(func)
        assert scores.MBA_score() > 0.0

    def test_mba_score_all_mixed(self):
        """Every instruction has both -> score 1.0."""
        inner_logic = MockHLILInstruction(HighLevelILOperation.HLIL_NOT, operands=[])
        outer_arith = MockHLILInstruction(
            HighLevelILOperation.HLIL_SUB, operands=[inner_logic]
        )
        func = MagicMock()
        func.instructions = [outer_arith]
        scores = ObfuscationScores(func)
        assert scores.MBA_score() == 1.0


class TestGetDominatedBy:
    def test_get_dominated_by(self):
        child1 = MockHLILBasicBlock(dominator_tree_children=[])
        child2 = MockHLILBasicBlock(dominator_tree_children=[])
        root = MockHLILBasicBlock(dominator_tree_children=[child1, child2])
        result = get_dominated_by(root)
        assert root in result
        assert child1 in result
        assert child2 in result
        assert len(result) == 3


class TestUsesMBA:
    def test_uses_mba_arithmetic_only(self):
        instr = MockHLILInstruction(HighLevelILOperation.HLIL_ADD, operands=[])
        assert uses_mba(instr) is False

    def test_uses_mba_logic_only(self):
        instr = MockHLILInstruction(HighLevelILOperation.HLIL_XOR, operands=[])
        assert uses_mba(instr) is False

    def test_uses_mba_mixed(self):
        inner = MockHLILInstruction(HighLevelILOperation.HLIL_AND, operands=[])
        outer = MockHLILInstruction(HighLevelILOperation.HLIL_ADD, operands=[inner])
        assert uses_mba(outer) is True