摘要
提出了一种基于文法简化和配合语句深度的静态结构模型的嵌入式软件分析方法。该方法设计了文法简化的词法分析和配合语句深度的语法分析,结合控制流/数据流分析,对嵌入式软件进行分析。以智能电能表开源软件作为案例,进行了30次实验,将人为插入的错误代码作为验证对象,同PC-Lint和Splint测试工具进行对比,本方法能够正确分析的概率为91%,介于PC-Lint的95%和Splint的90%之间。该方法在解决了编译器对嵌入式平台不兼容问题以及保障正确率的情况下,提高了测试的效率。实验结果证明本方法适用于通过编译的C(含嵌入式)程序。
In order to solve the problem that the embedded software has the shortcoming of the platform dependence,this paper presented 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 was designed to analyze the embedded software.This paper used the open source software of smart meters as a case,and used the artificial errors as the test objects,repeated 30 times.Compared with the popular static analyzing tools PC-Lint and Splint,the method can accurately orient 91% errors,which is between PC-Lint's 95% and Splint's 90%.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.
出处
《计算机科学》
CSCD
北大核心
2016年第S2期490-494,共5页
Computer Science
基金
国网天津电力公司项目(KJ15-1-32)资助
关键词
嵌入式系统
静态结构模型
软件分析
Embedded system
Static structure model
Software analysis