Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
OCL 是否意味着要与复合结构图结合使用?
还是没有意义?如果有意义,有人可以给出一个可能的 OCL 约束的快速示例,例如基于此示例图源吗?
UML 特别提到了这种情况(规范的第 7.6 节)
约束本身可以附加到任何类型的 UML Element,或者实际上是元素的集合。
Element
最后:
7.2.1 元素和关系的根概念为 UML 中的所有其他建模概念提供了基础。
7.2.1
元素和关系的根概念为 UML 中的所有其他建模概念提供了基础。
这意味着您可以为任何内容添加约束。