在软件体系结构(software architecture,简称SA)设计中,复合构件是具有内部结构的构件,它可以对复杂的SA模型进行层次化的组织.尽管大多数体系结构描述语言都支持复合构件,但常见的SA模型分析与验证工具仅支持单层的SA模型作为输入,且目前的主流构件运行平台都不支持带有内部结构的复合构件模型.因此,有必要将多层的SA模型转化为单层的SA模型(即“单层化”).“单层化”的关键在于如何保证“单层化”前后SA模型的一致性.对该问题及其解决方案进行了系统而深入的研究,给出了SA模型一致性的形式化定义.在此基础上,提出了SA模型“单层化”的基本原则以及过程指南,并以一个构件化的邮件客户端为例,验证了该方法的可行性.
Composite components are components that have internal structures. Supported by almost all architecture description languages, composite components can organize architectural models in a hierarchical structure. However, most analysis and verification tools for SA model do not support composite components, neither do most component frameworks. Therefore, it is necessary to flatten the hierarchical SA model so that SA can play a more important role in practice. The most challenging issue in the flattening is how to assure the consistency between architectural models with and without composite components. In this paper, a formal definition of the consistency of an SA model is presented. Based on that, principles and guidelines for consistency assurance in flattening a hierarchical SA model are provided. Their feasibility is exemplified by a componentized email client.