统一过程和 UML 混淆

发布于 2024-07-25 07:57:45 字数 1042 浏览 7 评论 0原文

我对统一建模语言 (UML) 与 (R)UP 以及其他 OOA/D 方法论所认可的不同建模视角(概念、规范和实现)之间的关系有点不确定。

据我了解,使用相同符号的相同类型的图表可能具有不同的含义,具体取决于所使用的视角*。 例如,类图可以从概念角度表示现实世界系统/现象的抽象,并且当稍后将角度更改为规范/实现时,类图用于抽象计算机程序的构造。

问题:

1) 据我了解,UML 类图一般存在某些规则。 例如,一个类可以扩展另一个类,但它不能扩展关联。 类图的实体以及它们如何关联的规则在哪里定义? 这一切都发生在 UML 元建模架构的 M2 层 (参见元模型架构的维基百科图示)

2)一个相关问题。 在我看来,特定图的一般规则跨越建模视角(同样,类扩展关联是荒谬的),但不同的建模视角会将某些含义叠加到特定类型的图上。 例如,领域模型的类图中的关联(概念角度)本质上是双向的,而在设计模型的类图中(规范/实现角度)它可以是双向或单向的。

在刚刚描述的场景中,叠加的规则限制了关联的属性。 由视角叠加的规则将始终是 uml 元模型定义的规则的子集/限制而不是超集,这是一个正确的假设吗?

这些规则/限制是由视角定义的形式化的吗 ? (以类似于元模型的方式)或者它们仅仅是 OOA/D 文献中描述的约定?

* 视角在第 10.8 段中进行了解释:http://books.google.co.uk /books?id=r8i-4En_aa4C&printsec=frontcover&hl=da&source=gbs_v2_summary_r&cad=0

Im a bit uncertain about the relation between the Unified Modeling Language (UML) and the different modelling perspectives (conceptual, specification and impelementation) endorsed by (R)UP among other OOA/D methodologies.

From what I understand the same type of diagram using the same notation can have different meaning depending on the perspective* being used. For instance the class diagram can represent an abstraction of real world systems / phenomena in the conceptual perspective and when perspective is later changed to specification/implementation the class diagram is used to abstract constructs of a computer program.

Questions:

1) It is my understanding that certain rules exist for a UML class diagram in general. For instance that a class can extend another class but that it can't extend an association. Where are the entities of the class diagram and the rules about how they can relate defined? Does it all take place at the M2 layer in the UML metamodeling architecture
(see wikipedias illustratio of metamodel architecture)?

2) A related question. The way I see it, the general rules for a specific diagram span the modelling perspectives (again, it is absurd for a class to extend an association), but the different modelling perspectives will superimpose certain meaning to a particular type of diagram. For instance an association in the class diagram of the domain model (conceptual perspective) will inherently be bidirectional whereas it can be either bi- or unidirectional in the class diagram of the design model (specification / implementation perspective).

In the scenario just described the rule superimposed limits the properties of an association. Is it a correct assumption that rules superimposed by perspectives will always be a subset/limitation of the rules defined by the uml metamodel and never a superset?

Are these rules/limitations defined by the perspectives formalized (in a way similar to the metamodel) or are they mere conventions described in the OOA/D litterature?

* Perspectives are explained in paragraph 10.8: http://books.google.co.uk/books?id=r8i-4En_aa4C&printsec=frontcover&hl=da&source=gbs_v2_summary_r&cad=0

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

や三分注定 2024-08-01 07:57:46

1)你的第一个问题很清楚。 您正在寻找的规则称为“元模型”。 是的,它们被记录为 OMG(基本上是 UML 的创建者)所说的“MOF”或“元对象工具”。 这是 OMG 标准。

2)你的第二个问题有点令人困惑。 我会尝试在这里回答。 图表只是底层模型的视图。 如果您愿意,该模型是包罗万象的。 但图表不是。 您提到的观点与图表有关。 但其背后的模型是多视角的,即所有元素形成一个连接的网格,没有孤立的“孤岛”。 这有道理吗? :-)

1) Your first question is quite clear. The rules that you are looking for are called a "metamodel". And yes, they are documented as what the OMG (the creators of UML, basically) call "MOF" or "meta-object facility". It is an OMG standard.

2) Your second question is a bit more confusing. I'll try to answer here. Diagrams are just views on an underlying model. The model is overarching and all-encompassing, if you wish. But diagrams are not. The perspectives that you mention are related to diagrams. But the model that underlies is multi-perspective, in the sense that all the elements form a connected mesh, without isolated "islands". Does this make sense? :-)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文