TY - JOUR
T1 - 嵌入式处理器P2020机器码程序到C语言源程序的溯源方法
AU - Xie, Wenguang
AU - Li, Qi
AU - Ma, Chunyan
AU - Wang, Kenian
AU - Yin, Wei
AU - Zhang, Tao
N1 - Publisher Copyright:
© 2021, Beihang University Aerospace Knowledge Press. All right reserved.
PY - 2021/9/25
Y1 - 2021/9/25
N2 - The processor PowerPC P2020 is widely used in aeronautical embedded systems. To satisfy the airworthiness requirements of the A-level software in RTCA/DO-178C, a method of tracing from the PowerPC P2020 machine code program to the C language source program is proposed on three levels of codes: file, function declaration, and function body. On the basis of obtaining the C language source and the PowerPC P2020 machine code program file name list, the traceability of the PowerPC P2020 machine code file name is realized. By traverse the C source program abstract syntax tree and PowerPC P2020 machine code to get the list of function names, traceability of the PowerPC P2020 machine code function declaration is realized. By defining the abstract syntax tree node of the C language program to generate the expected assembly instruction sequence rules, traceability of the PowerPC P2020 machine code function body is realized. By designing 245 C language source program files and 345 PowerPC P2020 machine code program files, 1 111 C language function declarations and 1 273 PowerPC P2020 machine code function declarations, as well as 460 test cases covering 23 types of syntax structures of C language programs, effectiveness of the automatic tracing method from the PowerPC P2020 machine code program to the C language source program is verified. The results show that the traceability matching rate of document traceability and function declaration traceability reaches 100%, and the average traceability matching rate of the PowerPC P2020 function body and the C language source program function body code reaches 97.22%. The traceability matching results can check whether exception codes are inserted into the P2020 machine code program during the compilation process, so as to prevent potential safety hazards and ensure the safety and reliability of the embedded safety critical software object codes used in aerospace.
AB - The processor PowerPC P2020 is widely used in aeronautical embedded systems. To satisfy the airworthiness requirements of the A-level software in RTCA/DO-178C, a method of tracing from the PowerPC P2020 machine code program to the C language source program is proposed on three levels of codes: file, function declaration, and function body. On the basis of obtaining the C language source and the PowerPC P2020 machine code program file name list, the traceability of the PowerPC P2020 machine code file name is realized. By traverse the C source program abstract syntax tree and PowerPC P2020 machine code to get the list of function names, traceability of the PowerPC P2020 machine code function declaration is realized. By defining the abstract syntax tree node of the C language program to generate the expected assembly instruction sequence rules, traceability of the PowerPC P2020 machine code function body is realized. By designing 245 C language source program files and 345 PowerPC P2020 machine code program files, 1 111 C language function declarations and 1 273 PowerPC P2020 machine code function declarations, as well as 460 test cases covering 23 types of syntax structures of C language programs, effectiveness of the automatic tracing method from the PowerPC P2020 machine code program to the C language source program is verified. The results show that the traceability matching rate of document traceability and function declaration traceability reaches 100%, and the average traceability matching rate of the PowerPC P2020 function body and the C language source program function body code reaches 97.22%. The traceability matching results can check whether exception codes are inserted into the P2020 machine code program during the compilation process, so as to prevent potential safety hazards and ensure the safety and reliability of the embedded safety critical software object codes used in aerospace.
KW - C language source program
KW - Compiler validation
KW - P2020 machine code
KW - Source code analysis
KW - Tracing
UR - http://www.scopus.com/inward/record.url?scp=85118307144&partnerID=8YFLogxK
U2 - 10.7527/S1000-6893.2021.25177
DO - 10.7527/S1000-6893.2021.25177
M3 - 文章
AN - SCOPUS:85118307144
SN - 1000-6893
VL - 42
JO - Hangkong Xuebao/Acta Aeronautica et Astronautica Sinica
JF - Hangkong Xuebao/Acta Aeronautica et Astronautica Sinica
IS - 9
M1 - 325177
ER -