Is it possible to generate parts of a meta model from upper layer?

时间:2017-06-12 17:00:33

标签: uml class-diagram metamodel meta-object-facility

based on the four layer MOF structure, I'm currently working on a model (in fact a UML class diagram) at M1 level. However, I observed that some parts of the meta model are highly depending on references to certain classes, which may may differ depending on the use case. Therefore, I created a meta model on the M2 level, which allows users to define the variable parts of the M1 Model, which again can then be generated and incorpareted in the M1 model. The following images tries to depict that:

enter image description here

A resulting M1 model example would then look like that:enter image description here

As switching between the different levels can be a little bit confusing, I wonder if this approach is per se possible and UML conform? Furthermore, is there a notation for the "generated instances" relation in Figure 1 by chance? Within the MOF spec, <<merge>> or <<import>> is for example used, which maybe fit in for that purpose.

1 个答案:

答案 0 :(得分:0)

可能你的问题过于宽泛,无法给出简明的答案。然而,这是我在处理元模型时的建议:我发现人们几乎不知道为什么你需要一个元模型,并且需要相当长的时间来说服他们开始创建一个元模型。即使有所谓的UML专业人士。现在,在背景中,很明显,使用元模型的建模者可能在处理它时遇到更多困难。这只留下一种方式:保持简单。这就是我过去所做的。引入一个真正基本的元模型,专注于元类型,标记值和一些连接器。过了一段时间,人们真的习惯了它,并欣赏使用元模型。只有这样才开始需要切换到版本2,但仍然是静态的。

现在,你想要的东西看起来像九十九版。这可能只适用于一个超级模型,在这个模型中,你有一些浮雕在它上面,所有这些都提供了元元模型。这将是有趣的,我想成为该团队的一员。但是,我怀疑你能从中获得切实可行的结果。我的建议是你保持静态元模型。其他一切都可能导致你无处可去。