作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2010, Vol. 36 ›› Issue (1): 73-75. doi: 10.3969/j.issn.1000-3428.2010.01.026

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

基于覆盖测试的嵌入式软件自动裁剪

蔡 虹1,沈 雷1,李永红2   

  1. (1. 华东计算技术研究所,上海 200233;2. 中国电子设备系统工程公司研究所,北京 100141)
  • 收稿日期:1900-01-01 修回日期:1900-01-01 出版日期:2010-01-05 发布日期:2010-01-05

Automatic Tailoring for Embedded Software Based on Coverage Test

CAI Hong1, SHEN Lei1, LI Yong-hong2   

  1. (1. East China Institute of Computer Technology, Shanghai 200233; 2. Electronic Equipment System Engineering Institute, Beijing 100141)
  • Received:1900-01-01 Revised:1900-01-01 Online:2010-01-05 Published:2010-01-05

摘要: 针对软件移植嵌入式平台时的裁剪问题,提出一个通用的、自动化的裁剪方案。该方案基于覆盖测试思想,利用源代码静态分析技术,在每个函数的首尾插入桩代码,通过执行已插桩的程序,动态地获得函数的覆盖信息。根据函数的覆盖信息,能对软件进行自动化的裁剪。该裁剪方案可以将软件体积减少30%左右。

关键词: 嵌入式软件, 插桩, 覆盖测试, 裁剪

Abstract: This paper gives a solution of a general way for automatic tailoring while transplanting a software to an embedded system. The solution is based on the technique of coverage test. It makes static analysis for the source code which is tailored, and inserts the stub code into the beginning and ending of each function. After instrumentation, it executes the code and gets the coverage information. It tailors those functions which are never used. Though this way, it can reduce the size of software by about 30%.

Key words: embedded software, instrumentation, coverage test, tailoring

中图分类号: