Abstract:
Since there is no precise mapping mechanism between modeling languages and programming languages, the existence of UML binary relationships causes many difficulties in transforming automatically from design into implementation. The key part of the solution to this problem lies in how to define a normalization method to implement UML binary relationships precisely in programming languages. This paper centers on the definition problem of UML binary relationships. Based on four fundamental attributes, it presents formalization definitions of association, aggregation and composition relationships. Normalization patterns to implement these relationships in C++ are also provided.
Key words:
Binary relationships,
Association,
Aggregation,
Composition,
UML
摘要: 由于建模语言和程序设计语言之间缺乏准确的映射机制,UML二元关系的存在为设计到实现的自动转换造成了许多困难。解决问题的关键在于如何定义一种规范化的方法,用于在程序设计语言中准确地实现UML二元关系。该文围绕UML二元关系的定义问题,从4种基本属性出发,提出关联、聚合与组合关系的形式化定义,并给出在C++中实现这些关系的规范化模式。
关键词:
二元关系,
关联,
聚合,
组合,
UML
CLC Number:
WANG Xin; YUAN Xiaojie. Normalization Method to Implement UML Binary Relationships[J]. Computer Engineering, 2006, 32(21): 79-81.
王 鑫;袁晓洁. 实现UML二元关系的规范化方法[J]. 计算机工程, 2006, 32(21): 79-81.