摘要
用复杂网络理论研究软件系统的复杂性,选取两款面向对象开源软件框架webwork和spring作为研究对象,无(有)向图节点代表类,边代表类间的依赖和关联等关系,将系统抽象为网络图,并对其拓扑结构进行分析.研究表明:无(有)网络具有较大的聚类系数和较小的平均路径长度,具有小世界特性.由于框架都使用了依赖注入和控制反转,程序中类之间的关系,完全由spring容器来控制,而不是由代码控制,容器运行时会根据spring提供的配置信息注入到组件中.用依赖注入的一个结果是改变了编译阶段部分类之间的相互关系,由原来的关联实体类到关联加载配置文件类,从而影响节点的度包括入度和出度,使无(有)向图的边(弧)数改变.实验结果表明:度分布统计特性仍然具有无标度特性.
Complex network theory is used to study the complexity of the software system in this paper. The selected object-oriented open-source software framework both webwork and spring as the research object, undirected (directed) graph nodes representing classes, relationships be- tween classes edges representing dependency, association, etc., the system is abstracted to the network graph and its topology is analyzed. Studies show that undirected (directed) network has a large clustering coefficient and a smaller average path length, which are characteristics of a small world. Because of the inversion control and dependency injection used in the framework, program relations between classes, entirely controlled by the spring container, rather than by code control, will be injected into the container runtime according to configuration information provided by the spring assembly. Using dependency injection is to change the relationship be- tween the compilation phases of the class such as an associated entity class changed to the class of associated load configuration file. Thus it influences the degree of the nodes including in-degree and out-degree and change the number of undirected (directed) graph edges (arcs) has been changed. The results show that the statistical properties of the degree distribution still have scale- free characteristics.
出处
《北京交通大学学报》
CAS
CSCD
北大核心
2016年第5期23-28,共6页
JOURNAL OF BEIJING JIAOTONG UNIVERSITY
基金
国家"863"高技术研究发展计划项目资助(2015AA043701)
关键词
软件度量
复杂网络
度分布
聚类系数
software metrics
complex network
degree distribution
clustering coefficients