<br><font size=2 face="sans-serif">Hi all, </font>
<br>
<br><font size=2 face="sans-serif">Mat, Attila and Kitty have raised a
good issue. The issue of instances and subtypes being implicit and special.</font>
<br>
<br><font size=2 face="sans-serif">In the past we have had several discussions
about it and I will try to summarize the key points.</font>
<br>
<br><font size=2 face="sans-serif">1. In GME instance and subtypes are
inherent. This feature is embedded deeply in the underlying modeling framework.
A change to GME's metamodeling environment alone will not solve this problem.
We will have to go and redo its implementation.</font>
<br>
<br><font size=2 face="sans-serif">2. In GME Instances and subtype are
defined at &nbsp;<b>&quot;creation time&quot;</b> of FCO's (is part of
the constructor) and this attribute/relationship <b>cannot be modified
or removed</b>. For this reason UDM cannot view these relationships/attributes
as regular UML relationship and attribute. In UML relationships are created
after the object is created and can be removed/modified. The correct way
to do this would be to define on top of UML this notion of creating relationship
at creation of node time as well as unmodifiable relationships/attributes.
Since this was more work and required an extension of UML semantics we
did it using the GME way. That is having it implicit and hard-coded in
the implementation. </font>
<br>
<br><font size=2 face="sans-serif">3. One solution we had thought of but
never got around to implementing in GReAT was to provide an abstraction
that the user can deal with. (JIRA GRT-26). http://escher.isis.vanderbilt.edu/JIRA/browse/GRT-26</font>
<br>
<br><font size=2 face="sans-serif">The idea was to introduce implicit simple
associations. These simple associations won't be drawn in the UML diagram
but can be used in GReAT rules. Simple associations for instance and subtype
can be used in the pattern and GReAT's pattern matcher will know these
special role names and deal with them appropriately. If any of the GReAT
team members have time now they may want to implement this feature.</font>
<br>
<br><font size=2 face="sans-serif">Thanks,</font>
<br><font size=2 face="sans-serif">Adi</font>
<br>
<br>
<br><font size=2 face="sans-serif">-----------------------------------<br>
Aditya Agrawal<br>
Researcher<br>
IBM T. J. Watson<br>
mailto:aagrawa@us.ibm.com<br>
+1 (914) 784-6068 (TL 863)<br>
</font>
<br>
<br><font size=2><tt>udm-users-bounces@list.isis.vanderbilt.edu wrote on
05/05/2005 01:14:32 PM:<br>
<br>
&gt; <br>
&gt; Archetype-instance relationships are not modeled. They are not modeled
in &nbsp;<br>
&gt; GME, either - you can subtype/instantiate any object without specifying
&nbsp;<br>
&gt; this relationship in the metamodel. Same in UDM - you can &nbsp;<br>
&gt; subtype/instantiate any UDM object.<br>
&gt; It is a relationship which is available between objects of the same
type.<br>
&gt; <br>
&gt; Endre<br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; On Thu, 5 May 2005 11:29:36 -0500, Attila Vizhanyo &nbsp;<br>
&gt; &lt;viza@isis.vanderbilt.edu&gt; wrote:<br>
&gt; <br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp;-----Original Message-----<br>
&gt; &gt; &nbsp; &nbsp;From: great-users-bounces@list.isis.vanderbilt.edu<br>
&gt; &gt; [mailto:great-users-bounces@list.isis.vanderbilt.edu] On Behalf
Of<br>
&gt; &gt; Attila Vizhanyo<br>
&gt; &gt; &nbsp; &nbsp;Sent: Thursday, May 05, 2005 11:28<br>
&gt; &gt; &nbsp; &nbsp;To: great-users<br>
&gt; &gt; &nbsp; &nbsp;Subject: RE: [great-users] matching archetypes<br>
&gt; &gt; &nbsp; &nbsp;<br>
&gt; &gt; &nbsp; &nbsp;<br>
&gt; &gt; &nbsp; &nbsp;Frankly I don't know why the archetype-instance
relationship is<br>
&gt; &gt; missing from the Udm UML class diagrams.<br>
&gt; &gt; &nbsp; &nbsp;Either we simply overlooked this, or there must
be a good reason<br>
&gt; &gt; for UDM supporting it in a special way..<br>
&gt; &gt; &nbsp; &nbsp;Perhaps Endre (and Adi?) can enlighten us..<br>
&gt; &gt; &nbsp; &nbsp;<br>
&gt; &gt; &nbsp; &nbsp;-----Original Message-----<br>
&gt; &gt; &nbsp; &nbsp;From: great-users-bounces@list.isis.vanderbilt.edu<br>
&gt; &gt; [mailto:great-users-bounces@list.isis.vanderbilt.edu] On Behalf
Of<br>
&gt; &gt; Matthew J. Emerson<br>
&gt; &gt; &nbsp; &nbsp;Sent: Thursday, May 05, 2005 11:21<br>
&gt; &gt; &nbsp; &nbsp;To: great-users<br>
&gt; &gt; &nbsp; &nbsp;Subject: RE: [great-users] matching archetypes<br>
&gt; &gt; &nbsp; &nbsp;<br>
&gt; &gt; &nbsp; &nbsp;<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; So then I need a pattern I can match to
find an<br>
&gt; &gt; archetype, such as:<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; <br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; <br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; <br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; Although this relationship does exists in
the input<br>
&gt; &gt; model (otherwise, we couldn't find an instance's archetype in
an<br>
&gt; &gt; AttributeMapping block) it isn't captured in the UML. The only
thing to<br>
&gt; &gt; do is to build it up by hand using a set of rules, i.e. find
every<br>
&gt; &gt; class, if it is an instance search every other class until you
find it's<br>
&gt; &gt; archetype, then create the connection pictured above.<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; <br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; Could the archetype-instance relationship
be captured by<br>
&gt; &gt; the UML instead, in the same way that the reference-referent<br>
&gt; &gt; relationship is captured? Since archetypes and instances don't
appear in<br>
&gt; &gt; the meta-metamodel and the relationship isn't specified in the<br>
&gt; &gt; metamodel, then I guess we could use the MGAObject entity from
which<br>
&gt; &gt; every class in a GReAT UML class diagram inherits:<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; <br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; <br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; <br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; Then when you try to match the relationship
in a rule,<br>
&gt; &gt; the Pattern Matcher just uses those UDM methods which deal with<br>
&gt; &gt; instances and archetypes to try and complete the match.<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; <br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; Could it be done? It would make my transformation
much<br>
&gt; &gt; more efficient.<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; <br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; --Matt<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; <br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; <br>
&gt; &gt; &nbsp; _____<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; From: great-users-bounces@list.isis.vanderbilt.edu<br>
&gt; &gt; [mailto:great-users-bounces@list.isis.vanderbilt.edu] On Behalf
Of<br>
&gt; &gt; Attila Vizhanyo<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; Sent: Thursday, May 05, 2005 11:08 AM<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; To: great-users<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; Subject: RE: [great-users] matching archetypes<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; <br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &gt;Is it also possible to pass objects
to an output port<br>
&gt; &gt; of a GReAT rule from within an Attribute Mapping block?<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; No. You can't do that. You can pass along
model objects<br>
&gt; &gt; found by the pattern matcher only.<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; You can specify a pattern only using classes
and<br>
&gt; &gt; relations specified in the UML class diagram of your domain(s)..<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; <br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-----Original Message-----<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;From:<br>
&gt; &gt; great-users-bounces@list.isis.vanderbilt.edu<br>
&gt; &gt; [mailto:great-users-bounces@list.isis.vanderbilt.edu] On Behalf
Of<br>
&gt; &gt; Matthew J. Emerson<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Sent: Thursday, May 05, 2005
11:02<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;To: great-users<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Subject: [great-users] matching
archetypes<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;I would like to construct a
GReAT rule which<br>
&gt; &gt; takes as input a class and then if the input is a GME type-instance<br>
&gt; &gt; outputs the instance's archetype using the normal GReAT data
flow ports.<br>
&gt; &gt; Then, in a rule further downstream, I could bind to the archetype
and do<br>
&gt; &gt; things with it.<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;I know that it's possible to
find the archetype<br>
&gt; &gt; of a GME type-instance using the UDM APIs in side of an AttributeMapping<br>
&gt; &gt; block. Is it also possible to pass objects to an output port
of a GReAT<br>
&gt; &gt; rule from within an Attribute Mapping block?<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Matt Emerson<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ISIS-Vanderbilt University<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>
&gt; &gt;<br>
&gt; <br>
&gt; <br>
&gt; _______________________________________________<br>
&gt; udm-users mailing list<br>
&gt; udm-users@list.isis.vanderbilt.edu<br>
&gt; http://list.isis.vanderbilt.edu/mailman/listinfo/udm-users<br>
</tt></font>