You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

关于UML 2.5.1中StructuredClassifier的/role属性预期派生逻辑的技术问询

关于UML 2.5.1中StructuredClassifier的/role属性预期派生逻辑的技术问询

在UML 2.5.1规范PDF的第275页,StructuredClassifier章节下的11.8.15.5“Association Ends”和11.8.15.6“Operations”部分,我看到了两个关键定义:

1. /role 属性定义

• /role : ConnectableElement [0..*]{union, subsets Namespace::member} (opposite A_role_structuredClassifier::structuredClassifier)
The roles that instances may play in this StructuredClassifier.

2. allRoles() 操作定义

• allRoles() : ConnectableElement [0..*]
All features of type ConnectableElement, equivalent to all direct and inherited roles.

body: allFeatures()->select(oclIsKindOf(ConnectableElement)) ->collect(oclAsType(ConnectableElement))->asSet()

我现在的核心疑问是:/role作为一个派生属性,但规范里却没有给出对应的OCL实现逻辑。对比之下,allRoles()明确会返回自有和继承的所有角色,但我个人推测/role应该不包含父类的Features(也就是不会返回allFeatures()里来自父类的那些元素)。另外它声明了subsets Namespace::member,这意味着它可能包含某些导入的元素,但具体的派生逻辑到底是什么呢?

备注:内容来源于stack exchange,提问作者Robert Hairgrove

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.15 13:38:16