[great-users] matching archetypes

Aditya Agrawal aagrawa at us.ibm.com
Thu May 5 16:01:14 CDT 2005


Hi all, 

Mat, Attila and Kitty have raised a good issue. The issue of instances and 
subtypes being implicit and special.

In the past we have had several discussions about it and I will try to 
summarize the key points.

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.

2. In GME Instances and subtype are defined at  "creation time" of FCO's 
(is part of the constructor) and this attribute/relationship cannot be 
modified or removed. 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. 

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

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.

Thanks,
Adi


-----------------------------------
Aditya Agrawal
Researcher
IBM T. J. Watson
mailto:aagrawa at us.ibm.com
+1 (914) 784-6068 (TL 863)


udm-users-bounces at list.isis.vanderbilt.edu wrote on 05/05/2005 01:14:32 
PM:

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


More information about the great-users mailing list