Catalin Dima

83 papers A* 4A 7B 5C 7Misc 2Journal 31Unranked 24
YearRankTypeTitle / Venue / Authors
2026 B ed.
PRIMA
Catalin Dima, Angelo Ferrando, Vadim Malvone
2025 conf
FROM
Dumitru-Bogdan Prelipcean, Catalin Dima
2025 J jnl
Perform. Evaluation
Benoît Barbot, Damien Busatto-Gaston, Catalin Dima, Youssouf Oualhadj
2025 C conf
ICFEM
Dumitru-Bogdan Prelipcean, Catalin Dima, Daniele Varacca
2025 J jnl
ACM Trans. Comput. Log.
Francesco Belardinelli, Ioana Boureanu, Catalin Dima, Vadim Malvone
2025 conf
RP
Eugene Asarin, Aldric Degorre, Catalin Dima, Bernardo Jacobo Inclán
2025 J jnl
CoRR
Eugene Asarin, Aldric Degorre, Catalin Dima, Bernardo Jacobo Inclán
2024 C conf
CIAA
Eugene Asarin, Aldric Degorre, Catalin Dima, Bernardo Jacobo Inclán
2024 J jnl
CoRR
Eugene Asarin, Aldric Degorre, Catalin Dima, Bernardo Jacobo Inclán
2024 conf
QEST+FORMATS
Benoît Barbot, Damien Busatto-Gaston, Catalin Dima, Youssouf Oualhadj
2024 J jnl
CoRR
Benoît Barbot, Damien Busatto-Gaston, Catalin Dima, Youssouf Oualhadj
2024 C conf
ICFEM
Catalin Dima, Mariem Hammami, Youssouf Oualhadj, Régine Laleau
2024 J jnl
CoRR
Catalin Dima, Mariem Hammami, Youssouf Oualhadj, Régine Laleau
2023 conf
FSTTCS
Eugene Asarin, Aldric Degorre, Catalin Dima, Bernardo Jacobo Inclán
2023 J jnl
CoRR
Eugene Asarin, Aldric Degorre, Catalin Dima, Bernardo Jacobo Inclán
2023 A conf
AAMAS
Catalin Dima, Wojciech Jamroga
2023 J jnl
CoRR
Catalin Dima, Wojciech Jamroga
2023 C conf
EUMAS
Romain Demangeon, Catalin Dima, Daniele Varacca
2023 A conf
AAMAS
Rodica Condurache, Catalin Dima, Youssouf Oualhadj, Nicolas Troquard
2022 J jnl
CoRR
Francesco Belardinelli, Rodica Condurache, Catalin Dima, Wojciech Jamroga, Michal Knapik
2022 conf
AREA@IJCAI-ECAI
Rodica Condurache, Catalin Dima, Madalina Jitaru, Youssouf Oualhadj, Nicolas Troquard
2022 J jnl
CoRR
Francesco Belardinelli, Ioana Boureanu, Catalin Dima, Vadim Malvone
2021 J jnl
Inf. Comput.
Francesco Belardinelli, Rodica Condurache, Catalin Dima, Wojciech Jamroga, Michal Knapik
2021 ed.
FORMATS
Catalin Dima, Mahsa Shirmohammadi
2021 A conf
AAMAS
Rodica Condurache, Catalin Dima, Youssouf Oualhadj, Nicolas Troquard
2020 A* conf
LICS
Francesco Belardinelli, Catalin Dima, Vadim Malvone, Ferucio Laurentiu Tiplea
2020 J jnl
CoRR
Francesco Belardinelli, Catalin Dima, Vadim Malvone, Ferucio Laurentiu Tiplea
2019 J jnl
CoRR
Francesco Belardinelli, Catalin Dima, Ioana Boureanu, Vadim Malvone
2019 A conf
AAMAS
Francesco Belardinelli, Ioana Boureanu, Catalin Dima, Vadim Malvone
2018 A* conf
KR
Francesco Belardinelli, Catalin Dima, Aniello Murano
2018 J jnl
ACM Trans. Comput. Log.
Catalin Dima, Bastien Maubert, Sophie Pinchinat
2017 A conf
AAMAS
Francesco Belardinelli, Rodica Condurache, Catalin Dima, Wojciech Jamroga, Andrew V. Jones
2016 A conf
STACS
Eugene Asarin, Julien Cervelle, Aldric Degorre, Catalin Dima, Florian Horn, Victor S. Kozyakin
2016 conf
ICTCS
Catalin Dima, Bastien Maubert, Sophie Pinchinat
2016 J jnl
Theor. Comput. Sci.
Marie-Pierre Béal, Michel Blockelet, Catalin Dima
2016 J jnl
Formal Aspects Comput.
Dimitris Vekris, Frédéric Lang, Catalin Dima, Radu Mateescu
2015 J jnl
CoRR
Eugene Asarin, Julien Cervelle, Aldric Degorre, Catalin Dima, Florian Horn, Victor S. Kozyakin
2015 conf
MFCS (1)
Catalin Dima, Bastien Maubert, Sophie Pinchinat
2014 J jnl
Fundam. Informaticae
Catalin Dima
2014 conf
CSL-LICS
Eugene Asarin, Michel Blockelet, Aldric Degorre, Catalin Dima, Chunyan Mu
2014 A* conf
CAV
Rodica Bozianu, Catalin Dima, Emmanuel Filiot
2014 J jnl
CoRR
Rodica Bozianu, Catalin Dima, Emmanuel Filiot
2014 conf
MFCS (1)
Marie-Pierre Béal, Michel Blockelet, Catalin Dima
2014 J jnl
CoRR
Catalin Dima, Bastien Maubert, Sophie Pinchinat
2014 Misc conf
ITA
Marie-Pierre Béal, Michel Blockelet, Catalin Dima
2013 conf
FSEN
Dimitris Vekris, Catalin Dima
2013 J jnl
CoRR
Marie-Pierre Béal, Michel Blockelet, Catalin Dima
2013 J jnl
CoRR
Rodica Bozianu, Catalin Dima, Constantin Enea
2013 B conf
TARK
Rodica Bozianu, Catalin Dima, Constantin Enea
2013 J jnl
CoRR
Marie-Pierre Béal, Michel Blockelet, Catalin Dima
2013 B conf
IFM
Dimitris Vekris, Frédéric Lang, Catalin Dima, Radu Mateescu
2012 J jnl
Distributed Comput.
Catalin Dima, Ruggero Lanotte
2012 conf
CLIMA
Dimitar P. Guelev, Catalin Dima
2012 J jnl
Appl. Artif. Intell.
Raluca Diaconu, Catalin Dima
2012 J jnl
CoRR
Rodica Bozianu, Catalin Dima, Constantin Enea
2011 J jnl
J. Appl. Non Class. Logics
Dimitar P. Guelev, Catalin Dima, Constantin Enea
2011 J jnl
CoRR
Catalin Dima, Ferucio Laurentiu Tiplea
2011 J jnl
J. Log. Comput.
Catalin Dima
2010 conf
GANDALF
Catalin Dima, Constantin Enea, Dimitar P. Guelev
2010 J jnl
RAIRO Theor. Informatics Appl.
Eugene Asarin, Catalin Dima
2009 C conf
TIME
Catalin Dima
2009 conf
FORMATS
Catalin Dima, Ruggero Lanotte
2008 conf
DALT
Dimitar P. Guelev, Catalin Dima
2008 conf
CLIMA
Catalin Dima
2007 conf
CEEMAS
Constantin Enea, Catalin Dima
2007 C conf
ICTAC
Catalin Dima, Ruggero Lanotte
2007 conf
FORMATS
Catalin Dima
2007 ed.
ICS@SYNASC
Catalin Dima, Marius Minea, Ferucio Laurentiu Tiplea
2007 Misc conf
SYNASC
Catalin Dima, Constantin Enea, Radu Gramatovici, Alexandru Sofronia
2006 conf
ICS@SYNASC
Catalin Dima, Marius Minea, Ferucio Laurentiu Tiplea
2005 conf
VISSAS
Catalin Dima
2005 B conf
CONCUR
Catalin Dima
2004 conf
FORMATS/FTRTFT
Catalin Dima, Alain Girault, Yves Sorel
2003 conf
FORMATS
Catalin Dima
2003 conf
Grammars and Automata for String Processing
Catalin Dima
2003 conf
DMTCS
Catalin Dima
2002 conf
MTCS
Eugene Asarin, Catalin Dima
2002 A* conf
LICS
Catalin Dima
2001
Catalin Dima
2001 C conf
PDP
Catalin Dima, Alain Girault, Christophe Lavarenne, Yves Sorel
2001 J jnl
J. Autom. Lang. Comb.
Catalin Dima
2000 A conf
STACS
Catalin Dima
1999 B conf
FCT
Catalin Dima
tests/unit/test_decompile_utils.py
← Index tests/unit/test_decompile_utils.py python
"""Unit tests for decompiler utility modules:
- bninja/utils/hashes.py
- bninja/utils/json_encoder.py
- bninja/analysis/low_level_normalization.py
"""
import hashlib
import json
import pytest


# ============================================================================
# 1a. hashes.py
# ============================================================================

from redb.extractors.decompiler.bninja.utils.hashes import (
    calculate_md5,
    calculate_sha256,
    calculate_tlsh,
)


class TestCalculateMD5:
    def test_calculate_md5_known_value(self):
        expected = hashlib.md5(b"test").hexdigest()
        assert calculate_md5("test") == expected

    def test_calculate_md5_empty(self):
        expected = hashlib.md5(b"").hexdigest()
        assert calculate_md5("") == expected


class TestCalculateSHA256:
    def test_calculate_sha256_known_value(self):
        expected = hashlib.sha256(b"hello world").hexdigest()
        assert calculate_sha256("hello world") == expected

    def test_calculate_sha256_empty_string(self):
        result = calculate_sha256("")
        assert len(result) == 64
        assert all(c in "0123456789abcdef" for c in result)


class TestCalculateTLSH:
    def test_calculate_tlsh_long_data(self):
        # TLSH requires >= 50 bytes
        data = "A" * 100
        result = calculate_tlsh(data)
        assert result is not None
        assert isinstance(result, str)

    def test_calculate_tlsh_short_data(self):
        data = "A" * 10
        result = calculate_tlsh(data)
        assert result is None

    def test_calculate_tlsh_deterministic(self):
        data = "x" * 200
        assert calculate_tlsh(data) == calculate_tlsh(data)



# ============================================================================
# 1b. json_encoder.py
# ============================================================================

from redb.extractors.decompiler.bninja.utils.json_encoder import BinaryNinjaEncoder


class TestBinaryNinjaEncoder:
    def test_encode_value_confidence_object(self):
        obj = type("VC", (), {"value": 42, "confidence": 255})()
        result = json.dumps(obj, cls=BinaryNinjaEncoder)
        assert json.loads(result) == 42

    def test_encode_str_fallback(self):
        obj = type("Obj", (), {"__str__": lambda self: "custom_repr"})()
        result = json.dumps(obj, cls=BinaryNinjaEncoder)
        assert json.loads(result) == "custom_repr"

    def test_encode_normal_types(self):
        data = {"a": 1, "b": [2, 3], "c": "hello"}
        result = json.dumps(data, cls=BinaryNinjaEncoder)
        assert json.loads(result) == data

    def test_encode_set_via_str(self):
        # Python sets have __str__, so BinaryNinjaEncoder converts them
        # to their string repr instead of raising TypeError.
        result = json.dumps(set([1, 2, 3]), cls=BinaryNinjaEncoder)
        parsed = json.loads(result)
        assert isinstance(parsed, str)
        assert "1" in parsed


# ============================================================================
# 1c. low_level_normalization.py
# ============================================================================

from redb.extractors.decompiler.bninja.analysis.low_level_normalization import (
    LowLevelNormalization,
)


class MockIL:
    """Mock IL node for normalization tests."""
    def __init__(self, operation, operands=None):
        self.operation = operation
        self.operands = operands or []


class TestLowLevelNormalization:
    def setup_method(self):
        self.normalizer = LowLevelNormalization()

    def test_normalize_single_instruction(self):
        node = MockIL(operation=5)
        result = self.normalizer.normalize_instruction_all_levels(node)
        assert result == [5]

    def test_normalize_nested_operands(self):
        child1 = MockIL(operation=10)
        child2 = MockIL(operation=20)
        root = MockIL(operation=1, operands=[child1, child2])
        result = self.normalizer.normalize_instruction_all_levels(root)
        assert result == [1, 10, 20]

    def test_normalize_empty_operands(self):
        node = MockIL(operation=42, operands=[])
        result = self.normalizer.normalize_instruction_all_levels(node)
        assert result == [42]

    def test_normalize_list_operands(self):
        # Simulates phi-node style list operands
        inner = MockIL(operation=99)
        node = MockIL(operation=7, operands=[[inner]])
        result = self.normalizer.normalize_instruction_all_levels(node)
        assert result == [7, 99]

    def test_normalize_none_input(self):
        result = self.normalizer.normalize_instruction_all_levels(None)
        assert result == []