首页 | 本学科首页   官方微博 | 高级检索  
     

基于后缀树的程序理解Plan自动提取
引用本文:陈华,陈纯,唐文彬,钱剑飞,刘康苗. 基于后缀树的程序理解Plan自动提取[J]. 浙江大学学报(工学版), 2008, 42(8): 1340-1344
作者姓名:陈华  陈纯  唐文彬  钱剑飞  刘康苗
作者单位:1.浙江大学 计算机科学与技术学院,浙江 杭州 310027; 2.中国计量学院 信息分院,浙江 杭州 310018;3.上海理工大学 计算机工程学院,上海 200093
基金项目:国家自然科学基金,国家重点基础研究发展计划(973计划),浙江省重大科技专项资助项目
摘    要:为辅助维护用于程序理解的代码片段模版(Plan)库,提出了基于后缀树的Plan自动提取方法.通过词法/语法分析将源代码转换成Token串,然后对Token串生成后缀树,遍历后缀树得到候选代码Plan集,过滤后生成更小、更准确的Plan集.采用动态模式匹配合并合适的Plan和给Plan命名,最后生成可用于程序理解的Plan.由于后缀树的线性增长特性,该方法可以应用于大规模软件的程序理解.将方法应用于多个不同规模的软件,测试结果表明,该方法可以从源码中提取有效的Plan.

关 键 词:程序理解  后缀树  软件维护  软件工程

Automatic extraction of software plans for program comprehension based on suffix trees
CHEN Hua,CHEN Chun,TANG Wen-bin,QIAN Jian-fei,LIU Kan-miao. Automatic extraction of software plans for program comprehension based on suffix trees[J]. Journal of Zhejiang University(Engineering Science), 2008, 42(8): 1340-1344
Authors:CHEN Hua  CHEN Chun  TANG Wen-bin  QIAN Jian-fei  LIU Kan-miao
Abstract:A method of automatic plan extraction based on suffix trees was proposed to support the maintenance of software plan repositories for program comprehension,which are maintained by domain and computer science experts manually.The source codes were transformed into token strings after lexical and syntax analysis.The output token strings were used to construct a suffix tree,by traveling through which,a set of candidates of software plans was obtained.Filters were applied to the set to obtain a much smaller set.A dynamic pattern matching algorithm was finally applied to the set to merge suitable candidate plans and name them.The time and space requirements are linear to the size of nodes in suffix trees.The method can be applied to large scale software.Test results of applying the method to some software with different sizes show that it can extract valid plans from source code.
Keywords:software comprehension  suffix tree  software maintenance  software engineering
本文献已被 CNKI 维普 万方数据 等数据库收录!
点击此处可从《浙江大学学报(工学版)》浏览原始摘要信息
点击此处可从《浙江大学学报(工学版)》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号