计算机科学与探索 ›› 2018, Vol. 12 ›› Issue (7): 1100-1108.DOI: 10.3778/j.issn.1673-9418.1705084

• 系统软件与软件工程 • 上一篇    下一篇

编译前端分析自动构件化代码可靠性加强方法

葛红美,徐超,何炎祥   

  1. 1. 南京审计大学 工学院,南京 211815
    2. 武汉大学 计算机学院,武汉 430072
  • 出版日期:2018-07-01 发布日期:2018-07-06

Code Reliability Enhancement Method Based on Compiler Front-End Analysis Automatic Component

GE Hongmei, XU Chao, HE Yanxiang   

  1. 1. Technology School, Nanjing Audit University, Nanjing 211815, China
    2. Computer School, Wuhan University, Wuhan 430072, China
  • Online:2018-07-01 Published:2018-07-06

摘要:

随着嵌入式系统的广泛应用,嵌入式系统可靠性成为关注的焦点。针对嵌入式系统源程序的可靠性进行研究,提出了基于编译前端分析自动构件化代码加强方法。该方法结合构件化开发技术,设计了一种多层次迭代分析的编译器前端分析方法,对源代码与可靠构件的相似度进行计算,自动提取出相似度高的函数到可靠构件的映射关系。然后通过人机交互选择最佳的可靠构件进行映射,以最大程度加强代码的可靠性。实验结果表明,该方法能够找出90%以上与漏洞代码相匹配的可靠构件代码,且平均正确率高达94.5%,对加强代码本身的可靠性具有明显效果。

关键词: 可靠性, 编译前端分析, 构件化, 人机交互, 嵌入式系统

Abstract:

Embedded system has been applied in all kinds of fields. The reliability of embedded system has become the focus. To enhance the reliability of source code in embedded systems, this paper proposes a code reliability      enhancement method based on automatic component technology and compiler front-end analysis. Combined with the idea of component-based development method, the front-end multi-level iterative analysis method is designed. According to the comparison on the similarity between source code and reliability component code, the code with the same function can be acquired. Then by the human-computer interaction, the best replacement strategy can be  selected, and the unreliable source code is replaced by reliable component code. Since the reliable component code is verified, the changed code can be enhanced. The experimental results show that the proposed method can find more than 90% unreliable code segments, and the correct rate is as high as 94.5%, which uses the reliable component code to be replaced. It effectively enhances the reliability of the source code.

Key words: reliability, compiler front-end analysis, component, human-computer interaction, embedded system