摘要
构件需要在其复用期间进行持续的优化改进和重构,消除设计需求与复用需求之间的差异,在保证有用性的前提下改善可用性.为此,提出一种面向复用成本优化的、基于局部性原理与实例集分解的构件重构方法.首先给出一种基于特征的构件模型,着重探讨基于可变点的复用机制,并在此基础上研究构件复用成本的构成要素、优化策略与优化目标,即通过提高构件固定部分的比例降低复用成本.探讨了构件复用过程中存在的时间/空间局部性,依据构件实例复用频度的差异,将具有高复用频度的实例分离出来形成(半)实例化构件,以降低构件复用过程中的实例化成本与实现成本.进而提出一种基于贪心策略的构件实例分解算法实现近似最优化,并通过实例验证其有效性.该方法通过将构件特征间依赖关系分解为构件实例间依赖关系,将构件的部分实例化工作由复用阶段提前到设计阶段来完成,将若干可变特征转化为固定特征,从而避免了构件频繁复用时的多次实例化,以降低复用成本.
During the whole lifecycle of component reuse, it is necessary for designers to continuously re-design and refactor components to improve usability, e.g., reuse cost, reuse efficiency, etc, under the guarantee of high usefulness. For this purpose, this paper presents a reuse cost optimization oriented, locality principle and instance set decomposition based component refactoring method. A feature-oriented component model is firstly introduced, with emphasis on component reuse mechanism based on variation point. By analysis of the constituents of reuse cost, the optimization goal, i.e., increasing the proportion of fixed part of a component, is put forward. Then, the temporal and spatial locality in component reuse process is analyzed elaborately, and according to the reuse frequency of each component instance, those instances with higher reuse frequency are separated out to form (semi-)instantiated independent components, so as to decrease the instantiation cost and implementation cost during reuse process. A greedy strategy based component instance set decomposition algorithm is proposed and validated by a practical case. This method may bring some instantiation tasks forward to component design phase instead of in practical reuse phase and transform some variable features into fixed ones by decomposing the dependencies between components into dependencies between component instances, therefore avoiding multiple instantiations during frequent reuse to decrease reuse cost.
出处
《软件学报》
EI
CSCD
北大核心
2005年第12期2157-2165,共9页
Journal of Software
基金
国家自然科学基金
国家高技术研究发展计划(863)
国家教育部博士点基金~~
关键词
软构件
构件重构
复用成本
构件实例分解
software component
component refactoring
reuse cost
component instance decomposition