[gme-users] Metamodeling and libraries
Simon Görke
simon.goerke at ils.uni-stuttgart.de
Mon Sep 10 07:06:16 CDT 2012
Hi there,
I have a metamodelling task, where several entities in different metamodels
share the same set of attributes. The metamodels define the sources resp.
destinations for a GREAT-transformation. As the instances are rather
comprehensive, the metamodels are realized as individual gme projects (i.e.
in individual mga-files).
Regarding the identical attributes, I tried to insure consistency between
the *.mgas using gme's library capability as follows:
A library "Lib1" defines an (abstract) FCO with the list of all shared
attributes. The idea was to "attach" this library to the other *.mgas, paste
the FCO "as reference" and inherit the attributes from it. So the FCO works
as a kind of "global type definition".
My problem occurs, when I try to use the *.mgas that import Lib1 as
libraries themselves, i.e.
- entites in two libraries, Lib2 and Lib3, inherit from the Lib1-FCO
- a fourth *.mga-file attaches Lib2 AND Lib3 and makes use of Lib2- resp.
Lib3-entities.
/---Lib2 (lib1 attached)--\
Lib1 < >--test.mga(has Lib2 und Lib3 attached)
\---Lib3 (lib1 attached)--/
When running the metainterpreter, I get
"error occurred while registering new paradigm: Invalid MetaRef :Invalid
MetaRef: in file test.xmp at line xx"
At this position, I find an (identical) repetition of the definition of one
of the FCO's attributes:
<attrdef name="BusSpeed" metaref = "3070" valuetype = "enum" defvalue =
"1000">
<enumitem dispname = "250" value = "250"></enumitem>
<enumitem dispname = "500" value = "500"></enumitem>
<enumitem dispname = "1000" value = "1000"></enumitem>
</attrdef>
<attrdef name="BusSpeed" metaref = "3070" valuetype = "enum" defvalue =
"1000">
<enumitem dispname = "250" value = "250"></enumitem>
<enumitem dispname = "500" value = "500"></enumitem>
<enumitem dispname = "1000" value = "1000"></enumitem>
</attrdef>
Sorry for the longish description, but is there a way of insuring identical
attributes of FCOs in different *.mgas? Regarding the attributes, my
transformations are identity-functions which become a lot easier when
identity is structurally guaranteed.
Best regards
Simon
More information about the gme-users
mailing list