Transactions on Computer Science and Technology June 2014, Volume 3, Issue 2, PP.73-80
The Design and Implementation of Programming Language Specification Inspection Model ——C language specification Xinyuan Niu, Cong Ma# Computer School, Beijing Information Science & Technology University, Beijing 100101, China #
Email: niuxinyuan@bistu.edu.cn
Abstract By studying programming language specification, a programming language specification inspection model is designed. This model is used to inspect programming language code specification for improving code maintenance efficiency. Automatic walkthroughs is implemented for the software maintenance process. Based on C 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. Keywords: Automatic Software Maintenance, Specification Inspection Model, Code Walkthrough, Per, C Language Programming Specifications
编程语言规范检查模型的设计与实现* ——C语言规范 牛欣源1, 2,马聪1 北京信息科技大学 计算机学院,北京 100101 摘 要:研究编程语言规范,设计编程语言规范检查模型,运用该模型进行编程语言代码的规范检查,以提高代码维护效 率为目标,实现在软件维护过程中的自动代码走查。分析C语言编程规范,对C程序进行规范检查与修改,设计实现C语 言编程规范检查系统,完成自动代码走查。采用编程语言词法分析正则表达式,构造匹配各类不规范代码的正则表达 式,完成对C程序标识符、头文件、源程序语法格式和语句代码行的不规范代码检查,运用Perl脚本语言实现本系统。该 模型及其实现可应用于软件自动维护过程。 关键词:软件自动维护;规范检查模型;代码走查;Perl脚本语言;C语言编程规范
引言 软件维护是整个软件生命周期中最重要阶段,软件维护费用通常占软件总成本的40%-80%。对企业来 讲,软件维护费用年年上升。因维护工作不力,在维护已有软件的过程中耗费大量人力物力资源。对维护 人员来讲,维护性工作内容乏味,不易出成绩,工作量又不比开发人员少,工作不力或延误或丧失软件开 *
基金资助:北京信息科技大学计算机学院网络文化与数字传播北京市重点实验室开放课题;北京市属高等学校创新团队建设 与教师职业发展计划项目(IDHT20130519) ; 北京市教委专项(PXM2013_014224_000042,PXM2014_014224_000067) - 73 http://www.ivypub.org/cst