• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

J4 ›› 2012, Vol. 34 ›› Issue (2): 67-72.

• 论文 • 上一篇    下一篇

基于MYGCC的编程规则检查算法研究

李 锋,文艳军,齐治昌,陆赛因   

  1. (国防科学技术大学计算机学院,湖南 长沙 410073)
  • 收稿日期:2010-01-29 修回日期:2010-04-15 出版日期:2012-02-25 发布日期:2012-02-25

Research on a MYGCCBased Algorithmfor Checking Programming Rules

Li Feng,WEN Yanjun,QI Zhichang,LU Saiyin   

  1. (School of Computer Science,National University of Defense Technology,Changsha  410073,China)
  • Received:2010-01-29 Revised:2010-04-15 Online:2012-02-25 Published:2012-02-25

摘要:

MYGCC是一个编程规则检查工具,其目前的检查算法存在局限性,不能完整地展示违反编程规则的程序路径。本文提出并实现了一种改进的编程规则检查算法,可以弥补上述的局限性。实验表明改进算法是有效的,此改进有助于用户更准确地定位错误位置,方便对编程错误的修正。

关键词: 编程规则检查;静态分析;可扩展编译器

Abstract:

MYGCC is a tool for checking programming rules, and its current checking algorithm has defects. That is, it can not show the whole control flow paths that violate the checking rules. To eliminate the defects, this paper presents an improved algorithm to the original one of MYGCC. Experiment shows that the algorithm is effective. This improvement can help users to find the position of bugs more accurately, and benefit bug fixing.

Key words: programming rule checking;static analysis;extensible compiler