Carlos A. B. Mello

72 papers A 3B 38C 3Misc 2Journal 14Unranked 12
YearRankTypeTitle / Venue / Authors
2026 J jnl
Pattern Recognit.
Giullia B. A Maranhão, Carlos A. B. Mello
2025 B conf
SMC
Giullia B. A Maranhão, Carlos A. B. Mello
2024 J jnl
AI Soc.
Rafael G. Mesquita, Tsang Ing Ren, Carlos A. B. Mello, Miguel L. P. C. Silva
2023 B conf
DocEng
Daniela S. Costa, Carlos A. B. Mello
2021 B conf
DocEng
Daniela S. Costa, Carlos A. B. Mello, Marcelo d'Amorim
2021 J jnl
Neural Comput. Appl.
Renato Q. Albuquerque, Carlos A. B. Mello
2020 B conf
SMC
Daniela S. Costa, Carlos A. B. Mello
2020 conf
ISVC (1)
Marcos J. C. E. Azevedo, Carlos A. B. Mello
2020 conf
ICSE (NIER)
Marcelo d'Amorim, Rui Abreu, Carlos A. B. Mello
2019 B conf
IJCNN
Tiago J. dos Santos, Carlos A. B. Mello, Cleber Zanchettin, Thiago V. M. de Souza
2018 B conf
IJCNN
Everton B. Lacerda, Carlos A. B. Mello
2018 conf
IWSSIP
Everton B. Lacerda, Carlos A. B. Mello
2018 J jnl
Integr. Comput. Aided Eng.
Edward Roe, Carlos A. B. Mello
2017 J jnl
J. Univers. Comput. Sci.
Carlos A. B. Mello, Marília M. Saraiva, Diego P. A. Menor, Ricardo Nishihara
2017 B conf
KES
Everton B. Lacerda, Carlos A. B. Mello
2016 J jnl
Integr. Comput. Aided Eng.
Rafael G. Mesquita, Carlos A. B. Mello
2016 B conf
KES
Diego P. A. Menor, Carlos A. B. Mello, Cleber Zanchettin
2016 B conf
ICIP
Rafael G. Mesquita, Carlos A. B. Mello, P. L. Castilho
2015 J jnl
Integr. Comput. Aided Eng.
Alberto N. G. Lopes Filho, Carlos A. B. Mello
2015 J jnl
Expert Syst. Appl.
Rafael G. Mesquita, Ricardo M. A. Silva, Carlos A. B. Mello, Péricles Barbosa C. de Miranda
2015 B conf
SMC
Carlos A. B. Mello, Renato Q. Albuquerque
2015 B conf
IJCNN
S. C. S. Machado, Carlos A. B. Mello
2014 J jnl
Integr. Comput. Aided Eng.
Rafael G. Mesquita, Carlos A. B. Mello, L. H. E. V. Almeida
2014 J jnl
J. Univers. Comput. Sci.
Darko Brodic, Carlos A. B. Mello, Cedomir A. Maluckov, Zoran N. Milivojevic
2014 B conf
ICFHR
A. W. A. Arruda, Carlos A. B. Mello
2014 B conf
SMC
Hesdras O. Viana, Carlos A. B. Mello
2014 B conf
SMC
Carlos A. B. Mello, S. C. S. Machado
2014 B conf
ICIP
Diogo C. Costa, Carlos A. B. Mello
2013 A conf
ICDAR
Edward Roe, Carlos A. B. Mello
2013 B conf
SMC
Diogo C. Costa, Carlos A. B. Mello, T. J. dos Santos
2013 A conf
ICDAR
Alberto N. G. Lopes Filho, Carlos A. B. Mello
2013 B conf
SMC
Rafael G. Mesquita, Carlos A. B. Mello
2013 B conf
SMC
Rafael G. Mesquita, Carlos A. B. Mello
2013 J jnl
Expert Syst. Appl.
Everton B. Lacerda, Carlos A. B. Mello
2013 B conf
SMC
Carlos A. B. Mello, T. J. dos Santos, H. R. Medeiros, P. S. Pereira
2012 B conf
SMC
Carlos A. B. Mello, T. G. Tenorio
2012 B conf
SMC
Alberto N. G. Lopes Filho, Carlos A. B. Mello
2012 B conf
SMC
Carlos A. B. Mello, Diogo C. Costa, T. J. dos Santos
2012 B conf
SMC
Edward Roe, Carlos A. B. Mello
2012 B conf
SMC
Diogo C. Costa, G. A. M. Lopes, Carlos A. B. Mello, Hesdras O. Viana
2011 B conf
SMC
Juliano C. B. Rabelo, Cleber Zanchettin, Carlos A. B. Mello, Byron L. D. Bezerra
2011 B conf
SMC
Renata F. P. Neves, Alberto N. G. Lopes Filho, Carlos A. B. Mello, Cleber Zanchettin
2011 B conf
SMC
Renata F. P. Neves, Carlos A. B. Mello
2011 J jnl
Integr. Comput. Aided Eng.
Ángel Sánchez, Carlos A. B. Mello, Pedro D. Suárez, Alberto Lopes
2011 B conf
SMC
Diogo C. Costa, Ing Ren Tsang, Carlos A. B. Mello
2011 conf
DRR
Tiago C. Bockholt, George D. C. Cavalcanti, Carlos A. B. Mello
2011 conf
CAIP (2)
Carlos A. B. Mello, Ángel Sánchez, George D. C. Cavalcanti
2011 B conf
ICTAI
Everton B. Lacerda, Carlos A. B. Mello
2010 J jnl
Pattern Recognit. Lett.
Angélica A. Mascaro, George D. C. Cavalcanti, Carlos A. B. Mello
2010 Misc conf
SAC
Carlos A. B. Mello
2010 B conf
SMC
Carlos A. B. Mello
2009 B conf
SMC
Carlos A. B. Mello, Byron L. D. Bezerra, Afonso Ferreira, Juliano C. B. Rabelo
2009 B conf
SMC
Carlos A. B. Mello, Edward Roe
2008 B conf
SMC
Renata F. P. Neves, Carlos A. B. Mello, Mara S. Silva, Byron L. D. Bezerra
2008 conf
ICTAI (2)
V. M. O. Alves, Adriano L. I. Oliveira, E. R. Silva Jr., Carlos A. B. Mello
2008 conf
VISAPP (1)
Carlos A. B. Mello, Adriano L. I. Oliveira, Ángel Sánchez
2008 B conf
ACM Symposium on Document Engineering
Carlos A. B. Mello, Edward Roe, Everton B. Lacerda
2008 J jnl
J. Softw.
Carlos A. B. Mello, Luciana A. Schuler
2007 B conf
ACM Symposium on Document Engineering
Carlos A. B. Mello
2007 C conf
CIARP
Carlos A. B. Mello
2007 A conf
ICDAR
Carlos A. B. Mello, Byron L. D. Bezerra, Cleber Zanchettin, V. Macário
2007 conf
ICTAI (1)
Carmelo J. A. Bastos Filho, Carlos A. B. Mello, Júlio Dantas Andrade, Davi M. A. Falcão, Marília P. Lima, Wellington P. dos Santos, Adriano L. I. Oliveira
2007 B conf
SMC
Carlos A. B. Mello, Luciana A. Schuler
2006 conf
SBRN
Adriano L. I. Oliveira, Carlos A. B. Mello, E. R. Silva Jr., V. M. O. Alves
2005 C conf
SBAC-PAD
Raimundo S. Barreto, Eduardo Tavares, Paulo Romero Martins Maciel, Meuse N. Oliveira Jr., Leonardo Amorim, Ricardo Massa Ferreira Lima, Cesar Carvalho, Carlos A. B. Mello
2005 conf
ICASSP (2)
Claudio S. V. C. Cavalcanti, Carlos A. B. Mello, Milena P. S. Rodrigues
2005 C conf
CIARP
Carlos A. B. Mello, António H. M. Costa
2004 conf
ICIAR (2)
Carlos A. B. Mello
2004 B conf
MMM
Carlos A. B. Mello
2002 B conf
ACM Symposium on Document Engineering
Carlos A. B. Mello, Rafael Dueire Lins
2000 Misc conf
ICASSP
Carlos A. B. Mello, Rafael Dueire Lins
1997 conf
EUROMICRO
Carlos A. B. Mello, L. R. F. Neto, Rafael Dueire Lins
tests/unit/conftest.py
← Index tests/unit/conftest.py python
"""
Unit test configuration.

Replaces the redb.extractors package with a minimal stub so that
``from redb.extractors.database_exporters import ...`` works without
pulling in the heavy __init__.py import chain (pefile, elftools,
signify, magic, etc.).

Also stubs out redb.settings so that Elasticsearch / ClickHouse
clients are never actually created during unit tests.

Additionally installs binaryninja stubs for decompiler unit tests.

Stubs heavy third-party packages (pefile, magic, psutil, etc.) so that
redb.workers, redb.queries, redb.ingestor, and redb.s3_utils can all
be imported and patched in unit tests without requiring the real packages.
"""
import sys
import types
from pathlib import Path
from unittest.mock import MagicMock

# ---------------------------------------------------------------------------
# 0. Install binaryninja stubs FIRST — must happen before any decompiler
#    module is imported (triggered by __init__.py chain).
# ---------------------------------------------------------------------------
from tests.unit.conftest_binja_stubs import install_binja_stubs as _install_binja_stubs
_install_binja_stubs()

# ---------------------------------------------------------------------------
# 1. Stub external packages required by database_exporters.py itself,
#    the decompiler chain, and the workers/ingestor modules.
# ---------------------------------------------------------------------------
_heavy_deps = [
    # Database / networking
    "elasticsearch", "clickhouse_connect", "dotenv",
    # Binary analysis — top-level packages
    "pefile", "magic", "machofile",
    # Archive handling
    "py7zr", "pyzipper",
    # File type detection
    "magika",
    # System monitoring
    "psutil",
    # S3 / MinIO (submodule paths needed for `from minio.error import S3Error`)
    "minio", "minio.error",
    # YARA
    "yara_x",
    # Binary parsing — elftools tree
    "elftools", "elftools.elf", "elftools.elf.elffile",
    "elftools.common", "elftools.common.exceptions",
    # Code signing — signify tree
    "signify", "signify.fingerprinter", "signify.authenticode",
    # LIEF
    "lief",
    # Fuzzy hashing
    "ppdeep",
    # .NET analysis
    "dotnetfile",
    # Crypto / ASN.1
    "asn1crypto", "asn1crypto.cms", "asn1crypto.pem", "asn1crypto.x509", "asn1crypto.core",
    # Hashing
    "xxhash", "blake3", "mmh3", "numpy",
    # APK analysis
    "androguard", "androguard.core", "androguard.core.apk",
    "androguard.core.dex", "androguard.core.api_specific_resources",
    "androguard.misc",
    "permhash",
]
for _mod in _heavy_deps:
    if _mod not in sys.modules:
        try:
            __import__(_mod)
        except (ImportError, ModuleNotFoundError):
            sys.modules[_mod] = MagicMock()

# Stub urllib3 with a real Warning subclass (warnings.filterwarnings needs a class)
if "urllib3" not in sys.modules or isinstance(sys.modules.get("urllib3"), MagicMock):
    try:
        import urllib3  # noqa: F401
    except (ImportError, ModuleNotFoundError):
        _urllib3_mod = types.ModuleType("urllib3")
        _urllib3_exc = types.ModuleType("urllib3.exceptions")

        class _InsecureRequestWarning(UserWarning):
            pass

        _urllib3_exc.InsecureRequestWarning = _InsecureRequestWarning
        _urllib3_mod.exceptions = _urllib3_exc
        sys.modules["urllib3"] = _urllib3_mod
        sys.modules["urllib3.exceptions"] = _urllib3_exc

# Provide a functional ppdeep stub (tests call ppdeep.hash() and expect a string).
# Must overwrite the MagicMock that the loop above may have installed.
_ppdeep_existing = sys.modules.get("ppdeep")
if _ppdeep_existing is None or isinstance(_ppdeep_existing, MagicMock):
    _ppdeep_mod = types.ModuleType("ppdeep")
    _ppdeep_mod.__name__ = "ppdeep"

    def _ppdeep_hash(data):
        """Fake ssdeep hash — returns a deterministic placeholder."""
        if isinstance(data, str):
            data = data.encode("utf-8")
        if len(data) < 50:
            return None
        import hashlib
        h = hashlib.md5(data).hexdigest()
        return f"3:{h[:16]}:{h[16:]}"

    _ppdeep_mod.hash = _ppdeep_hash
    sys.modules["ppdeep"] = _ppdeep_mod

# Stub mmh3 if the C extension is not available
_mmh3_existing = sys.modules.get("mmh3")
if _mmh3_existing is None or isinstance(_mmh3_existing, MagicMock):
    _mmh3_mod = types.ModuleType("mmh3")
    _mmh3_mod.__name__ = "mmh3"

    def _mmh3_hash(data, seed=0):
        """Fake MurmurHash3 — deterministic hash using built-in hashlib."""
        import hashlib
        if isinstance(data, str):
            data = data.encode("utf-8")
        seed_bytes = (seed & 0xFFFFFFFF).to_bytes(8, "little")
        h = hashlib.md5(data + seed_bytes).digest()
        return int.from_bytes(h[:4], "little", signed=True)

    _mmh3_mod.hash = _mmh3_hash
    sys.modules["mmh3"] = _mmh3_mod

# Stub tlsh if the C extension is not available
if "tlsh" not in sys.modules:
    try:
        import tlsh as _real_tlsh  # noqa: F401
    except (ImportError, ModuleNotFoundError):
        _tlsh_mock = types.ModuleType("tlsh")
        _tlsh_mock.__name__ = "tlsh"

        def _tlsh_hash(data):
            """Fake TLSH hash — returns a deterministic placeholder.

            Returns empty string for data < 50 bytes or data with very
            low entropy (e.g. repeating patterns), mimicking the real
            TLSH library's "TNULL" behaviour.
            """
            if isinstance(data, str):
                data = data.encode("utf-8")
            if len(data) < 50:
                return ""
            # Real TLSH returns "" for low-entropy input
            if len(set(data)) < 8:
                return ""
            import hashlib
            return "T1" + hashlib.sha256(data).hexdigest()[:70].upper()

        _tlsh_mock.hash = _tlsh_hash
        sys.modules["tlsh"] = _tlsh_mock

# ---------------------------------------------------------------------------
# 2. Stub redb.settings (package) so module-level code never runs
# ---------------------------------------------------------------------------
_settings_mock = MagicMock()
_settings_mock.__name__ = "redb.settings"
sys.modules["redb.settings"] = _settings_mock
sys.modules["redb.settings.elasticsearch"] = MagicMock()
sys.modules["redb.settings.clickhouse"] = MagicMock()

# ---------------------------------------------------------------------------
# 3. Replace redb.extractors with a minimal package that does NOT eagerly
#    import every extractor (and their heavy deps).  Sub-module imports
#    like ``from redb.extractors.database_exporters import ...`` still work
#    because __path__ points to the real package directory.
# ---------------------------------------------------------------------------
_repo_root = Path(__file__).resolve().parents[2]
_extractors_pkg = types.ModuleType("redb.extractors")
_extractors_pkg.__path__ = [str(_repo_root / "redb" / "extractors")]
_extractors_pkg.__package__ = "redb.extractors"
sys.modules["redb.extractors"] = _extractors_pkg

# ---------------------------------------------------------------------------
# 4. Force-import redb submodules so that @patch('redb.workers.xxx'),
#    @patch('redb.queries.xxx'), etc. can resolve at decoration time.
#    This works because all heavy deps are already stubbed above.
# ---------------------------------------------------------------------------
import redb.logging_utils   # noqa: F401, E402
import redb.s3_utils         # noqa: F401, E402
import redb.queries          # noqa: F401, E402
import redb.workers          # noqa: F401, E402
import redb.ingestor         # noqa: F401, E402