面向对象的软件设计改进是增强系统的可扩展性、使之适应可能的需求变化的一种有效手段.提出一种基于CBR(case based reasoning)和微体系结构反模式的设计改进方法.该方法形式化地定义了在微体系结构层中不灵活的设计结构和相应的重构方案的描述方法,研究了它们在事例库中的组织和索引机制.根据基于事例的推理技术的4R过程,提出了类图、顺序图、质量要素和语义约束的相似性度量方法,描述了在给定设计中识别反模式及其实例,并在此基础上,用高质量的设计方案进行替代的几种算法.以该方法为依据,进一步介绍了设计改进支撑系统——CBDIT(CBR based design improving tool)的体系结构的设计.
Object-Oriented software design improving technology is an effective means to increase system flexibility for adapting to future requirement variation and expansion. In this paper, a software design improving approach, based on micro-architecture anti-pattern and case quality and maintainability. In this approach, problematic, based reasoning, is presented to improve software inflexible structures and corresponding refactoring alternatives at micro-architecture level are formally defined and described as cases. Their organization and index mechanism in the case base are studied. Following the 4R procedures of CBR, similarity measurement methods on class diagrams, sequence diagrams, OO quality metric factors, and semantic constraints are discussed. Based on the measurement results, some algorithms on identifying anti-patterns instances in a given original design and replacing them by designs with high quality are presented. Furthermore, a supporting system CBDIT is developed to aid this approach.