摘要
为了消除指针程序实现形式的多样化,简化程序分析,提出一种对用指针实现的程序进行标准化的方法.首先将程序表示成系统依赖图,分析指针别名信息;然后制定指针标准化规则并结合已有的代码多样化消除规则,对系统依赖图进行保持语义不变的转换,将语法表示不同但语义等价的程序转换为相同的系统依赖图表示,从而消除代码多样化.最后,将该方法应用到C语言编程题的自动评分系统中,并与人工评分和正确评分结果进行对比,验证了该方法的有效性.
In order to facilitate program analysis, a standardization method is proposed to remove variations in programs implemented with pointers. Firstly, a program is represented by a system dependence graph (SDG), and the alias information is analyzed. Then standardization rules for eliminating variations caused by pointers are proposed, and the SDG is transformed according to these rules, so that syntactically different but semantically equivalent codes can be transformed into identical SDGs. Therefore, code variations are removed. The proposed method has been applied to an automatic grading system of C programming language, and the results were compared with those of both manual and strictly precise grading systems to validate the effectiveness of our method.
出处
《哈尔滨工业大学学报》
EI
CAS
CSCD
北大核心
2009年第3期48-52,共5页
Journal of Harbin Institute of Technology
基金
国家自然科学基金资助项目(60673035)