[great-users] Will this work or crash?

Attila Vizhanyo viza at isis.vanderbilt.edu
Tue Jun 15 11:06:16 CDT 2004


Those objects which are marked deleted twice are deleted only once in
the generated code. So it is not a problem. The same goes for the GR
Engine, I believe.

-Attila


The second question was regarding the different matches. In this case
once an object is deleted and it is tried to be deleted again, GReAT
should ignore it. Feng and Attila could you please say if this is the
current behavior of GRE and CG.

Thanks,
Adi

> 
> Please have a look at the rule in attachment.
> 
> With that rule I want to eliminate all the "Requirement" elements
except
> one.
> 
> This is the Guard implementation:
> ---------
> if (Requirement1.uniqueId() == Requirement2.uniqueId()) return false;
> else return true;
> --------
> First of all, I'm not totally sure that such guard is needed. I don't
> know if it's possible that Requirement1 and Requirement2 will match
the
> same Requirement.
> 
> Secondarily:
> I suppose that the rule will generate all possible combinations of
> Requirement1 and Requirement2. But if all the matches are generated at
> the beginning, then since for each execution of the rule I will
destroy
> some element, at a certain point I suspect that in another execution
of
> the rule an element will be matched but that's one of those that I
have
> already destroyed! Then it might crash or behave erratically.
> Is GReAT safe regarding this?
> 
> BTW My transformation appears to work regarding this, but I haven't
> really put this rule into test and it's difficult to try this right
now.
> 
> 
> Otherwise which GReAT algorithm do you suggest for 'uniquizing' one
> element? (an AttributeMapping snippet could be good as well)
_______________________________________________
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