为系统构建模型是软件开发中的一项关键活动.一个高质量的模型不仅要包含系统的功能属性,即系统能够做什么,同时还应包含系统的非功能属性,即系统的质量如何.目前,通用的建模方法和工具对功能属性建模支持良好,而对如何为非功能属性建模关注得不多,特别是如何将二者统一起来并对描述的非功能属性的有关性质进行检验.通过在UML类图中增加非功能属性标注和约束关系表等建模元素来扩展UML类图,使其能够描述非功能属性.在此基础上,又提供了对扩展UML类图中非功能属性的一致性和可满足性进行检验的方法.通过实例对上述的面向非功能属性的建模和检验方法进行了说明,并介绍了相应的支持工具.
Modeling for a system is a very important activity in software development. A model with high quality should not only include the description of functional attributes of the system, i.e., what the system can do, but also the description of non-functional attributes, i.e., what is the quality of the system. Although the de facto modeling approaches and tools adequately support modeling for the functional attributes, they neglect modeling for the non-functional attributes, especially, on how to integrate the description of the functional and non-functional attributes in one model and provide methods to verify some properties about the non-functional attributes. In the paper, UML Class Diagram is extended to describe the non-functional attributes by adding the model elements, i.e., the non-functional attributes notation and the constraints table. An approach is given to verify the consistency and satisfiability of the non-functional attributes in the extended UML Class Diagram. An example is used to demonstrate our proposal and a tool that supports the description and verification of non-functional attributes in UML is introduced.