计算机科学 ›› 2016, Vol. 43 ›› Issue (Z11): 490-494.doi: 10.11896/j.issn.1002-137X.2016.11A.110

• 软件工程与数据库技术 • 上一篇    下一篇

基于文法简化和语句深度的静态结构模型嵌入式软件分析

李祯祥,刘崇伟,杨广益,刘金硕   

  1. 国网天津市电力公司电力科学研究院 天津300000,国网天津市电力公司电力科学研究院 天津300000,武汉大学计算机学院 武汉430079,武汉大学计算机学院 武汉430079
  • 出版日期:2018-12-01 发布日期:2018-12-01
  • 基金资助:
    本文受国网天津电力公司项目(KJ15-1-32)资助

Analysis of Embedded Software Based on Static Model with Simplified Grammar and Sentence Depth

LI Zhen-xiang, LIU Chong-wei, YANG Guang-yi and LIU Jin-shuo   

  • Online:2018-12-01 Published:2018-12-01

摘要: 提出了一种基于文法简化和配合语句深度的静态结构模型的嵌入式软件分析方法。该方法设计了文法简化的词法分析和配合语句深度的语法分析,结合控制流/数据流分析,对嵌入式软件进行分析。以智能电能表开源软件作为案例,进行了30次实验,将人为插入的错误代码作为验证对象,同PC-Lint和Splint测试工具进行对比,本方法能够正确分析的概率为91%,介于PC-Lint的95%和Splint的90%之间。该方法在解决了编译器对嵌入式平台不兼容问题以及保障正确率的情况下,提高了测试的效率。实验结果证明本方法适用于通过编译的C(含嵌入式)程序。

关键词: 嵌入式系统,静态结构模型,软件分析

Abstract: 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.

Key words: Embedded system,Static structure model,Software analysis

[1] 兰雨晴.软件测试[J].计算机系统应用,2003,24(12):66-68
[2] 刘佳欣.嵌入式软件静态检测及自动化路径测试工具的研究与设计[D].广州:华南理工大学,2012
[3] 邓世伟.嵌入式软件的测试方法和工具[J].单片机与嵌入式系统应用,2001,2(4):140-142
[4] 赵立平.控制流分析[J].计算机工程与应用,1979(2)
[5] 周希.基于静态分析的程序控制流图生成工具的设计与实现[D].广州:中山大学,2013
[6] 张广梅.软件测试与可靠性评估[D].北京:中国科学院计算技术研究所,2006
[7] American National Standards Institute.ANSI C [EB/OL].[2016-3-10].https://zh.wikipedia.org/wiki/ANSI_C
[8] Kiczales G,lamping J,Mendhekar A.An Overview of Aspect[C]∥J.Proc.13th European Conference on Object-Oriented Programming,LNCS,Vol.1241,Springer-Verlag,2000:220-242
[9] 张广梅.数据流相关软件故障的静态检测[J].计算机辅助设计与图形学学报,2005,7(11):2477-2482
[10] 王胜文.采用数据流图的故障模型生成算法与应用[J].哈尔滨工业大学学报,2009,1(41):118-121

No related articles found!
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!