[great-users] Type Inheritance with GReAT

Daniel Balasubramanian daniel at isis.vanderbilt.edu
Fri May 15 15:57:59 CDT 2009


Gurkan,

There's not a way using the graphical part of the language, but it can still be accomplished in the following way:

(1): Create a new element (call it X) in some rule.
(2): Match X in a subsequent rule, along with the element Y in which you want to create instances (or subtypes) of X.  Next, drag an AttributeMapping block into the rule.  In the AttributeMapping block, you have access to both the variables bound to X and Y, so you can write a line such as:
X.CreateInstance(Y); //create an instance of X in Y

Hope this helps,
Daniel

-----Original Message-----
From: great-users-bounces at list.isis.vanderbilt.edu on behalf of Gürkan Özhan
Sent: Thu 5/14/2009 5:50 PM
To: great-users
Subject: [great-users] Type Inheritance with GReAT
 
Dear GReAT Community,
   Is there a way to create subtypes or instances of model elements in
GReAT? For example we may newly create an element in a rule and then
in a subsequent rule we may want to create an instance of that
previously created element. This is a powerful mechanism to use in our
transformations,,,

Best regards,

Gurkan Ozhan
_______________________________________________
great-users mailing list
great-users at list.isis.vanderbilt.edu
http://list.isis.vanderbilt.edu/mailman/listinfo/great-users




More information about the great-users mailing list