###
计算机系统应用英文版:2017,26(5):175-179
本文二维码信息
码上扫一扫!
基于结构和语义相似度的SQL程序评分模型
(中华女子学院 计算机系, 北京 100101)
SQL Program Grading Model Based on Structure and Semantic Similarity
(Department of Computer Science, China Women's University, Beijing 100101, China)
摘要
图/表
参考文献
相似文献
本文已被:浏览 1105次   下载 2111
Received:August 13, 2016    Revised:September 27, 2016
中文摘要: 针对SQL查询程序实现多样性的问题,提出一种用于精确评估SQL程序的评分模型.首先基于通用标准的SQL语法规范标识符和命令子句,基于同义词链和抽象语法树规范表达式,将SQL程序转换成统一的中间形式,充分消除SQL程序句法和语义表达多样性带来的差异;然后,模拟人工评分思想,对标准化后的程序按评分点组成评估单元序列,采用改进的最长公共子序列算法评估代码相似度,按评分点权重计算成绩,并给出错误定位;最后,通过样例测试和分析说明了评分模型的有效性.
Abstract:In view of the diversity of SQL query program, an accurate scoring model is presented. First, based on the common standard SQL syntax specification identifier, command clause, the synonym chain and the abstract syntax tree, SQL program is converted into a kind of unified intermediate form, fully eliminating the SQL program syntax and semantic differences. Then, referring to the artificial grading thought, the standardized code is transformed into the token sequence according to grading points, and the improved algorithm for Longest Common Subsequence(LCS) is used to grade the program similarity. The scores are calculated according to the weight of the scoring points, and the error location is given as well. Finally, samples are tested and anglicized to illustrate the effectiveness of the grading model.
文章编号:     中图分类号:    文献标志码:
基金项目:中华女子学院科研基金(KY2016-03011)
引用文本:
陈洁.基于结构和语义相似度的SQL程序评分模型.计算机系统应用,2017,26(5):175-179
CHEN Jie.SQL Program Grading Model Based on Structure and Semantic Similarity.COMPUTER SYSTEMS APPLICATIONS,2017,26(5):175-179