摘要
结合程序切片技术,文中提出了一种基于函数依赖图的构件抽取方法。先讨论函数依赖图中的几种依赖关系及其表示方法,再对由源码分析所得的函数依赖图进行切片操作得到依赖子图,并结合源码生成最终切片代码,即为构件抽取的结果。此基础上,提出一种基于函数依赖图的内聚度和耦合度的计算方法,以便从软件度量的角度来评价切片代码(构件)的质量。实验表明利用文中的构件抽取方法生成的切片代码较精简,且具有较高的运行效率。
Based on function dependence graph,we propose a method of component extraction in this paper.First,we discuss some relations of dependence in a function dependence graph as well as their representations in a graph.Then,A sub-graph will be generated by doing slicing operations to the function dependence graph which is generated through parsing the source codes.Combining the source codes and the sub-graph,the sliced codes which are the result of component extraction can be generated.we also propose a method of computing the degree of cohesion and coupling based on function dependence graph to evaluate the qualities of the sliced codes from the point of software metrics.Experiments prove that the sliced codes generated by the method in this paper are more efficient.
出处
《南京邮电大学学报(自然科学版)》
2010年第6期78-84,共7页
Journal of Nanjing University of Posts and Telecommunications:Natural Science Edition
基金
国家自然科学基金(60703086
60873231
60973046
60903026)
江苏省自然科学基金(BK2009426)
江苏省高校自然科学基金(10KJB520015)
南京邮电大学樊登计划(NY210009)资助项目