An Automatic Traceback Method From Executable Code to C Source Code for DSP
Modern electronic systems are highly dependent on software, and errors in critical domains can lead to catastrophic consequences. Among these risks, software vulnerabilities caused by compilation errors are particularly challenging to prevent. The aviation software development standard DO-178C in the airworthiness domain mandates traceability requirements from executable code to <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$\mathbf{C}$</tex> source code before and after the compilation process. However, with the increasing size of software, manually analyzing and comparing code becomes impractically timeconsuming. To address this challenge, this paper proposes an automated method for traceability from executable code to <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$C$</tex> source code, specifically targeting DSP processors widely used in the aviation industry. The approach consists of the following steps: establishing a line-level mapping relationship between typical <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$\mathbf{C}$</tex> language syntax and assembly instructions using the “asm” keyword to embed line number instrumentation; identifying the syntax type of each line of code using Extended Backus-Naur Form based typical syntax patterns of <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$C$</tex> language; executing corresponding pre-compilation steps based on the syntax type and the compilation rules of the DSP processor; and comparing the results with the original executable code and calculating the similarity using the Longest Common Subsequence algorithm, thereby achieving automatic traceability from source code to executable code. Computational complexity analysis shows that this method has relatively low complexity. To validate its applicability, this approach was tested using multiple embedded software systems and verified Level A airborne software. The number of lines of the tested code is more than 40,000, and the automatic traceability rate of the results is more than 95 %, which shows that the method greatly improves the work efficiency.
Authors
- Kenian Wang (ORCID: https://orcid.org/0009-0006-6444-3806)
- Rongsheng Wang (ORCID: https://orcid.org/0000-0002-0789-7557)
- Wenguang Xie
Institutions
- Northwestern Polytechnical University (CN)
- Civil Aviation University of China (CN)
Publication Details
- Published
- 2025-04-25
- DOI
- https://doi.org/10.1109/iccea65460.2025.11102249
- Primary Topic
- Embedded Systems Design Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00