摘要
研究编程语言规范,设计编程语言规范检查模型,运用该模型进行编程语言代码的规范检查,以提高代码维护效率为目标,实现在软件维护过程中的自动代码走查。分析C语言编程规范,对C程序进行规范检查与修改,设计实现C语言编程规范检查系统,完成自动代码走查。采用编程语言词法分析正则表达式,构造匹配各类不规范代码的正则表达式,完成对C程序标识符、头文件、源程序语法格式和语句代码行的不规范代码检查,运用Perl脚本语言实现本系统。该模型及其实现可应用于软件自动维护过程。
By studying programming language specification, a programming language specification inspection model is designed. This model is used to inspect programming language code is implemented for the software maintenance specification for imp process. Based on C roving code maintenance efficiency. Automatic walkthroughs programming language Regular Expression, The program is designed and implemented for inspection and modification for standard C language specification, to achieve the automatic code review. Lexical analysis is used the programming language regex construct, to complete various types of non-standard code matching regular expression for the C program identifier in header files, source code syntax and statements of lines of code.to finish the standardized C code inspection. The system is done by using Perl scripting language. The model and its implementation can be applied to automatic software maintenance process
基金
北京信息科技大学计算机学院网络文化与数字传播北京市重点实验室开放课题
北京市属高等学校创新团队建设与教师职业发展计划项目(IDHT20130519)
北京市教委专项(PXM2013_014224_000042,PXM2014_014224_000067)
关键词
软件自动维护
规范检查模型
代码走查
Perl脚本语言
C语言编程规范
Automatic Software Maintenance, Specification Inspection Model, Code Walkthrough, Per, C LanguageProgramming Specifications