In order to solve the problem that the embedded software has the shortcoming of the platform dependence, this paper presents an embedded software analysis method based on the static structure model. Before control flo...In order to solve the problem that the embedded software has the shortcoming of the platform dependence, this paper presents an embedded software analysis method based on the static structure model. Before control flow and data flow analysis, a lexical analysis/syntax analysis method with simplified grammar and sentence depth is designed to analyze the embedded software. The experiments use the open source code of smart meters as a case, and the artificial faults as the test objects, repeating 30 times. Compared with the popular static analyzing tools PC-Lint and Splint, the method can accurately orient 91% faults, which is between PC-Lint's 95% and Splint's 85%. The result indicates that the correct rate of our method is acceptable. Meanwhile, by removing the platform-dependent operation with simplified syntax analysis, our method is independent of development environment. It also shows that the method is applicable to the compiled C(including embedded software) program.展开更多
基金Supported by the National Natural Science Foundation of China(61303214)the Science and Technology Project of China State Grid Corp(KJ15-1-32)
文摘In order to solve the problem that the embedded software has the shortcoming of the platform dependence, this paper presents an embedded software analysis method based on the static structure model. Before control flow and data flow analysis, a lexical analysis/syntax analysis method with simplified grammar and sentence depth is designed to analyze the embedded software. The experiments use the open source code of smart meters as a case, and the artificial faults as the test objects, repeating 30 times. Compared with the popular static analyzing tools PC-Lint and Splint, the method can accurately orient 91% faults, which is between PC-Lint's 95% and Splint's 85%. The result indicates that the correct rate of our method is acceptable. Meanwhile, by removing the platform-dependent operation with simplified syntax analysis, our method is independent of development environment. It also shows that the method is applicable to the compiled C(including embedded software) program.