关于UML 2.5.1中ConnectorEnd约束role_and_part_with_port的正确性疑问
UML 2.5.1规范中
role_and_part_with_port约束的修正疑问 UML 2.5.1规范第271页对role_and_part_with_port约束的定义如下:
11.8.11.6 - Constraints role_and_part_with_port --- 如果ConnectorEnd引用了partWithPort,那么role必须是由partWithPort的类型定义或继承的Port。 --- inv: partWithPort->notEmpty() implies (role.oclIsKindOf(Port) and partWithPort.type.oclAsType(Namespace).member->includes(role))
经核查,partWithPort及其type均未继承自Namespace,而partWithPort的类型Property具备namespace成员特性。请问该约束是否应修改为如下形式?
inv: partWithPort->notEmpty() implies (role.oclIsKindOf(Port) and partWithPort.namespace.member->includes(role))
内容的提问来源于stack exchange,提问作者Robert Hairgrove
相关产品推荐
相关产品推荐

