<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 <b>"creation time"</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>
> <br>
> Archetype-instance relationships are not modeled. They are not modeled
in <br>
> GME, either - you can subtype/instantiate any object without specifying
<br>
> this relationship in the metamodel. Same in UDM - you can <br>
> subtype/instantiate any UDM object.<br>
> It is a relationship which is available between objects of the same
type.<br>
> <br>
> Endre<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> On Thu, 5 May 2005 11:29:36 -0500, Attila Vizhanyo <br>
> <viza@isis.vanderbilt.edu> wrote:<br>
> <br>
> ><br>
> > -----Original Message-----<br>
> > From: great-users-bounces@list.isis.vanderbilt.edu<br>
> > [mailto:great-users-bounces@list.isis.vanderbilt.edu] On Behalf
Of<br>
> > Attila Vizhanyo<br>
> > Sent: Thursday, May 05, 2005 11:28<br>
> > To: great-users<br>
> > Subject: RE: [great-users] matching archetypes<br>
> > <br>
> > <br>
> > Frankly I don't know why the archetype-instance
relationship is<br>
> > missing from the Udm UML class diagrams.<br>
> > Either we simply overlooked this, or there must
be a good reason<br>
> > for UDM supporting it in a special way..<br>
> > Perhaps Endre (and Adi?) can enlighten us..<br>
> > <br>
> > -----Original Message-----<br>
> > From: great-users-bounces@list.isis.vanderbilt.edu<br>
> > [mailto:great-users-bounces@list.isis.vanderbilt.edu] On Behalf
Of<br>
> > Matthew J. Emerson<br>
> > Sent: Thursday, May 05, 2005 11:21<br>
> > To: great-users<br>
> > Subject: RE: [great-users] matching archetypes<br>
> > <br>
> > <br>
> ><br>
> > So then I need a pattern I can match to
find an<br>
> > archetype, such as:<br>
> ><br>
> > <br>
> ><br>
> > <br>
> ><br>
> > <br>
> ><br>
> > Although this relationship does exists in
the input<br>
> > model (otherwise, we couldn't find an instance's archetype in
an<br>
> > AttributeMapping block) it isn't captured in the UML. The only
thing to<br>
> > do is to build it up by hand using a set of rules, i.e. find
every<br>
> > class, if it is an instance search every other class until you
find it's<br>
> > archetype, then create the connection pictured above.<br>
> ><br>
> > <br>
> ><br>
> > Could the archetype-instance relationship
be captured by<br>
> > the UML instead, in the same way that the reference-referent<br>
> > relationship is captured? Since archetypes and instances don't
appear in<br>
> > the meta-metamodel and the relationship isn't specified in the<br>
> > metamodel, then I guess we could use the MGAObject entity from
which<br>
> > every class in a GReAT UML class diagram inherits:<br>
> ><br>
> > <br>
> ><br>
> > <br>
> ><br>
> > <br>
> ><br>
> > Then when you try to match the relationship
in a rule,<br>
> > the Pattern Matcher just uses those UDM methods which deal with<br>
> > instances and archetypes to try and complete the match.<br>
> ><br>
> > <br>
> ><br>
> > Could it be done? It would make my transformation
much<br>
> > more efficient.<br>
> ><br>
> > <br>
> ><br>
> > --Matt<br>
> ><br>
> > <br>
> ><br>
> > <br>
> > _____<br>
> ><br>
> ><br>
> > From: great-users-bounces@list.isis.vanderbilt.edu<br>
> > [mailto:great-users-bounces@list.isis.vanderbilt.edu] On Behalf
Of<br>
> > Attila Vizhanyo<br>
> > Sent: Thursday, May 05, 2005 11:08 AM<br>
> > To: great-users<br>
> > Subject: RE: [great-users] matching archetypes<br>
> ><br>
> > <br>
> ><br>
> > >Is it also possible to pass objects
to an output port<br>
> > of a GReAT rule from within an Attribute Mapping block?<br>
> ><br>
> > No. You can't do that. You can pass along
model objects<br>
> > found by the pattern matcher only.<br>
> ><br>
> > You can specify a pattern only using classes
and<br>
> > relations specified in the UML class diagram of your domain(s)..<br>
> ><br>
> > <br>
> ><br>
> > -----Original Message-----<br>
> > From:<br>
> > great-users-bounces@list.isis.vanderbilt.edu<br>
> > [mailto:great-users-bounces@list.isis.vanderbilt.edu] On Behalf
Of<br>
> > Matthew J. Emerson<br>
> > Sent: Thursday, May 05, 2005
11:02<br>
> > To: great-users<br>
> > Subject: [great-users] matching
archetypes<br>
> ><br>
> > I would like to construct a
GReAT rule which<br>
> > takes as input a class and then if the input is a GME type-instance<br>
> > outputs the instance's archetype using the normal GReAT data
flow ports.<br>
> > Then, in a rule further downstream, I could bind to the archetype
and do<br>
> > things with it.<br>
> ><br>
> > <br>
> ><br>
> > I know that it's possible to
find the archetype<br>
> > of a GME type-instance using the UDM APIs in side of an AttributeMapping<br>
> > block. Is it also possible to pass objects to an output port
of a GReAT<br>
> > rule from within an Attribute Mapping block?<br>
> ><br>
> > <br>
> ><br>
> > Matt Emerson<br>
> ><br>
> > ISIS-Vanderbilt University<br>
> ><br>
> > <br>
> ><br>
> <br>
> <br>
> _______________________________________________<br>
> udm-users mailing list<br>
> udm-users@list.isis.vanderbilt.edu<br>
> http://list.isis.vanderbilt.edu/mailman/listinfo/udm-users<br>
</tt></font>