Metraipolis › archive › dc_561b205d92fd

An Approach for Embedding-Guided Function Reuse Detection in Embedded C Software — arXiv:2608.04137

Source
arXiv (en)
Original
https://arxiv.org/abs/2608.04137
License (as archived)
CC0-1.0
Archived
2026-10-31T11:36:30.599Z
SHA-256 of the archived text
320ff733a3a8f68d0d8202f480fe3d33a32ef5e2e0d14260e643091d3f60bca9
Stable URL of this page
https://metraipolis.com/documento/dc_561b205d92fd

How to cite

An Approach for Embedding-Guided Function Reuse Detection in Embedded C Software — arXiv:2608.04137 — arXiv (en), https://arxiv.org/abs/2608.04137 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_561b205d92fd (Metraipolis archive dc_561b205d92fd, sha256 320ff733a3a8f68d0d8202f480fe3d33a32ef5e2e0d14260e643091d3f60bca9)
BibTeX
@misc{dc561b205d92fd,
  title = {An Approach for Embedding-Guided Function Reuse Detection in Embedded C Software — arXiv:2608.04137},
  howpublished = {arXiv (en)},
  url = {https://arxiv.org/abs/2608.04137},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_561b205d92fd; sha256 320ff733a3a8f68d0d8202f480fe3d33a32ef5e2e0d14260e643091d3f60bca9},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2608.04137. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

Reusing embedded software functions across products is economically valuable but technically difficult: the same functionality implemented for two different microcontroller platforms can be entirely incompatible at the hardware level, even when the functions score above 0.90 cosine similarity and both pass SonarQube quality checks. Static analysis tools were designed to measure code quality, not hardware-domain compatibility, and have no model of peripheral interfaces, hardware abstraction layer (HAL) dependencies, or register-map constraints. This paper presents a domain-aware retrieval-augmented generation (RAG) pipeline for embedded C software reuse detection that addresses the hardware-compatibility gap directly. The pipeline enriches each function by extracting its existing inline comments, call-graph context, and a project README before embedding it with eight backbone models (MiniLM, MPNet, BGE, E5, GraphCodeBERT, OpenAI text-embedding-3-small, LLaMA 3 8B, StarCoder2 3B) acting as feature extractors. Four hardware-compatibility validators---covering peripheral token overlap, parameter count parity, call-graph dependency overlap, and structural branching pattern---filter candidates directly in the retrieval stack. Evaluated on six public embedded C software projects (184 functions, 4,815 above-plateau pairs), the pipeline reveals that SonarQube produces a 93.6% false-positive rate as a reuse filter, with 83.5% of failures caused by hardware-environment mismatches that static analysis cannot detect. Manual verification of 40 rejected pairs confirms 97.5% validator accuracy, and a diagnostic rule-injection variant identifies the dominant failure categories (McNemar chi-squared~=~294.0, p~$<$~0.001).

Tema degli esploratori: calcolo e infrastrutture (retro-catalogo arXiv: annunci del 2026-08-06 in cs.SE).
Categorie arXiv: Software Engineering (cs.SE).
Pagina del lavoro: https://arxiv.org/abs/2608.04137 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-10-31T11:25:52.385Z dalla pagina https://arxiv.org/catchup/cs.SE/2026-08-06?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).