[gme-users] Metamodeling and libraries

Kevin Smyth ksmyth at isis.vanderbilt.edu
Tue Sep 11 09:44:36 CDT 2012


How are the libraries arranged? As I understand, test.mga attaches lib2 and lib3. Lib2 attaches lib1, and lib3 attaches lib1. If this is the case, then the project contains lib1 twice. The MetaInterpreter will see lib1's object multiple times, which is disallowed.

Kevin

-----Original Message-----
From: gme-users-bounces at list.isis.vanderbilt.edu [mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf Of Simon Görke
Sent: Monday, September 10, 2012 7:06 AM
To: gme-users
Subject: [gme-users] Metamodeling and libraries

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
 

_______________________________________________
gme-users mailing list
gme-users at list.isis.vanderbilt.edu
http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users


More information about the gme-users mailing list